-
Zitat von Lehona
That is not what I asked. Does it still crash when you comment out "STR_IndexOf(MEM_GetCommandLine(), "-GAME:")+6"? Does MEM_GetCommandLine() crash? Or STR_IndexOf()? Does it only crash during saving the game or would those functioncalls crash even when called "normally"?
I sense hostility attitude...
It crash even when called normally.
STR_IndexOf() does that.
This is the rest of the code:
Code:
func string _BIN_GetSavefilePath(var int slot) {
var string path;
var string cmd; cmd = MEM_GetCommandLine();
var string _BIN_ini;
if(!STR_len(_BIN_ini)) {
_BIN_ini = STR_SubStr(cmd, STR_IndexOf(cmd, "-GAME:")+6, STR_Len(cmd)-6);
_BIN_ini = STR_Split(_BIN_ini, ".", 0);
};
if(Hlp_StrCmp(_BIN_ini, "GOTHICGAME") || (Hlp_StrCmp(_BIN_ini, ""))) {
path = "saves";
}
else {
path = ConcatStrings("saves_", _BIN_ini);
};
if(slot) {
path = ConcatStrings(path, "/savegame");
path = ConcatStrings(path, IntToString(slot));
}
else {
path = ConcatStrings(path, "/quicksave");
};
path = ConcatStrings(path, "/SCRPTSAVE.SAV");
return path;
};
Geändert von hatrez123 (26.03.2015 um 15:39 Uhr)
-
I'm sorry, but "remote debugging" is very infuriating, especially when we're not exactly on the same wavelength. I sometimes assume too much and explain too little.
Also, if the crash occurrs in STR_IndexOf() (as you've said), then the LeGo code has nothing to do with it. As for now I can see nothing wrong with STR_IndexOf() (it's not even version specific, i.e. it works the same for G1 and G2), what kind of crash do you get? Any additional information?
-
I would like to say that sometimes I also have a crash during load saved game.Then I will always found some extra lines in gothic.ini about resolution sets. I always delete it and it works till the next similar crash situation.
I advice to set Zsy to 10 while playing and make screenshots
HERE IS THE SCRIPT FOR G1, IT WORKS LEHONA & hATREZ , THANKS A LOT DUDES!
func void colorOneChoice() {
var oCInformationManager manager; manager = _^(MEMINT_oCInformationManager_Address);
var int choiceView; choiceView = manager.DlgChoice;
var zCArray arr; arr = _^(choiceView+172);
if (arr.array) {
var zCViewText2 txt; txt = _^(MEM_ReadIntArray(arr.array, 0));
txt.color = RGBA(255, 255, 0, 255);
};
return;
};
|I will try with DlgTrade to color the trade box too!
Geändert von pawbuj (26.03.2015 um 17:14 Uhr)
-
Zitat von Lehona
I'm sorry, but "remote debugging" is very infuriating, especially when we're not exactly on the same wavelength. I sometimes assume too much and explain too little.
I understand
Zitat von Lehona
Also, if the crash occurrs in STR_IndexOf() (as you've said), then the LeGo code has nothing to do with it. As for now I can see nothing wrong with STR_IndexOf() (it's not even version specific, i.e. it works the same for G1 and G2), what kind of crash do you get? Any additional information?
Crash occurrs when I try to find from MEM_GetCommandLine():
STR_IndexOf(MEM_GetCommandLine(), "-GAME:")
[Bild: 2sba22u.jpg]
Otherwise:
STR_IndexOf("Blah blah -GAME: blah blah", "-GAME:")
it works.
I think it would be better if we will not talk about things which have nothing to do with LeGo but it would be nice if we will finish this problem :P.
Geändert von hatrez123 (27.03.2015 um 17:31 Uhr)
-
Geändert von pawbuj (28.03.2015 um 20:16 Uhr)
-
Zitat von hatrez123
I understand
Crash occurrs when I try to find from MEM_GetCommandLine():
STR_IndexOf(MEM_GetCommandLine(), "-GAME:")
[Bild: 2sba22u.jpg]
Otherwise:
STR_IndexOf("Blah blah -GAME: blah blah", "-GAME:")
it works.
I think it would be better if we will not talk about things which have nothing to do with LeGo but it would be nice if we will finish this problem :P.
Have you printed MEM_GetCommandLine() to see if it actually contains "-GAME:"? Because STR_IndexOf returns -1 if if doesn't. Then you add 6, wich makes no sense in that case. Try:
Code:
[func string _BIN_GetSavefilePath(var int slot) {
var string path;
var string cmd; cmd = MEM_GetCommandLine();
var string _BIN_ini;
if(!STR_len(_BIN_ini) && STR_IndexOf(cmd, "-GAME:") != -1) {
_BIN_ini = STR_SubStr(cmd, STR_IndexOf(cmd, "-GAME:")+6, STR_Len(cmd)-6);
_BIN_ini = STR_Split(_BIN_ini, ".", 0);
};
if(Hlp_StrCmp(_BIN_ini, "GOTHICGAME") || (Hlp_StrCmp(_BIN_ini, ""))) {
path = "saves";
}
else {
path = ConcatStrings("saves_", _BIN_ini);
};
if(slot) {
path = ConcatStrings(path, "/savegame");
path = ConcatStrings(path, IntToString(slot));
}
else {
path = ConcatStrings(path, "/quicksave");
};
path = ConcatStrings(path, "/SCRPTSAVE.SAV");
return path;
};
-
Zitat von Diego93
Have you printed MEM_GetCommandLine() to see if it actually contains "-GAME:"? Because STR_IndexOf returns -1 if if doesn't. Then you add 6, wich makes no sense in that case. Try:
Code:
[func string _BIN_GetSavefilePath(var int slot) {
var string path;
var string cmd; cmd = MEM_GetCommandLine();
var string _BIN_ini;
if(!STR_len(_BIN_ini) && STR_IndexOf(cmd, "-GAME:") != -1) {
_BIN_ini = STR_SubStr(cmd, STR_IndexOf(cmd, "-GAME:")+6, STR_Len(cmd)-6);
_BIN_ini = STR_Split(_BIN_ini, ".", 0);
};
if(Hlp_StrCmp(_BIN_ini, "GOTHICGAME") || (Hlp_StrCmp(_BIN_ini, ""))) {
path = "saves";
}
else {
path = ConcatStrings("saves_", _BIN_ini);
};
if(slot) {
path = ConcatStrings(path, "/savegame");
path = ConcatStrings(path, IntToString(slot));
}
else {
path = ConcatStrings(path, "/quicksave");
};
path = ConcatStrings(path, "/SCRPTSAVE.SAV");
return path;
};
This is result when I printed out MEM_GetCommandLine():
[Bild: a4vq7d.png]
Code:
func void test() {
Print(MEM_GetCommandLine());
};
And this is log when I used your proposed version:
[Bild: 2qjvwja.png]
Geändert von hatrez123 (29.03.2015 um 07:51 Uhr)
-
Did you change any of the Ikarus code? Did you initialize Ikarus correctly with MEM_InitAll()?
This problem is most likely not related to LeGo. The second error is only natural since the value that should be in MEM_GetCommandLine() is missing. LeGo can't work properly without Ikarus.
-
No, I didn't change Ikarus' code and yes, I did initialize it correctly.
Just ZenEgine from G1 is so fackin worst and has more bugs than ZenEngine from G2.
It's infuriating.
-
Chances are, there is no CommandLine for Gothic 1. Maybe you can find the needed value inside the ocGame class or somewhere else?
-
@Lehona: Wie siehts denn jetzt mit den Framefunctions aus, hatteste Zeit dir das anzuschauen, wieso die im Savegame nicht notiert wurden?
-
Alright, I resolved the problem.
Code:
func string GetParmValue(var string str) {
CALL_zStringPtrParam(str);
CALl_RetValIszString();
CALL__thisCall(MEM_ReadInt(zoptions_Pointer_Address), 4586784);
return CALL_RetValAszString();
};
func string _BIN_GetSavefilePath(var int slot) {
var string path;
var string _BIN_ini;
if(!STR_len(_BIN_ini)) {
_BIN_ini = GetParmValue("GAME"); // Yea, I've lost a lot of time and patience to resolve crash during saving the game.
_BIN_ini = STR_Split(_BIN_ini, ".", 0);
};
if(Hlp_StrCmp(_BIN_ini, "GOTHICGAME") || (Hlp_StrCmp(_BIN_ini, ""))) {
path = "saves";
}
else {
path = ConcatStrings("saves_", _BIN_ini);
};
if(slot) {
path = ConcatStrings(path, "/savegame");
path = ConcatStrings(path, IntToString(slot));
}
else {
path = ConcatStrings(path, "/quicksave");
};
path = ConcatStrings(path, "/SCRPTSAVE.SAV");
return path;
};
Thank you every1 for help.
Geändert von hatrez123 (01.04.2015 um 17:24 Uhr)
-
I have another trouble-shooting problem , which you can called "mess" which is not connected directly by Lego, but can be resolved by this paket.
In Gothic 1 Mob Switch change always his state after loading saved game (bug of Piranhas?).
example:
we pull vwhell to pos. 1 , the gate is closed. the body states shows : "s1".
After loading save, the same mob switch has starting value of pos which is 0 (s0 for bodystates) and the gate is stucked for good. Till saving the game in pos.1 of mob switch everything is working fine.
Can we modify what data will be stored by saves?
Geändert von pawbuj (31.03.2015 um 22:44 Uhr)
-
So.. if someone is intrested in LeGo for Gothic 1, I invite you to enjoy.
https://www.dropbox.com/s/gyhu0bjpc6...Go_G1.rar?dl=0
Only bloodsplats are not available.
Geändert von hatrez123 (05.05.2015 um 12:54 Uhr)
-
Would you like to upload the file as an attachment or here:
http://upload.worldofplayers.de/upload2.cgi
(password to be found here: http://forum.worldofplayers.de/forum...1#post12799565)
From my own experience, I delete or move dropbox content from time to time, and it would be unfortunate to loose your work that way.
-
Geändert von hatrez123 (05.05.2015 um 12:55 Uhr)
-
It's me again.
I noticed that the characters don't want to gesticulate, lips move only.
Where is the problem?
-
Zitat von hatrez123
It's me again.
I noticed that the characters don't want to gesticulate, lips move only.
Where is the problem?
Uh, I have no idea?
Is the link you provided in the last post up to date? I might try to get a Gothic Installation working and test it myself. That said, I have no idea how the gestures are working and last time I looked at the code I was flabbergasted.
Additionally, I remember Gottfried saying something that now you had to provide your own animations - I don't know whether this means there are none by default?
-
Zitat von Lehona
Uh, I have no idea?
Is the link you provided in the last post up to date? I might try to get a Gothic Installation working and test it myself. That said, I have no idea how the gestures are working and last time I looked at the code I was flabbergasted.
Additionally, I remember Gottfried saying something that now you had to provide your own animations - I don't know whether this means there are none by default?
Yup, it is up to date.
In Gothic 2 I had the same problem.
Also I'll add that the animations do not want to play after the trialogue, it forces to end the conversation and talk again.
-
Zitat von hatrez123
Yup, it is up to date.
In Gothic 2 I had the same problem.
Also I'll add that the animations do not want to play after the trialogue, it forces to end the conversation and talk again.
If it didn't work in Gothic 2, I don't know if I can fix it on my own, I'll try to get hold of Gottfried.
Please give me an example for the animation things.
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
|