Results 1 to 30 of 39

Thread: Konny's money script

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15

    Talking Re: Konny's money script

    Quote Originally Posted by konny
    The AI is spending the extra money always on new units, as far as I have seen.
    I think it also has to do with this 'spoil' below, but you’re probably aware of it already.
    Spoiler Alert, click show to read: 
    These control a set of AI production personalities, which contribute a bias towards building and training (but not retraining or repairing). This bias is fairly small compared to game-generated factors such as "the enemy is attacking me with lots of cavalry, build me some spearmen". Explaining the weighting system which drives the production AI in full is beyond the scope of this document as it would take several days to write.

    So in short, the building construction personalities are these: (ranked highest to lowest - therother)

    balanced - biases towards growth, taxable income, trade level bonuses (roads), walls and xp bonus buildings

    religious - biases towards growth, loyalty, taxable income, farming, walls and law

    trader - biases towards growth, trade level, trade base, weapon upgrades, games, races and xp bonus buildings

    comfort - biases towards growth, farming, games, races, xp bonus and happiness

    bureaucrat - biases towards taxable income, growth, pop health, trade, walls, improved bodyguards and law

    craftsman - biases towards walls, races, taxable income, weapon upgrades, xp bonuses, mines, health and growth

    sailor - biases towards sea trade, taxable income, walls, growth, trade

    fortified - biases towards walls, taxable income, growth, loyalty, defenses, bodyguards and law

    These biases are towards building properties, rather than buildings themselves. The game does not know what a "Blacksmith" is, for example, it only knows that it is a building which provides a weapon upgrade, and hence a Craftsman AI would be more likely to build it than another AI personality type.

    These are then combined with a troop production personality, as follows:

    smith - exactly level

    mao - biased towards mass troops, light infantry

    genghis - biased towards missile cavalry and light cavalry

    stalin - biased towards heavy infantry, mass troops and artillery

    napoleon - biased towards a mix of light and heavy infantry, light cavalry

    henry - biased towards heavy and light cavalry, missile infantry

    Caesar - biased towards heavy infantry, light cavalry, siege artillery

    The same system as for the buildings applies. Troop category and class are combined at the time the unit database is loaded to give a unit production type, and the likelihood of the AI choosing to produce a given unit type which can be produced is then modified by the unit type weighting. There is also a random element in the choosing of which building or troop type to produce next, so the effect of the bias is a statistical thing. Another factor that is applied over the top which may obscure the bias is a tendency towards producing troop mixtures (according to what is already in the garrison) and a weighting according to unit strength.

    The two sets of types can be freely combined; for example, although Fortified Caesar does not appear in the list of options currently used by the vanilla RTW game, it is a valid combination.


    Quote Originally Posted by konny
    BTW, with my script I can't recall to have ever seen one of the factions that don't get money help run into the minus, as long as they don't lose important cities.
    You want to say that with your script a faction never got in red? Your sentence seems to imply the opposite: AI is smart enough, as long as it doesn’t lose important cities, to run a positive treasury?

    Quote Originally Posted by konny
    Absolutly not. I am giving the AI 5,000 per town per turn until economy has recovered. The only way for the AI to don't get beyond this point is by not doing anything at all. When the AI has conquered an additional town it will get another 5,000 extra the next turn for that. This, minus the lower upkeep for the casualties, will most likely get their treasury over the green line.
    5000 seems too much money per turn/per town to me. Imagine SA with 20 towns going slightly (-100) into red. This would give them a 100.000 minae boost. At least, this is how I understood your script, partly because I understood you this way, and partly because of my wrong interpretation of the RTW money counting.

    The fact is that SA, in the described situation, would not get 100.000 minae from your script, but only 4900. I don't know if you are aware of this, but I wasn't. If you weren't, here is why: After you click the end turn button, the engine runs the moves of all other factions. After that, the script is run. I first thought that variable 'treasury' is held fixed, and the '#settlements'*5000 minae is added, but this isn't true. The variable 'treasury' is updated constantly during scriptrun after each event, and the SettlementTurnStart-event occurs '#settlements' times... dumb me. So your script keeps the treasury of a faction that is predicted to go in red, between 0-4999 minae, as long it has enough towns to compensate for the expenses. (having 3 towns means that the faction can pile up a credit of 15000 and still be able to have positive income,... now this seems a bit too much for mee, so I changed it to 1000 in my script (not adjusted in the above post), without any strong reason though.)

    NOTE1: maybe increasing the average unrest for the player-cities could also increase the overall difficulty of the game as the player would have to leave more troops in cities when campaigning.
    Last edited by Davor; 11-16-2007 at 19:30.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO