Caveman 2 Cosmos (ideas/discussions thread)

I'm familiar with the building and the effect. The alert is due to animals that wander by the city I believe. Rather than disabling the tag, I'd prefer to maybe investigate what can be done to filter the alert further. It's been a very low priority bug issue since it's reporting. Elimination of unnecessary notifications are less than compelling in light of the more important corrections being made for the years we've spent in development here.
Ah so this trigger has 5% chance of activation only if enemy units are present nearby city?

From description it sounded like it always has 5% chance of triggering even if there are no enemies.
 
Yes. They have been superseded by other space settler units.
I removed all mentions of them everywhere except for art definitions, as those are used.
I also cleared obsoletions being in Cold Fusion.
 
At 3am I had 4 great ideas but I wasn't getting out of my warm bed to write them here. It is now 7am and it is still below freezing:lol:. Here is the first.

There is a minor bug in C2C caused by the exe. It is a bug that affects every new player and sometimes experienced players. It is the one where you have to ensure that you select the Prehistoric Era as you start a new game. The bug is that the exe expects the first era to be ERA_ANCIENT.

A fix for this is fairly straight forward but will take come computer time and a bit of software designed to do the task.

Step 1. change all occurrences of ERA_ANCIENT to ERA_ SEDENTARY in all files XML, Python, dll, ini the lot

Step 2. change all occurrences of ERA_PREHISTORIC to ERA_ANCIENT

Step 3. recompile the dll

Step 4 - Test 1. does it fix the bug

Step 5 - Test 2. does it break save games?

If it passes bot tests put on the SVN for the next release.

Step 6. modders fix their mod mods ie stuff not on the SVN. This will affect the music mod.​
 
Idea 2 - MIssionaries ( actually Mammoth and extinctions came first and I have already forgotten the forth)

This is much more long term and is becoming vaguer as I write this.

Three problems
  1. Automated missionaries and corporate executives work for the AI but have big problems for the player. The automated player missionaries don't take the dangers of the world into consideration. This is why we don't have automate functions for the subdued animals as it would use these same functions.

  2. Kornifere came up with a very good idea for "free missionaries" but many complained that they would end up with units they did not need.

    It is easy enough to check how many missionaries you have and how many you need so we can limit it to only give you new ones when you need them.

    This would allow Druidism and Shamanism to be set back to the way the designer originally intended.

    This would probably need a BUG screen that allows the player to turn on/off the feature for religions and vary the number of missionaries given eg +1 more than needed, -6 less than is needed

  3. What if when you change to a new State Religion you were given the oportunity to spread this religion to all your cities that don't have it at a price?
 
Mammoth Extinction.

My previous design has a few problems.
  1. Getting the correct turn for all the different game speeds means tasting every turn for all the game.

  2. To reduce the time for the every turn test I need to check every plot on the map for Mammoth Herd/Graveyard every load. It has to be every map because of scenario maps and the space maps.
This is impacting game turns and load time.

Now I am thinking "We are a 'what if' type game so 'What if Mammoths don't go extinct?'".

I can set up an event that will always fire once but has a 99% chance of actually happening. IE 1% chance that mammoths don't go extinct. The only problem is getting everyone the option of saving their mammoths in multiplayer games. We would also need to have a second spawn definition for post extinction event that has a very reduced chance of spawning a mammoth.

If the even fires
  1. all mammoth herds in the wild are changed to Mammoth Graveyards.
  2. If you don't have the Mammoth Rider wonder you can pay a large sum to save each individual Mammoth herd both on the map and in your cities. Map ones become graveyards if you don't pay up.
  3. If you have the Mammoth Rider wonder all your mammoths are saved for free.
 
  • Like
Reactions: DC0
Good to see yur creative "juices" flowing again. :thumbsup::)
 
Ah so this trigger has 5% chance of activation only if enemy units are present nearby city?

From description it sounded like it always has 5% chance of triggering even if there are no enemies.
Yes. The effect is to mimic the potential to find a way through into the city despite the defenses being in place still. Lets swordsmen get through even though the walls aren't knocked down (IF the enemy is there adjacent to the city and the 5%chance takes place.) I don't think it makes it any easier, as in makes the attackers ignore the city defense %, just disables the minimum defense for entry barrier for that round.
 
At 3am I had 4 great ideas but I wasn't getting out of my warm bed to write them here. It is now 7am and it is still below freezing:lol:. Here is the first.

There is a minor bug in C2C caused by the exe. It is a bug that affects every new player and sometimes experienced players. It is the one where you have to ensure that you select the Prehistoric Era as you start a new game. The bug is that the exe expects the first era to be ERA_ANCIENT.

A fix for this is fairly straight forward but will take come computer time and a bit of software designed to do the task.

Step 1. change all occurrences of ERA_ANCIENT to ERA_ SEDENTARY in all files XML, Python, dll, ini the lot

Step 2. change all occurrences of ERA_PREHISTORIC to ERA_ANCIENT

Step 3. recompile the dll

Step 4 - Test 1. does it fix the bug

Step 5 - Test 2. does it break save games?

If it passes bot tests put on the SVN for the next release.

Step 6. modders fix their mod mods ie stuff not on the SVN. This will affect the music mod.​
Yep - that would work. Of course it would. Pretty easily done. Still, let's hold off til after re-release.
Idea 2 - MIssionaries ( actually Mammoth and extinctions came first and I have already forgotten the forth)

This is much more long term and is becoming vaguer as I write this.

Three problems
  1. Automated missionaries and corporate executives work for the AI but have big problems for the player. The automated player missionaries don't take the dangers of the world into consideration. This is why we don't have automate functions for the subdued animals as it would use these same functions.

  2. Kornifere came up with a very good idea for "free missionaries" but many complained that they would end up with units they did not need.

    It is easy enough to check how many missionaries you have and how many you need so we can limit it to only give you new ones when you need them.

    This would allow Druidism and Shamanism to be set back to the way the designer originally intended.

    This would probably need a BUG screen that allows the player to turn on/off the feature for religions and vary the number of missionaries given eg +1 more than needed, -6 less than is needed

  3. What if when you change to a new State Religion you were given the oportunity to spread this religion to all your cities that don't have it at a price?
I guess all this depends on if I will eventually be able to include religion in the Ideas project as I've hoped to or if you've already got other solutions in play.
We would also need to have a second spawn definition for post extinction event that has a very reduced chance of spawning a mammoth.
Why?
If you don't have the Mammoth Rider wonder you can pay a large sum to save each individual Mammoth herd both on the map and in your cities. Map ones become graveyards if you don't pay up.
Seems to me the only way Mammoths would survive past the extinction event would be if the cities had Mammoth Herds (local source of the Bonus.) And even those would then obsolete at a point.

Let extinction mean extinction of all wild Mammoths and if Humans aren't supporting some in captivity, they are all gone period and even if they are, the herds would dwindle under human captivity and eventually die out.
 
Mammoth Extinction.
Should imo be done through event xml, an event that requires the tech that represent the time period the animal went extinct, an event that not necessarily is active for each game played, an event that is global and happens for every player when it happens, an even that has a very low chance of happening every turn, but that chance would increase for each player that reach the required tech due to having a chance to happen several times each end turn.
 
Yes. The effect is to mimic the potential to find a way through into the city despite the defenses being in place still. Lets swordsmen get through even though the walls aren't knocked down (IF the enemy is there adjacent to the city and the 5%chance takes place.) I don't think it makes it any easier, as in makes the attackers ignore the city defense %, just disables the minimum defense for entry barrier for that round.
Ah so this building has chance of weakening city defenses in exchange of gold, but gold isn't issue if you are builder.
Isn't there way to make it check if enemy is animal NPC before triggering that 5% chance?
 
Isn't there way to make it check if enemy is animal NPC before triggering that 5% chance?
Sure. Hunt down where the coding is for that tag and add such a filter, recompile and commit. About an hour's job most likely. But one of the many misc tasks that I don't have infinite time for and rapidly fading energy for of late.
 
Sure. Hunt down where the coding is for that tag and add such a filter, recompile and commit. About an hour's job most likely. But one of the many misc tasks that I don't have infinite time for and rapidly fading energy for of late.
Hunting down it was very fast, as there were only 5 such files to look.
If you search for X in Notepad++ and you get some search results, then you right click them and click "open all"
Its in CvCity.cpp on line 27212

Code:
void CvCity::doInvasion()
{
    PROFILE_FUNC();
 
    bool bTestInvasion = false;
    PlayerTypes ePlayer = NO_PLAYER;
    if (!isInvaded())
    {
        if (getInvasionChance() > 0)
        {
            for (int iI = 0; iI < NUM_DIRECTION_TYPES; iI++)
            {
                CvPlot* pAdjacentPlot = plotDirection(getX_INLINE(), getY_INLINE(), (DirectionTypes)iI);
                if (pAdjacentPlot != NULL && !bTestInvasion)
                {
                    CLLNode<IDInfo>* pUnitNode;
                    CvUnit* pLoopUnit;

                    pUnitNode = pAdjacentPlot->headUnitNode();
                    while (pUnitNode != NULL)
                    {
                        pLoopUnit = ::getUnit(pUnitNode->m_data);
                        pUnitNode = pAdjacentPlot->nextUnitNode(pUnitNode);
                    
                        if (GET_TEAM(pLoopUnit->getTeam()).isAtWar(getTeam()))
                        {
                            bTestInvasion = true;
                            ePlayer = pLoopUnit->getOwnerINLINE();
                            break;
                        }
                    }
                }
            }
        }
Code:
 if (GET_TEAM(pLoopUnit->getTeam()).isAtWar(getTeam()))
               bTestInvasion = true;
                ePlayer = pLoopUnit->getOwnerINLINE();
                break;
}
Now this checks if player is at war with ANY team.
Animal teams should be excluded.
I don't know how to do that or how to compile DLL.
 
Last edited:
Alright this will speed up the process of a fix anyhow. A compile will ruin any minis but I think I'm not frozen waiting on those at this moment. Probably tomorrow evening I can focus on modding enough to fix this and possibly look at a few other things.

I could've found it, likely faster, but I have such a hard time seeing this as worth any mental expense that I couldn't have been bothered to. Still, it would be nice to know its done I guess.
 
Last edited:
Alright this will speed up the process of a fix anyhow. A compile will ruin any minis but I think I'm not frozen waiting on those at this moment. Probably tomorrow evening I can focus on modding enough to fix this and possibly look at a few other things.

I could've found it, likely faster, but I have such a hard time seeing this as worth any mental expense that I couldn't have been bothered to. Still, it would be nice to know its done I guess.
I guess players dealt with Catacombs invasion message by not building or removing invasion tag.
It gets annoying quickly, if a lot of animals spawn and players have a lot of cities.
I had a lot of such messages on my no AI space playtrough, and I just ignored them - I was too focused on getting to space content :p

Now its nice to know, that location of bug (Invasion being triggered from animals at city) was found and will be executed :lol:
 
Last edited:
It should also exclude:
Defensive only units. (Though recon units would be a logical exception to that rule...)
Attack only city units (rams).​

An alternate approach to excluding the few would be to use narrow prerequisites to exclude the many:
Only let Strike Teams, Heroes, Recons, field commanders, and units lead by general be valid units for enabling the catacomb invasion feature.​
 
Be well DH! Be Well.
 
@All

i think some of the problems lately have been with the graphics card, mainly the Nvidia ones . . . the driver they had on 24 Apr did not take well, and have since corrected the problem with a new one dated May 9.
 
Top Bottom