Promotions DLL

Oh yes that would be fantastic. But you should use thelopez code for that if needed so we can use both. :)
 
Hey TLO,

I found a little bug (nothing gamebreaking but nevertheless annoying) in CvGameTextMgr.cpp.

This code:

Code:
iHappy += std::max(0, (city.getCelebrityHappiness()));
should be:
Code:
iHappy = std::max(0, (city.getCelebrityHappiness()));
 
I suppose I screwed up the merging. Also this modcomp conflicts with Superspies. Both use 'canPromote'.
Anyway it seems to work fine now, thanks for the nice modcomp :)

Hi Arian,

Were you able to resolve this issue with Super Spies? I am running into the same thing.
 
hey guys, don't know if anyone wtill watches this thread, but I cannot get the tags to work in game?? They compile fine and the info diplays in the promotions, but the effects don't work in game? so far I have tried the celebrity and bonusiaircombat, the effects appears in the info but doesn't affect the game??

Any Idea what might be wrong or anything that I might have missed to get this curious outcome??

EDIT: Never mind.... I missed a chunk of SDK code! finally found it!
 
I think I figured out another CTD bug in this MOD, but I could be mistaken.
I wasn't creating any paratroopers so I think it was the AI building/using paratroopers.

I was getting a CTD because of the paratrooper tag in UnitAI.cpp

The CTD is a Division by Zero problem. I think it arrises because the paratrooper promotions can be used by units with the UNITAI_PARADROP. Because of this, I think that iParatrooperCount can be zero. I changed:


Code:
iValue += 20 * (AI_attackOdds(pAdjacentPlot, true) - ((50 * iDefenderCount) / (iParatrooperCount + iAttackerCount)));

to this:


Code:
iValue += 20 * (AI_attackOdds(pAdjacentPlot, true) - ((50 * iDefenderCount) / ([COLOR="Red"]std:max: (1, [/COLOR]iParatrooperCount) + iAttackerCount)));

Then no more CTD. Is any of this correct?
 
So I decided to come back here today. Thanks for the compliments/maintenance while I was gone. Probably not getting back into modding, though I can't tell the future so.......
 
Top Bottom