Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: Ideas for campaign script:

  1. #1

    Icon3 Ideas for campaign script:

    Hi Lusted et al.,

    Been thinking about the cool script you have in your mod and ways in which it could be improved further.

    As you know I use a similar yet slightly different script, but one thing I've still been finding is that as soon as I get to the mid game and get more than around 10 settlements the money just starts rolling in too easily, effectively killing the strategy. Now, boosting the AI's finances is one way, and it certainly helps, but increasing it too much can create other unwanted side effects such as:

    1. The AI techs too fast and kills the historical progression.

    2. The human just takes the AI's well developed cities and receives the high tech infrastructure without actually building any of it himself.

    So, what about another bit to the script - one that looks at it from a different angle and penalises the human mid to late game rather than boosting the AI further? E.g.:

    Code:
            monitor_event FactionTurnStart FactionType england
                    and FactionIsLocal
                    and Treasury > 10000
                    and Treasury < 20001
                    and I_NumberOfSettlements england > 10
                    console_command add_money england, -2500
            end_monitor
    
            monitor_event FactionTurnStart FactionType england
                    and FactionIsLocal
                    and Treasury > 20000
                    and I_NumberOfSettlements england > 10
                    console_command add_money england, -5000
            end_monitor
    Or, some other variations like:

    Code:
            monitor_event FactionTurnStart FactionType england
                    and FactionIsLocal
                    and I_TurnNumber > 100
                    and Treasury > 10000
                    and I_NumberOfSettlements england > 10
                    console_command add_money england, -2500
            end_monitor
    Or:

    Code:
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_TurnNumber > 50
                    and I_TurnNumber < 101
                    and Treasury > 10000
                    console_command add_money england, -250
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_TurnNumber > 100
                    and Treasury > 10000
                    console_command add_money england, -500
    Do you think any of these would work, and if so which do you think would be the most appropriate at increasing the late-game challenge?

    Cheers
    Last edited by DrJambo; January 31, 2007 at 06:31 PM.

  2. #2

    Default Re: Ideas for campaign script:

    I dont like the idea... Losing money because of certain conditions for the player is different, because we can know about those things.


    Retired moderator of TWC
    | Under the patronage of Atterdag

  3. #3
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Ideas for campaign script:

    1. The AI techs too fast and kills the historical progression.
    This is something i don't really care about.

    And im not putting in scripts that penalise the player, im playing around a bit with settlement mechanics, so the player will not make as much money.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  4. #4

    Default Re: Ideas for campaign script:

    Quote Originally Posted by Lusted View Post
    This is something i don't really care about.

    And im not putting in scripts that penalise the player, im playing around a bit with settlement mechanics, so the player will not make as much money.
    Yeah, historical progression also doesn't rate that highly for me either, but if the AI spends all the extra money techinmg up and the human takes it. Well, the money you're giving to the AI is effectively falling into the hands of the human. This can actually make the game easier as the human expands.

    I've also had a good look into the income side of the settlement mechanics file but so far I've not had much luck limiting human income from there. For all intents and purposes the Upkeep and Wages modifiers don't seem to do anything, probaby because they're already controlled from other files - EDU and descr_character.

    Corruption only partly works, but seems to eventually disappear completely in settlements, so it's use is marginal. Devastation hurts all factions and it's not proportional to human income. Put it too high and you'll kill the early game.

  5. #5

    Default Re: Ideas for campaign script:

    You could look at something like the following script as a comparison to the growing city maintenance one sees in Civ IV (used to curb rapid early expansion) and a very simplistic view on inflation (if you have a large standing treasury). Of course if you build your economy up then expansion is still very much possible, both in Civ IV and I imagine with a script something like this. Here's a couple of examples based on the need for 45 settlements to win:

    Code:
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 4
                    and I_NumberOfSettlements england < 45
                    and Treasury > 0
                    console_command add_money england, -100
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 4
                    and I_NumberOfSettlements england < 45
                    and Treasury > 10000
                    console_command add_money england, -100
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 4
                    and I_NumberOfSettlements england < 45
                    and Treasury > 20000
                    console_command add_money england, -100
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 4
                    and I_NumberOfSettlements england < 45
                    and Treasury > 30000
                    console_command add_money england, -100
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 4
                    and I_NumberOfSettlements england < 45
                    and Treasury > 40000
                    console_command add_money england, -100
            end_monitor
    As I said, if you think of it as sprawling city/empire maintenance, plus inflation, then it seems more reasonable!

    If however, one thought it more important to be dependent on number of cities rather than standing treasury then:

    Code:
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 4
                    and I_NumberOfSettlements england < 15
                    and Treasury > 0
                    console_command add_money england, -50
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 14
                    and I_NumberOfSettlements england < 25
                    and Treasury > 0
                    console_command add_money england, -100
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 24
                    and I_NumberOfSettlements england < 35
                    and Treasury > 0
                    console_command add_money england, -150
            end_monitor
    
    monitor_event SettlementTurnStart england
                    and FactionIsLocal
                    and I_NumberOfSettlements england > 34
                    and I_NumberOfSettlements england < 45
                    and Treasury > 0
                    console_command add_money england, -200
            end_monitor
    Lusted, does the SettlementTurnStart also work for each of the human's cities each turn?

    If this is of absolutely no interest, I might re-post in the general forum.

    Cheers
    Last edited by DrJambo; February 01, 2007 at 07:01 AM.

  6. #6
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Ideas for campaign script:

    Lusted, does the SettlementTurnStart also work for each of the human's cities each turn?
    Yes.

    I am just not in favour of a script that unduly punishes the player.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  7. #7
    GrandViZ's Avatar Domesticus
    Join Date
    Dec 2006
    Location
    Berlin, Germany
    Posts
    2,026

    Default Re: Ideas for campaign script:

    Hi DrJambo,

    why do you think, that corruption in settlement mechanics doesn't work? I am still not at home and cannot verify if the upkeep modifier we talked about works or not, but if not, then your scripting idea might be a way.

    However there are other possibilities to keep the income in balance by reducing the effectiveness of taxation, farms, and trade. The AI is anyway compensated by higher income via money script, which btw could be combined with the game difficulty the player has chosen.

    Furthermore, and this is also an aspect I am working on with the latest beta versions, is to balance the population growth by introducing an accordingly modified version of the realistic building tree and growth modifiers in settlement mechanics. It is not 100% perfect now, but it gives very promising results.

    Another issue is, that the different mods all seek a different solution for the common problem - to provide greater challenge to the human player - but fail when only parts of them are integrated. So maybe we would achieve better results when we would define common design goals for a balanced economy / warfare system on the strategic scale and agree on one direction?

    I often get complains about this or that feature is not working, because either the mod users don't understand the design concepts, or the combined mods create weird situations because of incompatible design concepts used.

    I would appreciate your (and Lusted's) opinion on this.

    Best regards
    GrandViZ
    Creator of the Ultimate AI
    Co-Author of Broken Crescent

    Under the Patronage of Trajan

  8. #8

    Default Re: Ideas for campaign script:

    Quote Originally Posted by GrandViZ
    why do you think, that corruption in settlement mechanics doesn't work? I am still not at home and cannot verify if the upkeep modifier we talked about works or not, but if not, then your scripting idea might be a way.
    The corruption mechanic does work, it just seems to dissipate over time in settlements. So, I'm not sure how useful it is for curbing excessive human income in the mid-late game once economic buildings are built.

    Quote Originally Posted by GrandViZ
    However there are other possibilities to keep the income in balance by reducing the effectiveness of taxation, farms, and trade. The AI is anyway compensated by higher income via money script, which btw could be combined with the game difficulty the player has chosen.
    True, but then messing with some of these mechanics might have other ramifications on the game. Farms don't provide much of an income boost anyway and neither trade, taxes or farms differentiate between periods of the game, so crippling one is likely to have a major impact on the early game. For me the problem isn't the early game, as I always seem to struggle financially. Instead it's the mid-late game when I've created a good number of the economic buildings and own around 10 settlements. The idea behind a script like this is it costs the player in proportion to the size and or treasury of the empire (as Civ's maintenance did in Civ IV), depending on which script is used.

    You see, certain things like buildings increase in cost as the tech level increases, which is good and how it should be; however, units costs remain the same throughout and are therefore comparatively expensive early game and super cheap in the late game. Once human income begins to explode, fielding lots of elite stacks no longer represents an obstacle and from that moment on the game becomes relatively easy. If only unit costs scaled as the buildings did...

    Quote Originally Posted by GrandViZ
    Furthermore, and this is also an aspect I am working on with the latest beta versions, is to balance the population growth by introducing an accordingly modified version of the realistic building tree and growth modifiers in settlement mechanics. It is not 100% perfect now, but it gives very promising results.
    Do you go by the 1 year per turn, because that will obviously impact more on how the settlement mechanics work?

    Quote Originally Posted by GrandViZ
    Another issue is, that the different mods all seek a different solution for the common problem - to provide greater challenge to the human player - but fail when only parts of them are integrated. So maybe we would achieve better results when we would define common design goals for a balanced economy / warfare system on the strategic scale and agree on one direction?
    Lusted mentioned being against undue punishment on the human, but isn't giving the AI massive financial reward just that...?

    Maybe if the AI was given less of a financial reward and the human was given a slight but progressive financial penalty the campaign would play better and the challenge would be maintained from start through to finish? Or, if retaining the large AI financial benefit is paramount, then how about instigating the progressive financial penalty for all, AI included, thus retaining some parity between early, mid and late games and not unduly punishing just the human?

    Regards
    Last edited by DrJambo; February 01, 2007 at 11:28 AM.

  9. #9
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Ideas for campaign script:

    Lusted mentioned being against undue punishment on the human, but isn't giving the AI massive financial reward just that...?
    How is that punishing the player? The ai just gets a cash boost, but a script which removes cash from the player would be punishing them.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  10. #10
    Socal_infidel's Avatar PDER Piper
    Join Date
    Jan 2007
    Location
    Brooklyn USA
    Posts
    2,563

    Default Re: Ideas for campaign script:

    Once human income begins to explode, fielding lots of elite stacks no longer represents an obstacle and from that moment on the game becomes relatively easy. If only unit costs scaled as the buildings did...
    I forget which mod uses it, but I've adopted a version of it in my own personal-use mod...I think it's DLV actually.

    But they use a field cost script for each army NOT in a settlement at the end of each turn. It's a bit excessive IMO as implemented in DLV, but you could use a modified version of it. One less costly in the early game. One more costly once the better units start taking the field.

    Anyway, just a thought.

  11. #11

    Default Re: Ideas for campaign script:

    Quote Originally Posted by Lusted View Post
    How is that punishing the player? The ai just gets a cash boost, but a script which removes cash from the player would be punishing them.
    Well, it punishes the human indirectly by giving an advantage to his/her opponents. Take the analogy of two teams. If a referee awards one team 5 free points at the start of each half, and the winner is the team with the most points, then the referee has indirectly punished one and helped another.

  12. #12
    GrandViZ's Avatar Domesticus
    Join Date
    Dec 2006
    Location
    Berlin, Germany
    Posts
    2,026

    Default Re: Ideas for campaign script:

    Quote Originally Posted by DrJambo View Post
    Well, it punishes the human indirectly by giving an advantage to his/her opponents. Take the analogy of two teams. If a referee awards one team 5 free points at the start of each half, and the winner is the team with the most points, then the referee has indirectly punished one and helped another.
    Well, giving the AI a boost is OK.

    But if the game mechanics handle AI and human the same, the human will always prevail, as he is superior in regard to every aspect of the game. Therefore we need mechanisms that reduce this AI handicap. If a script is used, then the costs for settlements should be fixed: They should not increment with the number of settlements but rather for each settlement with its level.

    monitor_event SettlementTurnEnd england
    and FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = wooden_pallisade
    console_command add_money england, -50
    end_monitor

    monitor_event SettlementTurnEnd england
    and FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = wooden_wall
    console_command add_money england, -50
    end_monitor

    monitor_event SettlementTurnEnd england
    and FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = stone_wall
    console_command add_money england, -100
    end_monitor

    monitor_event SettlementTurnEnd england
    and FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = large_stone_wall
    console_command add_money england, -200
    end_monitor

    monitor_event SettlementTurnEnd england
    and FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = huge_stone_wall
    console_command add_money england, -400
    end_monitor

    The results for upkeep would be level specific as follows (you can do the part for castles as homework ).

    village: free
    town: 50 florins
    large town: 50 + 50 = 100 florins
    city: 50 + 50 + 100 = 200 florins
    large city: 50 + 50 + 100 + 200 = 400 florins
    huge city: 50 + 50 + 100 + 200 + 400 = 800 florins

    Advantage is, that this way you have an adapting cost not only to size but also to population.

    Regards
    GrandViZ

    EDIT: Is there a way to generalize the faction, so you won't have to check for every faction if it is controlled by a human player?

    Would something like this work as well?

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = huge_stone_wall
    console_command add_money -400
    end_monitor
    Last edited by GrandViZ; February 01, 2007 at 03:08 PM.
    Creator of the Ultimate AI
    Co-Author of Broken Crescent

    Under the Patronage of Trajan

  13. #13

    Default Re: Ideas for campaign script:

    Does SettlementBuildingExists automatically include all the buildings below it in the tech tree as "existing"?
    Last edited by DrJambo; February 01, 2007 at 03:19 PM.

  14. #14
    GrandViZ's Avatar Domesticus
    Join Date
    Dec 2006
    Location
    Berlin, Germany
    Posts
    2,026

    Default Re: Ideas for campaign script:

    OK, I verified it. It works in the short form, no need to check for the faction. And I also verified that SIF_WAGES and SIF_UPKEEP in settlement_mechanics.xml is broken! The modifiers don't do anything and cannot be used to balance the economy.

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = wooden_pallisade
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = wooden_wall
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = stone_wall
    console_command add_money -100
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = large_stone_wall
    console_command add_money -200
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType city
    and SettlementBuildingExists = huge_stone_wall
    console_command add_money -400
    end_monitor

    I will include this script in the next version of UAI, definetly!

    Regards
    GrandViZ
    Creator of the Ultimate AI
    Co-Author of Broken Crescent

    Under the Patronage of Trajan

  15. #15

    Default Re: Ideas for campaign script:

    A couple of questions GrandViz:

    Does SettlementBuildingExists automatically include all the buildings below it in the tech tree as "existing"?

    And for castles we'd be looking at:

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = motte_and_bailey
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = wooden_castle
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = castle
    console_command add_money -100
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = fortress
    console_command add_money -200
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = citadel
    console_command add_money -400
    end_monitor

  16. #16
    GrandViZ's Avatar Domesticus
    Join Date
    Dec 2006
    Location
    Berlin, Germany
    Posts
    2,026

    Default Re: Ideas for campaign script:

    Quote Originally Posted by DrJambo View Post
    Does SettlementBuildingExists automatically include all the buildings below it in the tech tree as "existing"?
    No, it should only check for the particular building specified.

    And for castles we'd be looking at: ...
    You did your homework! A+

    Regards
    GrandViZ

    EDIT: OK, I made a logical mistake. Only one condition can be true at the same time. Therefore we have to adjust the costs as follows:

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = motte_and_bailey
    console_command add_money -50
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = wooden_castle
    console_command add_money -100
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = castle
    console_command add_money -200
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = fortress
    console_command add_money -400
    end_monitor

    monitor_event SettlementTurnEnd FactionIsLocal
    and SettlementType castle
    and SettlementBuildingExists = citadel
    console_command add_money -800
    end_monitor

    Fix it accordingly for cities!
    Last edited by GrandViZ; February 01, 2007 at 04:12 PM.
    Creator of the Ultimate AI
    Co-Author of Broken Crescent

    Under the Patronage of Trajan

  17. #17

    Default Re: Ideas for campaign script:

    Exellent, that looks better.

  18. #18

    Default Re: Ideas for campaign script:

    I'm with Dr. Jambo. I thought a modder as good as Lusted would understand this simple concept:

    Humans have advantages that cannot be measured therefor a handicap is absolutely necessary. I want a game with economic challenge, so I hope someone tries Dr. Jambo's idea and lets me know. I'll mod it into my setup if it balances well.

  19. #19
    Lusted's Avatar Look to the stars
    Join Date
    Jan 2005
    Location
    Brighton, Sussex, England.
    Posts
    18,183

    Default Re: Ideas for campaign script:

    Humans have advantages that cannot be measured therefor a handicap is absolutely necessary. I want a game with economic challenge, so I hope someone tries Dr. Jambo's idea and lets me know. I'll mod it into my setup if it balances well.
    But i know many people who would go "why am i getting money drained out of my economy for no reason, apart from to penalise me?".

    Giving the ai a cash boost helps it build up and perform better. But i do not agree with adding in artificial handicaps for the player.

    And whoever gave me neg rep for saying i wont put it in should think about the fact this is my mod. I put what i want in it, not what is the most popular idea.
    Creator of:
    Lands to Conquer Gold for Medieval II: Kingdoms
    Terrae Expugnandae Gold Open Beta for RTW 1.5
    Proud ex-Moderator and ex-Administrator of TWC from Jan 06 to June 07
    Awarded the Rank of Opifex for outstanding contributions to the TW mod community.
    Awarded the Rank of Divus for oustanding work during my times as Administrator.

  20. #20

    Default Re: Ideas for campaign script:

    Lol, Lusted, wasn't me before you ask. And don't worry I respect it's your mod. I just posted this suggestion here for healthy discussion with good modders. That is all.

    Cheers

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •