Tinkering with the game options

Noyyau

Privateer Captain
Joined
Jun 9, 2012
Messages
1,446
Location
Italy
Preamble:
Recently I've been playing a few High to Low games, and liked the idea a lot. I also noticed that the civs I bring to first in score then remain at the top of the scoreboard for the rest of the game.

Seeing how the AI isn't really brilliant in setting up civs (especially at the beginning), I though: why not do this further? Why shouldn't more civs benefit from my wisdom and benevolence? :)mischief:)

So, question:

How can I modify the parameters of the High to Low option? Where are they coded?

I tried to have a look in the xml and python assets, but couldn't find anything meaningful.
 
I'm glad you are enjoying those game options. The code is in the SDK, in CvGame.cpp:

Code:
void CvGame::doHightoLow()
{
        MEMORY_TRACE_FUNCTION();

        int iI;
        if (!GC.getGameINLINE().isGameMultiPlayer())
        {
            if (isOption(GAMEOPTION_CHALLENGE_HIGH_TO_LOW))
            {
                if (!GC.getGameINLINE().isGameMultiPlayer())
                {
                    if (getGameTurn() >= GC.getDefineINT("HIGH_TO_LOW_FIRST_TURN_CHECK"))
                    {
                        if (getHighToLowCounter() < 2)
                        {
                            for (iI = 0; iI < MAX_PLAYERS; iI++)
                            {
                                if (GET_PLAYER((PlayerTypes)iI).isAlive())
                                {
                                    if (GET_PLAYER((PlayerTypes)iI).isHuman())
                                    {
                                        if (getPlayerRank((PlayerTypes)iI) == 0)
                                        {
                                                                                MEMORY_TRACK_EXEMPT();

                                            GC.getInitCore().reassignPlayerAdvanced((PlayerTypes)iI, getRankPlayer(countCivPlayersAlive() -1));
                                            changeHighToLowCounter(1);
                                                                                AddDLLMessage((PlayerTypes)iI, true, GC.getEVENT_MESSAGE_TIME(), gDLL->getText("TXT_KEY_PLAYER_REASSIGNED").GetCString(), "AS2D_WELOVEKING", MESSAGE_TYPE_MAJOR_EVENT, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"));
                                        }
                                    }
                                }
                            }
                                    }
                                }
                        }
            }
        }
}

Are you looking at increasing the number of civs you can run (from the '2' in the code)? I can make that a global define parameter in the next revision if you would like.
 
I can make that a global define parameter in the next revision if you would like.
That should be nice. It seems there is a growing number of players trying this option.
 
I'm glad you are enjoying those game options. The code is in the SDK, in CvGame.cpp:

Code:
Are you looking at increasing the number of civs you can run (from the '2' in the code)? I can make that a global define parameter in the next revision if you would like.[/QUOTE]

Oh wow yes a global define parameter would be awesome! :D
 
High to Low is great fun, makes for a truly interesting game!

Easy to get screwed over by it if you've got Barbarian Civs or Revolutions enabled though ;)
I still fondly remember losing a game because I got swapped over to my final civ - right as my previous one was about to conquer it! :lol:
I was left with one city and five javelins for an army, while eighteen horse archers and elephant riders were charging at it.
 
Oh wow yes a global define parameter would be awesome! :D
I hope you haven't found time too long, by the evening he already have implemented it :D
 
You can set the global define "HIGH_TO_LOW_NUM_REASSIGNMENTS". It defaults to "2".
 
I just love you all :goodjob:

For playing with High and Low, I found that it is better to start with a bunch of AI civs at game creation and Barb Civs disabled.
I didn't get Rezca's situation, but I did get shifted to a recently spawned barb civ that had its city tile and then peaks forever and ever (then I also learned that in totestra it is better to use the "reduce peaks" option).
I then manually activate the Barb Civ option with the python console after reaching the last changed civ.

Also when tinkering in the bonusinfo.xml file I noticed that some resources are coded to spawn relative to the number of civs in play, not map size, so that's probably why some resources were extremely rare when starting alone and letting the world be populated by barb civs.
Of course mapscripts then might spawn a few more depending on settings.
 
Also when tinkering in the bonusinfo.xml file I noticed that some resources are coded to spawn relative to the number of civs in play, not map size, so that's probably why some resources were extremely rare when starting alone and letting the world be populated by barb civs.
Of course mapscripts then might spawn a few more depending on settings.

You can force minimum & maximum values for resource spawning. Look for <iMinimumPerWorld> and <iMaximumPerWorld>. They can be added to any resource lacking it. They are scaled, so the numbers are for a standard map. On larger maps, it will be increased slightly.
 
You can force minimum & maximum values for resource spawning. Look for <iMinimumPerWorld> and <iMaximumPerWorld>. They can be added to any resource lacking it. They are scaled, so the numbers are for a standard map. On larger maps, it will be increased slightly.

I remember you introduced those not long ago, but I found those tags only on the strategic ("infrastructure" in the xml file) resources. Hmmm should look again to see if it's only those that are dependant on player number.
 
You can set the global define "HIGH_TO_LOW_NUM_REASSIGNMENTS". It defaults to "2".

Which file is it exactly?

I just updated to 886, but in \Assets\XML\ I've been searching each file there from "high_to_low" and the only hit was in A_New_Dawn_GlobalDefines.xml for HIGH_TO_LOW_FIRST_TURN_CHECK

then the gameoptions file to show/hide the option and the text files, but those are not relevant to the question.
 
Afforess forgot to add the variable to global defines. I will publish a fix ASAP but Sourceforge is down at the moment.
 
Afforess forgot to add the variable to global defines. I will publish a fix ASAP but Sourceforge is down at the moment.

I didn't forget, you don't have to add them to global defines. They use the default value specified in the code until they get added to the XML.
 
Sure, but how players are supposed to guess it exists ? I've added it at rev887.
 
Top Bottom