Modders Guide to FfH2

If you ever get a spare moment, could you bundle the "High to Low" option with your Assimilation mod? It's an awesome game option and I think it would be a ton of fun for BtS players.

I don't really have much time so I'll have to use my time machine to do it.

Okay, here you go. I went back to 2 weeks ago and added it to assimilation: http://forums.civfanatics.com/showthread.php?t=281289
 
I'll try that out and see how it works out. Thanks for the header. Since I'm in the office and I don't have the file I'll post it up later for you to have a look and I'll let you know if it works!

Thanks Kael.

Okay I've finally checked my FfH Editor and the B1 has a number, I have actually added 13 new units. From Columns C up to O. Thus my B1 sum is now 332, which if manually calculated is correct.

They newly added unitinfos are not in alphabetical order though. Will this effect the outcome of the export and break the script?

I've attached the thing below for you to go through. Mind you the name and unitclass are still under development so the names might be a bit silly :p
 

Attachments

Okay I've finally checked my FfH Editor and the B1 has a number, I have actually added 13 new units. From Columns C up to O. Thus my B1 sum is now 332, which if manually calculated is correct.

They newly added unitinfos are not in alphabetical order though. Will this effect the outcome of the export and break the script?

I've attached the thing below for you to go through. Mind you the name and unitclass are still under development so the names might be a bit silly :p

The units export fine for me.
 
How can I make Scorch spell (Sun I) castable on Grassland (turning it to Plains) ??

Replace these in CvSpellInterface.py

Code:
def reqScorch(caster):
	pPlot = caster.plot()
	pPlayer = gc.getPlayer(caster.getOwner())
	if (pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_PLAINS') or pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_FIELDS_OF_PERDITION') or pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_GRASSLAND')):
		if pPlayer.isHuman() == False:
			if caster.getOwner() == pPlot.getOwner():
				return False
		return True
	if pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_SNOW'):
		if pPlayer.isHuman() == False:
			if caster.getOwner() != pPlot.getOwner():
				return False
			if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_DOVIELLO'):
				return False
			if pPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_ILLIANS'):
				return False
		return True	
	return False

def spellScorch(caster):
	pPlot = caster.plot()
	if pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_PLAINS'):
		pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_DESERT'),True,True)
	if pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_FIELDS_OF_PERDITION'):
		pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_BURNING_SANDS'),True,True)
	if pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_SNOW'):
		pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_TUNDRA'),True,True)
	if pPlot.getTerrainType() == gc.getInfoTypeForString('TERRAIN_GRASSLAND'):
		pPlot.setTerrainType(gc.getInfoTypeForString('TERRAIN_PLAINS'),True,True)
	if pPlot.isOwned():
		startWar(caster.getOwner(), pPlot.getOwner())
 
What do the <bDispel> tag in CIV4SpellInfos.xml and <bDispellable> tag in CIV4PromotionInfos.xml do?

I thought that they were used to remove these promotions in the old Dispel Magic spell, but the tags still exist and promotions and 2 spells (Dispel Magic and Revelation) still have the tags even though it doesn't seem to have the old effect anymore. (I'd personally like it if the old effect returned, without loosing the new one.)
 
The source code for version "h" is linked in the first post.
 
All it does now is validate spells as castable if a dispellable unit is in range

But it doesn't actually dispel spells, only mana nodes?
 
I have a rather stupid question: Can XML changes lead to a total game crash? I modded both the XML and Python files heavily, but now my game crashes a couple of turns (10-20) after Hyborem enters the game for no apparent reason.

It would be nice to know if I can stick with undoing the Python stuff to find the reason for the crash, or if the culprit is more likely to be found in the xml.
 
Sure they can, depending on what you changed. Incorrect xml graphics defines are a very common cause of unexplained crashes. Removing something that is called in C++ or Python tends to lead to crashes. One of my most recent crashed came from removing the BRIGIT_HELD unit and forgetting to stop this unit from being placed on The Ring of Carcer when the maps loads. If you deleted Hyborem, any of the units he starts with, or some types of hell terrain it would crash when he enters the game. There are a lot of other possible causes too though.
 
Thanks for the answer. I have no idea what the issue that causes the bug could be though. I don't remember changing anything complicated about the infernals and if I use the patch h files to play for a bit and switch back to my version after ~30-40 turns the game seems to be stable again.

So my question is: Is there something specific happening about 4-20 turns after the infernals have entered the game, which I could have broken with my tinkering?
 
Possibly, but only if he has Malevolent Designs. (I removed the requirement in my version though, as I like being abel to steal the AV holy city as my capital and don't like having to wait to summon him until after I have the tech.)

My instincts say it has to do with Hell terrain, but I don't have much to base that on.



What kind of changes have you made?
 
Hmm apparently the crashing is not directly related to Hyborem. I started a test game and gave my starting civ infernal pact at the beginning of the game, so I could switch to Hyborem.

I played for about 200 turns until the crash happened, which I could not repeat on reload. The other games started crashing at around that turncounter as well

The XML changes I made were mostly value tweaks, adding promotions to certain units, changing civics and tech requirements, tweaking AI leader flavors etc. Nothing that should be able to produce a crash. No graphic changes except changing the Flames graphic to Fallout.

In Python I changed the lairs, so epic lairs can be explored more often, tweaked some Python AI tech scripts by giving them a tech requirement, added a few more results to the infernal grimoire. I made barbarian axemen and champions available earlier (at mining/smelting instead of bronzeworking/ironworking).
Also some value changes like reducing the Illian worldspell to 10 turns, but nothing that stands out as a possible crash issue.
Those are pretty much all the changes.
 
Yeah, I got some weird crashes with the Legion modmod when I gave a trait -100% GPP
 
Back
Top Bottom