Modders Guide to FfH2

I was wondering how I might go about setting up a build order that does nothing. There are times when I can't afford anymore armies or I don't want to build anything. I figure it can't be much harder than the build culture, money, research stuff just gotta get a new option to build nothing available.
 
I haven't tried it, but I think you would edit C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Fall from Heaven 2 031\Assets\XML\Gameinfo\CIV4ProcessInfo.xml adding:
Code:
		<ProcessInfo>
			<Type>PROCESS_WAIT</Type>
			<Description>TXT_KEY_PROCESS_WAIT</Description>
			<Strategy>TXT_KEY_PROCESS_CULTURE_STRATEGY</Strategy>
			<TechPrereq>NONE</TechPrereq>
			<ProductionToCommerceModifiers>
				<iProductionToCommerceModifier>0</iProductionToCommerceModifier>
				<iProductionToCommerceModifier>0</iProductionToCommerceModifier>
				<iProductionToCommerceModifier>0</iProductionToCommerceModifier>
			</ProductionToCommerceModifiers>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds</Button>
		</ProcessInfo>
(possibly changing the icon and maybe creating a new strategy if you want)

Actually, I think that this would suffice:
Code:
		<ProcessInfo>
			<Type>PROCESS_WAIT</Type>
			<Description>TXT_KEY_PROCESS_WAIT</Description>
			<Strategy>TXT_KEY_PROCESS_CULTURE_STRATEGY</Strategy>
			<TechPrereq>NONE</TechPrereq>
			<ProductionToCommerceModifiers/>
			<Button>Art/Interface/Buttons/Process/ProcessCulture.dds</Button>
		</ProcessInfo>
 
How do I define a new strategy?
Where do I enter the description?

Edit:

Code:
		<ProcessInfo>
			<Type>PROCESS_WAIT</Type>
			<Description>TXT_KEY_PROCESS_WAIT</Description>
			<Strategy>TXT_KEY_PROCESS_CULTURE_STRATEGY</Strategy>
			<TechPrereq>NONE</TechPrereq>
			<ProductionToCommerceModifiers>
				<iProductionToCommerceModifier>0</iProductionToCommerceModifier>
				<iProductionToCommerceModifier>0</iProductionToCommerceModifier>
				<iProductionToCommerceModifier>0</iProductionToCommerceModifier>
			</ProductionToCommerceModifiers>
			<Button>Art/Interface/Buttons/Process/ProcessWait.dds</Button>
		</ProcessInfo>

This is the code needed. But I don't know where to put the Text for the description.
 
For some reason I was thinking that had something to do with the AI, in which case it would probably involve soem SDK stuff that is way beyond me. It should have been obvious by the TXT_KEY_ that it just the description of what the process does that is displayed to the player.

It is looking for a string of text. You could write what you want there, or create a text key and put it in CIV4GameText_FFH2.xml. Or, if you don't care if the civilopedia r mouseovers say anything about it, just leave it blank

The description tag above it is handled the same way. If you did it the way I wrote it here you would see TXT_KEY_PROCESS_WAIT in the game, instead of a more easibly readable description. You can call it whatever you want.
 
Excellent thank you very much for the help MagisterCultuum. I now have the build order working and displaying what I want.

What is the importance of a strategy? I deffinately don't want the AI to get stuck on building nothing, is this going to be a factor?
 
Is there any way to prevent a unit from picking up a certain promotion (Mobility 1) while keeping a regular unit type (an arcane unit like Barbatos) in XML? I want to make an arcane unit with 0 movement that acts as the leader/hero for a civilization.
 
I'd prefer to just use XML, so it would be modular. I'll try the Domain Immobile trick.
 
Another question: Is it possible to do Terrain change via an XML spell or some other XML effect?
 
Feature or Improvement changes, yes; Terrain, no.

It would nice if it had this capability though.


Even more so, I really wish you could set terrain/feature/improvement prereqs for the spells. Building prereqs would also be very helpful. There are just too many units that have access to such spells to warrant using the slower python prereqs.
 
I am attemping to put in an improvement similar to the old coastal cottages from ROM, I am having an issue with the art files though, they seem not to want to cooperate, When I place a cottage on a coastal square it works properly and the buildings are placed on the shore, however if I make a new improvement with the same art the buildings sit in the middle of the water
 
Your problem is the LSystem. You have to define the new improvement in the same way that the cottage is defined now. That file is what makes all things which show up on the map cooperate with one another (in this case, an improvement with nearby ocean)
 
could you explain the process necessary to do this?

There are several sections in the CIV4PLOTLSYSTEM.xml file that look like this

Code:
		<ArtRef Name="art:building">
			<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL</Attribute>
			<Attribute Class="Scalar">NIF:Art/Structures/Cities/an_eu.nif::1x1_01</Attribute>
			<Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN</Attribute>
			<Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
			<Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
			<Scale>0.35</Scale>
		</ArtRef>

I replaced the improvement section so the sections look like this but it doesn't seem to work.

Code:
		<ArtRef Name="art:building">
			<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL</Attribute>
			<Attribute Class="Scalar">NIF:Art/Structures/Cities/an_eu.nif::1x1_01</Attribute>
			<Attribute Class="Improvement">IMPROVEMENT_COTTAGE,IMPROVEMENT_HAMLET,IMPROVEMENT_VILLAGE,IMPROVEMENT_TOWN,IMPROVEMENT_TRADING_POST,IMPROVEMENT_EMPORIUM,IMPROVEMENT_SEA_TOWN</Attribute>
			<Attribute Class="Scalar">szForceContourNode:BUILDING</Attribute>
			<Attribute Class="Scalar">szBatchGroup:buildings_an_eu</Attribute>
			<Scale>0.35</Scale>
		</ArtRef>


EDIT: OK after editing the entire file and adding in my improvements it finally works. sometimes it helps if you are working on the files in the right directory.

Would this work to get the art for the Farm Complex to show up in your mod?
 
In theory it would. But there are about 12 times as many references to the Farm as they are to any of the other improvements.

I did a find/replace to try and just make them all do multi-entry on 1 line like you have there, but it seems that either I made a small error, or there are some entries for the farm which are NOT allowed to be multi-entry.

The end result was that the normal farm started to look like the farm complex :) (just the house, no field, and centered on the tile facing south)
 
There were at least 70 lines in that file that I had to add or change to get it to work and not all of them were simple search and replace. I think I will take some time and go through and see if I can get the art for the Farm complexes to work. I will let you know how it goes.
 
I don't know if splitting the files would really be helpful. I do think that most fields should be made optional. Also, is there any reason not just to make all equipment and maybe summons too) be of a single unitclass? They aren't built anyway, and I don't think their unitclass information is ever really used anyway. Eliminating the need for these things would probably to cut down on file size significantly and make them easier to read through.
optional fields would be useful too, though making them all one unitclass, while nice, isn't a big concern for me because the entries in the unitclass file are really short themselves (making the unitclassinfos file small) and it wouldnt affect unitinfos at all for making it smaller.

but theres two reasons id like them grouped better and divided, one for modding (that file is one of the longest to load and annoying to root through), and the other for worldbuilder, because the current semi-alphabetical (with some icons that are hard to discern) it can be a pain to find units. currently atleast the equipments are all at the beginning, but a similar setup for summons and heroes would make them easier to find, rather than being peppered in the semi-alphabetical listing which is decided by the unitclass (so things like mimic and champion are together); ideally theyd be on different tabs in worldbuilder but i dont know how possible that is.
 
Well, for modding you can do what I have done with Promotions and just make fields optional if they use the defuault values (blank for an array, 0 for a boolean or integer, and NONE for a string). Then just delete all the defaults from the file. Makes it smaller and easier to mod. Then I also like to place comments beside the <Type> entry saying what the item is, so that I can collapse the 3rd level in Notepad++

Worldbuilder is NOT sorted at all actually. The items appear in the order that they were loaded, which means that it is in the order of the XML (and if you use modules then those are after the main XML). Thus re-arranging the order of them in the UnitInfos.xml will sort them for your worldbuilder. Kael has done a great job of keeping the XML sorted by alphabet, and thought ahead enough to place his items at the front of the list. Though I do wish he had sorted by the alphabet using the names found IN the Text Strings (ie - split the priests, Disciples & Highpriests up, since their Type name isn't the in-game name of the units), but that also holds with his convention of grouping the UU versions of a unit with the default unit (which is why the Mimic & Champion are together). I am sure that arguements can be easily made for each grouping scheme, but I personally am in favor of PURELY alphabetical. I can read the tooltips to see what it is a UU of.
 
optional fields would be useful too,

Aye - though Optional, Freely-ordered fields would be even more so :D

I'm trying to find ways to make the order items appear in "not-matter", such that we can have very short entries of relevant information without having to worry about where to put the field.

The other alternative (and most likely simpler) is what Xienwolf suggested about alphabetizing the optional fields a while back.
 
Well the schema is the only thing that actually cares about order. I can't remember what the WoC team was saying, but there is a patch for XMXSML or somesuch, the overriding control of all XML, coming out with the next Service Pack from Microsoft. You can download it manually already IIRC. I know I was discussing the order dependance when it came up, so it might be that it was a fix to that nuisance.
 
Top Bottom