| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Chieftain
|
Frustrated modder question
Hi, everyone. A few days ago I decided to try myself in modding. I took another mode for a base, a K-mod, and tried to make some XML changes, which were mostly related to civics. At first everything went on smoothly: I made desired changes and ran quite a few simulations to see, how AI would use rebalanced civics. After a while I felt myself satisfied and even started a game with my new mode. Than I decided to make some more rebalancing and changed CIV4CivicInfos.xml yet again. After that I tried to run a simulation and had a CTD in industrial era. I unmade my recent changes and tried to run a simulation again. To my astonishment, I got a CTD. Only after I restored original CIV4CivicInfos.xml CTDs stopped. Than I decided to make changes to it step-by-step, running simulations after every one of them - a VERY time-consuming process, btw. From that I discovered, that now almost everything I do in CIV4CivicInfos.xml leads to CTD.
At this point I felt myself completely at a loss. How is it even possible for a variable in an .xml file to lead to CTD? And even if it is possible - how didn't I ran into it in my earlier experiments? It is plausable to assume, that I'm getting CTDs because of some other reason, but they do stop after I restore original CIV4CivicInfos.xml. I would really appreciate, if someone can help me to solve this bizzare problem.
__________________
English is not my native language and I rather suck at it. So if you see stupid mistakes in my posts, please, don't think it's because I'm retarded and feel free to correct. |
|
|
|
|
|
#2 |
|
Deity
![]() Join Date: Apr 2006
Location: New York State
Posts: 4,859
|
It's really hard to tell you what's wrong if we don't know what you're changing. It's probably some type of typo; not every XML field actually undergoes error checking before being read in.
__________________
Mods: Convert Production to Espionage, FinalFronterFlat, The Road to War Ultimate Edition for BtS 3.19, Star Trek |
|
|
|
|
|
#3 |
|
Chieftain
|
I thought about "typo" theory, but it is highly unprobable: I several times started from the original file. Basicly, here are the minimum alterations in CIV4CivicInfos.xml after which CTDs start to accure:
In representation: changed <SpecialistExtraCommerces> value to zero, changed <CommerceModifiers> to 25 in the first line (gold) In police state: changed upkeep to medium In Universal Suffrage: changed <YieldModifiers> to 10 in the first line (food), changed <iImprovementUpgradeRateModifier> to 100, changed <iCivicPercentAnger> to 400, changed <iWarWearinessModifier> to 100, removed all previous bonuses (ihurry and +1 hammer from town), changed upkeep to high. It looks like that changes to representation and police state don't cause CTDs, but every change to Universal Suffrage taken separately (except possibly food bonus) does cause it. And I also do know that CTDs happen even if I leave Universal Suffrage untouched and instead change one of economic civics. What else can I add? I made changes to other XML files: added one unit (bombard) and altered effect of pyramids. But it looks like these changes are OK as bu themselves they don't cause CTD. CTD always happens closer to endgame (which may be connected with the fact that I changed only late game civics). If I test different versions of CIV4CivicInfos.xml on one save, CTDs happen at different time, but they happen invariably within 25 turns from the last autosave.
__________________
English is not my native language and I rather suck at it. So if you see stupid mistakes in my posts, please, don't think it's because I'm retarded and feel free to correct. Last edited by Gavagay; Apr 12, 2012 at 04:59 PM. |
|
|
|
|
|
#4 |
|
Deity
![]() Join Date: Apr 2006
Location: New York State
Posts: 4,859
|
Could you post one of the versions of Universal Suffrage that causes a crash? Or maybe all of them?
__________________
Mods: Convert Production to Espionage, FinalFronterFlat, The Road to War Ultimate Edition for BtS 3.19, Star Trek |
|
|
|
|
|
#5 |
|
Chieftain
|
This is my basic version of Universal Suffrage which caused crash. I tried to reset different parts of it to default values, but crashes seemed to stop only after I reset to zeros everything but line about food. Though now I suspect that may be I just didn't wait long enough in that test.
Spoiler:
Actually I now remembered that I also changed Civ4LeaderHeadsInfo in regards to favourite civics of leaders. Completely forgot about that, sorry. Now will try to to run a sim with this file reset to default. Update. Hmmm, now, after I copied that, I see strange gaps in words "strategy" and "pedia". I use notepad to edit files, and these spaces aren't seen there. Nevertheless, I never touched these lines, so this gaps should have been already present in original mod. And it works perfectly.
__________________
English is not my native language and I rather suck at it. So if you see stupid mistakes in my posts, please, don't think it's because I'm retarded and feel free to correct. Last edited by Gavagay; Apr 13, 2012 at 02:57 PM. |
|
|
|
|
|
#6 |
|
Deity
![]() Join Date: Apr 2006
Location: New York State
Posts: 4,859
|
Nothing looks bad... looks like you need to get a debug version of the DLL to figure out what's going on. The standard way to do that is to compile the SDK with the debug option (tutorial on the modiki); I don't know if anyone has posted one or not.
__________________
Mods: Convert Production to Espionage, FinalFronterFlat, The Road to War Ultimate Edition for BtS 3.19, Star Trek |
|
|
|
|
|
#7 |
|
Chieftain
|
Thank you for the answer. I'll try to do it. I will also try to ask this question to the author of the original mod. May be this signifies a bug in his mod which he would want to fix.
__________________
English is not my native language and I rather suck at it. So if you see stupid mistakes in my posts, please, don't think it's because I'm retarded and feel free to correct. |
|
|
|
|
|
#8 |
|
Deity
![]() Join Date: Apr 2006
Location: New York State
Posts: 4,859
|
Entirely possible. If that mod has its own DLL you'll need to use its source.
__________________
Mods: Convert Production to Espionage, FinalFronterFlat, The Road to War Ultimate Edition for BtS 3.19, Star Trek |
|
|
|
|
|
#9 | |
|
Prince
Join Date: Oct 2010
Location: Brussels, Belgium
Posts: 415
|
Those gaps in words are not normal. Since you said that you used Notepad, you might want to read this recent post from God-Emperor, copied below.
Quote:
Edit: personally, I have edited this file in similar ways and I never had a crash with any change in the values. |
|
|
|
|
|
|
#10 |
|
Say No 2 Net Validations
![]() ![]() |
That's a problem with the forum settings, not with his XML file. The software breaks up too long words to prevent that somebody tries shenanigans with the forums software.
|
|
|
|
|
|
#11 |
|
Prince
Join Date: Oct 2010
Location: Brussels, Belgium
Posts: 415
|
Ah, OK!
|
|
|
|
|
|
#12 |
|
Chieftain
|
Thanks, everyone, it looks like, I figured out what caused crashes. It was a mistake in a completely different XML file. For some reason it didn't manifest itself in my first sims, that is why I blamed civics for it.
__________________
English is not my native language and I rather suck at it. So if you see stupid mistakes in my posts, please, don't think it's because I'm retarded and feel free to correct. |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|