• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Modmodding Q&A Thread

It was a lower case T.

IT WAS A SINGLE T THAT WAS ERRONEOUSLY LOWER CASE.

I have no idea how it became lower case.

BUT IT DID.

And wasted hours of my life.

Until I decided "shove it, I'm gonna take 5 minutes and remerge the scenario file"

And it works. Pushing now.
 
Welcome to the wonderful world of debugging. :lol:
 
Welcome to my day to day life.
 
Oh don't be fooled, I am well acquainted with absurdly stupid errors that crash or ruin a program.

Back a couple of summers ago, I built a TileMap system in Pygame. I had everything working, until I implemented a moving camera. When I got to the edges of the map, it crashed due to an out of bounds error. I was confounded, I thought I set up safeguards to prevent it, and when I checked, the safe guards were still there. I spent an entire day trying to find it, and finally gave up. For a month I left it alone, until one fateful day I returned.

And one of the +s was a -.
 
Only until your bank switches + and - and you are suddenly in massive debt.
 
Oh don't be fooled, I am well acquainted with absurdly stupid errors that crash or ruin a program.

Back a couple of summers ago, I built a TileMap system in Pygame. I had everything working, until I implemented a moving camera. When I got to the edges of the map, it crashed due to an out of bounds error. I was confounded, I thought I set up safeguards to prevent it, and when I checked, the safe guards were still there. I spent an entire day trying to find it, and finally gave up. For a month I left it alone, until one fateful day I returned.

And one of the +s was a -.
I once was able to help out a colleague by pointing out the difference between i++ and ++i.
 
I once was able to help out a colleague by pointing out the difference between i++ and ++i.
Ah yes, increment then assign vs assign then increment.

EDIT: This is just going to become /thread ProgrammingCirclejerk isn't it?
 
In that case it would be good practice to use a thread pool instead.
 
The former.
 
I can't get the Vikings to give up on Deification. Even after going into the DLL and changing CivPlayerAI's code:

Code:
else if (eCivic == CIVIC_VASSALAGE)
    {
        if (getCurrentEra() >= ERA_INDUSTRIAL)
        {
            iValue *= 3;
            iValue /= 4;
        }
    }
    else if (eCivic == CIVIC_DEIFICATION)
    {
        if (getCurrentEra() >= ERA_RENAISSANCE)
        {
            iValue /= 2;
        }
    }
    else if (eCivic == CIVIC_REDISTRIBUTION)
    {
        if (getCurrentEra() >= ERA_MEDIEVAL)
        {
            iValue /= 2;
        }
    }

To instead say iValue = MIN_INT for each of the iValue applications, the Vikings refuse to budge from Deification. Am I missing something?
 
So, anyone have any idea why Denmark still chooses Deification even when it's AI rates it as the worst value?
 
The only way I've found to drive the Vikings away from Deification so far has been to make Ragnar have Clergy as a favorite civic.
 
Is there currently a method for checking the total number of techs a civ has?
 
No, you need to count.
 
I am having trouble with using isHasTech in CvCity.cpp. I am trying to replace all Era specific events with number of techs specific events, but for some reason I am getting the error "Expression must have class type" on getTeam() when I use the following code:

Code:
if (getTeam().isHasTech((TechTypes)iI)) {

But by itself it is fine. If it helps I am doing this inside of Greece's UP.
 
getTeam() returns a TeamTypes enum, you need the actual object, i.e. GET_TEAM(getTeam()).isHasTech(...).
 
I can't figure out how to get isHasTech within CvGameTextMgr::setFoodHelp. I assume the reason it's not working is because city is written as CvCity&. Google failed me
 
Back
Top Bottom