Vincentz Infinite Projects [VIP MOD]

Yes :) Please share. The system as is, kinda works, but have room for improvement ;)
hey hey

so i kinda fiddled with an idea.
ill try to be focused with the method:

- assume UPT 10

on move check - run over all potential tiles if > 10 -> cant move to
if all tiles are above 10 -> choose the one with 10 that is more likely (highest priority) and allow movement into -> e.g upt = 11.
all tiles are 11 -> check, allow a 12 upt.

if stack is above 10, and the target tile is les then 10, move all units to fill in the 10, other left over units are banned from that tile.

in theory -> ai will never get stuck nor a human, it will always have room to move to.
this will make sure stacks are built above 10 only if there is room.

i think this will bring control to the stacks in an elegant way without hindering the ai . something like - Dispersed Stack limits :)

it will have to include lots of here and there logic and functionality.
but i invested my effor in the last year with CITY STATES and my Ranged attack...
 
What im doing now is

verifyStackValid();
Code:
    //Vincentz #UPT
    int iNumVisibleUnits = 0;
    if (plot()->isVisible(GC.getGameINLINE().getActiveTeam(), !GC.getGameINLINE().isDebugMode()))
    {
        CLLNode<IDInfo>* pUnitNode5 = plot()->headUnitNode();
        while (pUnitNode5 != NULL)
        {
            CvUnit* pUnit = ::getUnit(pUnitNode5->m_data);
            pUnitNode5 = plot()->nextUnitNode(pUnitNode5);

            if (pUnit && !pUnit->isInvisible(GC.getGameINLINE().getActiveTeam(), false))
            {
                ++iNumVisibleUnits;
            }
        }
    }

    //    if ((plot()->getNumUnits() > GC.getDefineINT("MAXUPT")) && (getDomainType() != DOMAIN_AIR))
    if ((iNumVisibleUnits > GC.getDefineINT("MAXUPT") * GET_PLAYER(getOwnerINLINE()).getCurrentEra() + GC.getDefineINT("STARTUPT")) && (getDomainType() != DOMAIN_AIR))
    {
        return jumpToNearestValidPlot();
    }

    //Vincentz #UPT


CanMoveInto
Code:
//Vincentz UPT
    int iNumVisibleUnits = 0;
    if (pPlot->isVisible(GC.getGameINLINE().getActiveTeam(), false))
    {
        CLLNode<IDInfo>* pUnitNode5 = pPlot->headUnitNode();
        while (pUnitNode5 != NULL)
        {
            CvUnit* pUnit = ::getUnit(pUnitNode5->m_data);
            pUnitNode5 = pPlot->nextUnitNode(pUnitNode5);

            if (pUnit && !pUnit->isInvisible(GC.getGameINLINE().getActiveTeam(), false))
            {
                ++iNumVisibleUnits;
            }
        }
    }
    if (!pPlot->isVisibleEnemyUnit(this))
    {
        if (iNumVisibleUnits >= GC.getDefineINT("MAXUPT") * GET_PLAYER(getOwnerINLINE()).getCurrentEra() + GC.getDefineINT("STARTUPT"))
        {
            return false;
        }
    }
    //Vincentz #UPT
 
Hey,
Ok,
So you jumping units around to nearest.
I like that you used the era to tweak upt limits.

What about the ai you mentioned?
The upt doesnt apply always?

If going with the idea i suggested,
I assume that,
Junptonearest,
Should be duplicated as a core function,
There it will jump the unit, to the closest tile that us acceptable, and dont have a stack of upt limit.
Abd if all junpto tiles are above uot,
Run the jumpto again, but without the upt...this is like tge second coat that will allow above the upt limit if all the tiles have above upt .

Something like that i imagine.

What do you think?
 
Its pretty close to what it does now more or less ;)

For now I will leave it, as the AI seems to be able to use it fairly well.
And there are a lot of other AI to look at. The AI just threw a single unit at a city I just captured. It didnt have any chance of winning and there were several of my unit in the city, so even if it had won, it wouldnt really have gained anything.
So I think my next step will be AI. Not my favorite to be honest, but it needs to be done.
 
Im considering recreating my "hidden" flexible difficulty modifier and rebrand it as 7 Sins:
  • Lust -> Extra Happiness Consumption
    Based on Population
  • Gluttony -> Extra Food Consumption
    Based on Crop Yield
  • Greed -> Less Commerce (or extra inflation)
    Based on GNP
  • Sloth -> Less Production
    Based on Mfg Goods
  • Wrath -> Worse Unit Combat Odds
    Based on Military Strength
  • Envy -> Less Culture
    Based on Land Area
  • Pride -> Negative Diplomacy Modifiers
    Based on Score
Ideally these should work independent of each other, and could loosely be based on Demographics.
But maybe just adjust them based on score.

The end result should be a more challenging game.
 
Last edited:
When I put it to pass the turn, this error appeared, and from that point on, the turn is loading infinitely.

Any idea what it could be?

I'm uploading my save too.

upload_2022-6-18_10-49-39.png


*Update :

Two new errors appeared, but when I clicked "Ignore always", the game kept working, but I don't know what impact these errors can have on the game.

upload_2022-6-18_10-34-25.png


upload_2022-6-18_10-33-55.png
 

Attachments

  • Gabriel Lima BC-6550.CivBeyondSwordSave
    415.5 KB · Views: 16
Last edited:
Those messages are asserts that made sense in vanilla, but not in my mod. I haven't disabled them though.
The popups come up because I uploaded the mod with a "Debug" gamecore.dll.
Its quite a bit slower, and can be used for tracing down bugs. Next upload will be with a "Release" version, without these annoying popups.

You can "Ignore always", however when you start the game again and load, the messages will unfortunately pop up again :(
 
Those messages are asserts that made sense in vanilla, but not in my mod. I haven't disabled them though.
The popups come up because I uploaded the mod with a "Debug" gamecore.dll.
Its quite a bit slower, and can be used for tracing down bugs. Next upload will be with a "Release" version, without these annoying popups.

You can "Ignore always", however when you start the game again and load, the messages will unfortunately pop up again :(

Thanks for the reply, and I'm glad to hear that these messages are nothing and that I can continue playing on my save. And taking the opportunity to give some feedback on the mod, I'm really enjoying what I've seen so far, and I have to admit that I'm taking a beating for the AI.:lol:
 
Im considering recreating my "hidden" flexible difficulty modifier and rebrand it as 7 Sins:
  • Lust -> Extra Happiness Consumption
    Based on Population
  • Gluttony -> Extra Food Consumption
    Based on Crop Yield
  • Greed -> Less Commerce (or extra inflation)
    Based on GNP
  • Sloth -> Less Production
    Based on Mfg Goods
  • Wrath -> Worse Unit Combat Odds
    Based on Military Strength
  • Envy -> Less Culture
    Based on Land Area
  • Pride -> Negative Diplomacy Modifiers
    Based on Score
Ideally these should work independent of each other, and could loosely be based on Demographics.
But maybe just adjust them based on score.

The end result should be a more challenging game.
Interesting tematic choice. Imo it could be interesting althougth balance would be crucial. Also rather than sins I see it as normal processes in most cases as an increase in private consumption. The ones I see most fitting are increased food consuption and happiness, worst combat odds could be interesting althougth if it comes based on demographics you are already on a winning position, same with culture or diplo.
 
Yeah, the "sins" isn't really the best description, it is more of a "rest on your laurels" kind a thing. And yes, it would in most parts be introduced in an already winning position. However, my last game I actually had quite fun taking over the world. It was a challenge albeit an easy challenge.
What I want to accomplish is a challenging challenge :) Even though my score was triple that of the 2nd on the leaderboard, I could easily have lost if the AI had come together. Instead I picked them off one by one. And while it was a difficult to stay ahead in the science department, I was able to get a comfortable lead in the end.

Some mods simply turn up the difficulty, but with the 7 different modifiers, there is a "mini-game" in managing it the best way. Simply building tons of troops wont help as the efficiency of the troops becomes weaker. Simply producing huge cities with tons of production and food wont be a viable solution, as they would be penalized, and most important, getting a huge lead on the scoreboard, would get the AI to pool together, and in a joint effort stop the "mad leader who is trying to take over the world"
 
What I want to accomplish is a challenging challenge :) Even though my score was triple that of the 2nd on the leaderboard, I could easily have lost if the AI had come together. Instead I picked them off one by one. And while it was a difficult to stay ahead in the science department, I was able to get a comfortable lead in the end.
I also have that goal for my own mod. :)
There the difficulty is increasing by the size of your empire. Every city is increasing/decreasing global things by 1%.

Difficulty Increasing with Empire Size: New feature in version 1.1. The bigger your empire gets, the harder it is to manage. Now not only maintenance costs increase but other aspects also change to prevent snowballing over smaller civs and keep the game challenging. Maintenance Cost in All Cities, Maintenance Cost from Distance to Palace, Maintenance Cost from Number of Cities, Great People Rate, Great General Rate, Golden Age Length and Culture all decrease by 1% per Cities. Anarchy Length, War Weariness and Hurry Production Cost all increase by 1% per City.
(I just noticed that the description is wrong: maintenance is not decreasing but increasing)
 
Keep on pluggin' those holes! :goodjob:
 
I was just referring to the overall project. I had nothing specific in mind. :D
 
This is just a thought, but needed to write it down before it blows away from that grey matter I once called a brain.
But what if there was OR decisions in the tech tree instead of ALL. So a civ have to make a choice. Either to go with A or B.
This could include units and buildings designated at the techs too. It could create some diversity, and also a need of change of strategy and tactics.
 
I know there's a theoretical foundation in Civ2 to make mutually-exclusive tech branches, but I don't know if modders ever experimented with it. If you figure out a user-friendly framework, I can only imagine what the Civ4 crowd could do with it. :cool:
 
That is exactly how Master of Orion 2 tech tree works. It works well there... though I always choose Creative racial trait, so I got all choices at the same time.
I don't know how it would work with Civ4. Interesting idea, never the less.
 
Doesn't Thunderbird over in the C2C forums have something similar to what your thinking? I know my last go around on the Tech Tree, I chose Clockworks instead of Steamworks in the TT, and my Tech choices shifted dramatically.
 
Top Bottom