Page 1 of 4 1234 LastLast
Results 1 to 20 of 70

Thread: New Scripts

  1. #1
    Indefinitely Banned
    Join Date
    Oct 2012
    Location
    Ludbreg,Croatia
    Posts
    670

    Default New Scripts

    Character Rebellion scripts - characters can rebel in certain conditions(pretenders,usurpers,...)
    Active Rebellion scripts - rebel armies can appear in a province given certain conditions
    Event Scripts - Jousting tournament(you can win gold by placing bets),To the jail! event(you can banish characters but beware,they might come back with an entire army as rebels),Mercenary Hiring events(you can hire a mercenary captain and his company,they will spawn as rebels and attack a certain settlement,if they win the settlement becomes yours),royal weddings,royal feasts
    Royal Houses scripts - the existing characters at the starting date will be part of a dinasty,the ones that you can add to your factions will join the benefactor's dinasty
    Recruiting royal ladies
    Recruiting teachers (that give bonuses to a character for command or governing)
    Usurper script (a rebelling pretender that can claim your kingdom,will attack the faction leader and if he wins,he will become the new faction leader,you wont lose the game/you will lose the game,depending on your choice at the starting date)
    Vassal script - if you conquer a number of given regions and eliminate a faction you can choose to install a character that has a title in that country(for example you conquered Constantinople and eliminated byzantium,your character gets that city and you can choose to install him as a king in a vassal state that will have all its starting territories or certain territories).Also there will be a chance this character will turn on you instead of becoming your vassal.
    Pretender script - when your heir gets the title of faction leader the pretender can rise up in rebellion with a number of provinces andcharacters,the effect can be the same as the usurper script)
    Interactive scripts with characters(you can appoint a character as councillor,an assasin as spymaster,a merchant as a representative of a guild,so on...),(you can banish,execute,educate,appoint,even appoint him as faction leader),also there should be interactions with enemy characters or enemy or own cities(city that surrenders,etc.)
    Legion script for byzantium,a script to rename byzantium to roman empire after conquering certain provinces and eliminating certain factions
    Military order script(you can create armies for a certain amount of cash made up of military orders units after calling for a crusade,it will have same effects as the mercenary script,it will go and attack the crusade targets,this option will be available if you got enough piety) this can be done without turning the army into rebels,simply create it and join it to the crusade without the option to remove it from the crusade OR just make it dissapear if you click remove from crusade,same thing can be applied to jihads
    religion script - you will be allowed to join a schismatic religion ORTHODOX - Miaphysite CATHOLIC - Reformist SUNNI - Shi'a (in catholic case,you will be excomunicated) or join back your former religion
    character religion and given traits - each of your character will have at his retinue : religion,speciality(administrator,commander at different levels),physical strength(personal security) and others - these traits can modify during his lifetime and other traits and retinues can be acquired
    object script - character can acquire different objects in different events(important swords,artefacts,etc.)
    crown script - if a character kills a faction leader will acquire his (crown,attire,etc.)the character with this kind of object will have some bonuses,the heir of the killed faction leader will have negative traits until he manages to acquire the object that shows his right to rule,also this new faction leader can wake up with different rebellions in his country
    beheaded script - character that defeats an enemy character can behead the defeated character for a healthy dread boost
    beheading a king gives even more dread

    Vassalage works properly o_O? never had one

    How would you like those scripts??Give me more ideas
    Last edited by King of the Ring; June 07, 2014 at 06:40 PM.

  2. #2

    Default Re: New Scripts

    All those scripts sounds good, I would like them all as long they don't make turn times unbearable

    Mercenary Company Script sounds pretty awesome, could be a submod on its own lol

    hmm maybe they can be activated through the sub mod manager, so you have the option to run basic titanium with faster turn times
    Last edited by Melooo182; June 07, 2014 at 07:09 PM.

  3. #3
    Andytheplatypus's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    . U.S. - MS, Gulf Coast.
    Posts
    2,384

    Default Re: New Scripts

    Quote Originally Posted by Melooo182 View Post
    hmm maybe they can be activated through the sub mod manager, so you have the option to run basic titanium with faster turn times
    This. A lot of people (me included) have crappy computers so the option to turn scripts on or off is necessary.

  4. #4
    Indefinitely Banned
    Join Date
    Oct 2012
    Location
    Ludbreg,Croatia
    Posts
    670

    Default Re: New Scripts

    for each of the scripts,yes

    maybe someone wants to play with only one script

    just like in TATW,at the start of the game they will be able to choose it,or set up the scripts before launching the game

  5. #5

    Default Re: New Scripts

    Sounds really cool especially the civil war and discontent stuff, I have a few questions tho:

    Usurper script (a rebelling pretender that can claim your kingdom,will attack the faction leader and if he wins,he will become the new faction leader,you wont lose the game/you will lose the game,depending on your choice at the starting date)
    This would be a Rebel army spawning and attacking your leader wherever he his, correct?

    Religion script - you will be allowed to join a schismatic religion ORTHODOX - Miaphysite CATHOLIC - Reformist SUNNI - Shi'a (in catholic case,you will be excommunicated) or join back your former religion
    So would Lithuania be able to convert to Catholic (losing pagan religious units and safer from conflict with Catholics), or Orthodox (lose religious pagan units but free to attack Catholics vice-versa)??
    What would be the benefits of going Reformist if you are going to suffer excommunication?

  6. #6
    Indefinitely Banned
    Join Date
    Oct 2012
    Location
    Ludbreg,Croatia
    Posts
    670

    Default Re: New Scripts

    we'll decide that when we're writing the script

  7. #7
    Andytheplatypus's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    . U.S. - MS, Gulf Coast.
    Posts
    2,384

    Default Re: New Scripts

    Are you offering to write these scripts or are you just giving suggestions?

  8. #8
    Indefinitely Banned
    Join Date
    Oct 2012
    Location
    Ludbreg,Croatia
    Posts
    670

    Default Re: New Scripts

    i'll write what i can
    the advanced ones fall on the experienced in scripting

    also i want advanced diplomacy,im bored of seeing faction not attacking each other,who am i supposed to backstab then?

  9. #9

    Default Re: New Scripts

    i like those scripts , continue with gj

  10. #10

    Default Re: New Scripts

    Possible Sappers script
    Spoiler Alert, click show to read: 
    Code:
    declare_counter edinburgh_siege
    ...repeat for rest of settlements
    monitor_event CharacterTurnStart CharacterIsLocal
        and IsBesieging
        and Trait Sapper = 1
            and I_CompareCounter edinburgh_siege = 0
            and I_SettlementUnderSiege Edinburgh
                historic_event edinburgh_sappers true
            end_if
            ...repeat for rest of settlements
    end_monitor
    
    
    ;accept
    monitor_event EventCounter I_EventCounter edinburgh_sappers_accepted = 1
        set_event_counter edinburgh_sappers_accepted 0
            console_command add_money -1500
            generate_random_counter edingburgh_sapping 0 100
            if I_EventCounter edingburgh_sapping > 66
                console_command damage_wall Edinburgh breach
                set_counter edinburgh_siege 1
            end_if
            if I_EventCounter edingburgh_sapping <= 66
            and I_EventCounter edingburgh_wall_damage > 33
                console_command damage_wall Edinburgh gate
                set_counter edinburgh_siege 1
            end_if
            if I_EventCounter edingburgh_sapping <= 33
                historic_event sappers_failed
            end_if
    end_monitor
    
    
    ;reject
    monitor_event EventCounter I_EventCounter edinburgh_sappers_declined = 1
        set_event_counter edinburgh_sappers_declined 0
    end_monitor
    ...repeat for rest of settlements
    
    
    ;Reset counters
    monitor_event FactionTurnEnd FactionIsLocal
        If I_CompareCounter edinburgh_siege = 1
        and not I_SettlementUnderSiege Edinburgh
            set_counter edinburgh_siege 0
        end_if
        ...repeat for rest of settlements
    end_monitor

    :/ it still has a problem, it does not filter if a particular settlement is being besieged by the player or not
    so we could end up getting sapping event for a settlement besieged by another faction.


    EDIT:
    Spoiler Alert, click show to read: 
    Code:
    declare_counter edinburgh_siege
    ...repeat for rest of settlements
    monitor_event SiegeEquipmentCompleted FactionIsLocal
        and I_CompareCounter edinburgh_siege = 0
        and SettlementName Edinburgh
            historic_event edinburgh_sappers true
    end_monitor
    ...repeat for rest of settlements
    
    ;accept
    monitor_event EventCounter I_EventCounter edinburgh_sappers_accepted = 1
        set_event_counter edinburgh_sappers_accepted 0
            console_command add_money -1500
            generate_random_counter edingburgh_sapping 0 100
            if I_EventCounter edingburgh_sapping > 66
                console_command damage_wall Edinburgh breach
                set_counter edinburgh_siege 1
            end_if
            if I_EventCounter edingburgh_sapping <= 66
            and I_EventCounter edingburgh_wall_damage > 33
                console_command damage_wall Edinburgh gate
                set_counter edinburgh_siege 1
            end_if
            if I_EventCounter edingburgh_sapping <= 33
                historic_event sappers_failed
            end_if
    end_monitor
    
    ;reject
    monitor_event EventCounter I_EventCounter edinburgh_sappers_declined = 1
        set_event_counter edinburgh_sappers_declined 0
    end_monitor
    ...repeat for rest of settlements
    
    ;Reset counters
    monitor_event FactionTurnEnd FactionIsLocal
        If I_CompareCounter edinburgh_siege = 1
        and not I_SettlementUnderSiege Edinburgh
            set_counter edinburgh_siege 0
        end_if
       ...repeat for rest of settlements
    end_monitor

    I think this one could work, properly filtering settlements undersiege by non local factions
    but this no longer can have a Trait requirement and needs a siege equipment built (ladders, rams, etc)...to bad it cannot distinguish which one :/
    also the whole script needs Hotseat compatibility or being disabled when hotseat

  11. #11
    Andytheplatypus's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    . U.S. - MS, Gulf Coast.
    Posts
    2,384

    Default Re: New Scripts

    Would it make the script smaller to only have select settlements available for sapping?

  12. #12

    Default Re: New Scripts

    Quote Originally Posted by Andytheplatypus View Post
    Would it make the script smaller to only have select settlements available for sapping?
    that would rather add an extra monitor for every settlement, as we need to keep the SiegeEquipmentCompleted one to know which settlements are actually being besieged by the player...havent found another way yet.

  13. #13
    Andytheplatypus's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    . U.S. - MS, Gulf Coast.
    Posts
    2,384

    Default Re: New Scripts

    Sorry I am terrible at scripting. So instead of it helping it would actually hamper turn time for there to be a limited settlements for sapping since you have to monitor all settlements?

  14. #14

    Default Re: New Scripts

    yeah, reducing the settlements that can be sapped would indeed help, as of now how the script is it would require ~600 monitors to check all settlements and the sapping interactive events, if its made like with one single click you sap all settlements that meet the conditions (under siege by player and a siege equipment built) then it could be reduced to some ~202 monitors...or maybe workaround that uses a single monitor for interactive events that cycles through a list of settlements.

  15. #15
    Andytheplatypus's Avatar Domesticus
    Join Date
    Jan 2010
    Location
    . U.S. - MS, Gulf Coast.
    Posts
    2,384

    Default Re: New Scripts

    You think crusade/jihad settlements would be fair game?

  16. #16
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: New Scripts

    There is a problem with this line...

    Code:
    monitor_event EventCounter I_EventCounter edinburgh_sappers_accepted = 1
    Once edinburgh_sappers_accepted becomes 1 then every time any event counter changes value this monitor will execute, subtracting 1500 from the player and anything else the monitor does.

    It should be this...

    Code:
    monitor_event EventCounter EventCounterType edinburgh_sappers_accepted
      and I_EventCounter edinburgh_sappers_accepted = 1
    ...or just...

    Code:
    monitor_event EventCounter EventCounterType edinburgh_sappers_accepted
      and EventCounter = 1

  17. #17

    Default Re: New Scripts

    Thanks Withwnar, I thought the command set_event_counter edinburgh_sappers_accepted 0 would take care of that
    Quote Originally Posted by Andytheplatypus View Post
    You think crusade/jihad settlements would be fair game?
    yeah why not, I included in the script a 33% chance of failure, to take in account if they get cough, the tunnel collapses etc
    that % could be incresed

  18. #18

    Default Re: New Scripts

    This should reduce monitors to 203 (199 for settlements)
    Spoiler Alert, click show to read: 
    Code:
    declare_counter xxx_sapped
    declare_counter xxx_sappers
    ...repeat for rest of settlements
    declare_counter edinburgh_sapped
    declare_counter edinburgh_sappers
    declare_counter sappers_id
    monitor_event SiegeEquipmentCompleted SettlementName Xxx
        and FactionIsLocal
        and I_CompareCounter xxx_siege = 0
        and I_CompareCounter xxx_sappers = 0
            set_counter xxx_sappers 1
            set_counter sappers_id 1
            historic_event sappers true
    end_monitor
    ...repeat for rest of settlements
    monitor_event SiegeEquipmentCompleted SettlementName Edinburgh
        and FactionIsLocal
        and I_CompareCounter edinburgh_siege = 0
        and I_CompareCounter edinburgh_sappers = 0
            set_counter edinburgh_sappers 1
            set_counter sappers_id 199
            historic_event sappers true
    end_monitor
    
    
    monitor_event MessageOpen TrueCondition; should activate when opening historic event messages
        and I_CompareCounter sappers_id > 0
        if I_compareCounter sappers_id = 1
        and I_CompareCounter xxx_sappers = 1
            snap_strat_camera X,Y (Settlement coords maybe shifted to the right)
        end_if
    ...repeat for rest of settlements
        if I_compareCounter sappers_id = 199
        and I_CompareCounter edinburgh_sappers = 1
            snap_strat_camera X,Y (Edinburgh coords)
        end_if
    end_monitor
    
    
    ;accept
    monitor_event EventCounter EventCounterType sappers_accepted
        and I_EventCounter sappers_accepted = 1
        set_event_counter sappers_accepted 0
            if I_CompareCounter sappers_id = 1
            and I_CompareCounter xxx_sappers = 1
                console_command add_money -1500
                set_counter xxx_sappers 0
                set_counter xxx_sapped 1
                generate_random_counter xxx_sapping 0 100
                if I_EventCounter xxx_sapping > 66
                    console_command damage_wall Xxx breach
                    historic_event sappers_success1
                end_if
                if I_EventCounter xxx_sapping <= 66
                and I_EventCounter xxx_wall_damage > 33
                    console_command damage_wall Xxx gate
                    historic_event sappers_success2
                end_if
                if I_EventCounter xxx_sapping <= 33
                    historic_event sappers_failed
                end_if
            end_if
        ...repeat for rest of settlements
            if I_CompareCounter sappers_id = 199
            and I_CompareCounter edinburgh_sappers = 1
                console_command add_money -1500
                set_counter edinburgh_sappers 0
                set_counter edinburgh_sapped 1
                generate_random_counter edingburgh_sapping 0 100
                if I_EventCounter edingburgh_sapping > 66
                    console_command damage_wall Edinburgh breach
                    historic_event sappers_success1
                end_if
                if I_EventCounter edingburgh_sapping <= 66
                and I_EventCounter edingburgh_wall_damage > 33
                    console_command damage_wall Edinburgh gate
                    historic_event sappers_success2
                end_if
                if I_EventCounter edingburgh_sapping <= 33
                    historic_event sappers_failed
                end_if
            end_if
            if I_CompareCounter xxx_sappers = 1
                set_counter sappers_id 1
            end_if
        ...repeat for rest of settlements
            if I_CompareCounter edinburgh_sappers = 1
                set_counter sappers_id 199
            end_if
    end_monitor
    
    
    ;reject
    monitor_event EventCounter EventCounterType sappers_declined
        and I_EventCounter sappers_declined = 1
        set_event_counter sappers_declined 0
            if I_CompareCounter sappers_id = 1
            and I_CompareCounter xxx_sappers = 1
                set_counter xxx_sappers = 0
            end_if
        ...repeat for rest of settlements
            if I_CompareCounter sappers_id = 199
            and I_CompareCounter edinburgh_sappers = 1
                set_counter edinburgh_sappers = 0
            end_if
    end_monitor
    
    
    ;Reset counters
    monitor_event FactionTurnEnd FactionIsLocal
        If I_CompareCounter edinburgh_sapped = 1
        and not I_SettlementUnderSiege Edinburgh
            set_counter edinburgh_sapped 0
        end_if
    ...repeat for rest of settlements
        If I_CompareCounter xxx_sapped = 1
        and not I_SettlementUnderSiege Xxx
            set_counter xxx_sapped 0
        end_if
    end_monitor

  19. #19

    Default Re: New Scripts

    Quote Originally Posted by Withwnar View Post
    Spoiler Alert, click show to read: 
    There is a problem with this line...

    Code:
    monitor_event EventCounter I_EventCounter edinburgh_sappers_accepted = 1
    Once edinburgh_sappers_accepted becomes 1 then every time any event counter changes value this monitor will execute, subtracting 1500 from the player and anything else the monitor does.

    It should be this...
    I'd better say: Every time any event counter changes value, monitor #1 will read the list of event counters (or something like that), find the edinburgh_sappers_accepted and compare its value with 1.
    If it is monitor #3, it 'll check if the event counter which has just changed its value is the edinburgh_sappers_accepted. If this is true, it'll check if the value of this event counter (which has just been exported btw). It's more efficient way, isn't it?

    Quote Originally Posted by Melooo182 View Post
    This should reduce monitors to 203 (199 for settlements)
    Spoiler Alert, click show to read: 
    Code:
    declare_counter xxx_sapped
    declare_counter xxx_sappers
    ...repeat for rest of settlements
    declare_counter edinburgh_sapped
    declare_counter edinburgh_sappers
    declare_counter sappers_id
    monitor_event SiegeEquipmentCompleted SettlementName Xxx
        and FactionIsLocal
        and I_CompareCounter xxx_siege = 0
        and I_CompareCounter xxx_sappers = 0
            set_counter xxx_sappers 1
            set_counter sappers_id 1
            historic_event sappers true
    end_monitor
    ...repeat for rest of settlements
    monitor_event SiegeEquipmentCompleted SettlementName Edinburgh
        and FactionIsLocal
        and I_CompareCounter edinburgh_siege = 0
        and I_CompareCounter edinburgh_sappers = 0
            set_counter edinburgh_sappers 1
            set_counter sappers_id 199
            historic_event sappers true
    end_monitor
    
    
    monitor_event MessageOpen TrueCondition; should activate when opening historic event messages
        and I_CompareCounter sappers_id > 0
        if I_compareCounter sappers_id = 1
        and I_CompareCounter xxx_sappers = 1
            snap_strat_camera X,Y (Settlement coords maybe shifted to the right)
        end_if
    ...repeat for rest of settlements
        if I_compareCounter sappers_id = 199
        and I_CompareCounter edinburgh_sappers = 1
            snap_strat_camera X,Y (Edinburgh coords)
        end_if
    end_monitor
    
    
    ;accept
    monitor_event EventCounter EventCounterType sappers_accepted
        and I_EventCounter sappers_accepted = 1
        set_event_counter sappers_accepted 0
            if I_CompareCounter sappers_id = 1
            and I_CompareCounter xxx_sappers = 1
                console_command add_money -1500
                set_counter xxx_sappers 0
                set_counter xxx_sapped 1
                generate_random_counter xxx_sapping 0 100
                if I_EventCounter xxx_sapping > 66
                    console_command damage_wall Xxx breach
                    historic_event sappers_success1
                end_if
                if I_EventCounter xxx_sapping <= 66
                and I_EventCounter xxx_wall_damage > 33
                    console_command damage_wall Xxx gate
                    historic_event sappers_success2
                end_if
                if I_EventCounter xxx_sapping <= 33
                    historic_event sappers_failed
                end_if
            end_if
        ...repeat for rest of settlements
            if I_CompareCounter sappers_id = 199
            and I_CompareCounter edinburgh_sappers = 1
                console_command add_money -1500
                set_counter edinburgh_sappers 0
                set_counter edinburgh_sapped 1
                generate_random_counter edingburgh_sapping 0 100
                if I_EventCounter edingburgh_sapping > 66
                    console_command damage_wall Edinburgh breach
                    historic_event sappers_success1
                end_if
                if I_EventCounter edingburgh_sapping <= 66
                and I_EventCounter edingburgh_wall_damage > 33
                    console_command damage_wall Edinburgh gate
                    historic_event sappers_success2
                end_if
                if I_EventCounter edingburgh_sapping <= 33
                    historic_event sappers_failed
                end_if
            end_if
            if I_CompareCounter xxx_sappers = 1
                set_counter sappers_id 1
            end_if
        ...repeat for rest of settlements
            if I_CompareCounter edinburgh_sappers = 1
                set_counter sappers_id 199
            end_if
    end_monitor
    
    
    ;reject
    monitor_event EventCounter EventCounterType sappers_declined
        and I_EventCounter sappers_declined = 1
        set_event_counter sappers_declined 0
            if I_CompareCounter sappers_id = 1
            and I_CompareCounter xxx_sappers = 1
                set_counter xxx_sappers = 0
            end_if
        ...repeat for rest of settlements
            if I_CompareCounter sappers_id = 199
            and I_CompareCounter edinburgh_sappers = 1
                set_counter edinburgh_sappers = 0
            end_if
    end_monitor
    
    
    ;Reset counters
    monitor_event FactionTurnEnd FactionIsLocal
        If I_CompareCounter edinburgh_sapped = 1
        and not I_SettlementUnderSiege Edinburgh
            set_counter edinburgh_sapped 0
        end_if
    ...repeat for rest of settlements
        If I_CompareCounter xxx_sapped = 1
        and not I_SettlementUnderSiege Xxx
            set_counter xxx_sapped 0
        end_if
    end_monitor
    I think you should reconsider "monitor_event MessageOpen TrueCondition". What is its use? Snapping strat_camera around the map? What if the historic event is the lateral_council1?

    If you want to damage_walls of local settlements, check this out:
    Spoiler Alert, click show to read: 
    Code:
    declare_counter edinburgh_sapped
    ...
    
    monitor_event SettlementTurnStart SettlementIsLocal
    
        e_select_settlement
    
        if I_SettlementSelected Edinburgh
    
            if not I_SettlementUnderSiege Edinburgh
                set_counter edinburgh_sapped 0
            end_if
    
            if I_SettlementUnderSiege Edinburgh 
            and I_CompareCounter edinburgh_sapped = 0
                ; random counter stuff
                console_command damage_wall Edinburgh gate
                set_counter edinburgh_sapped 1
            end_if
    
        end_if
    
        ; do the same for all other settlements    
    end_monitor

  20. #20

    Default Re: New Scripts

    I think you should reconsider "monitor_event MessageOpen TrueCondition". What is its use? Snapping strat_camera around the map? What if the historic event is the lateral_council1?
    yeah i know it would do it with any historic event/interactive event/mission/turn report/etc...a little side effect which I think is bearable enough and would go away when you get done with sapping interactive events...and yes its purpose is to shift the camera to the settlement to be sapped as indicator since they all were condensed to a single interactive event.

    I still have to test all this in game...this has just been a theoretical exercise so far.

    Quote Originally Posted by gsthoed View Post
    If you want to damage_walls of local settlements, check this out:
    Spoiler Alert, click show to read: 
    Code:
    declare_counter edinburgh_sapped
    ...
    
    monitor_event SettlementTurnStart SettlementIsLocal
    
        e_select_settlement
    
        if I_SettlementSelected Edinburgh
    
            if not I_SettlementUnderSiege Edinburgh
                set_counter edinburgh_sapped 0
            end_if
    
            if I_SettlementUnderSiege Edinburgh 
            and I_CompareCounter edinburgh_sapped = 0
                ; random counter stuff
                console_command damage_wall Edinburgh gate
                set_counter edinburgh_sapped 1
            end_if
    
        end_if
    
        ; do the same for all other settlements    
    end_monitor
    Not really sure this is what we're looking for here, isnt this script for damaging own settlement walls?...the sapping script aims to damage a specific enemy settlement's walls while under siege by a local army, but there could be some use on the e_select_settlement command hmmm.

Page 1 of 4 1234 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
  •