PDA

View Full Version : Possible CTD Source



LordElrond
01-19-2006, 19:56
I know this is my first post so I thought I would make myself useful. I've followed EB since around the beginning of 05 and never joined cause I didn't have much time. Anyway, I thought that posting this occurence of my CTD might help the team.

I've done it about 7 times now, and the crash is guaranteed to occur. I'm playing Epeiros and I got a message that my faction heir, I forget his name (Ptolemai?), the son of Phyrros, has a chance to compete in the olympics. Now, I don't want to hurt his stats by competing and falling on my face so I move him out of the town. The moment I hit the end turn button, theres a crash. It never made it the the ai movements.

So I try again. I move him farther away, then in the trees, then just one tile out of the town... always a CTD. Finally I try it a couple times just leaving him in the town and it doesn't crash either time.

I hope that this helps someone who can fix the problems. I can do more tests if anyone wants as well.

Malrubius
01-19-2006, 20:32
Hmm, being in or out of a settlement shouldn't have any effect on the Olympics, unless the general is under siege. Once you get the message that your general's a competitor, it's just a matter of waiting for the results next turn. What happens on the next turn when it doesn't crash? Is he a failure, or does he succeed? Do you get a message?

Could you zip up the savegame and send it to me?

LordElrond
01-19-2006, 20:35
If I leave him in the settlement he always fails miserably. He is in the Italian peninsula, in Rhegion I believe.

I'll see if I can get it to you soon Malrubius.
Edit: I think I did it correctly and sent it to you, tell me if it works.

LorDBulA
01-19-2006, 21:15
Jus to add some data i also had few crushes on olimpic years.
But when game didnt CTD my character always failed in olimpics.
Did enyone won olimpics?

Teleklos Archelaou
01-19-2006, 21:25
I've asked about this and the percentages seem to be good - but I've never seen it.

Malrubius
01-19-2006, 21:54
I guess I know what I'll be doing tonight...:wall:

Malrubius
01-20-2006, 01:05
Ok, I played this out right before I went to work. I moved Ptolemaios a bit north and hit 'end turn' (a bad CharacterTurnEnd trigger would take effect almost immediately). I didn't have a CTD. The AI turns started, I got attacked, autoresolved, and had a CTD afterwards during the AI turn. I didn't have a chance to fully examine the output of Filemon, but I'm pretty sure it doesn't have anything to do with the Olympics. I'll take another look at the dump tomorrow. From what I recall, it was full of more "file not found" error messages.

I will investigate the chances for Olympic victory, though. They may be too low.

LordElrond
01-20-2006, 02:40
Well at least its good that the olympics aren't bugged. Strange, I'll have to look at it more myself.

Malrubius
01-20-2006, 03:30
Well at least its good that the olympics aren't bugged. Strange, I'll have to look at it more myself.

I didn't say that. ~;) I'll have to do some calculations to figure out the probabilities.

LordElrond
01-20-2006, 05:40
My mistake. :oops:

Malrubius
01-21-2006, 00:25
Ok, here are the probabilities:


Natural Energy 5 = 15%
Natural Energy 6 = 30%

with the HaleAndHearty trait (In the Pink, etc).
Natural Energy 5 = 30%
Natural Energy 6 = 60%



Ptolemaios has a 15% chance, unless he gets a lot healthier.


They probably need increasing. :oops:

Malrubius
01-21-2006, 18:56
Thank you Thank you Thank you for putting me onto this bug!

Eureka!

This in Data\text\export_VnVs.txt:


{Seleukid_Olympionikes_effects_desc}


causes CTDs when you win the Olympics.

This:


{Seleukid_Olympionikes_effects_desc}
+1 Influence


Does not. :oops:

I had tested it all a long time ago, but since then we'd done special messages for each faction, and somehow I left out the effects for every single trait (well, with the way I generated them, if one was messed up, they all were). This is not something I wrote for my validation program to catch (I didn't even know it would CTD), so now I need to add something else to that.

Anyway, if you add that second line everywhere you have Olympionikes_effects_desc} in that file (just do a search for the bold text there), you shouldn't have any more CTDs from winning the Olympics.

LordElrond
01-21-2006, 19:35
Well thats good news. One less CTD to worry about. Too bad its too late for my general.:no: I had to continue my campaign with him embarrassing himself and now having to live with it for the rest of his life. :wall: Anyway, thanks for providing the fixed code. I assume this will be in the patch for those who don't fix it themselves?

BTW: What coding language is this written in? I just started college going to major into computer science so this is all very interesting to me as I look through all the code you guys have written.

Teleklos Archelaou
01-21-2006, 19:37
Would it happen anytime any hellenic character won - even if he was AI?

LordElrond
01-21-2006, 19:50
I believe it would crash for every hellenic character since it was missing in every hellenic nations code as I look through it (just as Mal said). Does the ai compete in the olympics? That could be a huge cause of CTDs if they did... everytime they won - CTD :skull:

Malrubius
01-21-2006, 20:00
Would it happen anytime any hellenic character won - even if he was AI?

Yeah, I believe that would be the case. The Olympics look like the only place where I have a blank line following a "}" character. I learn something new about RTW CTDs every day, it seems! :embarassed:



BTW: What coding language is this written in? I just started college going to major into computer science so this is all very interesting to me as I look through all the code you guys have written.

It's not a programming language, per se, but a special RTW scripting language. Pretty simple, but there's no compiler to check your errors and tell you something is invalid! :sweatdrop: I believe I've learned more about good programming practices from this than when I was studying it in college!

LordElrond
01-21-2006, 20:04
Eh, no compiler. Well looking through more and more of the 1000s of lines of code wrote for this, I have to say that most people probably don't realize how much time and effort it would actually take just to get all the code into working order... plus research done beforehand.

Malrubius
01-22-2006, 18:55
The traits and ancillaries have really been a team effort, with input, descriptions, and decisions from many of our members. Even the coding itself has been done by several of us (at least half a dozen people)! We're kind of short-handed right now, so anybody interested in coding would be welcome to volunteer his services! ~;)

NightStar
01-22-2006, 21:00
After bit of testing I find that this bug could be a major source of CTD's that I have been experiencing with KH and A. Seleukia.

I fixed the export_VnVs file and loaded up a game where I had an recurring CTD with KH and pressed end turn and voila.....no CTD. I have to test it further.

And yeah Malrubius.....the olympic events happen during the summer don't they?

Malrubius
01-22-2006, 21:39
Yeah, the end of spring is when eligibility is determined (> 20% MP remaining, not besieging or under siege, high natural energy, etc). Then at the end of summer, the results are determined.

Yeah, and fixing that should be savegame compatible, too.

NightStar
01-22-2006, 22:18
Ah I thought so, the end of summer which are the resaults. Most of the CTD's I have been experiencing are with KH and A. Seleaukia at the end of summer....and almost at no other time. Now I have to load up the saves where I have recurring CTD and check it out.

Malrubius
01-22-2006, 22:20
I think this may clear up a significant number of CTDs, but I'm still getting the AI attempt to merge failure bug, where they move a captain/general on top of another and it CTDs. I have no idea what causes this.

BozosLiveHere
01-23-2006, 04:00
THANK YOU! Your little fix just saved my Sweboz campaign. No more CTDs here, now I can go back to leading my barbaric alliance against the city dwelling people of the world. :2thumbsup:

LordElrond
01-23-2006, 20:00
Malrubius, I have to point out something that happened while continuing my Epeiros campaign. I managed to win the olympics with another character and everything seems to be working fine. I got the victory message and the +1 influence I think. But... I never had a message/trait before that telling me that he had entered the olympics. The only one I received was the victory trait. I know that with Ptolemaious I had recieved the message that he had entered the Olympics, and that was before I fixed the code in my game. Just wondering if there might be a connection. Thanks.

Edit: When I looked at his profile again I see both the entering of the olympics and the victory in the olympics message. I on't think generals new traits are always announced at the start of turns.

NightStar
01-23-2006, 22:28
Yes, with this bug out of the way I seem to be able to load up most of the save games that had recurring CTD's and continue playing. So I have to say that this bug was the cause of most of the recurring CTD's. I managed to play from 243bc to 223bc in one sitting without a single CTD in a campaign that was riddled with them. ~:cheers: