Mod-Modders Guide to Fall Further

What I had to do was take the FfH2 code, from the FfH2 Modders thread, and the code Xienwolf provided, and combine them. There's a new source code up for FfH2 though, so I don't know how well it works with FF code.
No such luck. I just tried that with the the new FFH2 code, and the same error happened. Thanks anyway, though.
 
I am pretty sure that what I linked in the first post should work, so if you downloaded it recently then I am just wrong. But if you downloaded a while ago, try getting it again (or if you didn't download at all).

For all future releases, everything you need to compile the code will be included, you just have to have the libraries set up on your machine so that you are capable of compiling any Civ code with your choice of Codeblocks or VS2008 Express (probably any VS though in actuality)
 
I am pretty sure that what I linked in the first post should work, so if you downloaded it recently then I am just wrong. But if you downloaded a while ago, try getting it again (or if you didn't download at all).

For all future releases, everything you need to compile the code will be included, you just have to have the libraries set up on your machine so that you are capable of compiling any Civ code with your choice of Codeblocks or VS2008 Express (probably any VS though in actuality)

It was downloaded yesterday evening, but I downloaded it again just in case. Same problem. I can compile the FFH2 DLL (although it doesn't do me any good since it's version 41), so my problem is definitely something specific to the FF code. Any further ideas, or am I dead in the water until that future release comes out?
 
Do you use Codeblocks, or Visual Studio? I would imagine Codeblocks if you compiled FfH source, be certain that there is not a CyMapInterface.cpp file, and that there ARE CyMapInterface1.cpp & CyMapInterface2.cpp files when you open the project. Right now that is the major difference
 
I have 2 questions reagarding promotions.

1.) If i have promotion A exclude promotion B, but a unit gets B first, then A, does he keep B?

and 2.) If I exclude the Mutated promotion, does the mutation effect still happen and the unit just doesn't get the Mutated promo (allowing it to mutate again), or does it block the complete effect?
 
Do you use Codeblocks, or Visual Studio? I would imagine Codeblocks if you compiled FfH source, be certain that there is not a CyMapInterface.cpp file, and that there ARE CyMapInterface1.cpp & CyMapInterface2.cpp files when you open the project. Right now that is the major difference

Codeblocks. And the CyMapInterface thing isn't the problem, I just checked that too.
 
Exclusion is preventative. Overwrite is curative. So if you use both, then you can never have the second promotion when you have the first one, but if you only use one of the two, then it is possible to have both if attained in the proper order.

Mutation effect happens when you gain mutation promotion, so prevention of gaining Mutated stops mutating, but removal after mutation happens allows mutation to happen again if re-acquired later.
 
Thanks!
Thats what i thought, but i wasn't sure.
 
Is there a problem with ":" in the pedia? I tried to add it to a promotion name and it didn't work... It stopped before the ":" and screwed up the [ICON_BLABLA] of the pedia.
 
Well, I'll use another symbol.

Anyway, I'm unable to round a number up in python. I've used round(iLevel / 4). When iLevel is 10, it gives round(2.5) and it's rounded to 2 while I would like to have it rounded to 3. I think the ceil() function would be useful (if I understood the documentation right) but I can't use it for reasons unknown to me.
 
floor forces the number toward negative infinity, ceil forces it toward positive infinity. I think the rule is that round forces it toward 0 or something like that, mildly counter-intuitive IIRC. trunc just chops the decimal, whatever it was.


Near as I can tell, you have to say

math.ceil(fNumber)

And math should be universally available and defined I guess.
 
Well, in the python error log, I get "global name match isn't defined". How can I define it? If it's too much of a hassle, I'll find another way but it would be handy :)
 
Change match to math?
Haha, no, I wrote it "math" in the file. I didn't paste the error message, so it's just a typo I did when typing my post :lol:

The actual function:
Code:
def spellWangoleOfBwoheshegu(caster):
	pPlot = caster.plot()
	iLevel = caster.getLevel()
	iValue = math.ceil(iLevel / 4)
	iValue = int(iValue)
	CvUtil.pyPrint('Value = %d'
		       %(iValue))
	for iUnit in range(pPlot.getNumUnits()):
		pUnit = pPlot.getUnit(iUnit)
		for i in range(iValue):
			CvUtil.pyPrint('i = %d'
				       %(i))
			iSfx = str(int(i) + 1)
			pUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOTIVATED' + iSfx), true)
 
If I had too much comments in python (for documentation sake), would the processing speed be altered?
 
then maybe import math is missing? Imports are at the beginning of a python file
 
Back
Top Bottom