• Civilization 7 has been announced. For more info please check the forum here .

Modders Guide to FfH2

I was wondering if anyone could tell me which file I would need to edit to add or remove a religion from being able to be researched and used by an agnostic Civilization
 
Need some help on this one. Somehow I am keeping the game from fully loading with the following Read & Write entries in CvUnit.cpp

Code:
	pStream->Read(NUM_YIELD_TYPES, m_piYieldFromWin);
	pStream->Read(NUM_YIELD_TYPES, m_piYieldForLoss);
	pStream->Read(NUM_COMMERCE_TYPES, m_piCommerceFromWin);
	pStream->Read(NUM_COMMERCE_TYPES, m_piCommerceForLoss);
.
.
.
	pStream->Write(NUM_YIELD_TYPES, m_piYieldFromWin);
	pStream->Write(NUM_YIELD_TYPES, m_piYieldForLoss);
	pStream->Write(NUM_COMMERCE_TYPES, m_piCommerceFromWin);
	pStream->Write(NUM_COMMERCE_TYPES, m_piCommerceForLoss);


They are, as it appears, arrays of the Yields and Commerces. Everything works fine with these 2 sections omitted, but with them present, the game hangs after generating the map, before popping it up (I assume it is hanging up while trying to create the initial units for everyone)


EDIT: Got it all sorted out now. Newb mistakes since this is my first shot at adding Arrays.
 
I was wondering if anyone could tell me which file I would need to edit to add or remove a religion from being able to be researched and used by an agnostic Civilization

there is cannotResearch in CvGameUtils, but you need also to enable some building and unit class in the civilization xml for grigori. You need also to edit CvPlayer::canDoReligion in the sdk to allow the grigori to use a religion. Not sure that is enough , but that's required.

Tcho !
 
I was wondering if there is a nice tutorial somewhere to show me how to add a leader to a civilization.

Also wondering if it is still possible to make it so that a leader can only be selected by a human player.
 
Is there a nice text tutorial? i am on dialup and cannot watch the movie.
 
I was wondering if someone could make/help me make an elven immortal that uses a bow for first strikes (like archers do). I've tried at first giving a flurry a sword instead of daggers and then the unit made my game crash :mad:.
Thanks in advance :D

P.s. I thought this belonged here because they are ffh units.
 
I was thinking of giving the malakim a unique worker that will be able to build some in the desert. I was wondering if it is possible to allow them to build improvements that would normally not be allowed in a desert or if I need to add improvements for them to build.

Also wondering if it is possible to have a worker be able to plant trees, scrubs, jungle with only modifications to XML
 
Vehem wrote up a tutorial for adding a leader to the game with some nice pictures in our own Mods subforum not long ago if I remember right.

Being able to build in a new terrain requires setting the improvement to be allowed by that terrain, and would allow ALL workers to build it there if they can build that improvement. So if done by just XML you have to create copies of all the build orders and improvements which are Malakim only for each item you want buildable in the desert.

I don't see any way to create features by XML alone at the moment.
 
Thank You Xienwolf, The tut Vehem did is perfect.

I figured I would have to make all new improvements but one can hope.

I am pretty sure that I used to be able to set a leader to only be selectable by a human player, but I dont see the tag in the leaderhead file. Is it still possible or was it removed?
 
I was wondering if there is an easy way to increase research costs accross the board. i was thinking i would like to increase the costs by 50%

I noticed this in the global defines

Code:
    <Define>
        <DefineName>BASE_RESEARCH_RATE</DefineName>
        <iDefineIntVal>0</iDefineIntVal>
    </Define>

could this be used to do this? what would I need to set it to?
 
I was wondering if there is an easy way to increase research costs accross the board. i was thinking i would like to increase the costs by 50%

I noticed this in the global defines

Code:
    <Define>
        <DefineName>BASE_RESEARCH_RATE</DefineName>
        <iDefineIntVal>0</iDefineIntVal>
    </Define>
could this be used to do this? what would I need to set it to?

you could just use the gamespeed modifiers if that doesnt work like:
<iResearchPercent>300</iResearchPercent>
 
thanks sureshot but does anyone know what values work for this code?

Code:
    <Define>
        <DefineName>BASE_RESEARCH_RATE</DefineName>
        <iDefineIntVal>0</iDefineIntVal>
    </Define>

would 50 be +50%? +50 research? 50% of normal research?
or would it be -50 to increase research costs.

Would be nice so I could have both the speed values modifying tech costs and this.

Edit: Also does anyone know where I could find a list of what each of the tags in the various xml files do.
 
BASE_RESEARCH_RATE appears to be free research you get each turn.
 
i started working on a remod of the basic ffh unit structures (i made a FfH mod idea thread in the modmod forum about the basic ideas) but stopped to wait for 0.32 before i do more, but one thing i did while messing around to try to optimize and cleanup a bit was to change the freaks, demagogs and a few other civilization specific units into fewer unitclasses, like:
UNITCLASS_CIVUNIT1
UNITCLASS_CIVUNIT2
and then make freak a UU for it and similar for other civilizations, this makes for fewer entries in the unitclass and less unitclasses needing to be set to NONE in the civilizationinfos file (since i think you can set them to NONE by default in the unitclassinfos file.. or was that not working even for non world units? either way still better in general), similar to the special buildings civs can get.
 
First post of this thread has quite a bit that is new to FfH, and I remember seeing a great thread for it in the Tutorials forum, but can't find it anymore

Thank you Xienwolf, I read through this entire thread before I first started posting and I entirely forgot about that list in the first post.

I was wondering about,

FeatureUpgrade- If this improvement has a chance to turn into a feature.

in the improvement infos. would this mean that the improvement stays untill the feature upgrades and then dissapears?

if so that would work nicely to simulate seeding a forest, or jungle and it could be done all in XML.
 
Sureshot: I know that I have run into issues with Dom Pedro's Dynamic Unique Units when I set the default of a UnitClass to NONE, but other than the special aspects of the MODCOMP I didn't notice any complications from doing it. People informed me that the AI handles it a bit oddly though, and I think that I had changed a few lines in the importing of the MODCOMP which fixed that fault. So I believe that in normal FfH it might work fine, but I know that in my MODCOMP it works like a charm, so long as you do not use the special features of Dynamic UUs in relation to that particular class.

#Kasdar: Right now that field is only used for Smoke, which turns into Flames and removes itself from the tile. So I would think it should work perfectly for seeding a forest as well.
 
Top Bottom