1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Revolution: with BarbarianCiv, Rebellion, AIAutoPlay

Discussion in 'Civ4 - Modpacks' started by jdog5000, May 16, 2006.

  1. Blazer6

    Blazer6 King

    Joined:
    Aug 15, 2005
    Messages:
    906
    The AI does have that script for # of units per city, which probably makes it such a stack builder. You would think that there would be scripts for all those improvements to ease that overload.
    I let the AI manage my cities from the start and it allocates population decently, but it still has all archers by 1000AD and now is working on horseback riding without any horses. Axemen...they don't have any city bonuses, pfft.

    The autoplay is not good at all on high difficulty unless you are far ahead of everyone.
     
  2. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    This is very interesting stuff you've come across here. I wonder then if it would be possible for new functions and restrictions to be placed on the AI to prevent it from sending itself rocketing to the poorhouse.

    I think one way to accomplish this would be to make the AI much more willing to unload cities... I mean, they will not trade cities for anything as it stands. It's ridiculous.

    I realize of course that artificial intelligence for a game can only go so far, but it seems like even some basic emergency braking would do them a world of good here.
     
  3. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Yeah, I've seen two instances when it really should just offer the city to the other player:

    1) A small city they captured but have no culture in that is heavily influenced by your culture. It won't flip to you, but it does them no good. Just revolts over and over ...

    2) Small cities on the fringe of their empire that are costing them money when they're in serious financial trouble. They should really be willing to give those up, or trade for some help.

    That being said, I can understand how this would be very difficult to balance and make exploit proof, so I don't fault Firaxis for leaving this out ...
     
  4. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    I've been wondering whether when you give control to the AI, it is forced to play at your difficulty or if it gets to play on Noble. I'll report my findings ...

    As I thought, while you're in autoplay, the AI who takes over your civ is treated like any other AI player. If you start a game on Diety, you can watch the AI pump out units like there's no tomorrow.
     
  5. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    There is something about financial trouble in the PlayerAI code that I never really quite got... even has to do with city trading. If that IS what it's for, it's broken... but if an AI willing to get rid of cities is potentially unbalancing, I think it'd be worth an investigation to try to find a balance for it.
     
  6. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    I think what you're referring to is this in CvPlayerAI::AI_cityTrade:
    Code:
            if (!(GET_PLAYER(ePlayer).isHuman()))
    	{
    		if (GET_PLAYER(ePlayer).getTeam() != getTeam())
    		{
    			if ((pCity->plot()->calculateCulturePercent(ePlayer) == 0) && !(pCity->isEverOwned(ePlayer)) && (GET_PLAYER(ePlayer).getNumCities() > 3))
    			{
    				[B]if (GET_PLAYER(ePlayer).AI_isFinancialTrouble())[/B]
    				{
    					return DENIAL_UNKNOWN;
    				}
    
    Which, I believe, keeps the AI from trading a city to an AI who is in financial trouble ... doesn't depend on current status of the city owner. You'd think the other player would know not to accept it ... I think what keeps the AI from ever trading a city except in cases of war is:

    Code:
            if (GET_PLAYER(ePlayer).getTeam() != getTeam())
    	{
    		return DENIAL_NEVER;
    	}
    
     
  7. Blazer6

    Blazer6 King

    Joined:
    Aug 15, 2005
    Messages:
    906
    I noticed that the AI-Player has gained about +10 mutual military struggle and -0 how dare you say no to joining our war.
    I guess the AI-Player cannot say no to war assistance, or it declares war on the same civ as everyone (portraits of leaders don't open) else who gives out mutual military struggle points. I noticed after having the AI-Player declare war on the one city civ for the fifth time. It also tends to keep relations with a larger group than necessary. I assume it wants to keep as many civs pleased as it can at the cost of working towards solidifying relations with a few friendly civs.
    I noticed that all the civs who give out the mutual military struggle are squeezing my borders and all could destroy me in a few turns if they wanted. Could that mere diplomacy bonus hold a much greater weight of respect among the AI than the others?

    Don't use autoplay if you want to avoid war.
     
  8. junter

    junter Chieftain

    Joined:
    Jan 22, 2006
    Messages:
    70
    Please can someone help me ? I want to make a fusion of Revolution mod and Assassin mod !!!!!!!!!! PLEASE HELP ME PLEASE !!!!!!!!!!!!!! :cry: :scan: :goodjob:
     
  9. Blazer6

    Blazer6 King

    Joined:
    Aug 15, 2005
    Messages:
    906
    The AI-Player has a habit of disbanding units when it is running in the green and has hundreds of gold. It has disbanded over 60 units and the game still has 300 turns left. It seems scripted to declare war when its close allies are attacking that same civ. This will go on repeatedly and the civs are awarding nearly +10 mutual struggle points by now.
    One of my cities (of 6) revolted for some unknown reason and joined a civ that had no cities and no access to that civ. I have yet to get a civ to split no matter how many cities they have, the same for barbarian units. One civ supposedly split but all its cities disappeared when I noticed.
     
  10. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    So... what you're saying is: we're not ready for a robot President?
     
  11. Blazer6

    Blazer6 King

    Joined:
    Aug 15, 2005
    Messages:
    906
    I would think of it as...don't look behind the curtain, because he himself is also being controlled by his puppet outside his turn.
     
  12. Caesium

    Caesium Radiant!

    Joined:
    Jan 14, 2006
    Messages:
    526
    I looked through your code and discovered, that you made the possibility to spread a new civ with the SDK, but in/with your Barbs in Civ Mod you still use the "old fashioned" way to kill a randomly selected AI player.
    Will there be a version in future, where all mod parts use the civ apreading by SDK?
     
  13. Caesium

    Caesium Radiant!

    Joined:
    Jan 14, 2006
    Messages:
    526
    No answers for two days? What's up?
     
  14. Blazer6

    Blazer6 King

    Joined:
    Aug 15, 2005
    Messages:
    906
    If jdog did not answer your private/instant message, then jdog is taking a break.
     
  15. Jeppson

    Jeppson Warlord

    Joined:
    Jun 11, 2005
    Messages:
    107
    Location:
    Sweden
    If I play with 18 civs will it be impossible for a new civ to spawn? Is it possible with the sdk to increase the number of max civs?
     
  16. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    It is currently not possible to have civilizations spawning if all 18 civs are alive and well. And no, it's not possible to change this in the SDK since it's hard coded into the exe file.

    However, word is that this restriction is being either raised or eliminated in Warlords.
     
  17. Craig_Sutter

    Craig_Sutter Deity

    Joined:
    Aug 13, 2002
    Messages:
    2,753
    Gender:
    Male
    Location:
    Calgary, Canada
    Please release the AIautoplay as a mod component. It will be easier to incorporate it in other mods for play-testing.

    I tried to add revolution to another mod, and disable all other functions, but it was beyond me. Just copied "revolution" files to the other mods folder (no files were replaced in the new mod), copied revolution.ini into the other mods .ini, and made false all the other mod components in the combined ini. AIplay worked, but the other mod components still weren't disabled - it was creating barb civs.
     
  18. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    You're correct, the civ killing off code remains in the BarbarianCiv python code. However, it is not called unless the DoGameStartKill setting is enabled in Revolution.ini ... so, by default, the mod does exactly what you request: all civ spreading/spawning is done through the SDK.

    The killing off on game start code was left in to make it easier for me to create a Python only version which will be easier for other modders to include in their mods.

    Yup ... I had been pretty good about answering questions/issues, but finals and then a little vacation hit.
     
  19. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Good to know Firaxis is doing something about that ... for me, it's not much of an issue because my computer isn't fast enough to run a map where much more than 18 civs make sense, but computers keep getting better :)
     
  20. jdog5000

    jdog5000 Revolutionary

    Joined:
    Nov 25, 2003
    Messages:
    2,601
    Location:
    California
    Done! It can be found here.
     

Share This Page