Modder's Documentation

I was thinking that a more time consuming (but permanent) solution would be to implement a system where as you can assign different values to a WW worldwide effect based on weather a civ is You, Friend, or Foe.

This could be done either in the DLL (setting a percent effect for builder, teammates/allies, neutral, and enemy) or with the XML (by adding the appropriate tags) I know this would mean work, but it would be more flexible than Hydro's setup and would make it a better tradeoff for the player/builder.
 
I was thinking that a more time consuming (but permanent) solution would be to implement a system where as you can assign different values to a WW worldwide effect based on weather a civ is You, Friend, or Foe.

This could be done either in the DLL (setting a percent effect for builder, teammates/allies, neutral, and enemy) or with the XML (by adding the appropriate tags) I know this would mean work, but it would be more flexible than Hydro's setup and would make it a better tradeoff for the player/builder.

What's "my" set up? :confused:
 
Sorry to double post, but in the intent of getting back on topic, I was wondering if someone could add documentation for all the (non spawn related) new XML tags that aren't in AND?
 
Buildings can provide multiple resources now like this:
Code:
<ExtraFreeBonuses>
	<ExtraFreeBonus>
		<FreeBonus>BONUS_HYDROGEN</FreeBonus>
		<iNumFreeBonuses>7</iNumFreeBonuses>
	</ExtraFreeBonus>
	<ExtraFreeBonus>
		<FreeBonus>BONUS_CORN</FreeBonus>
		<iNumFreeBonuses>1</iNumFreeBonuses>
	</ExtraFreeBonus>
</ExtraFreeBonuses>
 
If you want to view .DDS files as Windows thumbnails without opening them
Install Nvidia DDS Viewer
Download:
http://developer.nvidia.com/content/dds-viewer


How To Make Full-Sized, Non-Blurry Buttons in Photoshop

http://forums.civfanatics.com/showthread.php?t=268684



Without Photoshop
When playing on low quality graphics setting (for big MODS) some buttons appear small and blurry. It just doesn't look good. Because I don't have Photoshop I had to find another solution. I did find info on the forum but fixing the buttons required Photoshop :(

But I found a simple (and free) solution:

1. Download and install NVIDIA Texture Tools and select DDS Utilities:

Here: http://developer.nvidia.com/object/nv_texture_tools.html

2. Run nvDXT

3. Use these commandline parameters:

nvDXT -file my_blurry_button.dds -nomipmap -dxt3 -fadeamount 0

The fixed buttons can then be found in the DDS Utilities map (they have an underscore attached). Wildcards are allowed so you can fix a whole bunch at once.

Maybe someone has figured this out before but I couldn't find it on the forum so I decided post it. :)
 
hi i would like to change some civics for my self. Could you explain me where to find the code for it ?
sorry for my bad English
 
Go to your C2C mod file, go to XML, GameInfo, and then a file saying "CivicInfos" should be there. Note, it's not "CivicOptionInfos", don't get these two mixed up. But be wary, if you change certain options under "CivicInfos", you will have to change other files as well.
 
For people who are modding the tech tree, here is my current version. This is actually a CSV file so you can work with it in a spreadsheet program. Let me know if there are any mistakes, and I will try to keep it updated as we make more Tech Tree changes.

What I have in this file is: all Techs except Cold Fusion, Global Governance, Religion, and Special Promotion, along with Era, Era and Number, Cost, Broken Level, Unbroken Level, and Prerequisites.

"Era and Number" is my numbering system for how deep in a given era a Technology is. For example, Language and Nomadic Lifestyle are Prehistoric-1, because they are the first techs in that era. Cave Dwelling and Gathering, which require only Nomadic Lifestyle, are Prehistoric-2, and so on.

A technology's "level" is one more than the highest-level prerequisite. In the case of OR techs, I used the lowest-level prerequisite. The "Broken Level" column is modifying the level numbers so that all Ancient techs are higher than all Prehistoric techs, all Classical techs are higher than all Ancient techs, and so on. The "Unbroken Level" column does not do this. Comparing a technology's Broken Level to its Unbroken Level gives you an idea of how much overlap there is between the eras.

I also have created a Reverse Tech Tree, listing all technologies and what they lead TO. This might help to merge new techs into the tree, and find out which prerequisites you might replace.

CURRENT VERSION: SVN 4622 (incorporating all recent changes to Modern and Transhuman Eras)
 

Attachments

  • C2C Tech Tree 4622.txt
    49.8 KB · Views: 109
  • C2C Reverse Tech Tree 4622.txt
    85.8 KB · Views: 169
I created another CSV file for reference. This is all of the World Wonders and Projects, and their costs (including resource bonuses) and tech prerequisites. I think this would be useful if we want to recost the Wonders.

CURRENT VERSION: 2700.
 
Yesterday I have added a new feature to the XML that allows you to use a global define wherever an int, float or bool is used now.
The only thing you have to do to use it is to remove the type information from the schema.

I will show that on the example of the spawn info XML.
Each spawn rule in there contains an integer value named iStartYear which defines from which year the spawn rule should be active. A lot of the rules should always be active but this still needs to be defined. Currently that is done by using -50000 there, which is the actual start year. But if the decision should be made that we want to start from -200000, that value would need to be changed for all spawn rules. Better to use the actual start year variable, which is a global define named START_YEAR.
So open the CIV4UnitSchema.xml and look for:
Code:
<ElementType name="iStartDate" content="textOnly" dt:type="int"/>
and change it to:
Code:
<ElementType name="iStartDate" content="textOnly"/>

Now in CIV4SpawnInfos.xml all the
Code:
<iStartDate>-50000</iStartDate>
can be changed to
Code:
<iStartDate>START_YEAR</iStartDate>

In general you should use this for all values that are the same for several XML entries and that you want easily changable in a global define.
 
Updated the first post with a link to detail on using the Pathing method in Python.

Yesterday I have added a new feature to the XML that allows you to use a global define wherever an int, float or bool is used now.
The only thing you have to do to use it is to remove the type information from the schema.

Currently I am assuming this wont work for Outcomes since in some, like barbarian diplomacy, you will want a value and others like subduing animals will require a variable.
 
Currently I am assuming this wont work for Outcomes since in some, like barbarian diplomacy, you will want a value and others like subduing animals will require a variable.
It works for any int, bool or float. When you remove the type information, it will check all entered input if it is a value (then it will use the value directly) or if it is a global define name string (then it will resolve the global define).
So when you use it you can still have the normal entries with direct value as they are now, you don't need to change the tag entry to a global defines entry at every occurance.
 
It works for any int, bool or float. When you remove the type information, it will check all entered input if it is a value (then it will use the value directly) or if it is a global define name string (then it will resolve the global define).
So when you use it you can still have the normal entries with direct value as they are now, you don't need to change the tag entry to a global defines entry at every occurance.

OK so it is me misunderstanding how schema definitions work then ;). No biggy, while I used them quite a lot in the years before retirement they are still new fangled technology. (Not really.)
 
OK so it is me misunderstanding how schema definitions work then ;). No biggy, while I used them quite a lot in the years before retirement they are still new fangled technology. (Not really.)
The schema mainly gives limits. So if you define a type, then that element can only have that type to be validated. And if you define that an element has to have those specific children, then that element has to have those children but it can also have other children (unless you define its model as closed).
Btw, Civ4 uses a schema format that is obsolete and rarely used nowadays but it has an effect on the reading of the XML in Civ4 beyond validation. If an element type is defined as int, then you can't read it as a string (it returns garbagge), only the int reading function will work. So for some reason it actually uses the type information from the schema despite that in the code itself you use specific functions to read each type.
 
Mostly notes as I try and balance map resource placement.

CIV4BonusClassInfos.xml
  • Type - name of the class. We currently have:-
    • BONUSCLASS_GENERAL iUnique = 0
      Almonds, Ancient temple, Apple, Banana, Cannabis, Clay, Cocoa, coconut, Coffee, Cotton, Dates, Dye, Fig, Fur, Geothermal Sea Vent, Gold Incense, lead, lemon, Mango, Mushrooms, Natural Gas (Should be a fuel?), Olives, Opium, Papaya, Peyote, Pistachio, Platinum, Pomegranate, Prickly Pear, resin, Salt, Silk, Silver, Spices, Sugar, Tea, Timber, Tin, Tobacco, Whale, Wine
    • BONUSCLASS_GRAIN (4)
      Barley, Corn, Flax, Melon, Potato, Pumpkin, Rice, Squash, Wheat
    • BONUSCLASS_LIVESTOCK (4)
      Bison, Camel, Cow, Deer, Llama, Mammoth, Pig, Poultry, Rabbit, Sea Lions(*), Sheep, walrus(*)
      * Sea Lions and Walrus have special placement code in the map scripts to limit them to coastal terrain and single plot islands
    • BONUSCLASS_SEAFOOD (5)
      Clam, Crab, Fish, Lobster, Shrimp
      (none)
    • BONUSCLASS_RUSH (4)
      Copper, Donkey, Horse, Iron, Ivory, Obsidian, Sulphur
    • BONUSCLASS_MODERN (8)
      Bauxite, Rubber, Thermal Vent, Titanium
    • BONUSCLASS_WONDER (8)
      Marble, Stone
    • BONUSCLASS_LUXURY (8)
      Amber, Diamond, Jade, Pearls, Ruby and Sapphire
    • BONUSCLASS_FUEL (6)
      Coal, Oil, Uranium, Methane
    • BONUSCLASS_MANUFACTURED (0)
    • BONUSCLASS_FUTURE (0)
  • iUnique- the minimum number of plots between resources in this class. Eg if 5 then a resource in this group will not be placed within 5 plots of another resource in the group. (The tag for grouping "over rides" this for the single resource.

CIV4BonusInfos.xml
  • Type - name of the bonus
  • BonusClassType - group see type on CIV4BonusClassInfos
  • TechReveal - technology that shows the resource on the map
  • TechCityTrade - technology that allows the resource to be used in the city and traded. Note: health bonuses etc only come into affect at this technology.
  • iPlacementOrder - the order that the bonus is placed. Value 0 are placed first then 1 then 2 and so on. This means that those with the highest order may not appear on the map.
 
Top Bottom