FfH2 Bug Thread

I've only recently discovered FfH2, and am not a very good civ player or knowledgeable about Civ, so I'd like to apologize if this is not a bug, not a FfH2 bug, or if I'm too vague.

...

Any ideas what's happening?

Install my modmod (see link in signature) and try again (you'll have to start a new game). If you still see this issue, post a savegame in the forum and I'll look into it.
 
doviello's worker to beastman upgrade is causing problem in agresssive ai scenarios, (blood of angels) they don't make any improvements and losing battles in long term
how can I disable worker to beastman upgrade for doviello?
it is realistic but not important for gameplay imo
 
Just play a modmod like Better Naval AI (it's not only naval stuff it improves).
 
I'm playing with naval ai modmod already; but still doviello upgrades his workers to beastman always, and adopting conquest at start, and stay with 5-size cities all game, because of ''agressive ai option'' in scenario
 
If that is the case you should report that in the more naval AI bug thread. I'm sure Tholal is willing to make the AI better by having them keep some workers as workers.
 
Reading his fix it seems unlikely that the AI would ever transform all his workers to beastmen unless gc.getInfoTypeForString('UNITCLASS_WORKER') is not updated when the spell is cast. If it is only updated once a turn they will still transform all workers to beastmen.

An other possibility is that the Doviello KeeprOT7Keys was playing against only had one city. In that case the fix would help. Still two workers per city as minimum seems a lot. I would rather change it to pPlayer.getNumCities() >= pPlayer.getUnitClassCount(gc.getInfoTypeForString('UNITCLASS_WORKER')) to solve that problem.
 
thanks guys for previous question :D
not a bug, but I don't want to start a thread for that:
I'm making an eurasia map for ffh2. indonesia and iceland is the corners of the map. (84X44)
but I have a question, what's the mechanic of goblin forts? soldiers in them I mean;
when I finished the terrain part of map I added some goblin forts around the map, and 5 barbarian city, but while I testing game I saw a goblin fort with 6-7 goblin archer (in turn 10 or 15).And I didn't add any unit to these forts in worldbuilder.Is it calculating on barbarian city count?
or any assosication with it? or total goblin fort number?
All goblin forts have same soldiers, with same numbers; too.
 
Yeah, it's a known mapmaker problem. I believe that each time you load a map, it places a goblin on a fort. You have to remove them manually when editing/creating maps.
 
oh thanks lone wolf :D
 
I tried

iAC = CyGame().getGlobalCounter()
iMax = 1.1 + 0.03 * iAC + ( iAC / 70 )**3.1
iMult = math.log10( ( 2 + iAC ) / 16 ) + ( iAC / 90 )**6
iMultB = iMult * gc.getDefineINT('PLANAR_GATE_CHANCE') + 822

if CyGame().getSorenRandNum(10000, "Planar Gate") < iMultB:

In python, but its just breaking the CivEventsManager code ... any knowledge as to why?

I was certain A**B could be an exponent function in python, and I was vaguely certain that math.log10 would work in python.

Anyone know what I'm missing?


Edit: I even tried import math, and it didn't seem to work

Edit: Exponent is fine, the only thing that BREAKS the code is math.log10 ....

Anyone know a more appropriate way to perform logarithms in FFH2 python? Or is it impossible even with import math?

Edit: I downloaded Python27, thinking I could isolate math.py and add it to the folder ... but I couldn't find it.
 
Why make it so complicated? Why not just remove the math.log10 part?
 
(2 + iAC) / 16 gives 0 if iAC < 14 (you're dividing integers and python rounds down always).
log(0) is not defined.
If you want a float division, try "x / 16.0". Like:
Code:
iMax = 1.1 + 0.03 * iAC + ( iAC / 70.0 )**3.1 
iMult = math.log10( ( 2 + iAC ) / 16.0 ) + ( iAC / 90.0 )**6

Just out of interest:
You want to make a function for the chance of a planar gate spawning a unit, right?
What kind of behaviour do you want to archieve? It may indeed be possible to get similar behaviour just with power functions.
 
I want it to start at 0 for 0 AC, then ramp up to around 9 - 12% at AC 30, then plateau, and start picking back up at around 60, 70, 75 ... taking a steep climb near 90, and reaching around 28-35% at AC 100
 
Thanks lfgr, adding .0 to the denominator fixed the problem :)


now, one of my exponents is a 3.1 ... does that see it as 3 or 3.1?

I hear if you want to get a fractional/floating exponent, u need to do Math.power? (math.pow(x,y))

So maybe math.pow(x/70.0,3.1)?
 
What about that:
if 0-30: AC/3 or alternatively non-linear 10 - ( 10 / (30^c) ) * (30 - x)^c
if 30-60: 10
if 60-100: 10 + ( 20 / 40^d ) * ( (AC - 60)^d )
c and d is your choice, depends how steep you want the function at the beginning respectively the end.

It's just stretched and moved power functions and linear functions concatenated. Something like that might me enough for what you want.
 
For some reason my modifications have caused UnitUtil from bug to not initialize.

Now, since its Bug, it shouldn't matter right? But I DID see a massive amount of OOS errors in the mid to late game ... was this due to the Power Functions of iMult and iMax, or was it the UnitUtil error?

I'd be prone to think it was the power functions of iMult specifically

(I had switched to power functions because logs were slowing down the game too much)
 
For some reason my modifications have caused UnitUtil from bug to not initialize.

Now, since its Bug, it shouldn't matter right? But I DID see a massive amount of OOS errors in the mid to late game ... was this due to the Power Functions of iMult and iMax, or was it the UnitUtil error?

I'd be prone to think it was the power functions of iMult specifically

(I had switched to power functions because logs were slowing down the game too much)

I'd say try to fix the UnitUtil error first :)
I remember getting misleading error reports from BUG several times, so the problem may not even directly have to do with UnitUtil. Did you get any python exceptions? Did you check your edits for syntax errors (I usually run "python x.py" before trying a modification in-game)?
 
python x.py?

and that's the only error, and only when I start a game (once map is loaded)


Edit:

All I did was add

if pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_DUNGEON_TORTURE')) > 0:
if pUnit.isAlive():
if CyGame().getSorenRandNum(100, "Asylum") < 50:
pUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_TORTURED_SOULS'), True)

to CivGameUtils.py

(between fixing planar gates and testing the game)

----

I'm tempted to comment that part out and see if the error persists
 
Top Bottom