Results 1 to 3 of 3

Thread: [Submod]changed AI money assistance script [help/advice needed]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Terrible Tactician Member Shadowwalker's Avatar
    Join Date
    Nov 2007
    Location
    Germania Libera *g*
    Posts
    304

    Default [Submod] changed AI money assistance script [help/advice needed]

    So I have been pondering about this quite for some time even before the release of EB II.
    My idea has been to adjust the AI money bonus according to the factions' size.

    In the following spoilers I'll don't include the whole script changes but only use one faction as an example.

    The is how it is currently set by the EB team:

    Spoiler Alert, click show to read: 

    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    and Treasury < 600
    if I_LosingMoney f_rome
    increment_kings_purse f_rome 1000
    end_if
    if not I_LosingMoney f_rome
    console_command add_money f_rome, 400
    end_if
    end_monitor
    ;;;;;;;;;;;;;;;;;;
    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    and not LosingMoney
    and Treasury > 20000
    increment_kings_purse f_rome -1000
    end_monitor


    And this is what I changed it to:

    Spoiler Alert, click show to read: 

    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    if not I_NumberOfSettlements f_rome > 6
    set_kings_purse f_rome 4000
    end_if
    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;
    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    if I_NumberOfSettlements f_rome > 6
    if not I_NumberOfSettlements f_rome > 8
    set_kings_purse f_rome 2000
    end_if
    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    if I_NumberOfSettlements f_rome > 8
    set_kings_purse f_rome 0
    end_if
    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    and Treasury < 600
    if I_LosingMoney f_rome
    console_command add_money f_rome, 2000
    end_if
    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;
    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    and not LosingMoney
    and Treasury > 20000
    console_command add_money f_rome -3000
    end_monitor



    (1) small factions and factions that haven't grown beyond their starting size +1 province receive a significant bonus (4000 mnai) to their income.
    (2) factions that have grown a bit (stating provinces +3) still receive a moderate money bonus (2000 mnai)
    (3) larger factions (>starting provinces +3) receive no automatic bonus to their income anymore, unless they are losing money.
    (4) the "take away some money from the AI if they have too much" script has been altered a bit, but I didn't change the basic approach there.
    (4) the slave faction hasn't been touched because they are actually developing their settlements and recruting nicely, no need to change much there in my opinion.
    (5) No changes to the player setting, all the changes are affecting the AI exclusively.

    In theory this is meant to provide the following changes:

    Small factions (in particular all the 1-province factions) don't start with an immediate debt when AI-controlled.
    Growing factions are slowed down a bit.
    There is hopefully less chance (or even no chance, can't say for sure yet as the whole thing lacks serious testing so far) for factions who own only 1 or two provinces (Pergamon! Massylia! Lusotannan!) to spam 5 or even 6 stacks without doing anything.

    I tested it at least a bit yet, the altered campaign script doesn't crash the game (started 3 games with different factions and hit "end turn" for 20 turns).

    I ran into a really odd bug though. My changes seem to have caused the "select potential successor" script ceasing to work. Which is rather mysterious as I didn't touch that script at all. Does any of you have an idea what may have caused this?



    I attach the file nevertheless, just in case you want to have a look at it.
    I don't recommend using the file yet due to the mentioned bug, though.
    Attached Files Attached Files
    Last edited by Shadowwalker; 09-12-2014 at 07:23.
    Finished EB Campaigns: Kart-Hadast 1.0/1.2 | Pontos 1.1 | Arche Seleukeia 1.2 | Hayasdan 1.2 | Sab'yn 1.2 | Makedonia 1.2 (Alex)
    Lost Campaigns (1.2, Alex. exe): Getai | Sab'Yn
    Ongoing campaigns (1.2): SPQR (110 BC) | Sab'yn (217 BC) | Pontos (215 BC)
    from Populus Romanus

    "The state of human ethics can be summarized in two sentences: We ought to. But we don't." (Tucholsky)

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