Request: "How-To" update a Civ 5 mod for G+K

thadian

Kami of Awakened Dreamers
Joined
Sep 27, 2006
Messages
2,288
Location
Indiana, USA
Ive been struggling for some time now with these 2 mods, Government Buildings and Palace Additions but i can't do anything to make either one work! I do have notepad ++ and just want to make a few of my own alterations but when i see the modbuddy screen i just become depressed, unable to function because i don't know what anything does.

So, what i would like to request is a small tutorial of sorts, covering just a few simple things:

WHY - the mods are broken.

WHAT - to do in order to make them work again.

HOW - the best way from scratch to make it compatible. Modbuddy program or hard XML edits will work fine for me.

WHERE - to make the changes in the files, where the files are.

My intention - Palace Additions: I would like to make the mod Palace Additions usable with Gods and Kings. Only a few changes - I would like to remove 2 of the added buildings - and replace them. I would like to remove the ones that give +2 food and +4 food, respectively and replace them with ones that give +1 Faith and +2 food. The last building, i would like to add ONE faith as it's bonus.

My Intention - Government Buildings: I would like to revitalize the original state of the mod, where no tech prereq's are used for the buildings. As for the Developer unit and it's new improvements, i would like to assign these improvements to unlock on the tech tree. I would like workers to be able to upgrade to Developers and i would like to have them come into the tech tree at Civil Service.

What YOU can do: I do have the mod's and can upload the files if anyone needs me to in order to help me. Likewise, you "could just do it for me" but i would rather gain a little competence and do it myself, but i admit i need some help with instructions. In theory, this "should not be too hard" because i never deleted these 2 mods. Therefore it LOOKS like an easy job however i could be wrong. Any advice would be appreciated on how to go about doing this would be greatly appreciated.
 
Ive been struggling for some time now with these 2 mods, Government Buildings and Palace Additions but i can't do anything to make either one work! I do have notepad ++ and just want to make a few of my own alterations but when i see the modbuddy screen i just become depressed, unable to function because i don't know what anything does.

So, what i would like to request is a small tutorial of sorts, covering just a few simple things:

WHY - the mods are broken.

WHAT - to do in order to make them work again.

HOW - the best way from scratch to make it compatible. Modbuddy program or hard XML edits will work fine for me.

WHERE - to make the changes in the files, where the files are.

My intention - Palace Additions: I would like to make the mod Palace Additions usable with Gods and Kings. Only a few changes - I would like to remove 2 of the added buildings - and replace them. I would like to remove the ones that give +2 food and +4 food, respectively and replace them with ones that give +1 Faith and +2 food. The last building, i would like to add ONE faith as it's bonus.

My Intention - Government Buildings: I would like to revitalize the original state of the mod, where no tech prereq's are used for the buildings. As for the Developer unit and it's new improvements, i would like to assign these improvements to unlock on the tech tree. I would like workers to be able to upgrade to Developers and i would like to have them come into the tech tree at Civil Service.

What YOU can do: I do have the mod's and can upload the files if anyone needs me to in order to help me. Likewise, you "could just do it for me" but i would rather gain a little competence and do it myself, but i admit i need some help with instructions. In theory, this "should not be too hard" because i never deleted these 2 mods. Therefore it LOOKS like an easy job however i could be wrong. Any advice would be appreciated on how to go about doing this would be greatly appreciated.

I've not long seen the comment in the Workshop and, as mentioned there, somewhat confused with the part about prereq techs - all the buildings had prereq techs since the begining.

Eg, Government Office required Civil Service, Magistrate required Chivalry and so on.

Units and tile improvements also required prereq techs and, like the buildings, has always been the case.

Has this not been the case for you since the original version?
 
This is not as easy to accomplish as one might think given that any mod might modify countless files depending on what they are trying to achieve.


WHY - the mods are broken.
Not sure if all the mods are broken, but the more complex ones that are code and unit heavy have broken due to changes in LUA events and the way unit art work is now modular (previously we were all copying and replacing unit art with our own define files).

WHAT - to do in order to make them work again.
The answer here is it depends on the mod! To use an analogy, cars, trains and planes are all transport vehicles, but each is built in a different and complex manner so a problem in one does not necessarily impact the others.

Here was some of my lessons for my mod in dev:
1. Convert the vanilla map to G&K format by simply opening in WB, checking scenario settings and then saving it again.
2. If using INSERT SQL statements for Buildings and Unit tables then make sure you check the Database.log file to see if any errors are being generated and then modify the SQL statements to include/modify rows for new religion features.
3. If UI is modified, then check Firetuner to make sure nothing has gone haywire (once again there is no specifics here as it depends on what each modder has done via coding).
4. Confirm the various trigger events are functioning properly via Firetuner (the list could be limitless here depending on what the code is trying to achieve)

HOW - the best way from scratch to make it compatible. Modbuddy program or hard XML edits will work fine for me.
There is no best way unfortunately. Modbuddy is the main tool of choice for any changes if wanting a 'controlled' environment(I have used quotes as some might disagree). As for XML changes, as stated previously, these are minimal as G&K added new XML tables and only slightly changed buildings/units tables. Only major table change was making artdefines modable via XML/SQL.

WHERE - to make the changes in the files, where the files are.
Aside from the few tables I mentioned, you not going to get a straight answer here unless someone has indeed modified every table in their mod (VEM maybe?).

Sorry if this is not satisfying your need, but hopefully it points out how difficult it is to make such a tutorial....plus we are all still uncovering new modding pitfalls of G&K everyday.
 
Only major table change was making artdefines modable via XML/SQL.

Which only goes to prove the "it depends on the mod in question" statement.

Any table that referred to culture treated it as a special entry and not an associated yield - this has completely changed. As an example, any building that granted culture is broken in G&K until fixed by some "major" (but not complex) rewrites.
 
3. If UI is modified, then check Firetuner to make sure nothing has gone haywire (once again there is no specifics here as it depends on what each modder has done via coding).

UI changes are far more subtle and complex than just checking that nothing has gone "haywire" - you need to compare the original vanilla file that you changed to the new G&K variant of it to ascertain if your edits to the vanilla file are still valid - from doing a "diff" between "511" and "G&K 674" around 90% of the changed files are in the UI.

For example, the old vanilla DiploCorner files work in G&K, but they break various aspects of the new UI in that items just don't show up - the whole mechanism that handles the DiploCorner has changed - it just so happens that the old file continues to work. This *WILL* introduce some very subtle and hard-for-players-to-find issues as incompletely checked mods will still appear to work ... up to a point (usually when Spies kick in).

The same is also true for the Notification system - the old files work, you just won't get any new notifications.

W
 
So, what i would like to request is a small tutorial of sorts, covering just a few simple things:

WHY - the mods are broken.

This is an easy one to answer. Because between Vanilla 511 and G&K 674 there are 218 files with significant differences, any one of which, or more likely, combination of which, could have "broken" the mod by no longer working the same way (ie containing the same code) as before."

The rest of your questions cannot be answered "simply" because there are 218 files with significant differences.

And that's only the code we can get to - the changes within the compiled C/C++ files that comprise the "DLL" are completely unknown.
 
UI changes are far more subtle and complex than just checking that nothing has gone "haywire" - you need to compare the original vanilla file that you changed to the new G&K variant of it to ascertain if your edits to the vanilla file are still valid - from doing a "diff" between "511" and "G&K 674" around 90% of the changed files are in the UI.

For example, the old vanilla DiploCorner files work in G&K, but they break various aspects of the new UI in that items just don't show up - the whole mechanism that handles the DiploCorner has changed - it just so happens that the old file continues to work. This *WILL* introduce some very subtle and hard-for-players-to-find issues as incompletely checked mods will still appear to work ... up to a point (usually when Spies kick in).

The same is also true for the Notification system - the old files work, you just won't get any new notifications.

W

Is there something in particular with the espionage part that has a tendency to break things then?

Actually, come to think of it, I've just realised some of the Civilisations elsewhere are probably missing that whole aspect :blush:

After 674, the GP area was a mess with this (my) mod in use, so I opted to remove that aspect of it, in favour of the GP progress associated with Civil Servant specialists being visible in the city screen only.

I try to avoid editing files that are highly likely to conflict, or be in use by other mods, if nothing more than for keeping as much compatibility as possible.
 
Is there something in particular with the espionage part that has a tendency to break things then?

Actually, come to think of it, I've just realised some of the Civilisations elsewhere are probably missing that whole aspect :blush:

You just hit the nail on the head - that whole part of the game is new but arrives a long way into the game play - so it looks like everything is working - civ on menu, check, units ok, check, trait ok, check, etc for other stuff I've added, check, ... then 150 turns in "BOOOOOM!" for no "explained" reason (or if you've edited the UI so you don't see things "weird stuff just happens")
 
You just hit the nail on the head - that whole part of the game is new but arrives a long way into the game play - so it looks like everything is working - civ on menu, check, units ok, check, trait ok, check, etc for other stuff I've added, check, ... then 150 turns in "BOOOOOM!" for no "explained" reason (or if you've edited the UI so you don't see things "weird stuff just happens")

And, of course, the game will crash consistently at the same point each time. I updated the info for New Zealand earlier and voila. Need to update the others I've done now too.

There's also a religion association too that is probably worth people remembering when adding Civs.

I think what didn't help, was 674 and G&K in very close succession, which threw in a lot of confusion as to what/where/how/why etc.
 
It's really 511 to GK674 with vanilla getting a whole load of fixes as a side effect - but no, it didn't help (115 mods to check twice in my case)
 
you have probably already seen it but I have noticed 2 major change s in the file for building :

The tag <culture> doesn't exist anymore, now it's <CultureRateModifier>

To give buildings the ability to produce resources it's now <Building_ResourceQuantity> instead of <Building_ResourceChange> and it works without the help of an extra mod.

Those are only 2 examples.

There is some changes in the unit system as well : naval units are either <CombatClass>UNITCOMBAT_NAVALRANGED</CombatClass> or <CombatClass>UNITCOMBAT_NAVALMELEE</CombatClass> instead of only <CombatClass>UNITCOMBAT_NAVAL</CombatClass>

Strengh and cost of units seems to have changed as well.

I don't think that any modder can list all the changes that were done.
Firaxis could have made a list of those changes but it probably thinks that finding out makes the modding more interresting !
 
Im unsure because i still see...

<Row>
<Type>BUILDING_MONUMENT</Type>
<BuildingClass>BUILDINGCLASS_MONUMENT</BuildingClass>
<FreeStartEra>ERA_MEDIEVAL</FreeStartEra>
<Cost>40</Cost>
<GoldMaintenance>1</GoldMaintenance>
<Help>TXT_KEY_BUILDING_MONUMENT_STRATEGY</Help>
<Description>TXT_KEY_BUILDING_MONUMENT_DESC</Description>
<Civilopedia>TXT_KEY_BUILDING_MONUMENT_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_MONUMENT_STRATEGY</Strategy>
<ArtDefineTag>MONUMENT</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<Culture>2</Culture>
<HurryCostModifier>40</HurryCostModifier>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<NeverCapture>true</NeverCapture>
<PortraitIndex>21</PortraitIndex>
</Row>

as the monument in Assets\Gameplay\XML\Buildings\Civ5Buildings.xml

however, in Assets\DLC\Expansion ... XML\Buildings\Civ5Buildings.xml it looks like this...

<Row>
<Type>BUILDING_MONUMENT</Type>
<BuildingClass>BUILDINGCLASS_MONUMENT</BuildingClass>
<FreeStartEra>ERA_MEDIEVAL</FreeStartEra>
<Cost>40</Cost>
<GoldMaintenance>1</GoldMaintenance>
<Help>TXT_KEY_BUILDING_MONUMENT_STRATEGY</Help>
<Description>TXT_KEY_BUILDING_MONUMENT_DESC</Description>
<Civilopedia>TXT_KEY_BUILDING_MONUMENT_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_MONUMENT_STRATEGY</Strategy>
<ArtDefineTag>MONUMENT</ArtDefineTag>
<MinAreaSize>-1</MinAreaSize>
<HurryCostModifier>40</HurryCostModifier>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<NeverCapture>true</NeverCapture>
<PortraitIndex>21</PortraitIndex>
</Row>

and

<Row>
<BuildingType>BUILDING_MONUMENT</BuildingType>
<YieldType>YIELD_CULTURE</YieldType>
<Yield>2</Yield>
</Row>

So what i want to do is make this work with g+k, but i don't know "what to change to what".

Spoiler :

<Buildings>
<Row>
<Type>BUILDING_GREAT_HALL</Type>
<BuildingClass>BUILDINGCLASS_GREAT_HALL</BuildingClass>
<Cost>40</Cost>
<Description>TXT_KEY_BUILDING_GREAT_HALL</Description>
<Civilopedia>TXT_KEY_CIV5_BUILDINGS_PALACE_TEXT</Civilopedia>
<Strategy>TXT_KEY_BUILDING_GREAT_HALL_STRATEGY</Strategy>
<Help>TXT_KEY_BUILDING_GREAT_HALL_HELP</Help>
<ArtDefineTag>ART_DEF_BUILDING_PALACE</ArtDefineTag>
<Culture>2</Culture>
<MinAreaSize>-1</MinAreaSize>
<ConquestProb>66</ConquestProb>
<HurryCostModifier>25</HurryCostModifier>
<NeverCapture>true</NeverCapture>
<IconAtlas>BW_ATLAS_1</IconAtlas>
<PortraitIndex>19</PortraitIndex>
</Row>
</Buildings>


I will need to poke around a bit more but i am looking at the XML in both places and can not find what i need to change. I will try a few more things and hopefully report success.
 
the tag <Culture>2</Culture> does not exist in G&K anymore, instead you can use <CultureRateModifier>n</CultureRateModifier> for your building to give a % in culture or
to make a building produce a specific amount of culture, add a row to the Building_YieldChanges table, with YieldType set to YIELD_CULTURE. - (PawelS)
 
Top Bottom