Some more questions about the mod.

I wonder what happens if those lines are removed.
Code:
            //to eliminate pre-build exploits for all Wonders and all Projects
            if (isProductionWonder() || isProductionProject())
            {
                break;
            }

Will it let build multiple wonders per turn?
That might be it. Pre-build exploits... I wonder what that's about exactly. They weren't too descriptive with that.
 
Spoiler :
Code:
void CvCity::doProduction(bool bAllowNoProduction)
{
    /************************************************************************************************/
    /* Afforess                      Start        12/21/09                                                */
    /*                                                                                              */
    /*                                                                                              */
    /************************************************************************************************/
    if (GC.getUSE_CAN_DO_PRODUCTION_CALLBACK())
    {
        if (Cy::call<bool>(PYGameModule, "doProduction", Cy::Args() << this))
        {
            return;
        }
    }
    /************************************************************************************************/
    /* Afforess                         END                                                            */
    /************************************************************************************************/
    if (!isHuman() || isProductionAutomated())
    {
        //    Koshling - with the unit contracting system we only build units to contractual
        //    orders (apart from a few emergency cases) and we should not change from building
        //    them due to new techs etc
        if (!isProduction() || isProductionProcess() || (AI_isChooseProductionDirty() && !isProductionUnit()))
        {
            AI_chooseProduction();
        }
    }

    if (!bAllowNoProduction && !isProduction())
    {
        return;
    }

    if (isProductionProcess())
    {
        /************************************************************************************************/
        /* UNOFFICIAL_PATCH                       12/07/09                         denev & jdog5000     */
        /*                                                                                              */
        /* Bugfix, Odd behavior                                                                         */
        /************************************************************************************************/
        if (m_bPopProductionProcess)
        {
            popOrder(0, false, true);
            m_bPopProductionProcess = false;
        }
        /************************************************************************************************/
        /* UNOFFICIAL_PATCH                        END                                                  */
        /************************************************************************************************/
        return;
    }

    if (isDisorder())
    {
        return;
    }

    if (isProduction())
    {
        changeProduction(getCurrentProductionDifference(false, true));
        setOverflowProduction(0);
        setFeatureProduction(0);
        /************************************************************************************************/
        /* Afforess    Multiple Production Mod        08/23/09                                            */
        /*                                                                                              */
        /*                                                                                              */
        /************************************************************************************************/
        setBuiltFoodProducedUnit(isFoodProduction());
        clearLostProduction();

        int iOverflowProductionModified = 0;
        while (isProduction() && productionLeft() <= iOverflowProductionModified)
        {
            changeProduction(iOverflowProductionModified);
            setOverflowProduction(0);

            popOrder(0, true, true);

            if (!isHuman() && !isProduction())
            {
                AI_chooseProduction();
            }

            //to eliminate pre-build exploits for all Wonders and all Projects
            if (isProductionWonder() || isProductionProject())
            {
                break;
            }

            //to eliminate pre-build exploits for Settlers and Workers
            if (isFoodProduction() && !isBuiltFoodProducedUnit())
            {
                break;
            }

            if (isProductionProcess())
            {
                break;
            }

            //fix production which floods from overflow capacity to next queue item if it exists
            if (isProduction() && m_iLostProductionBase > 0)
            {
                changeProduction(getExtraProductionDifference(m_iLostProductionBase));
                clearLostProduction();
            }

            iOverflowProductionModified = getOverflowProductionDifference();
        }

        if (m_iGoldFromLostProduction > 0)
        {
            MEMORY_TRACK_EXEMPT();

            CvWString szBuffer = gDLL->getText("TXT_KEY_MISC_LOST_PROD_CONVERTED", getNameKey(), m_iLostProductionModified, m_iGoldFromLostProduction);
            AddDLLMessage(getOwnerINLINE(), false, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_WONDERGOLD", MESSAGE_TYPE_MINOR_EVENT, GC.getCommerceInfo(COMMERCE_GOLD).getButton(), (ColorTypes)GC.getInfoTypeForString("COLOR_RED"), getX_INLINE(), getY_INLINE(), true, true);

            GET_PLAYER(getOwnerINLINE()).changeGold(m_iGoldFromLostProduction);
            clearLostProduction();
        }
        /************************************************************************************************/
        /* Afforess    Multiple Production Mod       END                                                */
        /************************************************************************************************/
    }
    else
    {
        changeOverflowProduction(getCurrentProductionDifference(false, false), getProductionModifier());
    }
}
It would start here I suppose. This is where the production step is actually taking place in a city at the beginning of a turn. You'll probably want to see what's in other functions being called here. This is in CvCity.cpp
WHAT THE QUACK?!
It LITERALLY [break]s on Wonders and Settlers, DUUUDE!!!
Like, there's no NEED to compile a new code altogether - just REMOVE those stupid [break]s to begin with.
I'm sooo gonna try it out IMMEDIATELY - see ya soon with a REPORT, dammit.
So SIMPLE, that I refuse to BELIEVE it.
 
I wonder what happens if those lines are removed.
Code:
            //to eliminate pre-build exploits for all Wonders and all Projects
            if (isProductionWonder() || isProductionProject())
            {
                break;
            }

Will it let build multiple wonders per turn?
I was writing about that BEFORE seeing your post.
If I'm *RIGHT* about it...
I'm gonna feel like the biggest GAME HACKER there can be, mwahahahahaha!!!!!
 
I was writing about that BEFORE seeing your post.
If I'm *RIGHT* about it...
I'm gonna feel like the biggest GAME HACKER there can be, mwahahahahaha!!!!!
You need github though, as source code is not present in SVN.
 
You need github though, as source code is not present in SVN.
So maybe you can test it quickly - I don't need credit, only results.
I would appreciate at least getting a "personal modmod", in case you don't want to implement it "officially".
Thanks.
 
So maybe you can test it quickly - I don't need credit, only results.
I would appreciate at least getting a "personal modmod", in case you don't want to implement it "officially".
Thanks.
DLL changes way too frequently for modmod, maybe I'll do test of it and then do pull request.

That is it you could build multiple food requiring units or wonders in one turn officially.
 
DLL changes way too frequently for modmod, maybe I'll do test of it and then do pull request.

That is it you could build multiple food requiring units or wonders in one turn officially.
English, please - is there a chance for me to get it working on my computer in the foreseeable future (if it even does work to begin with)?
 
English, please - is there a chance for me to get it working on my computer in the foreseeable future (if it even does work to begin with)?
Code changes are too frequent for modmod - like everyday something changes.

You could get github - follow instructions in link that I gave.
I'll test these changes if it works at all, and then "ask" on github if those changes can be implemented into mod as actual feature (not as modmod).

It built two wonders in one turn.
Also it produces multiple settlers in row too
 
Last edited:
Code changes are too frequent for modmod - like everyday something changes.

You could get github - follow instructions in link that I gave.
I'll test these changes if it works at all, and then "ask" on github if those changes can be implemented into mod as actual feature (not as modmod).

It built two wonders in one turn.
So do you need to VOTE between yourselves on this (kinda HUGE and "game changing") edit?
Or that's exactly what you meant to begin with?
And if it "goes through", could I get it from a SVN update - or is there a (long) "lag behind" between SVN and Git?
Thanks.
But it REALLY eliminates a dumb and unnecessary nuisance, believe me.
Oh, and you could just make it an OPTION, something like "Multi-Build Unlimited" - so that players could CHOOSE whether to use it or not, no forcing there.
 
There may be a good reason why multiple production is set to stop at wonders, I don't know what it may be though. We would have to ask some of the old timers for that.
Or read the multiple production mod thread might shed some light on what the "pre built-exploit" is.
Link
Because I'm afraid that you can produce food-produced units without blocking city population growth.
When the city has enough production to build both of Warrior (non food-produced unit) and Worker (food-produced unit), if you order a Warrior as first item, and order a Worker as next item, then it is possible.

But it certainly isn't smart way to restrict multiple workers production.
Now I'm reviewing the following idea:

In principle, multiple production rule isn't applied to food-produced unit.
Exceptionally, when first queue item is food-produced unit, the rule is applied to following food-produced items.
One exploit is that if you queue up settlers after something that is very cheap, you may be able to train settlers without ever loosing population growth on any turns ever.

So the food producing unit limitation needs to stay.

Here's a reason for the wonder limitation.
He set it up to apply the overflow to the next item on the list, not to another copy of the exact same item. So if you carefully select your tiles to barely miss popping out a worker this turn, then swap back to all your lush Super-Food tiles for the next turn and have a wonder lined up to follow the worker, you just applied a ton of food to your wonder.
 
Last edited:
No need to vote. I'm cool with changing it. Rax tested it and confirmed it would work and I agree its annoying. HOWEVER, this is with one caviat, which is that apparently they had found good cause as it can create some loopholes and if we find those and they are really an issue then it may have to go back to the way it was, so please, @raxo2222 go ahead and just comment that breaking portion out and leave a comment note to say why we removed it and that it's still there in case we do find we need it back.
 
There may be a good reason why multiple production is set to stop at wonders, I don't know what it may be though. We would have to ask some of the old timers for that.
Or read the multiple production mod thread might shed some light on what the "pre built-exploit" is.
It sounds to me to be a synonym of multi-building, just worded queerly.
Oh, wait, I KNOW!
This is what *I* had been doing like forever:
You have a 3-turn-worth Wonder?
Well, since in Vanilla you could only build ONE something - then just build something that OVERFLOWS a lot into "pre-building" production.
If you're lucky and use correct stuff, you can "pre-build exploit" to eventually build that Wonder in LESS than 3 turns (even down to ONE) due to SAVING UP production.
I've been doing it like ALWAYS, loool.
So this function simply makes this HARDER due to production "decay into gold", otherwise you'd just pile your OVERFLOW production into a Wonder while STILL building something EACH TURN.
Yes, it's STUPID in the era of Multi-Building, PERIOD.
 
That overflow having production % mod applied to it may be the very source of what they are saying is a pre-build exploit. There could be some other things they were considering as well, involving production added from captives/great people etc...
 
Here's a reason for the wonder limitation.
Yeah that's what I was trying to explain about the food issue earlier. I think there's a second portion in the code that is intended to help curb that. But perhaps we need a line in there that adds a check to eliminate any remaining food sourced production if the current build is not a food trained unit.
 
Problem I see is:
that cities that have e.g. 500% more hammers when building units than when building buildings one would always build a cheap unit before any building in the queue to make the 500% hammer boost apply to the building.
Same with units that can be built with food, a city with e.g. 100 food and 2 hammers that build 1 warrior (cost 2 hammers) before a wonder (cost 80 hammers) would then complete the warrior and the wonder in one turn due to the food applying to the wonder as hammers. The wonder would take 40 turns without the warrior in front.
Extreme examples but there are such things as food specialized cities with little hammer output and/or cities with a large hammer difference between unit and building production in a c2c game.

So rule should be that transition from building to unit or vice versa should break the multiple production unless we can trim away or add in production based on the hammer modifier change in that transition, and transition from food produced unit to non-food produced unit or vice versa does the same with the same unless clause.
 
Last edited:
Problem I see is:
that cities that have e.g. 500% more hammers when building units than when building buildings one would always build a cheap unit before any building in the queue to make the 500% hammer boost apply to the building.
Same with units that can be built with food, a city with e.g. 100 food and 2 hammers that build 1 warrior (cost 2 hammers) before a wonder (cost 80 hammers) would then complete the warrior and the wonder in one turn due to the food applying to the wonder as hammers.
Oh... yeah that's probably what they were looking at. hmm... There are other ways to address this of course. Like requiring that the current build category (unit/building/wonder) not change without forcing a break, which is what I thought we were operating with in the first place. That would far more directly apply to eliminating loopholes that are probably still allowed otherwise. You could do this to finish a building quickly as well right now, even if said building was not a wonder. That would also manage the food issue to at least keep buildings of any kind from being the recipient of food production directly.
 
I committed this change, I guess it can be refined further to prevent such exploits

AI also would accidentally stumble on those exploits too.

I dislike this wonder limitation too, that is you couldn't build more than one wonder per turn.
 
Back
Top Bottom