• Civ7 is already available! Happy playing :).

[MODCOMP] Civics Resources Mod

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Civics Resources Mod
By: TheLopez

Last Updated 11/08/06

Version: 0.2w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.2w

Version: 0.1
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.1


Description:
This mod adds the tags to enable a civic to give a civilization free bonuses
when the player switches to that civic. So for instance in the sample included
CIV4CivicInfos.xml file one gold is now given whenever a player switches to the
hereditary rule civic. To achieve this the following XML tag snippet was added
to the hereditary rule definition in CIV4CivicInfos.XML following the
<WeLoveTheKing> tag.
[TAB][TAB][TAB]<FreeBonuses>
[TAB][TAB][TAB][TAB]<FreeBonus>
[TAB][TAB][TAB][TAB][TAB]<BonusType>BONUS_GOLD</BonusType>
[TAB][TAB][TAB][TAB][TAB]<iBonusAmount>1</iBonusAmount>
[TAB][TAB][TAB][TAB]</FreeBonus>
[TAB][TAB][TAB]</FreeBonuses>

Screenshot:
Spoiler :

civics%20resources%20mod_mca.jpg



-----Notes to Modmakers-----

If you want to use this mod component in your mod I have tried to make things
as easy as possible for you. In the SDK files I have added
// < Civics Resources Start > and // < Civics Resources End > in all of the
places where changes were made.

In the XML files I have added <!-- Civic Resources Start --> and
<!-- Civic Resources End --> in all of the places where changes were made.

-----Version Information-----

-----v0.1------

- Setup the Civics Resources Mod infrastructure

- Added the code needed to provide bonuses when a player switches to a civic
that provides free bonuses.


-----===Credits & Thanks===-----

- Exavier
[TAB]Composite Mod - readme.txt format

- Mavy
[TAB]For providing the idea for the mod
 
Nice this will fit in nicely in the CCCP

How goes stuff with the Dynasties (Regicide) code?
 
I have a general problem getting mods that use .dll files to work. When civ4 is supposed to reset with the mod intergrated it doesn't. The game just closes. If some body has any idea what to do it would be appreciated.
 
uglydisease2 said:
I have a general problem getting mods that use .dll files to work. When civ4 is supposed to reset with the mod intergrated it doesn't. The game just closes. If some body has any idea what to do it would be appreciated.

Let it sit for a few minutes (how long you actually need depends greatly on your system). It can take a little while for anything to show up.
 
uglydisease2 said:
I have a general problem getting mods that use .dll files to work. When civ4 is supposed to reset with the mod intergrated it doesn't. The game just closes. If some body has any idea what to do it would be appreciated.
Please keep questions like this in the main forum, thanks.
 
Updated Warlords version to be compatible with the v2.0.8.0 patch.
 
Hey, TheLopez. Never thanked you properly before for coming up with this great mod. Hope you don't mind, but I have decided to build it into my CivicInfosPlus mod, to give maximum flexibility to all modders :).

Aussie_Lurker.
 
Aussie_Lurker said:
Hey, TheLopez. Never thanked you properly before for coming up with this great mod. Hope you don't mind, but I have decided to build it into my CivicInfosPlus mod, to give maximum flexibility to all modders :).

Aussie_Lurker.

No problem, sure I don't mind, that's what it is here for.
 
So, I tried to import this to 3.13 BtS, and it works fairly well. Except that the last item you list as a resource available from a civic doesn't load. Thus if you say that only 1 resource is gained (like 5 Wheat), nothing changes. But if you say 2 resources, or even a resource and a NONE, you get the first (so like, 5 Wheat and 3 Clams gives you 5 Wheat. But 3 Clams and 5 Wheat gives you 3 Clams).

Anyone know how/why the XML loader might skip the last item in an array?
 
I would check to see if the code in the CvInfos.cpp conforms to the code elsewhere in the file now... there was some changes to it since this modcomp was originally created. Otherwise, I don't know.
 
I figured it out when the same problem happened with another array addition to the XML. I had made a comment, and that broke the computer. :p

I did something like this:
Code:
<resources>        <!--Testing -->
    <resource>
        <Something>
        <SomeAmount>
    </resource>
</resources>

I like to put the testing flags on things so I can easily get back to them if I close the file, or go elsewhere in it, but it turns out that having a comment on the same line as the opening header of an array causes the game to drop the last item listed in the array. Mildly strange, but somewhat understandable. Anyway, removing the comment removed the issue.
 
Top Bottom