View Full Version : Modmodmods of AND
Sinapus Dec 25, 2009, 07:30 AM I attempted to report what I thought was a bug in AND (savegames not loading and CTD) but was told it was because I had changed something. My response probably seems a bit exasperated because what I described was pretty much what I've experienced over the past few years: never ran into the error before. Tried walking back a few changes and the same thing seems to keep happening.
The XML tweaks I've been using do things like add new tech yields for improvements and adjust some settings on the buildings and what I did on previous versions of RoM and Afforess's mods was installed both and went through the appropriate XML files and made the adjustments. Worked fine for those versions, but it seems to be breaking something in AND.
I did notice that the CIV4CivicInfos.xml in the RoM had the Coinage and Guilds civics added into them after I installed AND which makes me wonder if what I broke happened because I adjusted something AND no longer can recognize it. AND seems to go over the RoM build, alter a few things and might make changes to the AND install based on what it finds in RoM's files as well.
What I'm wondering is: if I want to make XML tweaks to RoM and AND, should I install RoM, make the tweaks to RoM and then run AND, let it finish and make any adjustments needed for AND? (One tweak I made was moving the tech for planting forests down to Paper. Not sure if that would be something that would break savegames.)
os79 Dec 25, 2009, 09:11 AM I attempted to report what I thought was a bug in AND (savegames not loading and CTD) but was told it was because I had changed something. My response probably seems a bit exasperated because what I described was pretty much what I've experienced over the past few years: never ran into the error before. Tried walking back a few changes and the same thing seems to keep happening.
The XML tweaks I've been using do things like add new tech yields for improvements and adjust some settings on the buildings and what I did on previous versions of RoM and Afforess's mods was installed both and went through the appropriate XML files and made the adjustments. Worked fine for those versions, but it seems to be breaking something in AND.
I did notice that the CIV4CivicInfos.xml in the RoM had the Coinage and Guilds civics added into them after I installed AND which makes me wonder if what I broke happened because I adjusted something AND no longer can recognize it. AND seems to go over the RoM build, alter a few things and might make changes to the AND install based on what it finds in RoM's files as well.
What I'm wondering is: if I want to make XML tweaks to RoM and AND, should I install RoM, make the tweaks to RoM and then run AND, let it finish and make any adjustments needed for AND? (One tweak I made was moving the tech for planting forests down to Paper. Not sure if that would be something that would break savegames.)
If you are meaning to play with AND and want to modify it, best thing is to install AND over RoM first before making any changes. That way you will know it is your mod that messed it up, not the installation itself. If the installation ran just dandy, then you know it is not the installation. After that, change whatever you like, then if it fail, be free to report here and we experienced modders will be happy to help out.
Sinapus Dec 25, 2009, 11:11 PM If you are meaning to play with AND and want to modify it, best thing is to install AND over RoM first before making any changes. That way you will know it is your mod that messed it up, not the installation itself. If the installation ran just dandy, then you know it is not the installation. After that, change whatever you like, then if it fail, be free to report here and we experienced modders will be happy to help out.
Does Autoplay work okay on this? I can probably reload the whole thing, play out to turn 100 or so on autoplay (which hopefully is faster than my picky unit-moving strategy) and then keep adding files until something breaks.
Knowing my luck, it's the custom map I tend to use. Do huts on top of peaks cause any problems? (Figured they'd keep until a nearby city's culture took them or a unit with the mountaineering ability came along or the appropriate tech was developed.)
os79 Dec 26, 2009, 07:27 AM Does Autoplay work okay on this? I can probably reload the whole thing, play out to turn 100 or so on autoplay (which hopefully is faster than my picky unit-moving strategy) and then keep adding files until something breaks.
Knowing my luck, it's the custom map I tend to use. Do huts on top of peaks cause any problems? (Figured they'd keep until a nearby city's culture took them or a unit with the mountaineering ability came along or the appropriate tech was developed.)
Not sure what you mean by autoplay. Because, yes, it does work whether or not you mod your game, unless you mod the autoplay, of course :).
However, if you are talking about savegame compatible every time you mod something...
Then some of changes will be so while others will not. Just be ready to start a fresh game if your modding is not savegame compatible.
Sinapus Dec 26, 2009, 10:44 AM Not sure what you mean by autoplay. Because, yes, it does work whether or not you mod your game, unless you mod the autoplay, of course :).
However, if you are talking about savegame compatible every time you mod something...
Then some of changes will be so while others will not. Just be ready to start a fresh game if your modding is not savegame compatible.
Autoplay lets you set an X number of turns for the computer to play the game out on its own. This morning I tested an unmodded version of AND for 105 turns, saved it, quit, restarted and loaded the save no problem.
In some impatience I copied over my modded xml files over into Rom/AND and started it up and the game crashed. Copied my unmodded backups over and it works fine. So I'm going to have to manually edit the files and see where/when it breaks. Joy.
Sinapus Dec 26, 2009, 01:45 PM Okay, I tested a few of the files. If I copy over some of my xml files into the RoM territory and the game loads fine. If I edit the xml file Afforess_CIV4HandicapInfo.xml the game will crash and it will load normally once I restore the backup of the file.
I edited Plant_Forest_CIV4BuildInfos.xml a little under Jooyo's folder and am having any problem.
I use Wordpad to edit the xml files. I'm wondering if Afforess uses another program to edit his xml files and if the differences between that program and Wordpad when they save the file is causing a problem.
Afforess Dec 26, 2009, 02:09 PM Okay, I tested a few of the files. If I copy over some of my xml files into the RoM territory and the game loads fine. If I edit the xml file Afforess_CIV4HandicapInfo.xml the game will crash and it will load normally once I restore the backup of the file.
I edited Plant_Forest_CIV4BuildInfos.xml a little under Jooyo's folder and am having any problem.
I use Wordpad to edit the xml files. I'm wondering if Afforess uses another program to edit his xml files and if the differences between that program and Wordpad when they save the file is causing a problem.
I use Notepad++ to edit files, but wordpad should work fine.
What exactly are the error messages? They are pretty descriptive errors, so I can tell you what you are doing wrong if you post them.
Sinapus Dec 26, 2009, 02:49 PM I use Notepad++ to edit files, but wordpad should work fine.
What exactly are the error messages? They are pretty descriptive errors, so I can tell you what you are doing wrong if you post them.
Screenshot of the error that popped up.
I changed the barbarian unit and barbarian city appearance by five each for the noble difficulty and replaced the map and tech goody hut results with either gold or a scout. That's all.
The section I edited.
<HandicapInfo>
<Type>HANDICAP_NOBLE</Type>
<Description>TXT_KEY_HANDICAP_NOBLE</Description>
<Help>TXT_KEY_HANDICAP_NOBLE_HELP</Help>
<iFreeWinsVsBarbs>2</iFreeWinsVsBarbs>
<iAnimalAttackProb>85</iAnimalAttackProb>
<iStartingLocPercent>40</iStartingLocPercent>
<iAdvancedStartPointsMod>100</iAdvancedStartPointsMod>
<iGold>0</iGold>
<iFreeUnits>8</iFreeUnits>
<iUnitCostPercent>50</iUnitCostPercent>
<iResearchPercent>100</iResearchPercent>
<iDistanceMaintenancePercent>75</iDistanceMaintenancePercent>
<iNumCitiesMaintenancePercent>70</iNumCitiesMaintenancePercent>
<iMaxNumCitiesMaintenance>5</iMaxNumCitiesMaintenance>
<iColonyMaintenancePercent>100</iColonyMaintenancePercent>
<iMaxColonyMaintenance>200</iMaxColonyMaintenance>
<iCorporationMaintenancePercent>100</iCorporationMaintenancePercent>
<iCivicUpkeepPercent>80</iCivicUpkeepPercent>
<iInflationPercent>90</iInflationPercent>
<iRevolutionIndexPercent>100</iRevolutionIndexPercent>
<iHealthBonus>2</iHealthBonus>
<iHappyBonus>4</iHappyBonus>
<iAttitudeChange>-1</iAttitudeChange>
<iNoTechTradeModifier>70</iNoTechTradeModifier>
<iTechTradeKnownModifier>0</iTechTradeKnownModifier>
<iUnownedTilesPerGameAnimal>40</iUnownedTilesPerGameAnimal>
<iUnownedTilesPerBarbarianUnit>55</iUnownedTilesPerBarbarianUnit>
<iUnownedWaterTilesPerBarbarianUnit>500</iUnownedWaterTilesPerBarbarianUnit>
<iUnownedTilesPerBarbarianCity>100</iUnownedTilesPerBarbarianCity>
<iBarbarianCreationTurnsElapsed>30</iBarbarianCreationTurnsElapsed>
<iBarbarianCityCreationTurnsElapsed>35</iBarbarianCityCreationTurnsElapsed>
<iBarbarianCityCreationProb>6</iBarbarianCityCreationProb>
<iAnimalBonus>-40</iAnimalBonus>
<iBarbarianBonus>-10</iBarbarianBonus>
<iAIAnimalBonus>-40</iAIAnimalBonus>
<iAIBarbarianBonus>-25</iAIBarbarianBonus>
<iStartingDefenseUnits>0</iStartingDefenseUnits>
<iStartingWorkerUnits>0</iStartingWorkerUnits>
<iStartingExploreUnits>0</iStartingExploreUnits>
<iAIStartingUnitMultiplier>0</iAIStartingUnitMultiplier>
<iAIStartingDefenseUnits>0</iAIStartingDefenseUnits>
<iAIStartingWorkerUnits>0</iAIStartingWorkerUnits>
<iAIStartingExploreUnits>0</iAIStartingExploreUnits>
<iBarbarianDefenders>4</iBarbarianDefenders>
<iAIDeclareWarProb>100</iAIDeclareWarProb>
<iAIWorkRateModifier>0</iAIWorkRateModifier>
<iAIGrowthPercent>100</iAIGrowthPercent>
<iAITrainPercent>100</iAITrainPercent>
<iAIWorldTrainPercent>100</iAIWorldTrainPercent>
<iAIConstructPercent>100</iAIConstructPercent>
<iAIWorldConstructPercent>100</iAIWorldConstructPercent>
<iAICreatePercent>100</iAICreatePercent>
<iAIWorldCreatePercent>100</iAIWorldCreatePercent>
<iAICivicUpkeepPercent>100</iAICivicUpkeepPercent>
<iAIUnitCostPercent>100</iAIUnitCostPercent>
<iAIUnitSupplyPercent>50</iAIUnitSupplyPercent>
<iAIUnitUpgradePercent>50</iAIUnitUpgradePercent>
<iAIInflationPercent>80</iAIInflationPercent>
<iAIWarWearinessPercent>80</iAIWarWearinessPercent>
<iAIPerEraModifier>0</iAIPerEraModifier>
<iAIAdvancedStartPercent>100</iAIAdvancedStartPercent>
<Goodies>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_WARRIOR</GoodyType>
<GoodyType>GOODY_WARRIOR</GoodyType>
<GoodyType>GOODY_SCOUT</GoodyType>
<GoodyType>GOODY_EXPERIENCE</GoodyType>
<GoodyType>GOODY_EXPERIENCE</GoodyType>
<GoodyType>GOODY_HEALING</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_SCOUT</GoodyType>
<GoodyType>GOODY_BARBARIANS_WEAK</GoodyType>
<GoodyType>GOODY_BARBARIANS_WEAK</GoodyType>
<GoodyType>GOODY_BARBARIANS_STRONG</GoodyType>
</Goodies>
<FreeTechs/>
<AIFreeTechs/>
</HandicapInfo>
Afforess Dec 26, 2009, 02:57 PM Screenshot of the error that popped up.
I changed the barbarian unit and barbarian city appearance by five each for the noble difficulty and replaced the map and tech goody hut results with either gold or a scout. That's all.
The section I edited.
<HandicapInfo>
<Type>HANDICAP_NOBLE</Type>
<Description>TXT_KEY_HANDICAP_NOBLE</Description>
<Help>TXT_KEY_HANDICAP_NOBLE_HELP</Help>
<iFreeWinsVsBarbs>2</iFreeWinsVsBarbs>
<iAnimalAttackProb>85</iAnimalAttackProb>
<iStartingLocPercent>40</iStartingLocPercent>
<iAdvancedStartPointsMod>100</iAdvancedStartPointsMod>
<iGold>0</iGold>
<iFreeUnits>8</iFreeUnits>
<iUnitCostPercent>50</iUnitCostPercent>
<iResearchPercent>100</iResearchPercent>
<iDistanceMaintenancePercent>75</iDistanceMaintenancePercent>
<iNumCitiesMaintenancePercent>70</iNumCitiesMaintenancePercent>
<iMaxNumCitiesMaintenance>5</iMaxNumCitiesMaintenance>
<iColonyMaintenancePercent>100</iColonyMaintenancePercent>
<iMaxColonyMaintenance>200</iMaxColonyMaintenance>
<iCorporationMaintenancePercent>100</iCorporationMaintenancePercent>
<iCivicUpkeepPercent>80</iCivicUpkeepPercent>
<iInflationPercent>90</iInflationPercent>
<iRevolutionIndexPercent>100</iRevolutionIndexPercent>
<iHealthBonus>2</iHealthBonus>
<iHappyBonus>4</iHappyBonus>
<iAttitudeChange>-1</iAttitudeChange>
<iNoTechTradeModifier>70</iNoTechTradeModifier>
<iTechTradeKnownModifier>0</iTechTradeKnownModifier>
<iUnownedTilesPerGameAnimal>40</iUnownedTilesPerGameAnimal>
<iUnownedTilesPerBarbarianUnit>55</iUnownedTilesPerBarbarianUnit>
<iUnownedWaterTilesPerBarbarianUnit>500</iUnownedWaterTilesPerBarbarianUnit>
<iUnownedTilesPerBarbarianCity>100</iUnownedTilesPerBarbarianCity>
<iBarbarianCreationTurnsElapsed>30</iBarbarianCreationTurnsElapsed>
<iBarbarianCityCreationTurnsElapsed>35</iBarbarianCityCreationTurnsElapsed>
<iBarbarianCityCreationProb>6</iBarbarianCityCreationProb>
<iAnimalBonus>-40</iAnimalBonus>
<iBarbarianBonus>-10</iBarbarianBonus>
<iAIAnimalBonus>-40</iAIAnimalBonus>
<iAIBarbarianBonus>-25</iAIBarbarianBonus>
<iStartingDefenseUnits>0</iStartingDefenseUnits>
<iStartingWorkerUnits>0</iStartingWorkerUnits>
<iStartingExploreUnits>0</iStartingExploreUnits>
<iAIStartingUnitMultiplier>0</iAIStartingUnitMultiplier>
<iAIStartingDefenseUnits>0</iAIStartingDefenseUnits>
<iAIStartingWorkerUnits>0</iAIStartingWorkerUnits>
<iAIStartingExploreUnits>0</iAIStartingExploreUnits>
<iBarbarianDefenders>4</iBarbarianDefenders>
<iAIDeclareWarProb>100</iAIDeclareWarProb>
<iAIWorkRateModifier>0</iAIWorkRateModifier>
<iAIGrowthPercent>100</iAIGrowthPercent>
<iAITrainPercent>100</iAITrainPercent>
<iAIWorldTrainPercent>100</iAIWorldTrainPercent>
<iAIConstructPercent>100</iAIConstructPercent>
<iAIWorldConstructPercent>100</iAIWorldConstructPercent>
<iAICreatePercent>100</iAICreatePercent>
<iAIWorldCreatePercent>100</iAIWorldCreatePercent>
<iAICivicUpkeepPercent>100</iAICivicUpkeepPercent>
<iAIUnitCostPercent>100</iAIUnitCostPercent>
<iAIUnitSupplyPercent>50</iAIUnitSupplyPercent>
<iAIUnitUpgradePercent>50</iAIUnitUpgradePercent>
<iAIInflationPercent>80</iAIInflationPercent>
<iAIWarWearinessPercent>80</iAIWarWearinessPercent>
<iAIPerEraModifier>0</iAIPerEraModifier>
<iAIAdvancedStartPercent>100</iAIAdvancedStartPercent>
<Goodies>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_LOW_GOLD</GoodyType>
<GoodyType>GOODY_WARRIOR</GoodyType>
<GoodyType>GOODY_WARRIOR</GoodyType>
<GoodyType>GOODY_SCOUT</GoodyType>
<GoodyType>GOODY_EXPERIENCE</GoodyType>
<GoodyType>GOODY_EXPERIENCE</GoodyType>
<GoodyType>GOODY_HEALING</GoodyType>
<GoodyType>GOODY_HIGH_GOLD</GoodyType>
<GoodyType>GOODY_SCOUT</GoodyType>
<GoodyType>GOODY_BARBARIANS_WEAK</GoodyType>
<GoodyType>GOODY_BARBARIANS_WEAK</GoodyType>
<GoodyType>GOODY_BARBARIANS_STRONG</GoodyType>
</Goodies>
<FreeTechs/>
<AIFreeTechs/>
</HandicapInfo>
Everything seems fine...
Did you move some files around? Delete any?
Sinapus Dec 26, 2009, 03:09 PM Everything seems fine...
Did you move some files around? Delete any?
No. If I restore the backup I made of the file you created, it loads. Edit it even a little (I originally had changes for everything past noble) and *poof* it crashes. If I edit the files under the main RoM folder, it loads fine as well. Same as when I put the backups of those files back in place. I am usually pretty careful and most of the mistakes I've run into was if I pasted something incorrectly and broke an xml tag. I haven't tried editing the other files from the part you created since I see no reason to change them.
I do know that when I was modifying the VISAS mod for Warlords a couple years ago I found that I could wreck an xml file if I used regular notepad, but using wordpad would work fine. Something about the way each program saves data, even simple text.
This notepad++ program, is it from the sourceforge.net website?
Afforess Dec 26, 2009, 03:15 PM No. If I restore the backup I made of the file you created, it loads. Edit it even a little (I originally had changes for everything past noble) and *poof* it crashes. If I edit the files under the main RoM folder, it loads fine as well. Same as when I put the backups of those files back in place. I am usually pretty careful and most of the mistakes I've run into was if I pasted something incorrectly and broke an xml tag. I haven't tried editing the other files from the part you created since I see no reason to change them.
I do know that when I was modifying the VISAS mod for Warlords a couple years ago I found that I could wreck an xml file if I used regular notepad, but using wordpad would work fine. Something about the way each program saves data, even simple text.
This notepad++ program, is it from the sourceforge.net website?
Yes. Its free and open source. I'd try it out, it is possible that wordpad is formatting it incorrectly.
Sinapus Dec 26, 2009, 03:46 PM Well, made minor tweaks to the file in question using notepad++. Saved it and put it in the appropriate folder and launched AND. No crash.
I'm hoping this is also the root cause of the savegame uncompress error I kept running into since I started on this particular mod.
Edit: Actually, it only accepted very minor edits. I could change the delay in barb unit and city appearance and other flags without crashing the game but as soon as I edited the goody hut results the game would crash. Tried multiple ways of editing. From pasting the results in to manually typing it in and got the same result. The game seems a bit sensitive to the size of the file. If I add a few too many characters it'll crash. I recall this happening to the CIV4CivicInfos.xml file in an earlier version of RoM so it's probably some quirk that pops up from time to time. I have a workaround (editing the CIV4GoodyInfo.xml file) so I'll ignore that and proceed with the autoplay test to see if the savegame error still exists.
Sinapus Dec 27, 2009, 01:25 AM Played 120 turns on autoplay, saved the game and it successfully loaded. Hopefully that means whatever problem happened last week is gone for now.
Now all I have to do is figure out how to import some of the extra civs from the Mega Pack to bring the number of available civs up to 50. Unfortunately, I seem to be missing something because their images show up as pink squares in the Civilopedia and possibly further but I stopped after I noticed that problem.
That's more a RoM issue, though. Edit: That I found the answer to, I hope. Copied the FPKs from Mega over to the right spot and they load normally now. Yay!
Sinapus Jan 02, 2010, 10:00 AM Well, one potential modding tip: If you mod the Game Defines file to allow unlimited wonders, don't use AND's "Unlimited Wonders" option. Tried one game yesterday with it on and tried to load a save at about turn 70 or so. Crash. This morning I played without the option (but the XML mod still active) and loaded a game turn on 156 or so. Of course, now Afforess just released a patch so I'll have to start all over again.
(Still not sure what tweak is causing the savegame loads to crash. Hope this time it was as I suspect above, but it could be that I was just lucky this time around.)
|
|