Modders Guide to FfH2

Is it possible for a building to modify production based on Unit Combat?? (instead of Unit Domain)
 
I have made many changes for my mod to vanilla ffh, and the game works fine for my laptop running XP. I loaded and patched vanilla FfH onto my desktop which runs Win 7 64 bit, and it seems to work fine. However when I tried to run my modded version, the game crashed when it gets to Init XML on game startup, without giving me any xml error message. After some work I found the Unit Art file to be at least one problem, but havent had time yet to find the line(s) of code responsible.

Anyone have any idea what I could have done in xml which would make the game crash on my desktop, and I dont even get an xml error message?
 
missing xml entries in the artdefines can cause a crash to desktop. If you use a debug dll you will get an error message telling you which artdefine is missing.
 
Could some one link me to the "School Girl" art that used to be the Succubus Placeholder art?

I'm planning on using it for a unit.

Alternatively, if anyone has "hot nurse" or "nurse" unit-art somewhere ...

additionally, a Professor and/or Doctor unit art ... as well as a labgeek unit art ... would be nice ;)

also Office intern unit-art if possible.

But really I'm only asking for the School Girl art since that seems easiest available.
 
How do I make a unit have +1 gold costs per turn?

or +2?

and how do I make it have zero Unit Costs? Just by saying it doesn't count towards military support?
 
and how do I make it have zero Unit Costs? Just by saying it doesn't count towards military support?

Yep. Setting bMilitarySupport to 0 in Unitinfos.xml should do the trick.

As far as making a unit cost extra maintenance, I'm not really sure. There is an iExtraCost tag, which according to http://civ4.wikidot.com/xml:civ4unitinfos, is for "Additional Gold you have to pay for every Unit built". I'm not exactly sure what that does, but it sounds like it takes gold when the unit is built?
 
Thank you Tholal ... iExtraCost is exactly what I was looking for.

for those interested ... it adds a Price directly to unit-cost ... so as no amount of Civics can remove it.
 
Is there an XML tag defining how specialists provide GPP? Basically what I want is to make the Grigori Palace giving Adventurer GPP to Citizens.
 
Skarn ... which mod or mod/mod where you looking to alter?

I prefer to mod base FFH myself ...
 
I only mod base FFH for now, as I know next to nothing about Python and DLL modding seems like another dimension to me. Modmods are way too complex for me to mod for the time being :)

Valkrionn, I suppose you did heavy DLL modding to allow that in the next version of RIFE? Or would it be possible in base FFH with Python?
 
Heavy modding, yes. You could do it using some python (perturn check for grigori palace, check for citizen specialists, increment adventurer GPP) but it would be messy and not displayed on the specialist. Better than nothing, however. ;)

RifE 1.31 allows that all via xml, and is clearly displayed. Credit for the code goes to Milaga.
 
Aye ... RifE has always been +++ on content ...

but really FFH and RifE are two completely different games. It all depends on what game you want to mod :D


But yea ... as an Addendum to what Valkrionn said ... a lot of good modders put a lot of work into the current DLL of RifE ...

basically, if you *do* decide to mod for RifE ... you'll have a lot of pro-modding tools to work with ... and your mod may even become a module of the official (RifE) release ;)
 
which goes back to my initial, and most important, point ... that FFH and RifE are two distinctly different games.

:lol:
 
Two python questions:

If there a function for FfH that changes a units base defense strength. (I've seen the combat strength function in the wild hunt spell, but that has only seemed to change attack strength when tried for something else. There doesn't seem to be one in the first few posts in this thread, though I have have just missed them.)


Also, are there any Python functions for changing the yields, or other effects of Buildings (With effects similar to the moment event, or the elder council event, for example.) I haven't seen any functions for this in the API, though as above I may have simply missed them. (I do remember seeing this as an example of something that could be done with Python, though may have imagined reading this.)
 
changeBaseCombatStrDefense
setBuildingYieldChange

there are more functions in CyCity.h, but unfortunatly there is no documenatation, so you either use try and error or take a look at the source in CvCity.cpp (quite difficult though to get the information if you aren't familiar with the dll.
 
Is there a way to find Building Type? All the building lookups in the code seem to focus on BuildingClass rather than Type.

IE, I have BuildingTypes eBuilding, and I want to see if eBuilding is a Planar Gate. I'm using the following code, but it doesn't seem to be working.

if (eBuilding == GC.getInfoTypeForString("BUILDING_PLANAR_GATE"))

Any tips on the proper way to code this?
 
If you make UUs and UBs cross class? (without making a new type within that class)

For instance ... if you had a Training Yard UB type "Tomato" .... (within class Training Yard) .... but then you made all other buildings UB Tomato ...

Or if you made all unit-classes UU "Warrior" for instance
 
Back
Top Bottom