Modding Help

Mesix

The Allfather
Joined
Mar 17, 2006
Messages
4,412
Location
Asgard
I didn't see a better place to post modding questions, so I'll post my questions here.

I am learning to mod, and thought that using my favorite mod as a reference would be a great way to learn. Unfortunately, there seems to be some folders missing in FfH, but it works fine, so the stuff must be somewhere else. Specifically, I can't find any of the .dds files for the tech tree buttons (or a lot of other artwork for that matter).

I am currently modding a tech tree and wanted to use one of the icons. I have made a dummy tech in my nonfunctional mod called Astrology. I got the Astrology tech to appear in the tech tree, the text works, and the next step was to put in an icon. I thought the icon from Knowledge of the Ether would work well as a place holder for now, so I searched my FfH2 directory for the icon. According to the CIV4TechInfos.xml file, the button should be located at:

<Button>Art/Interface/Buttons/TechTree/Knowledgeoftheether.dds</Button>

When I look in the FfH2 mod directory under Art/Interface/Buttons, there is no subfolder called TechTree. I have browsed through the other art folders and can't find the .dds files in any of them for the tech tree buttons.

Where is the tech tree button art located in the mod?
 
Thanks for the info. I now have a tech with a name and a picture. Progress!

I'll probably have more questions as I run into walls. If I can't find the answers in the Creation and Customization forum then I will post them in this thread for the expert advice of all you FfH team members and ModModers.
 
Hehe this will probably help me a lot too :)

Al
 
Hi, newbie to modding too.

I can't find the code that allows the Illians +2 food to snow tiles, and also the one that makes each Khazad city count have a dwarven vault... Wanted to grant Sprawling trait to Khazad but settlements will not count as cities for the vaults :p

Please help
 
That are two separate things

The civ-specific yields from terrain are controled in XML\Terrain\CIV4TerrainInfos.xml , at the appropiate terrain entry. Look for snow as example and you will know how to add it. Also, it is not required, so do not be scared if this part of a particular terrain entry does not have such lines. Just add it at the end.

Edit: here is how it looks at the end of the snow (it is from my mod, so it actually gives 1 :food: (first yield line) and 1 :hammers: (second). Third would add :commerce:

Code:
			<CivilizationYieldType>CIVILIZATION_ILLIANS</CivilizationYieldType>
			<CivilizationYieldChange>
				<iYield>1</iYield>
				<iYield>1</iYield>
				<iYield>0</iYield>
			</CivilizationYieldChange>
Vaults/sprawling are more complicated
Vaults are controled in python. You need "def doTurnKhazad" function in python\CustomFunctions.py
Unfortunatelly, settlements are blocked from getting any buildings in SDK, and even if you can edit it, it is all or nothing (but I can be mistaken, my sdk knowledge is quite limited). I thought that it can be overriden in python, but it seems I was wrong.
By the way, are you sure that dwarven megapolis with a vault would not be overpowered? ;)
 
Hehehe... I want to win against a computer even once on Noble. I can't even dent their border cities since I usually do a builder type of play. I rarely build units - thats why I love the Elohim :)

Actually, I don't want the settlements to have vaults. So if I just add the Sprawling trait to Khazad it's done? Thanks!
 
The civ-specific yields from terrain are controled in XML\Terrain\CIV4TerrainInfos.xml, at the appropiate terrain entry.

I think someone should move this to the CIV4CivilizationInfos.xml and allow the changing of yields for more than one civilization (or feature, after it has been moved to the civilization infos). I didn't expect it under Terrains, when looking for this the first time myself. After all it is more or less a civ trait.
 
Actually, I don't want the settlements to have vaults. So if I just add the Sprawling trait to Khazad it's done? Thanks!
Well, I thought that you checked it and they did not get it... I am not sure, python is able to override sdk blocks, so you just have to try it. Anyway, with current settlement mechanics it doesn't really matter - they do not produce anything and do not have unhappines problems. I think that settlements may even not count when deterimining the vault state, but I am not sure of it.

I think someone should move this to the CIV4CivilizationInfos.xml and allow the changing of yields for more than one civilization (or feature, after it has been moved to the civilization infos). I didn't expect it under Terrains, when looking for this the first time myself. After all it is more or less a civ trait.
I fully agree, I am always suprised it ended there. Too bad that I can't do it myself...
 
I fully agree, I am always suprised it ended there. Too bad that I can't do it myself...

I'll see what I can do as soon as I have a bit more time (maybe after the evolution ecology test tomorrow). I did something very similar for health/unhealth from features lately. Should help.
 
Thanks again Ahwaric. Will test out the Khazad tonight after I study.

I have an idea for Corlindale/Elohim. I want to have several special semi-hero-like unit buildable for the Elohim. These units are like Guardians for Corlindale can only be built after Corlindale himself visited the Unique Features and their associated Techs have been researched - mostly Religion Founding Techs. They are like heroes - there can only be one instance in the game and cannot be built multiple times. They cannot move by themselves - Corlindale carries them with him on the tile (like hawks). They gain stronger abilities if the Ultimate Religion Techs were researched.

Here's my idea on these Guardians:

Mirror of Heaven (Fire) - Magician type - can cast Scorch and Fireball-like spells, cannot atk or def, needs Ashen Veil Founding tech. *does small damage to hostile units in an within 1 tile (like Crown of Brilliance) with Ashen Veil ulti Tech

Patria (Earth) - Defender type - can cast Stoneskin-like spell but only affects other Guardians, cannot atk, have Guardsman promo, needs Kilmorph. *does small collateral damage and randomly inflict Rust on units attacking it with Ulti Kilmorph Tech (Arete I think)

Tears (Water) - Healer type - cannot atk or def, can cast Healing and remove Status-like spells but works for other Guardians only, needs Order Founding Tech. *can Resurrect other Guardians if Ulti Order Tech researched.

Letum Frigus (Ice) - Offense type - melee, can cast a spell that enhances STR for all Guardians like Enchantment 1 (Enchanted Blades?), str of about 5 or 6 I think, needs Overlord Founding Tech to build. *gains Ignore Building Def promotion (don't know what it is) and randomly cast Slow and Wither on units it attacks with Overlords Ulti Tech (Mind Stapling?)

Sirona (Air) - Sentry/Support type - range atk 3 or 4, can cast teleport (teleport Corlindale and all other Guardians to Capital), can cast Wall of Force if in city (min level req is lvl3) needs FoL. *gains Marksmanship and randomly cast Weaken (increases magic damage done to it by 10%) on units it attacks, upgrades Wall of Wind (min lvl required is 6)

All Guardians gain additional abilities by researching Esus and Empyrean techs. Maybe like these:
Esus - gain small auto-acquire xp promotion like disciples/mages
Empyrean - gain Affinities to their affiliated elements, i.e., magician type gains +1 Fire affinity


I know these are overpowered but I love to play these on Elohim :) I thought of making a new civ with a Magician/Druid like hero with all these Guardians but I can't think of any UBs or what their focus will be. I don't want to add them to Amurites though since Govannon can defend himself :p unlike Corlindale. Besides I like Elohim better - they have Hallowing to manage AC.

Sorry if I don't know all the names of techs I just started playing Civ 4 and Fall from Heaven 2 and I love it! I chose the Religion techs as I think the Elohim will be forced to sacrifice research if they want to enhance their Guardians. What do u think Ahwaric and Jean? I know their overpowered :p
 
and another newbie modding question. i just started modmodding yesterday and started by creating a new promotion. the promotion works fine but i have trouble with the interface grafik.
in promotioninfos.xml the <button></button> tag points to units/lightning elemental.dds (i'm at work and can't look it up so misremembered file and tag names are likely).
this displays the icon correctly in the unit detail display in the lower left corner, but in the half-transparent mouse over info i get a quite large pink rectangle instead.
any ideas?
 
Is there any way to write your own mouseover text for Traits-- like, just adding a bullet point with your own words in addition to the normal output (promotions granted, -10% research, etc.)? I've got quite a few trait ideas I've implemented where I've had them grant the ability to build buildings or units, or the ability to gain certain promotions, but these don't show up on mousing over on the leader selection screen.
 
There should be a <Help></Help> field available for TraitInfos. You point that at a TXT_KEY and write what you want to have displayed in the Civilopedia there. Mouseovers for Adaptive trait are similar, but slightly more complicated if you add any of your new traits to adaptive.
 
I hope nobody minds me adding my question to this thread - I don't think it's worth its own.

Is there any way to save state information (values of variables) in the save-game file? I looked around and found CyVariableSystem, which keeps state while the game is open, but isn't saved - all the variables are lost if you exit. Scriptdata looked like it should work, but I got errors when attempting to read the data (to do with the datatypes, I think.)

I was trying to add a 'diminishing returns' aspect to a spell, so that it was less effective the more often it was used. To do that, I needed to keep a count of previous castings. I hit the problem with Scriptdata on the first casting, when (presumably) the data was uninitialised.

I suppose what I'd like to find is some sort of Python-accessible dictionary, to which my code could add arbitrary key/value pairs (for the variable name and its value), which was saved along with the rest of the game data. Barring that, are there any other methods I can use?

Thanks in advance for any tips. And, of course, thanks to all involved for this magnificent mod.
 
You should (have to?) to use pickle with scriptdata. You can find plenty of examples on how to do that in other mods, including those that came with BtS.
 
Top Bottom