Page 1 of 3 123 LastLast
Results 1 to 20 of 55

Thread: Scripts that are or will be in the SSHIP

  1. #1
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Icon14 Scripts that are or will be in the SSHIP

    Hi Guys,
    In this thread I'd like to present you with the scripts that I am working now or I've been working on in past in the SSHIP. Previous work consisted mainly fixing of the existing scripts, now I'm often adding my own, new scripts. They are crafted with history in mind, as the spirit of the mod is.

    If you feel an urge to change something in your build or to code a minimod, this thread should make it easier for you. Mind that the SSHIP script.txt includes a few instructions for the newbie scripters (the EDCT has even more).

    Structure of the script.txt (as of May 2022) is as follows:
    Code:
    ;===================== CONTENTS ==================================================
    
    ;---- HELP FOR MODERS
    ;-------  Technical advice
    ;-------  Advice on moding this SSHIP script
    ;-------  Ideas for further modding
    
    ;---- TECHNICALITIES for script
    ;------- Reveal everything ( shift + r to trigger)
    ;------- Test trigger ( shift + t to trigger)
    ;------- Show build version and date in the log
    
    ;---- CAMPAIGN SET-UP
    ;------- Difficulty set-up (counters & infos for difficulty, king's purse adjustments)
    ;------- Who's playing current turn
    ;---------- Definitions for eras, leap years, etc.
    ;---------- Beginning of AI turn: zeroing counters, setting AI & difficulties
    ;---------- Beginning of PLAYER turn: zeroing counters, setting player & other counters, aggressivity system decrease
    ;---------- Beginning of EACH FACTION turn: setting counters for faction, religion, culture, size
    ;---------- Whose settlement it is
    ;------- Reveal Known Settlements (at the beginning of a campaign)
    
    ;---- NOTIFICATIONS (pop-out windows)
    ;------- Info depending on difficulty
    ;------- Info depending on religion
    ;------- Factions' initial historical info pop-up
    ;------- Factions close-to-collapse
    ;------- Statistics of the campaign
    
    ;---- AI SUPPORT
    ;------- Destroy AI buildings that prevent AI from funding other buildings
    ;------- Spawn of Armies at the Beginning
    ;------- Spawn of Fleets at the Beginning
    ;------- Scripted Early Sieges with Additional Armies
    ;------- Additional Fleets Throughout The Game
    ;------- Additional General if there're Too Few
    
    ;---- AI FACTION REEMERGENCE SCRIPT   (11000 lines)
    
    ;---- BATTLE RELATED
    ;------- Leader Battle Models
    ;------- G5 BAI STUFF (22000 lines)
    ;------- G5 Looting Script
    
    ;---- ECONOMY
    ;------- Player's treasury size counter & anti-hoarding mechanism (to be used also in other scripts)
    ;------- G5 Faction Economy Script
    ;------- Additional Costs (Change of Capital, Supply, NewNobles, JoinsCrusade)
    ;------- Mercenaries Disband Due to Debts
    
    ;---- INTERNATIONAL AFFAIRS   (5500 lines)
    ;------- Small scripts for diplomacy
    ;------- Player Agressivity Mechanism (turmoil and deterioration of diplo standing after capture of a settlement)
    ;------- Aggressor Tracking Script (if and how many on-going war were inititated by a faction)
    ;------- AI Faction Leader Change Effects (for a weak AI the diplomatic standing is reset)
    
    ;---- FACTION LEADER
    ;------- FL Policies & Counters (EDCT -> counters -> EDB, script & other)    (1700 lines)
    ;------- Change on the throne counters & costs                                (2000 lines)
    ;------- Crowns (ceremony, costs, upkeep)
    ;------- FL Faction Killer (for each faction monitor CeasedFactionLeader)
    ;------- King's Right Hand tracking (Near_Loyalty)
    
    ;---- BUILDINGS
    ;---------- Counters for number of buildings completed
    ;------- REGULAR BUILDINGS
    ;---------- Racing Track
    ;---------- Universities - catholic evolution
    ;---------- Printing Press
    ;------- UNIQUE BUILDINGS (wonders) --- (fires coded for: Holy Sepulchre, Umayyad Mosque, Speyer, Wien, Krakow)
    ;------- HANSA buildings
    ;---------- Hanseatic System
    ;---------- Hansa buildings fires
    ;------- SOUTH ITALY buildings
    ;---------- Al-Idrisi
    ;---------- South Italy Building fires
    ;------- Knight Orders (Recruitment Requirements, Dissolution of the Templars, Hospitaller, Teutonic, Santiago)
    
    ;---- PROVINCES
    ;------- Provinces activated on SettlementSelected
    ;------- Capture of Settlements (change of name, armies spawned, building damaged, counters: _turns_in_our_realm, aggressivity)
    ;---------- List of 199 settlements by region                                (28000 lines)
    ;------- Settlement Situation (unrest due to conquest, occupation, weak leader, player's aggressivity)
    ;---------- Script for each of 199 settlements                               (55000 lines)
    ;------- Civil war after usurpation (Armies & Duration)                     (1800 lines)
    ;------- Rebellions in troublesome regions (spawn of slave armies: Austria)
    ;------- Wars over historically contested provinces (Bohemia, Jutland)
    
    ;---- INVASIONS
    ;------- Scripts common for invasions mechanisms (decrease purse, countdown of counters etc.)
    ;                monitor: PreFactionTurnStart FactionType slave
    ;------- Scotland Mobilizes
    ;------- Bulgarian Uprising (098 deactivated)
    ;------- Eldeguzid invasions of Georgia
    ;------- Turcoman Help for Rum
    ;------- Berber Help for Moors
    ;------- Makurian Help for the Fatimids
    ;------- Steppes Untamed - Nomadic Tribes Help for the Cumans
    ;------- Qara Khitai
    ;------- GOLDEN HORDE (MONGOL INVASIONS)
    
    ;---- FACTIONS' HISTORICAL EVOLUTIONS
    ;---------- Info on spheres of influence (activated on SettlementSelected)
    ;---------- Ostsiedlung event
    ;------- Catholic Factions
    ;---------- HRE Evolution
    ;---------- Poland Evolution
    ;---------- Hungary Evolution
    ;---------- Kingdom of Jerusalem Evolution
    ;---------- Aragon Evolution
    ;---------- France Evolution
    ;---------- England Evolution
    ;---------- Scotland Evolution
    ;---------- Norway Evolution
    ;---------- Denmark Evolution
    ;------- Orthodox Factions
    ;---------- Byzantine Evolutions
    ;---------- Serbia Evolution
    ;---------- Georgia Evolution
    ;---------- Rus Evolution
    ;------- Pagan Factions
    ;---------- Lithuania Evolution
    ;------- Muslim Dynasties
    ;---------- Rum Evolution
    ;---------- Almoravid Evolution
    ;---------- Zengid Evolution
    ;---------- Abbasid Evolution
    ;---------- Fatimid Evolution (Baqt, Fatimid to Ayyubid, Ayyubid to Mamluk)
    
    ;---- CHURCH, ANCILLARIES, PRINCESSES
    ;------- Church Titles
    ;------- Ecumenical Patriarch
    ;------- Great People Ancillaries
    ;------- Noble Lady Spawn Script (3000 lines)
    
    ;---- NATURAL DISASTERS
    ;------- Earthquakes
    ;------- Floods
    
    ;---- INTERACTIVE EVENTS
    ;------- Great Trade Fair
    ;------- Great Tourney
    ;------- Troubadours
    ;------- Great Councils
    ;------- Pirates
    ;------- Financial Support for the Crusaders
    Advice in the script.txt (as of May 2022) for the potential modders:
    Spoiler Alert, click show to read: 
    ; --------- MINIMISE NUMBER of ACTIVE MONITORS ------------;
    ; There're many ingenious scripts coded in the other mods, but they are very likely to interact with scripts already included in the mod.
    ; Or the may just get into collision with the overall gameplay, producing very UNexpected results, from strange behaviour to crashes.
    ; This concerns also the EDCT (traits), the EDA (anciallaries), the EDB (buildings), the DM (mercenaries): many mechanisms there are defined here in the script.
    ; So: DO NOT DELETE anything unless you're 200% sure it will not have any unforeseen side-effects.

    ;------- OPTIMISATION of processing time:
    ; The goal is to shorten the processing time between the turns, so: --------- MINIMISE NUMBER of ACTIVE MONITORS ------------
    ; They are stored in memory and linger there.
    ; Each monitors should be terminated as soon as it is possible. Add terminate to any monitor, just in case something strange happens.
    ; The number of times a monitor get called\tested seems not to matter (eg. several CharacterTurnEnd events with a thousand characters on the map should bog down the turn times, but it don't seem to).
    ; Maybe it'always better to put the conditions that have the least likelyhood at the beginning of a list of conditions in a monitor (because the engine will then just skip the rest of the conditions).

    ;------- Comfort of the players:
    ; - limit the frequency of historical_events notifications by limiting them to the relevant factions or only to the player.

    ;------- Saveguards against crashes:
    ; - always add a randomness to a monitor (eg RandomPercent > 90) so that it would be possible to move from a save even if that monitor would cause a crash
    ; - use < > rather than =

    ;------- COUNTERS
    ; You do not need to declare an event_counter - it always exists in a zero state.
    ; You need to declare a normal counter.
    ; Command "historic_event":
    ; - creates a regular event_counter (if one doesn't already exist) and increments its value by +1.
    ; - obviously, it also displays a scroll (formatted by an entry in descr_event_images.txt with text from historic_events.txt).
    ; - you can interact with this event_counter using set_event_counter, inc_event_counter, or conditions like I_EventCounter.

    ; Negation of a normal counter can be done in two ways:
    ; and not I_CompareCounter ai_ec_id = 21
    ; and I_CompareCounter ai_ec_id ! = 21

    ; (perhaps not true but it was noted before): counter that changes throughout the game (eg. during player's turn is 1, but during AI is 0) should rather be not be used as condition for buildings (in EDB) because it breaks the building queue.

    ;------- CONDITIONS IN MONITORS and in IF CLAUSES

    ; 'If' sections only work correctly with conditions that start with I_, like I_SettlementUnderSiege (basically conditions that do not need trigger requirements, eg do not depend on the export of the event).
    ; In case you want to script that something happens in a Scotland turn: monitor_event FactionTurnStart FactionType scotland
    ; but if you cannot use the monitor, use the clause: if I_EventCounter faction_turn_scotland = 1

    ; Conditions that CANNOT be used in IF-clauses:
    ; --- "Treasury = X" (needs the faction exports) - in the SSHIP special counters for treasury exist - look at the script!
    ; --- "FactionBuildingExists" (needs the faction exports) - but you can use I_SettlementOwner
    ; --- "SettlementBuildingFinished" (needs building exports)

    ;------- AFTER AN EVENT
    ; move_strat_camera - move (sweep like) from the current map view to the location of the event
    ; snap_strat_camera - instant placement of view on the location of the event
    ; position - locator button in a pop-out window
    ; zoom_strat_camera - zooms afterhe move/snap/clicking on the locator button

    ;------- SPECIAL ISSUES

    ; Crusades and Jihads:
    ; - IsCrusade / IsJihad - checks if theres one in progress, works also for other religions
    ; - IsOnJihad - checks if the character has signed up for the jihad
    ; - "monitor_event GeneralJoinCrusade" - applies to joining jihaad as well correctly assumed there is a separate event the same way there is a different condition). In which case the IsCrusade condition does have a function as it makes sure that it is only applicable during a crusade, not a Jihaad (IsJihaad) or both.

    ; Defining time:
    ; and I_TurnNumber > 10
    ; But one may define years of the mod and:
    ; and I_CompareCounter campaign_year > 1110
    ; (it is the way in Titanium)

    ; reveal_tile - reveals armies and whatever else is on the tile and it will continue to reveal that tile for the rest of the campaign unless you issue hide_all_revealed_tiles. Watch out if there's no hide_all_reveal_tiles somewhere else in script which will make armies, fleets, agents, etc. disappear under fog as they're not permanent fixtures on the map.

    ;------------------------------------------------------------------------------------------------------
    ;------- Advice on moding this SSHIP script - counters & mechanisms -----------------------------------
    ;------------------------------------------------------------------------------------------------------

    ;------- CODING WHICH FACTION IS PLAYING -------

    ; The best way to script things dependent on the player and factions:
    ;
    ; monitor_event whatever
    ; if I_EventCounter is_the_player == 1 ; player turn
    ; and I_EventCounter faction_turn_england == 1 ; England turn
    ; and I_EventCounter DifficultyLevel > 2 ; Hard or Very Hard difficulty
    ; do stuff
    ; end_monitor

    ; monitor_event whatever
    ; if I_EventCounter is_the_player == 0 ; AI turn
    ; and I_EventCounter faction_turn_england == 0 ; not England turn
    ; and I_IsFactionAIControlled france ; player is not France
    ; and I_EventCounter DifficultyLevel == 4 ; Very Hard difficulty
    ; do stuff
    ; end_monitor

    ;------- Who's turn: player, AI, faction (these are counters from the previous verison of the sship, somehow redundant)

    ; At the beginning of each faction turn start the following is defined:
    ; is_the_ai 0 = PLAYER TURN (used in the "Unrest Surges in Certain Major Cities" script)
    ; is_the_ai 1,2,3,4 = AI TURN: difficulties E/M/H/VH (used in the "Unrest Surges in Certain Major Cities" script, used in EDB to provide AI with bonuses depending on the difficulty level)

    ; is_the_player 1 = PLAYER TURN (used in the EDB for unit recruitment and for few building benefits)
    ; is_the_player 0 = AI TURN (used neither in the EDB nor in 097 script)

    ; ai_ec_id : = WHICH FACTION IS CURRENTLY PLAYING: 0=Local player, 1=rebels, 2=venice etc (used in Faction Economy script)
    ; pl_ec_id : = WHICH FACTION THE PLAYER IS: 2 = venice etc (used in Rebellion script)

    ; 1 slave, 2 venice, 3 sicily, 4 abbasid, 5 papal_states, 6 denmark, 7 egypt, 8 scotland, 9 cumans, 10 mongols, 11 turks,
    ; 12 france, 13 hre, 14 england, 15 portugal, 16 poland, 17 byzantium, 18 moors, 19 russia, 20 spain, 21 hungary, 22 aragon,
    ; 23 lithuania, 24 kievan_rus, 25 serbia, 26 georgia, 27 norway, 28 jerusalem, 29 zengid, 30 pisa, 31 rum

    ;------- Size of settlements
    ; there're 4 sizes defined (small: 1-3, medium 4-9, large 10-19, huge 20-50), each turn the counters are known:
    ; how bit the current faction is, and what was the size of each faction at the last beginning of its turn
    ; see here:

    ;------- THE SETTLEMENTS ----------------------------------------------------------------
    ; Have a look at the explanations at the beginning of the relevant section.
    ; In particular, any script aiming at provoking the unrest (turmoil) should do it through increasing a special SSHIP counter, not a direct command ("add_settlement_turmoil").
    ; This is because every console command "add_settlement_turmoil" replaces the previous unrest and new scripts often end up in lowering the current one.

    ;------- SPAWN OF AN ARMY ----------------------------------------------------------------
    ; if you add the same units in a spawned army, try to provide significant differences (with experience levels) between them
    ; so that it would be more entertaining for the player in fight (he needs to pay attention which unit he's fighting)
    ; eg.
    ; unit Macemen exp 7 armour 0 weapon_lvl 0
    ; unit Macemen exp 0 armour 0 weapon_lvl 0
    ; unit Crossbow Militia exp 7 armour 0 weapon_lvl 0
    ; unit Crossbow Militia exp 0 armour 0 weapon_lvl 0

    ; Name of a general:
    ; - if the army spawned is a faction - use "random_name"
    ; - if the army is slave then provide a name from the slave list (not another!)
    ; (sub_faction tag doesn't work in campaign_script so leaving "random_name" produces a nameless general)
    ; - you don't need to give him Bodyguard unit - any unit will do (although too weak will be replaced by a better, if such is in the army)

    ;------- Aggressor
    ; AGGRESSOR: to be analysed how do the links to EDCT work with
    ; aggressor 1 - faction is currently engaged in a war it has started.
    ; aggaragon 1 - it is Aragon that is the aggressor

    ; monitor_event CharacterTurnStart Trait Aggressor_Aragon > 0
    ; set_event_counter aggressor 1
    ; end_monitor

    ; monitor_event FactionWarDeclared TargetFactionType aragon
    ; set_event_counter aggaragon 1
    ; end_monitor

    ;------- Size of the players' treasury:
    ; player_treasury - see script for it, it is meant to be used in other scripts
    Last edited by Jurand of Cracow; May 29, 2022 at 06:34 AM.
    Mod leader of the SSHIP: traits, ancillaries, scripts, buildings, geography, economy.
    ..............................................................................................................................................................................
    If you want to play a historical mod in the medieval setting the best are:
    Stainless Steel Historical Improvement Project and Broken Crescent.
    Recently, Tsardoms and TGC look also very good. Read my opinions on the other mods here.
    ..............................................................................................................................................................................
    Reviews of the mods (all made in 2018): SSHIP, Wrath of the Norsemen, Broken Crescent.
    Follow home rules for playing a game without exploiting the M2TW engine deficiencies.
    Hints for Medieval 2 moders: forts, merchants, AT-NGB bug, trade fleets.
    Thrones of Britannia: review, opinion on the battles, ideas for modding. Shieldwall is promising!
    Dominant strategy in Rome2, Attila, ToB and Troy: “Sniping groups of armies”. Still there, alas!

  2. #2
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    Let us start with the Noble Ladies script. This was done, fixed and actually tested over this year, I hope it fully works now. I'm actually interested if the players find the number of the princesses on the map right.

    Code:
    ;======================================================================================================
    ;------- Noble Lady Spawn Script
    ;======================================================================================================
    ; first version VineFynn 2019, re-coded by JoC 2020
    
    ; What does it do:
    ; starting in 1157 (turn 50) it provides each faction with a princess (called noble lady) every generation (slightly more than 20 years)
    ; the goal is to make the princesses an important part of the game (as wifes, tools of diplomacy, diplomats themselves) - without this script the "natural born" princesses would appear very rarely due to the fact that in most cases the new FL would ascend to the throne after his chilren had came of age
    
    
    ; Possible further modding:
    ; the whole section can be deleted without any impact on the other parts of the game, if one doesn't like it;
    ; a submod "Royal Ladies of the Court" could be implemented to make a part of the game for the player (but it's not advised: it would be very processing-power consuming);
    ; another option is to have Yes/No proposal for the player - against a payment (but Bloodlines and names might make the script long!)
    ; until this happens all "I_IsFactionAIControlled" are omitted in the script - thus the player also gets a princess from the script.
    
    set_event_counter spainlady 1
    ...
    
    ; princess spawn is stochastic below, and one may adjust when they start being spawned
    ; and also often they're spawned (100 - every 15 years, 50 - every 28 years)
    ; groups are made so that princesses from the same region have different delays
    
    monitor_event PreFactionTurnStart I_TurnNumber > 50
        and FactionType slave
    
        if RandomPercent < 66
            inc_event_counter spainlady 1
            ...
        end_if
    
        if I_EventCounter spainlady > 28
            ;            and I_IsFactionAIControlled spain
    
            if I_SettlementOwner Leon = spain
                and RandomPercent < 5
    
                spawn_character spain Blanca, princess, age 19, x 37, y 152           ; Charm 4
                console_command give_trait "Blanca" IAmPrincess 2
                console_command give_trait "Blanca" Princess_Royal_Blood_Spanish 1
                console_command give_trait "Blanca" PrettyWoman 1
                console_command give_trait "Blanca" HumbleWoman 1
                console_command give_trait "Blanca" SpiritedWoman 1
    
                set_event_counter spainlady 0
    
            end_if
    
            if I_EventCounter spainlady > 28
                and I_SettlementOwner Santiago = spain
                and RandomPercent < 5
    
                spawn_character spain Isabel, princess, age 19, x 14, y 155           ; Charm 3
                console_command give_trait "Isabel" IAmPrincess 2
                console_command give_trait "Isabel" Princess_Royal_Blood_Spanish 1
                console_command give_trait "Isabel" PrettyWoman 1
                console_command give_trait "Isabel" GoodPrincess 1
    
                set_event_counter spainlady 0
    
            end_if
    
            if I_EventCounter spainlady > 28
                and I_SettlementOwner Leon = spain
                and RandomPercent < 5
    
                spawn_character spain Sancha, princess, age 19, x 37, y 152           ; Charm 1
                console_command give_trait "Sancha" IAmPrincess 2
                console_command give_trait "Sancha" Princess_Royal_Blood_Spanish 1
                console_command give_trait "Sancha" PrettyWoman 1
                console_command give_trait "Sancha" PretentiousWoman 1
    
                set_event_counter spainlady 0
    
            end_if
    
    
            if I_EventCounter spainlady > 28
                and I_SettlementOwner Santiago = spain
                and RandomPercent < 5
    
                spawn_character spain Jimena, princess, age 19, x 14, y 155            ; Charm 2
                console_command give_trait "Jimena" IAmPrincess 2
                console_command give_trait "Jimena" Princess_Royal_Blood_Spanish 1
                console_command give_trait "Jimena" BigotWoman 1
                console_command give_trait "Jimena" HumbleWoman 1
                console_command give_trait "Jimena" FaithfulWoman 1
    
                set_event_counter spainlady 0
    
            end_if
    
            if I_EventCounter spainlady > 28
                and I_SettlementOwner Leon = spain
                and RandomPercent < 5
    
                spawn_character spain Ana, princess, age 19, x 37, y 152            ; Charm 5
                console_command give_trait "Ana" IAmPrincess 2
                console_command give_trait "Ana" Princess_Royal_Blood_Spanish 1
                console_command give_trait "Ana" PrettyWoman 1
                console_command give_trait "Ana" HumbleWoman 1
                console_command give_trait "Ana" SpiritedWoman 1
                console_command give_trait "Ana" UnchasteWoman 1
    
                historic_event noble_lady_spawn_spain
                set_event_counter spainlady 0
    
            end_if
    
    
            if I_EventCounter spainlady > 28
                and I_SettlementOwner Santiago = spain
                and RandomPercent < 5
    
                spawn_character spain Inmaculada, princess, age 19, x 14, y 155           ; Charm 6
                console_command give_trait "Inmaculada" IAmPrincess 2
                console_command give_trait "Inmaculada" Princess_Royal_Blood_Spanish 1
                console_command give_trait "Inmaculada" PrettyWoman 1
                console_command give_trait "Inmaculada" TolerantWoman 1
                console_command give_trait "Inmaculada" SpiritedWoman 1
                console_command give_trait "Inmaculada" FaithfulWoman 1
                console_command give_trait "Inmaculada" FairWoman 1
    
                historic_event noble_lady_spawn_spain
                set_event_counter spainlady 0
    
            end_if
        end_if
    ...
    Last edited by Jurand of Cracow; May 29, 2022 at 06:39 AM.

  3. #3
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    This fires only at the beginning of the game and will be improved in the future. The problems from the previous versions of the SSHIP (Santiago not revealed etc.) are fixed, I hope.
    You may always provide bits of the script you think should be there, I'd include them (after scrutiny ;-)

    Code:
        ;========================================================================================================
        ;------- City Initial Reveal
        ;========================================================================================================
        ; it is only for the player because the AI can always see all the settlements and ports
        ; the cities should be revealed on the basis of both historicity (actually, many should be) and gameplay (many shouldn't be so that exploration the map is a part of the game)
        ;
        ; this script should be reviewed faction-by-faction in the future
        
         monitor_event FactionTurnStart FactionIsLocal 
    
    
            if I_EventCounter faction_turn_spain = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_france = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_portugal = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_aragon = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_hre = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 168,173    ;    Venice        
                reveal_tile 181,206    ;    Prague
                reveal_tile 170,222    ;    Brandenburg
                reveal_tile 224,208    ;    Krakow
                reveal_tile 198,222    ;    Poznan
            end_if 
    
    
            if I_EventCounter faction_turn_england = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_scotland = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_denmark = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 224,208    ;    Krakow            
            end_if 
    
    
            if I_EventCounter faction_turn_norway = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
            end_if 
    
    
            if I_EventCounter faction_turn_poland = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 181,206    ;    Prague
            end_if 
    
    
            if I_EventCounter faction_turn_hungary = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 168,173    ;    Venice        
                reveal_tile 181,206    ;    Prague
                reveal_tile 224,208    ;    Krakow            
            end_if 
    
    
            if I_EventCounter faction_turn_venice = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 302,61    ;     Cairo
            end_if 
    
    
            if I_EventCounter faction_turn_sicily = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 168,173    ;    Venice   
                reveal_tile 302,61    ;     Cairo
            end_if 
    
    
            if I_EventCounter faction_turn_pisa = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 168,173    ;    Venice   
                reveal_tile 302,61    ;     Cairo
            end_if 
    
    
            if I_EventCounter faction_turn_abbasid = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
                reveal_tile 302,61    ;     Cairo
                reveal_tile 364,1    ;     Mecca
            end_if 
    
    
            if I_EventCounter faction_turn_byzantium = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 168,173    ;    Venice   
                reveal_tile 302,61    ;     Cairo
            end_if 
    
    
            if I_EventCounter faction_turn_kievan_rus = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 224,208    ;    Krakow
            end_if 
    
    
            if I_EventCounter faction_turn_russia = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
            end_if 
    
    
            if I_EventCounter faction_turn_serbia = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
            end_if 
    
    
            if I_EventCounter faction_turn_georgia = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 416,94    ;     Baghdad
            end_if 
    
    
            if I_EventCounter faction_turn_lithuania = 1
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 224,208    ;    Krakow
            end_if 
    
    
            if I_EventCounter faction_turn_moors = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
                reveal_tile 302,61    ;     Cairo
                reveal_tile 364,1    ;     Mecca
            end_if 
    
    
            if I_EventCounter faction_turn_rum = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
                reveal_tile 302,61    ;     Cairo
                reveal_tile 364,1    ;     Mecca
            end_if 
    
    
            if I_EventCounter faction_turn_turks = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
                reveal_tile 302,61    ;     Cairo
                reveal_tile 364,1    ;     Mecca
            end_if 
    
    
            if I_EventCounter faction_turn_egypt = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
                reveal_tile 302,61    ;     Cairo
                reveal_tile 364,1    ;     Mecca
            end_if 
    
    
            if I_EventCounter faction_turn_zengid = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
                reveal_tile 302,61    ;     Cairo
                reveal_tile 364,1    ;     Mecca
            end_if 
    
    
            if I_EventCounter faction_turn_jerusalem = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 169,146    ;     Rome
                reveal_tile 14,155    ;     Santiago de Compostela
                reveal_tile 168,173    ;    Venice   
                reveal_tile 302,61    ;     Cairo
            end_if 
    
    
            if I_EventCounter faction_turn_mongols = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
                reveal_tile 416,94    ;     Baghdad
            end_if 
    
    
            if I_EventCounter faction_turn_cumans = 1
                reveal_tile 330,74    ;    Jerusalem
                reveal_tile 284,142    ;    Constantinople
            end_if 
    
    
            hide_all_revealed_tiles
            terminate_monitor
        end_monitor
    Last edited by Jurand of Cracow; November 28, 2020 at 11:09 AM.

  4. #4
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    EDIT: Mind that this script has been integrated with DIP.


    ---------------------

    The first script is pertinent to Jerusalem. As you see, it changes its name and present a movie. For some other cities there're also movies, as below.
    Actually, I'd be very happy if somebody would produce movies (.bik) for the other cities - this would spice up the game.

    Code:
        ;====================================================================================================== JERUSALEM
        ;------- Jerusalem ---------------------------------------------------------------------------------
    
        declare_counter Jerusalem_christian
        declare_counter Jerusalem_islam
        declare_counter Jerusalem_pagan
        set_counter Jerusalem_christian 0
        set_counter Jerusalem_islam 0
        set_counter Jerusalem_pagan 0
    
        monitor_event GeneralCaptureSettlement SettlementName Jerusalem
        
            if FactionReligion catholic
            and I_CompareCounter Jerusalem_christian = 0
    
                change_settlement_name Jerusalem Jerusalem
                historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik
                set_counter Jerusalem_christian 1
                set_counter Jerusalem_islam 0
                set_counter Jerusalem_pagan 0
            end_if    
    
            if FactionReligion orthodox
            and I_CompareCounter Jerusalem_christian = 0
    
                change_settlement_name Jerusalem Hierosolyma
                historic_event jerusalem_christian event/Christians_Capture_Jerusalem.bik
                set_counter Jerusalem_christian 1
                set_counter Jerusalem_islam 0
                set_counter Jerusalem_pagan 0
            end_if
               
            if FactionReligion islam
            and I_CompareCounter Jerusalem_islam = 0
    
                change_settlement_name Jerusalem al_Quds
                historic_event jerusalem_muslim event/Muslims_Capture_Jerusalem.bik
                set_counter Jerusalem_islam 1
                set_counter Jerusalem_christian 0
                set_counter Jerusalem_pagan 0
            end_if
    
            if FactionReligion pagan
            and I_CompareCounter Jerusalem_pagan = 0
    
                historic_event jerusalem_pagan
                set_counter Jerusalem_pagan 1
                set_counter Jerusalem_islam 0
                set_counter Jerusalem_christian 0
            end_if
        end_monitor
    Constantinople gets a similar script (and in the next SSHIP will get also the movies), but no specific text yet (Georgios, maybe you'd volunteer to write them?)
    Code:
    ;====================================================================================================== CONSTANTINOPLE  in the future make specific text for the event
    
        monitor_event GeneralCaptureSettlement SettlementName Constantinople
    
    
            if FactionReligion orthodox
            and not FactionType russia
            and not FactionType kievan_rus        
                change_settlement_name Constantinople Constantinople    
            end_if
    
    
            if FactionType russia
                change_settlement_name Constantinople ConstantinopleRus
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if            
            end_if
    
    
            if FactionType kievan_rus
                change_settlement_name Constantinople ConstantinopleRus
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if            
            end_if
    
    
            if FactionReligion catholic    
                change_settlement_name Constantinople Constantinople    
            end_if
            
            if FactionReligion islam
            and not FactionType turks        
            and not FactionType rum        
                change_settlement_name Constantinople ConstantinopleArabic
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE event/Constantinople_captured_by_muslims.bik
                end_if    
            end_if
    
    
            if FactionType turks
                change_settlement_name Constantinople ConstantinopleTurkic
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE event/Constantinople_captured_by_muslims.bik
                end_if            
            end_if
    
    
            if FactionType rum
                change_settlement_name Constantinople ConstantinopleTurkic
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE event/Constantinople_captured_by_muslims.bik
                end_if            
            end_if
    
    
            if FactionType cumans
                change_settlement_name Constantinople ConstantinopleTurkic
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if            
            end_if
    
    
            if FactionType mongols
                change_settlement_name Constantinople ConstantinopleTurkic
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if            
            end_if
            
        end_monitor

    Some other cities also get similar scripts, but they're not shown to every faction and they're limited - just change of the name and a pop-out window. For certain cities something more, like for Krakow.

    Code:
        ;====================================================================================================== BALTICS
        ;------- Baltics -----------------------------------------------------------------------------------
    
    
        ;------------------------------------------------------------------------------  TURKU
    
    
    
    
        monitor_event GeneralCaptureSettlement SettlementName Turku
    
    
            if FactionReligion catholic
                change_settlement_name Turku Abo
                
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if
            end_if
        
            if not FactionReligion catholic 
                change_settlement_name Turku Turku
            end_if
            
        end_monitor
    
    ...
    
        ;------------------------------------------------------------------------------  KRAKOW
        monitor_event GeneralCaptureSettlement SettlementName Krakow
    
    
            if FactionType poland
                change_settlement_name Krakow Krakow
                historic_event CONQUERED_KRAKOW_PL  factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
            end_if
    
    
            if  FactionType hre
                change_settlement_name Krakow Krakau
                historic_event CONQUERED_KRAKOW  factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
            end_if
             
            if not FactionType slave
            and not FactionType poland
            and not FactionType hre        
                change_settlement_name Krakow Krakow
                historic_event CONQUERED_KRAKOW  factions { poland, hre, france, england, norway, denmark, hungary, lithuania, kievan_rus, russia, cumans, }
            end_if
         
            if I_EventCounter is_the_player = 1 
            and RandomPercent < 66
            and I_EventCounter is_the_ai > 2
                console_command set_building_health Krakow hinterland_roads 60
            end_if    
            
        end_monitor
    Code:
    ;------------------------------------------------------------------------------ MECCA in the future make specific text for the event
    
    
        monitor_event GeneralCaptureSettlement SettlementName Mecca
    
    
            if FactionReligion orthodox
                change_settlement_name Mecca MeccaLatin
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if    
            end_if
    
    
            if FactionReligion catholic    
                change_settlement_name Mecca MeccaLatin
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE event/Mecca_captured_by_christians.bik
                end_if    
            end_if
            
            if FactionReligion islam
                change_settlement_name Mecca Mecca
            end_if
            
        end_monitor
    
    
    ;------------------------------------------------------------------------------ CAIRO in the future make specific text for the event
    
    
        monitor_event GeneralCaptureSettlement SettlementName Cairo
    
    
            if FactionReligion orthodox
                change_settlement_name Cairo CairoLatin
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE
                end_if
            end_if
    
    
            if FactionReligion catholic    
                change_settlement_name Cairo CairoLatin
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE event/Cairo_captured_by_christians.bik
                end_if    
            end_if
            
            if FactionReligion islam
                change_settlement_name Cairo Cairo
            end_if
            
        end_monitor    
    
    
    ;------------------------------------------------------------------------------ BAGHDAD in the future make specific text for the event
    
    
        monitor_event GeneralCaptureSettlement SettlementName Baghdad
    
    
            if FactionReligion orthodox
                change_settlement_name Baghdad Baghdad
            end_if
    
    
            if FactionReligion catholic    
                change_settlement_name Baghdad Baghdad
            end_if
            
            if FactionReligion islam
            and not FactionType turks    
                change_settlement_name Baghdad Baghdad
            end_if
    
    
            if FactionType turks    
                change_settlement_name Baghdad Baghdad
                if I_EventCounter is_the_player = 1 
                    historic_event SETTLEMENT_NAME_CHANGE event/Baghdad_captured_by_seljuks.bik
                end_if                
            end_if
            
        end_monitor
    Last edited by Jurand of Cracow; May 29, 2022 at 06:43 AM.

  5. #5
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    This one you probably know well ;-)

    Code:
        ;======================================================================================================
        ;------- Mercenaries Disband Due to Debts
        ;======================================================================================================
        ; player gets a warning 1 turn before disbandment
        ; all units with attribute "mercenary_unit" will be disbanded - even the factional units
        ;
        ; at some point it's worth to code also cool off period for "mercenaries_disband", as it is for "debt_warning"
    
    
    
    
        ;----------------- (0) overall debt warning
    
    
        set_event_counter debt_warning 5
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and Treasury < 1000
            and Treasury > 0
            and I_EventCounter debt_warning > 4
    
    
            historic_event warning_debt
            set_event_counter debt_warning 0
    
    
        end_monitor
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_EventCounter debt_warning < 5
    
    
            inc_event_counter debt_warning 1
    
    
        end_monitor
    
    
        ;----------------- (I) player recovered from debt
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and Treasury > 0
    
    
            if I_CompareCounter pl_ec_id = 2
                set_event_counter venice_mercenary_warning 0
            end_if
    ...
    
    
        end_monitor
    
    
        ;----------------- (II) player was in debt and mercenaries go now
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and Treasury < -500
    
    
            if I_CompareCounter pl_ec_id = 2
                and I_EventCounter venice_mercenary_warning = 1
                destroy_units venice, mercenary_unit
                historic_event mercenaries_disband
            end_if
    ...
    
    
            ;----------------- (III) player is in debt for the first turn and gets a warning
    
    
            if I_CompareCounter pl_ec_id = 2
                and I_EventCounter venice_mercenary_warning = 0
                inc_event_counter venice_mercenary_warning 1
                historic_event mercenaries_complain
            end_if
    ...
    
    
        end_monitor
    Last edited by Jurand of Cracow; November 28, 2020 at 11:15 AM.

  6. #6
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    This one was made by MWY long time ago, I've introduced it for 097. It's very historical. I've got a few other similar historical events in mind that would replicate this script (Almohads, Makuria, Timurids)

    Code:
        ;======================================================================================================
    	;------- Qara Khitai  ---------------------------------------------------------------------------------
    	;======================================================================================================
    	
        ;====================================================================================================== Qara Khitai Invasion
        ;------- Qara Khitai Trade & Invasion
        ; made in 2018 by MWY
    
    
        ;------------------ AI -------------------
        monitor_event PreFactionTurnStart FactionType turks
            and IsFactionAIControlled
            and I_SettlementOwner Merv = turks
            and I_TurnNumber > 14
            and RandomPercent > 66
    
    
            set_event_counter Qara_Khitai_Provoked 0
    
    
            if RandomPercent > 5
                inc_event_counter Qara_Khitai_Provoked 1
            end_if
            if RandomPercent > 5
                inc_event_counter Qara_Khitai_Provoked 1
            end_if
    
    
            if I_EventCounter Qara_Khitai_Provoked = 0
                add_money turks -15000
    
    
                increment_kings_purse turks 250
                historic_event Qara_Khitai_Trade
            end_if
    
    
            if I_EventCounter Qara_Khitai_Provoked = 1
                add_money turks -7500
    
    
                increment_kings_purse turks 250
                historic_event Qara_Khitai_Trade
            end_if
    
    
            if I_EventCounter Qara_Khitai_Provoked = 2
                set_event_counter Qara_Khitai_Invasion 1
            end_if
    
    
            terminate_monitor
        end_monitor
    
    
        ;------------------ PLAYER -------------------
        monitor_event PreFactionTurnStart FactionType turks
            and not IsFactionAIControlled
            and I_SettlementOwner Merv = turks
            and SettlementsTaken > 1
            and RandomPercent > 75
    
    
            set_event_counter Qara_Khitai_Provoked 0
            historic_event Qara_Khitai_Ambassadors true
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart FactionType turks
            and not IsFactionAIControlled
            and I_SettlementOwner Merv = turks
            and I_EventCounter Qara_Khitai_Contact = 1
            and RandomPercent > 50
    
    
            set_event_counter Qara_Khitai_Contact 2
            historic_event Qara_Khitai_Ambassadors_Two true
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event EventCounter EventCounterType Qara_Khitai_Ambassadors_accepted
            and EventCounter = 1
    
    
            set_event_counter Qara_Khitai_Contact 1
            add_money turks -10000
            set_event_counter Qara_Khitai_Ambassadors_accepted 0
            terminate_monitor
        end_monitor
    
    
        monitor_event EventCounter EventCounterType Qara_Khitai_Ambassadors_declined
            and EventCounter = 1
    
    
            set_event_counter Qara_Khitai_Contact 1
            inc_event_counter Qara_Khitai_Provoked 1
            set_event_counter Qara_Khitai_Ambassadors_declined 0
            terminate_monitor
        end_monitor
    
    
        monitor_event EventCounter EventCounterType Qara_Khitai_Ambassadors_Two_accepted
            and EventCounter = 1
    
    
            add_money turks -5000
            set_event_counter Qara_Khitai_Ambassadors_Two_accepted 0
            terminate_monitor
        end_monitor
    
    
        monitor_event EventCounter EventCounterType Qara_Khitai_Ambassadors_Two_declined
            and EventCounter = 1
    
    
            inc_event_counter Qara_Khitai_Provoked 1
            set_event_counter Qara_Khitai_Ambassadors_Two_declined 0
            terminate_monitor
        end_monitor
    
    
    
    
        monitor_event EventCounter EventCounterType Qara_Khitai_Provoked
            and I_EventCounter Qara_Khitai_Contact = 2
    
    
            if I_EventCounter Qara_Khitai_Provoked = 2
                and RandomPercent > 5
                set_event_counter Qara_Khitai_Invasion 1
            end_if
    
    
            if I_EventCounter Qara_Khitai_Provoked = 1
                and RandomPercent > 50
                set_event_counter Qara_Khitai_Invasion 1
            end_if
    
    
            if I_EventCounter Qara_Khitai_Provoked = 0
                and RandomPercent > 95
                set_event_counter Qara_Khitai_Invasion 1
            end_if
    
    
            if not I_EventCounter Qara_Khitai_Invasion = 1
                increment_kings_purse turks 250
                historic_event Qara_Khitai_Trade
            end_if
    
    
            terminate_monitor
        end_monitor
    
    
    
    
        monitor_event FactionTurnStart FactionType slave
            and I_EventCounter Qara_Khitai_Invasion = 1
    
    
            historic_event Qara_Khitai_Attack
    
    
            spawn_army ; URGENCH
                faction slave
                character	Tabuyan, named character, age 48, x 504, y 148, label qarakhitaileader, family
                traits MilitaryInclination 1 , Military_Edu 3 , NaturalMilitarySkill 2 , GoodCommander 2 , BattleDread 1 , StrategyDread 2 , PublicFaith 1 , GoodCavalryGeneral 1 , ReligionStarter 1 , BiologicalSon 1 , Handsome 6 , Intelligent 6
                unit	ME Bodyguard		exp 4 armour 0 weapon_lvl 0
                unit	Nukeri Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Nukeri Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Nukeri Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Lubchiten Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Lubchiten Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Steppe Kazaks		exp 2 armour 0 weapon_lvl 0
                unit	Steppe Kazaks		exp 2 armour 0 weapon_lvl 0
                unit	Turkish Horse Archers		exp 2 armour 0 weapon_lvl 0
                unit	Turkish Horse Archers		exp 2 armour 0 weapon_lvl 0
                unit	Merguen Archers		exp 3 armour 0 weapon_lvl 0
                unit	Merguen Archers		exp 3 armour 0 weapon_lvl 0
                unit	Kashtim Thralls		exp 3 armour 0 weapon_lvl 0
                unit	Kashtim Thralls		exp 3 armour 0 weapon_lvl 0
                unit	Afghan Javelinmen		exp 2 armour 0 weapon_lvl 0
                unit	Afghan Javelinmen		exp 2 armour 0 weapon_lvl 0
            end
    
    
            spawn_army ; MERV
                faction slave
                character	Yelu_Dashi, named character, age 27, x 508, y 126, label qarakhitaiheir, family
                traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 2 , Anger 1 , StrategyDread 1 , PublicFaith 1 , Loyal 2 , ContentGeneral 1
                unit	ME Bodyguard				exp 4 armour 0 weapon_lvl 0
                unit	Nukeri Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Nukeri Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Lubchiten Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Lubchiten Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Lubchiten Horse Archers		exp 3 armour 0 weapon_lvl 0
                unit	Steppe Kazaks				exp 2 armour 0 weapon_lvl 0
                unit	Steppe Kazaks				exp 2 armour 0 weapon_lvl 0
                unit	Steppe Kazaks				exp 2 armour 0 weapon_lvl 0
                unit	Turkish Horse Archers		exp 2 armour 0 weapon_lvl 0
                unit	Turkish Horse Archers		exp 2 armour 0 weapon_lvl 0
                unit	Merguen Archers		exp 3 armour 0 weapon_lvl 0
                unit	Merguen Archers		exp 3 armour 0 weapon_lvl 0
                unit	Kashtim Thralls		exp 3 armour 0 weapon_lvl 0
                unit	Kashtim Thralls		exp 3 armour 0 weapon_lvl 0
                unit	Kashtim Thralls		exp 3 armour 0 weapon_lvl 0
                unit	Kashtim Thralls		exp 3 armour 0 weapon_lvl 0
            end
    
    
            terminate_monitor
        end_monitor
    
    
    
    
        declare_counter QK_attack_urgench
        set_counter QK_attack_urgench 0
        declare_counter QK_attack_Merv
        set_counter QK_attack_Merv 0
    
    
        monitor_event FactionTurnStart FactionType slave
            and I_CharacterExists qarakhitaileader
    
    
            if I_SettlementOwner Urgench = slave
                terminate_monitor
            end_if
    
    
            if I_SettlementUnderSiege Urgench
                if I_CompareCounter QK_attack_urgench = 1
                    siege_settlement qarakhitaileader, Urgench, attack
                    set_counter QK_attack_urgench 2
                    terminate_monitor
                end_if
            end_if
    
    
            if I_CompareCounter QK_attack_urgench = 1
                terminate_monitor
            end_if
    
    
            if not I_SettlementUnderSiege Urgench
                if I_CompareCounter QK_attack_urgench = 0
                    siege_settlement qarakhitaileader, Urgench, maintain
                    set_counter QK_attack_urgench 1
                end_if
            end_if
    
    
        end_monitor
    
    
        monitor_event FactionTurnStart FactionType slave
            and IsFactionAIControlled
            and I_CharacterExists qarakhitaiheir
    
    
            if I_SettlementOwner Merv = slave
                terminate_monitor
            end_if
    
    
            if I_SettlementUnderSiege Merv
                if I_CompareCounter QK_attack_Merv = 1
                    siege_settlement qarakhitaiheir, Merv, attack
                    set_counter QK_attack_Merv 2
                    terminate_monitor
                end_if
            end_if
    
    
            if I_CompareCounter QK_attack_Merv = 1
                terminate_monitor
            end_if
    
    
            if not I_SettlementUnderSiege Merv
                if I_CompareCounter QK_attack_Merv = 0
                    siege_settlement qarakhitaiheir, Merv, maintain
                    set_counter QK_attack_Merv 1
                end_if
            end_if
    
    
        end_monitor

  7. #7
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    This one replicates a fixed William Wallace uprising. Again, I'm going to make a few similar uprisings in: Wales, Bohemia, Brandenburg (until paganism < 50%), peasants in Flanders, Italy, barons in England, Germany, France, Hungary, Bohemia. I actually don't know when I'd make them.

    Code:
        ;======================================================================================================
    	;------- Scotland  ------------------------------------------------------------------------------------
    	;======================================================================================================
    	
    	;====================================================================================================== First Scottish Uprising
        ;------- First Scottish Uprising ------------------------------------------------------------------
    	; the goal is to make the life of England more difficult early game (when it matters)
    	; script is a copy of William Wallace script with smaller army. 
    
    
        declare_counter first_scottish_uprising_spawned
        set_counter first_scottish_uprising_spawned 0
    
    
        monitor_event FactionTurnStart FactionType scotland
            and I_TurnNumber < 250
            and I_NumberOfSettlements scotland < 2
            and I_NumberOfSettlements scotland > 0
            and I_CompareCounter first_scottish_uprising_spawned = 0
    
    
            set_counter first_scottish_uprising_spawned 1
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart FactionType scotland
            and I_CompareCounter first_scottish_uprising_spawned = 1
    
    
            spawn_army
                faction scotland
                character	Fergus mac_Mael_Coluim, named character, age 34, x 55, y 253
                traits MilitaryInclination 1 , Military_Edu 2 , NaturalMilitarySkill 2 , GoodCommander 1 , LoyaltyStarter 1, BattleChivalry 1 , Loyal 2 , Just 2 , Rabblerouser 3 , Hardened 1
                unit	Highland Nobles		exp 4 armour 0 weapon_lvl 0
                unit	Highland Nobles		exp 1 armour 0 weapon_lvl 0
                unit	Highlanders			exp 4 armour 1 weapon_lvl 0
                unit	Highlanders			exp 1 armour 0 weapon_lvl 1
                unit	Highlanders			exp 0 armour 0 weapon_lvl 1
                unit	Thanes				exp 1 armour 0 weapon_lvl 1
                unit	Scots Pikemen		exp 1 armour 0 weapon_lvl 0
                unit	Scots Pikemen		exp 0 armour 0 weapon_lvl 0
                unit	Scots Spearmen		exp 1 armour 0 weapon_lvl 0
                unit	Scots Spearmen		exp 0 armour 0 weapon_lvl 0
                unit	Scots Longbow		exp 4 armour 1 weapon_lvl 0
                unit	Scots Longbow		exp 1 armour 0 weapon_lvl 0
                unit	Scots Skirmisher	exp 1 armour 0 weapon_lvl 0
                unit	Scots Skirmisher	exp 0 armour 0 weapon_lvl 0
                unit	Border Horse		exp 3 armour 0 weapon_lvl 0
                unit	Border Horse		exp 0 armour 0 weapon_lvl 0			
            end
    
    
            historic_event FIRST_SCOTTISH_UPRISING
    
    
            if I_SettlementOwner Edinburgh = england
                console_command diplomatic_stance scotland england war
            end_if
    
    
            if I_SettlementOwner Edinburgh = france
                console_command diplomatic_stance scotland france war
            end_if
    
    
            if I_SettlementOwner Edinburgh = hre
                console_command diplomatic_stance scotland hre war
            end_if
    
    
            if I_SettlementOwner Edinburgh = norway
                console_command diplomatic_stance scotland norway war
            end_if
    
    
            if I_SettlementOwner Edinburgh = denmark
                console_command diplomatic_stance scotland denmark war
            end_if
    
    
            if I_SettlementOwner Edinburgh = aragon
                console_command diplomatic_stance scotland aragon war
            end_if
    
    
            if I_SettlementOwner Edinburgh = spain
                console_command diplomatic_stance scotland spain war
            end_if
    
    
            if I_SettlementOwner Edinburgh = portugal
                console_command diplomatic_stance scotland portugal war
            end_if
    
    
            if I_SettlementOwner Edinburgh = pisa
                console_command diplomatic_stance scotland pisa war
            end_if
    
    
            if I_SettlementOwner Edinburgh = venice
                console_command diplomatic_stance scotland venice war
            end_if
    
    
            terminate_monitor
        end_monitor

  8. #8
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    There're scripted invasions at the beginning of the game - as described in the description of the mod (read it if you haven't, I'm updating it constantly).

    Code:
        ;======================================================================================================
        ;------- Scripted Early Sieges with Additional Armies 
        ;======================================================================================================
        ; the goal is to support the weak factions that happen to be inactive or to make the often inactive front running
        ; remember to terminate monitors below to save time!
        ; maintaining siege for longer than 1 turn seems not to work
    
    
    
    
        ;====================================================================================================== NORWAY: Skara 4, Sigtuna 24
        ; Skara is needed to provide Norway with some money, Sigtuna is just in case of inactivity (and unlikely since the AI very often expands in this direction).
    
    
        monitor_event FactionTurnStart FactionType norway
            and I_TurnNumber = 3
    
    
            if I_IsFactionAIControlled norway
                spawn_army
                    faction norway
                    character    Gunnar Guddrodson, named character, age 30, x 175, y 266, family
                    traits LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 1 , GoodCommander 2 , ReligionStarter 1 , BiologicalSon 1 , Handsome 6 , Intelligent 6
                    unit        Royal Hirdsmen            exp 1 armour 0 weapon_lvl 0
                    unit        Landevearnmenn            exp 0 armour 0 weapon_lvl 0
                    unit        Drengjar                exp 4 armour 0 weapon_lvl 0
                    unit        Drengjar                exp 1 armour 0 weapon_lvl 0
                    unit        Drengjar                exp 0 armour 0 weapon_lvl 0
                    unit        Viking Raiders            exp 4 armour 0 weapon_lvl 0
                    unit        Viking Raiders            exp 1 armour 0 weapon_lvl 0
                end
            end_if
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event FactionTurnStart FactionType norway
            and IsFactionAIControlled
            and I_CharacterExists Gunnar Guddrodson
    
    
            if not I_SettlementOwner Skara = slave
                terminate_monitor                                                    ; terminate to shorten the turn times in the future
            end_if
    
    
            if I_SettlementUnderSiege Skara                                            ; if the settlement is already under siege - avoid CTD
                and I_TurnNumber = 3
                terminate_monitor
            end_if
    
    
            if not I_CharacterTypeNearTile norway, named_character, 0, 175, 266     ; if character not standing where it should - avoid CTD
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 4
                console_command auto_win attacker
                siege_settlement Gunnar Guddrodson, Skara, attack
                terminate_monitor                                                    ; terminate to shorten the turn times in the future
            end_if
    
    
            if I_TurnNumber = 3
                siege_settlement Gunnar Guddrodson, Skara, maintain
            end_if
        end_monitor
    
    
    
    
        monitor_event FactionTurnStart FactionType norway
            and I_TurnNumber = 23
    
    
            if not I_SettlementOwner Sigtuna = slave
                terminate_monitor
            end_if
    
    
            if I_IsFactionAIControlled norway
                spawn_army
                    faction norway
                    character    Bjorn Stenger, named character, age 24, x 205, y 275, family
                    traits LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 1 , GoodCommander 2 , ReligionStarter 1 , BiologicalSon 1 , Handsome 8 , Intelligent 6
                    unit        Royal Hirdsmen            exp 1 armour 0 weapon_lvl 0
                    unit        Landevearnmenn            exp 0 armour 0 weapon_lvl 0
                    unit        Drengjar                exp 4 armour 0 weapon_lvl 0
                    unit        Drengjar                exp 1 armour 0 weapon_lvl 0
                    unit        Drengjar                exp 0 armour 0 weapon_lvl 0
                    unit        Viking Raiders            exp 4 armour 0 weapon_lvl 0
                    unit        Viking Raiders            exp 1 armour 0 weapon_lvl 0
                end
            end_if
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event FactionTurnStart FactionType norway
            and IsFactionAIControlled
            and I_CharacterExists Bjorn Stenger
    
    
            if not I_SettlementOwner Sigtuna = slave
                terminate_monitor
            end_if
    
    
            if I_SettlementUnderSiege Sigtuna
                and I_TurnNumber = 23
                terminate_monitor
            end_if
    
    
            if not I_CharacterTypeNearTile norway, named_character, 1, 206, 275
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 24
                console_command auto_win attacker
                siege_settlement Bjorn Stenger, Sigtuna, attack
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 23
                siege_settlement Bjorn Stenger, Sigtuna, maintain
            end_if
        end_monitor
    
    
    
    
        ;====================================================================================================== DENMARK: Ribe 4, Visby 24
        ; Ribe is to provide some space from HRE (or an additional army), Visby is to ensure the island is conquered (and it also helps Denmark not to be wiped out from the map).
    
    
        monitor_event FactionTurnStart FactionType denmark
            and I_TurnNumber = 3
    
    
            if I_IsFactionAIControlled denmark
                spawn_army
                    faction denmark
                    character    Gunnar Estridsen, named character, age 30, x 140, y 244, family
                    traits LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 2 , ReligionStarter 1 , BiologicalSon 1 , Handsome 6 , Intelligent 6
                    unit        Royal Hirdsmen                exp 1 armour 0 weapon_lvl 0
                    unit        Norse Axemen                exp 4 armour 0 weapon_lvl 0
                    unit        Skjoldborgsmenn                exp 1 armour 0 weapon_lvl 0
                    unit        Skjoldborgsmenn                exp 1 armour 0 weapon_lvl 0
                    unit        Viking Raiders                exp 4 armour 0 weapon_lvl 0
                    unit        Viking Raiders                exp 1 armour 0 weapon_lvl 0
                    unit        Norse Archers                exp 3 armour 0 weapon_lvl 0
                    unit        Norse Archers                exp 1 armour 0 weapon_lvl 0
                end
            end_if
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event FactionTurnStart FactionType denmark
            and IsFactionAIControlled
            and I_CharacterExists Gunnar Estridsen
    
    
            if not I_SettlementOwner Ribe = slave
                terminate_monitor
            end_if
    
    
            if I_SettlementUnderSiege Ribe
                and I_TurnNumber = 3
                terminate_monitor
            end_if
    
    
            if not I_CharacterTypeNearTile denmark, named_character, 1, 141, 244
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 4
                console_command auto_win attacker
                siege_settlement Gunnar Estridsen, Ribe, attack
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 3
                siege_settlement Gunnar Estridsen, Ribe, maintain
            end_if
        end_monitor
    
    
    
    
        monitor_event FactionTurnStart FactionType denmark
            and I_TurnNumber = 23
    
    
            if I_IsFactionAIControlled denmark
                spawn_army
                    faction denmark
                    character    Agge Jorgensen, named character, age 25, x 211, y 260, family
                    traits LoyaltyStarter 1 , MilitaryInclination 1 , Military_Edu 2 , GoodCommander 1 , ReligionStarter 1 , BiologicalSon 1 , Handsome 5 , Intelligent 7
                    unit        Royal Hirdsmen                exp 1 armour 0 weapon_lvl 0
                    unit        Viking Raiders                exp 4 armour 0 weapon_lvl 0
                    unit        Viking Raiders                exp 1 armour 0 weapon_lvl 0
                    unit        Norse Archers                exp 3 armour 0 weapon_lvl 0
                    unit        Norse Archers                exp 1 armour 0 weapon_lvl 0
                end
            end_if
    
    
            terminate_monitor
        end_monitor
    
    
        monitor_event FactionTurnStart FactionType denmark
            and IsFactionAIControlled
            and I_CharacterExists Agge Jorgensen
    
    
            if not I_SettlementOwner Visby = slave
                terminate_monitor
            end_if
    
    
            if I_SettlementUnderSiege Visby
                and I_TurnNumber = 23
                terminate_monitor
            end_if
    
    
            if not I_CharacterTypeNearTile denmark, named_character, 1, 210, 260
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 24
                console_command auto_win attacker
                siege_settlement Agge Jorgensen, Visby, attack
                terminate_monitor
            end_if
    
    
            if I_TurnNumber = 23
                siege_settlement Agge Jorgensen, Visby, maintain
            end_if
        end_monitor
    Last edited by Jurand of Cracow; November 28, 2020 at 10:46 AM.

  9. #9
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    This one some players may wish to modify as it makes the game difficult. I'm likely to work on it at some point in the future.

    Code:
        ;======================================================================================================
        ;------- Unrest Surges in Certain Major Cities due to Occupation or a Weak Faction Leader
        ;======================================================================================================
        ; in SSHIP 092/096 known as "Occupied Major Cities Revolt"
    
    
        ; Certain major settlements were historically difficult to control. This script give them additional unrest when:
        ; - the settlement is conquered (player)
        ; - a weak faction leader ascends to the throne (player)
        ; - the settlement is not in the hands of the historical faction (AI).
    
    
        ; This script should be reviewed and improved:
        ; - list of the settlements (should Kalmar be on the list? why not Tunis?)
        ; - size of the unrest, both for the player and the AI
        ; - info windows for the player should be added
        ; - the reasons for the revolt in conjunction to the other scripts; for now it triggers only for:
        ; --- low Authority and Command FH ascending to the throne - but not for Usurpers (perhaps there's another mechanism for them?)
        ; --- when not-mother-faction conquers this settlement
        ; Keep in mind that if "add_settlement_turmoil ABC X" is triggered every turn, it replaces the former value (does not stack) so that every turn there's X*5% turmoil in the settlement ABC.
    
    
    
    
        ;------- (I) At the beginning of the game, all settlements are calm ------
    
    
        declare_counter paris_occupied
        declare_counter weak_leader_becomes_king_info
    ...
        set_counter paris_occupied 0
    ...
    
    
        set_counter weak_leader_becomes_king_info 0
    
    
        ;------- (II) If the settlement is captured, set it to an unrest state
    
    
        monitor_event GeneralCaptureSettlement SettlementName Paris
            set_counter paris_occupied 1
        end_monitor
    
    
    
    
        ;------- (only for player) If a bad heir gets the thrones, set the cities to a unrest state
        ;(all cities are set to unrest, but triggers will fire only for those that the player
    
    
        monitor_event BecomesFactionLeader CharacterIsLocal
            and Attribute Authority < 4
            and Attribute Command < 9
            and Attribute Chivalry > -9
    
    
            set_counter paris_occupied 1
    ...
    
    
            set_counter weak_leader_becomes_king_info 1
    
    
        end_monitor
    
    
        monitor_event BecomesFactionLeader CharacterIsLocal
            and Attribute Authority < 7
            and Trait Usurper > 0
    
    
            set_counter paris_occupied 1
    ...
    
    
            set_counter weak_leader_becomes_king_info 1
    
    
        end_monitor
    
    
    
    
        monitor_event BecomesFactionLeader CharacterIsLocal
            and I_EventCounter weak_leader_becomes_king_info = 1
    
    
            historic_event weak_leader_becomes_king
            set_counter weak_leader_becomes_king_info 0
    
    
        end_monitor
    
    
        ;------- Unrest triggers -------------------------------------------------------------------
        ; Keep in mind that if "add_settlement_turmoil ABC X" is triggered every turn, it replaces the former value (does not stack) so that every turn there's X*5% turmoil in the settlement ABC.
    
    
    
    
        monitor_event SettlementTurnStart SettlementName Paris
            and not FactionType france
    
    
            if I_CompareCounter paris_occupied = 1
                and I_EventCounter is_the_ai < 1
                add_settlement_turmoil Paris 8
                set_counter paris_occupied 0
            end_if
    
    
            if I_EventCounter is_the_ai > 0
                add_settlement_turmoil Paris 4
            end_if
        end_monitor
    Last edited by Jurand of Cracow; November 28, 2020 at 11:18 AM.

  10. #10
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    The Hanseatic script's been improved but more work is needed. If any of you would script the part III, that would be welcome.

    Code:
        ;======================================================================================================    ;------- Hanseatic System
        ;======================================================================================================
    
    
        ;----------------- (I) Prevent non-eligible provices from getting it ----------------------
    	; counter is used in EDG
    	
        set_event_counter hanseatic_guild_allowed 0
    	
        monitor_event FactionTurnStart FactionType slave
    
    
    		inc_event_counter hanseatic_guild_allowed 1
    		
    		if I_EventCounter hanseatic_guild_allowed > 20 
    			set_event_counter hanseatic_guild_allowed 0
    		end_if	
    		
        end_monitor
    
    
    
    
        ;----------------- (II) Allow giving points in EDG ----------------------
    	
        monitor_event PreFactionTurnStart TrueCondition
            set_event_counter hanseatic_count -1
        end_monitor
    
    
        monitor_event CharacterTurnStart GovernorPlugInExists = hansa
            and I_EventCounter hanseatic_league = 1
    
    
            inc_event_counter hanseatic_count 1
        end_monitor
    
    
        monitor_event CharacterTurnStart GovernorPlugInExists = c_hansa
            and I_EventCounter hanseatic_league = 1
    
    
            inc_event_counter hanseatic_count 1
        end_monitor
    
    
    
    
        set_event_counter hanseatic_constructed 0
    
    
        monitor_event GuildUpgraded BuildingName = hanseatic_guild
            set_event_counter hanseatic_constructed 1
            reset_guild_standing hanseatic_guild
        end_monitor
    
    
        monitor_event BuildingDestroyed BuildingName = hanseatic_guild
            set_event_counter hanseatic_constructed 0
            reset_guild_standing hanseatic_guild
        end_monitor
    
    
    
    
        ;----------------- (III) Replace Merchant guilds with Hanse 
    	;
    	; The problem: Hanse comes very late into the play and the relevant settlements can already have other guilds built
    	; A script is needed when certain nations (hre, lithuania, poland, denmark) would be offered replacement of merchants' guild with hanseatic
    	; This script could also be used for similar action with the Explorers'
    	; 
    	;     monitor_event FactionTurnStart FactionType hre
    	;	   destroy_buildings hre hanseatic_guild true

  11. #11
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    The script with the info windows starts as follows:
    Code:
        ;======================================================================================================    ;======================================================================================================
        ;------- Info depending on difficulty
        ;
        ; pro memoria: events happen on turn = I_TurnNumber + 1
        ; odd turns are summers, even turns are winters
    
    
        ;======================================================================================================
        ;------- All difficulties --------------------------------------------------------------------------
    
    
        ; turn 0: infos on Team, SSHIP and Difficulty level (scripted earlier)
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 1
    
    
            historic_event INFO_warning_mercenaries			; info on dangers of falling into debt: mercenaries will disaband
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 2
    
    
            historic_event INFO_TECHNICAL_CTDS
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 3
    
    
            historic_event INFO_TRAIT_HINT2
            historic_event INFO_TRAIT_HINT1
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 4
    
    
            historic_event INFO_FINANCIAL_RESERVES		; urging the player to keep money in reserve
            terminate_monitor
        end_monitor
    
    
        ; 5: info on ADDITIONAL_COSTS depending on difficulty
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 6
    
    
            historic_event INFO_TECHNICAL_NOT_FINISHED
            terminate_monitor
        end_monitor
    
    
        ; 7: info depending on difficulty
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 8
    
    
            historic_event INFO_FORCED_TRIBUTE
            terminate_monitor
        end_monitor
    	
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 9
    
    
            historic_event INFO_TECHNICAL_NO_UNIT_DESCRIPTIONS
            terminate_monitor
        end_monitor
    
    
        ;------------------------------------------------------------------ Information on offices
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 10
    
    
            historic_event INFO_crowns
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 11
    
    
            historic_event INFO_ministerial_offices
            terminate_monitor
        end_monitor
    
    
        monitor_event PreFactionTurnStart not IsFactionAIControlled
            and I_TurnNumber = 12
    
    
            historic_event INFO_PROVINCIAL_TITLES
            terminate_monitor
        end_monitor

  12. #12
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    This part you may easily adjust to your wishes to.

    Code:
        ;========================================================================================================
        ;------- Additional Costs (Change of Capital, Supply, Crowns, NewNobles, Change on the Throne, JoinsCrusade)
        ;========================================================================================================
    
    
    
    
        ;==================== CHANGE OF CAPITAL =======================
    
    
        monitor_event FactionNewCapital not IsFactionAIControlled
                    and not I_HotseatEnabled
    
    
            if I_EventCounter DifficultyLevel = 2
                historic_event capital_change
                console_command add_money -2000
            end_if
            
            if I_EventCounter DifficultyLevel = 3
                historic_event capital_change
                console_command add_money -3000
            end_if
    
    
            if I_EventCounter DifficultyLevel = 4
                historic_event capital_change
                console_command add_money -5000
            end_if
            
        end_monitor
    
    
    
    
        ;================== NEW GENERAL ======================================= info through a trait gain message
        monitor_event CharacterTurnEnd CharacterIsLocal
            and Trait NewNoble > 0
    
    
            console_command add_money -1000
    
    
        end_monitor
    
    
        ;================== MARRIAGE ========================================== info through a trait gain message
        monitor_event CharacterMarries CharacterIsLocal
            and Trait NewNoble < 1
    
    
            console_command add_money -1000
    
    
        end_monitor
    
    
        ;================== PRINCELY MARRIAGE ================================= info through a trait gain message
        monitor_event CharacterMarriesPrincess CharacterIsLocal
            and Trait NewNoble < 1
    
    
            console_command add_money -2000
    
    
        end_monitor
    
    
    
    
        ;================== SUPPLY & BESIEGE COSTS  =========================== info through a trait gain message
        monitor_event CharacterTurnStart CharacterIsLocal
            and IsGeneral
            and Trait ArmyCost > 0
    
    
            if Trait ArmyCost = 1
                console_command add_money -250
            end_if
            
            if Trait ArmyCost = 2
                console_command add_money -500
            end_if
    
    
            if Trait ArmyCost = 3
                console_command add_money -1000
            end_if
    
    
            if Trait ArmyCost = 4
                console_command add_money -1500
            end_if
    
    
            if Trait ArmyCost = 5
                console_command add_money -2000
            end_if
            
        end_monitor
    
    
        ;================== AT SEA COSTS ======================================= info through a trait gain message
        monitor_event CharacterTurnStart CharacterIsLocal
            and Trait AtSeaCost > 0
    
    
            if Trait AtSeaCost = 1
                console_command add_money -500
            end_if
            
            if Trait AtSeaCost = 2
                console_command add_money -1000
            end_if
    
    
        end_monitor
    
    
    
    
        ;================== CROWN PAYMENT ===================================== info also through a trait gain message
    
    
        monitor_event CharacterTurnStart CharacterIsLocal
            and Trait Crownholder = 5
    
    
            console_command add_money -20000
            historic_event info_crowns_coronation
    
    
        end_monitor
    
    
        ;================== CROWN UPKEEP ====================================== info through a trait message
    
    
        monitor_event CharacterTurnStart CharacterIsLocal
            and Trait Crownholder > 3
            and Trait Crownholder < 5
            
            if FactionReligion pagan
                console_command add_money -2000
            end_if
            
            if not FactionReligion pagan
                console_command add_money -5000
            end_if
        
        end_monitor
        
        ;================== CRUSADE OUTLAYS ===================================
    
    
        monitor_event GeneralJoinCrusade FactionIsLocal
            and IsCrusade
            and CharacterReligion catholic
    
    
            console_command add_money -3000
            historic_event info_cost_general_joins_crusade
    
    
        end_monitor
    
    
        monitor_event GeneralJoinCrusade FactionIsLocal
            and IsJihad
            and CharacterReligion islam
    
    
            console_command add_money -3000
            historic_event info_cost_general_joins_jihad
    
    
        end_monitor
    
    
    
    
        ;========== CHANGE ON THE THRONE COSTS  ===============================
        ; poor nations 300/100, average 500/200, big 1000/300
        ; in the future it's likely to be changed: poor nations 3/1k, average 5/2k, big 10/3k
        ; may also be differentiated depending on the difficulty
    
    
    
    
        ;----------------- (I) FL old age warning
    
    
        set_event_counter FL_old_age_warning 10
            
        monitor_event CharacterTurnStart IsFactionLeader
            and Trait Senile > 0
            and I_EventCounter is_the_player = 1 
    
    
            inc_event_counter FL_old_age_warning 1
            
            if I_EventCounter FL_old_age_warning > 10
                historic_event FL_OLD_AGE_WARNING
                set_event_counter FL_old_age_warning 0
            end_if
    
    
        end_monitor
    
    
        ;----------------- (II) expense script (for all difficulties but may be differenciated in the future)
        
        ;------------------------------------------------------
        monitor_event BecomesFactionLeader FactionType cumans
            and not IsFactionAIControlled
            and I_NumberOfSettlements cumans > 4
    
    
            console_command add_money -301
    
    
        end_monitor
    
    
        monitor_event BecomesFactionHeir FactionType cumans
            and not IsFactionAIControlled
            and I_NumberOfSettlements cumans > 4
    
    
            console_command add_money -101
    
    
        end_monitor
    Last edited by Jurand of Cracow; January 17, 2021 at 07:21 AM.

  13. #13
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    Recently I've been busy with scripting the evolution of the factions. The one for the Georgia still lacks the last part, on the last united kingdom of Alexander the Great in 15c.
    I'll actually be interested what you think about the conditions to get a reform - but you'll be able to experience it only in the future (or if you download that my 5,7GB install, iirc ;-)
    The main result from the scripts is an in-game evolution of military not linked only to the generic events like HEAVY_MAIL, PAVISE_SHIELDS or FULL_PLATE_ARMOR.
    Similar scripts are being produced for Serbia and Poland, perhaps also for other factions in the future.

    Code:
        ;====================================================================================================== GEORGIA EVOLUTION
        ;---------- Georgia Evolution
    
    
        set_event_counter georgian2_golden_age_player 0                ; turn 80-140
        set_event_counter georgian3_shota_rustaveli_player 0        ; turn 150-220
        set_event_counter georgian5_revival_player 0                ; turn 270-360
    
    
        ;-------------------------------------------------------------------- GEORGIAN 1 STARTING INFO
        ; information about reforms
        
        monitor_event FactionTurnStart not IsFactionAIControlled
            and FactionType georgia    
            and I_TurnNumber = 4
    
    
                historic_event GEORGIAN1_STARTING_INFO
                
            terminate_monitor
        end_monitor    
        
        ;-------------------------------------------------------------------- GEORGIAN 2 GOLDEN AGE
        ; historically should take place around turn 140
    
    
        monitor_event PreFactionTurnStart FactionType georgia
        
            if I_TurnNumber > 80                                    ; just in case the player rushes the map
            and NumBuildingsCompletedFaction p_large_town > 2        ; Gergia has built 3 Local Guards (Large Town level)
            and FactionBuildingExists = ikoner_studio                ; at least 1 Ikoner Studio exists (Minor City level)
            and I_SettlementOwner Kutaisi = georgia
            and I_SettlementOwner Tbilisi = georgia
            
                if I_FactionLeaderTrait georgia WifeIsGreek > 0        ; the FL should have either wife or some ancestors of Byzantine / Kievian descent
                    historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }                                    ; info only for the nearby factions
                    if not I_IsFactionAIControlled georgia
                        inc_event_counter georgian2_golden_age_player 1
                    end_if
                    terminate_monitor
                end_if
    
    
                if I_FactionLeaderTrait georgia Royal_Relation_Greek > 0
                    historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }    
                    if not I_IsFactionAIControlled georgia
                        inc_event_counter georgian2_golden_age_player 1
                    end_if
                    terminate_monitor
                end_if
    
    
                if I_FactionLeaderTrait georgia WifeIsKievan > 0
                    historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }    
                    if not I_IsFactionAIControlled georgia
                        inc_event_counter georgian2_golden_age_player 1
                    end_if
                    terminate_monitor
                end_if
    
    
                if I_FactionLeaderTrait georgia Royal_Relation_Kievan > 0
                    historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }    
                    if not I_IsFactionAIControlled georgia
                        inc_event_counter georgian2_golden_age_player 1
                    end_if
                    terminate_monitor
                end_if
            end_if
                
            if I_TurnNumber > 130                                            ; FALL BACK - in case of failure or a bug
            and I_SettlementOwner Tbilisi = georgia                            ; at least the capital is in the Georgian hands
            and RandomPercent > 90                                            ; to add some randomness against the bugs
    
    
                historic_event GEORGIAN2_GOLDEN_AGE factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }
                if not I_IsFactionAIControlled georgia
                    inc_event_counter georgian2_golden_age_player 1
                end_if
                terminate_monitor
            end_if
            
        end_monitor
    
    
        ;-------------------------------------------------------------------- GEORGIAN 3 SHOTA RUSTAVELI 
        ; historically should take place around turn 170
        
    
    
        monitor_event PreFactionTurnStart FactionType georgia
    
    
            if I_TurnNumber > 150                                        ; just in case the player rushes the map
            and NumBuildingsCompletedFaction ikoner_studio > 3            ; Gergia has built 3 Ikoner Studios (Minor City level)
            and I_SettlementOwner Kutaisi = georgia
            and I_SettlementOwner Tbilisi = georgia
            and FactionBuildingExists = cathedral_o                        ; at least 1 Large City
            and FactionBuildingExists = university                        ; at least 1 Large City
            
                historic_event GEORGIAN3_SHOTA_RUSTAVELI factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }    
                if not I_IsFactionAIControlled georgia
                    inc_event_counter georgian3_shota_rustaveli_player 1
                end_if            
                terminate_monitor
            end_if
    
    
            if I_TurnNumber > 210                                        ; FALL BACK - in case of failure or a bug
            and I_SettlementOwner Tbilisi = georgia                        ; at least the capital is in the Georgian hands
            and RandomPercent > 90                                        ; to add some randomness against the bugs
            
                historic_event GEORGIAN3_SHOTA_RUSTAVELI factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }    
                if not I_IsFactionAIControlled georgia
                    inc_event_counter georgian3_shota_rustaveli_player 1
                end_if            
                terminate_monitor
            end_if
            
        end_monitor
        
        ;-------------------------------------------------------------------- GEORGIAN 4 REVIVAL
        ; historically should take place around turn 380
    
    
        monitor_event SettlementTurnStart SettlementName Tbilisi
            and I_EventCounter GEORGIAN3_SHOTA_RUSTAVELI > 0                ; only after the peak had happened
            and not FactionType georgia                                    ; Gergia lost capital to another faction
            and not FactionType slave                                    ; but not to a rebellion
    
    
                historic_event GEORGIAN4_REVIVAL_ALLOWED                    ; next part of script may fire
                  terminate_monitor
        end_monitor
        
        monitor_event PreFactionTurnStart FactionType georgia
        
            if I_TurnNumber > 270                                        ; just in case the player rushes the map
            and I_EventCounter GEORGIAN4_REVIVAL_ALLOWED > 0                ; Gergia had lost capital to another faction
            and I_SettlementOwner Tbilisi = georgia
            and NumBuildingsCompletedFaction p_city > 3                    ; Gergia has built 4 Local Councils (Minor City level)
            and FactionBuildingExists = citadel                            ; at least 1 Citadel (Large Castle) exists
            
                historic_event GEORGIAN5_REVIVAL
                if not I_IsFactionAIControlled georgia
                    inc_event_counter georgian5_revival_player 1
                end_if            
                terminate_monitor
            end_if
    
    
            if I_TurnNumber > 350                                        ; FALL BACK - in case of failure or a bug
            and I_SettlementOwner Tbilisi = georgia                        ; at least the capital is in the Georgian hands
            and RandomPercent > 90                                        ; to add some randomness against the bugs
            
                historic_event GEORGIAN5_REVIVAL factions { georgia, jerusalem, byzantium, turks, cumans, abbasid, rum, zengid, kievan_rus, }    
                if not I_IsFactionAIControlled georgia
                    inc_event_counter georgian5_revival_player 1
                end_if            
                terminate_monitor
            end_if
            
        end_monitor
    Obviously, you need to have code the counterpart descriptions in another file:

    Code:
    {GEORGIAN1_STARTING_INFO_BODY}Historically, the Georgian military underwent significant changes in the middle ages, represented in the SSHIP via a set of "reforms". These reforms were tied to specific historic events, and in the course of the game they will come to pass as you develop the Georgian faction. Thus, as you lead your people forward in science, culture, and war, so too will your military develop as well. (Note that at a certain date the reforms will trigger automatically, even if the player has not yet developed the faction.) \n\nIn addition to the military reforms, there are a number of historical events which may come to pass in the Georgian Kingdom, provided the player develops the faction well. \n\nThe Georgian Golden Age, which historically peaked in the second part of the 12th century, will be triggered once Georgia has constructed an Ikoner Studio and three Local Guards, and the either the Georgian Faction Leader or his wife is of Kievan or Byzantine blood. \n\nHistorically, the nation's greatest poet, Shota Rustaveli, died in Jerusalem in the first half of 13the century. An in-game event for this will be triggered if a Cathedral and a University exist in Georgia and at least three Ikoner Studios have been built. This event may have an impact on both the military and religious life of Georgia! \n\nThe Georgian Revival, which historically occurred in the first part of 14th century, will be triggered if an enemy faction (not rebels) has conquered Tbilisi, and then Georgia has reconquered it, and constructed at least three Provincial Councils, and Georgia holds a Citadel.{GEORGIAN1_STARTING_INFO_TITLE}Georgian Reforms
    
    {GEORGIAN2_GOLDEN_AGE_BODY}The Georgian Golden Age spanned from the 11th to the 13th century, during which the Kingdom of Georgia reached the peak of its political power. \n\nThe climax of this period occurred during the rule of queen Tamar Mepe. She was already politically active during the reign of her father, being proclaimed co-ruler in 1178. In 1184 her father died, leaving no male heir, and Tamar inherited the throne. She then ruled Georgia for nearly thirty years, guiding through one of its highest periods. Georgia had become a power in the east, but only twenty years after Tamar's death the Mongol invasions sparked immense political upheavals, eventually leading to Georgia's ultimate demise. \n\nIMPACT ON GAMEPLAY: Georgia now has access to better units, many more recruits, and can field a higher number of diplomats.
    {GEORGIAN2_GOLDEN_AGE_TITLE}Georgian Golden Age
    
    {GEORGIAN3_SHOTA_RUSTAVELI_BODY}The Georgian Golden Age was marked by more than just expansion and military reforms, seeing a flourishing of medieval Georgian architecture, painting, and poetry. These arts were most frequently expressed in the development of ecclesiastic art, but in this period Georgia also saw the creation of its first major works of secular literature. \n\nShota Rustaveli (1172-1216) was the greatest Georgian poet. He was also one of the greatest representatives of the literature of the Orthodox medieval world. He is best known for Vepkhistqaosani "The Knight in the Panther's Skin", an epic adventure about friendship and courtly love.\n\nIMPACT ON GAMEPLAY: Theologian guilds provide more religion benefits and increase the maximum number of priests. Heavy infantry feudal units of Chukhchi will be available for recruitment in the castles. Many more recruits will show up to serve in the kings' cavalry Monaspa.
    {GEORGIAN3_SHOTA_RUSTAVELI_TITLE}Shota Rustaveli dies
    
    {GEORGIAN4_REVIVAL_ALLOWED_TITLE}Tbilisi is lost!
    {GEORGIAN4_REVIVAL_ALLOWED_BODY}The great city of Tbilisi has been conquered by Georgia's enemies! This is a tragic moment for the nation, but brave Georgians should keep their spirits high, as our nation will strike back, retake what is rightfully ours, and we will flourish again.\n\nIMPACT ON GAMEPLAY: If Georgia re-captures its capital, this will trigger a new era for the nation, allowing for the recruitment of stronger military units from Georgian lands.
    
    {GEORGIAN5_REVIVAL_BODY}After a length of Mongol rule marked by constant uprisings, Georgia saw a period of revival under king Giorgi V Brtskinvale ("Illustrious", 1286–1346). He restored the kingdom's unity and also focused on the cultural, social, and economic progress of his realm. He changed the coins issued by Ghazan khan with the Georgian ones, called George's tetri. Between 1325 and 1338, he worked out two major law codes, one regulating the relations at the royal court and the other devised for the peace of a remote and disorderly mountainous district. During his rule, Georgia established close international commercial ties, mainly with the Byzantine Empire, but also with the great European maritime republics, Genoa and Venice.\n\nIMPACT ON GAMEPLAY: Georgian recruitment pools of the best, usually heavy-armored units, will replenish faster. Technological change, in form of the improved crossbows, finds its way into the military. There will also be more merchants in the country.
    {GEORGIAN5_REVIVAL_TITLE}Georgian Revival
    EDIT: there're even more events for Georgia, check the relevant faction thread in the Guides subforum.
    Last edited by Jurand of Cracow; January 17, 2021 at 07:25 AM.

  14. #14
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    Currently, I'm working on the Georgian script and making the Georgian recruitment even better, on a similar script for Poland, and also on fixing the Mongol script following a plan (well, a very flexible way):

    ------- The Mongols' tweak -------There're 4 goals to attain for the Mongols' tweak:
    - give the player starting in their neighborhood (Turks, Abbasids, Cumans) a chance to survive (so that playing those factions is not a hopeless task). To this end, the second wave of attack will be limited in the north or in the south if the player plays a respective faction.
    - make them behave historically (be unstoppable at times, go deep in the west, subdue territories, then fade away) but make them part of the game (stochastic: time of arrival, directions of attack, number or armies).
    - make them gain territories indeed (what's been seen in the previews, they often linger without taking settlements for dozens of turns).
    - fix the problem of public order (rebellions) in the intialy conquered settlements.
    - adjust the numbers to the lower number of available troops in the SSHIP (the numbers of Mongols were from SS6.4).


    The elements of the tweak:
    - increase initial public order in the conquered cities.
    - diversify the directions of expansion (not only Khorasan, but also through the steppes to Rus and Europe, and also through the Iranian plateau to Baghdad).
    - add additional attacking groups that make expansion more historical.
    - lower the experience of the units, and change the composition of the armies.


    Programming of the invasions:
    - invasions' warn starts a few turns earlier but may also occur later - on average the date will be the same, but there'll be more variability.
    - waves of attack:
    ** 1: 1218-1230 : 2 armies assault Merv, 2 assault Urgench [currently 9 armies + 5 if Merv not taken, what was rather inevitable].
    ** 2: +3 : 2-3 armies assault Ray or Alamut
    ** 3: +3 : 2-3 armies assault Tabriz or Baku or Tbilisi or Ani
    ** 4: +3 : north of the Causacus and east-Black Sea (2 armies near Azaq, 2 near Kiev) [currently none].
    ** 5: +3 : second wave: 3 armies either at two of those cities: Merv/Urgench/Konjikala (if the player is Cumans), or 3 at Bulgar and Sharukan (if player Abbasids, Turks); or both - if player none of those factions [currently 4 armies at Merv]
    - instead of 3 additional groups of 2 armies, there'll be historical invasions:
    ** invasion of Iraq : if Mongols hold Nishabur/Merv, Ray/Yazd, Isfahan, spawn 2 full-stacks near Baghdad (otherwise spawn them next to Merv)
    ** invasion of Syria : if Mongols hold Nishabur/Merv, Ray/Yazd, Isfahan, Baghdad, spawn 3 full-stacks near Damascus or Aleppo
    ** invasion of Anatolia : if Mongols hold Nishabur/Merv, Ray/Yazd, Isfahan, Baghdad, spawn 3 full-stacks near Ceasarea or Sivas
    ** invasion of Zalesye : check cities against Cuman/slave/Mongol ownership then spawn 2-3 full-stacks at the first: Bulgar, Ryazan, Suzdal.
    ** invasion of Kiev : check cities against Cuman/slave/Mongol ownership then spawn 2-3 full-stacks at the first: Sharukan, Pereyaslav, Kiev
    ** invasion of Poland/Hungary : if Mongols hold Kiev/Pereyasla/Sharukan/Azaq/Iasi, check cities against Cuman/slave/Mongol ownership then spawn 3 full-stacks at the first: Halych, Krakow, Esztergom
    ** invasion of Bulgaria : if Mongols hold Azaq, check cities against Cuman/slave/Mongol ownership then spawn 2 full-stacks at the first: Iasi, Tarnovo, Nis
    Last edited by Jurand of Cracow; August 08, 2023 at 01:42 AM.

  15. #15

    Default Re: Scripts that are or will be in the SSHIP

    is it possible to have rebels spawning because of either king's low authority / having ennemies on your soil / beeing in debt ?
    I think it would be cool and historical. Could represent the warbands of routiers in western europe for example
    I

  16. #16

    Default Re: Scripts that are or will be in the SSHIP

    ...


  17. #17
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,488

    Default Re: Scripts that are or will be in the SSHIP

    Quote Originally Posted by lequintal69 View Post
    is it possible to have rebels spawning because of either king's low authority / having ennemies on your soil / beeing in debt ?
    I think it would be cool and historical. Could represent the warbands of routiers in western europe for example
    I
    Perhaps possible. However, at this very moment nobody deals with the rebel spawn. JLMP had it in mind, iirc. Lusitanio would perhaps know.

  18. #18

    Default Re: Scripts that are or will be in the SSHIP

    Quote Originally Posted by Jurand of Cracow View Post
    Perhaps possible. However, at this very moment nobody deals with the rebel spawn. JLMP had it in mind, iirc. Lusitanio would perhaps know.
    It would be possible using the king authority (I_FactionLeaderAttribute), any trait that the king might have (I_FactionLeaderTrait), being in debt would work too by just using the condition and Treasury < 0. There are also other interesting conditions, like the taxes on a certain city and the happiness level.

  19. #19
    Nemesis2345's Avatar Semisalis
    Join Date
    May 2013
    Location
    Constanta, Romania
    Posts
    462

    Default Re: Scripts that are or will be in the SSHIP

    Quote Originally Posted by lequintal69 View Post
    is it possible to have rebels spawning because of either king's low authority / having ennemies on your soil / beeing in debt ?
    I think it would be cool and historical. Could represent the warbands of routiers in western europe for example
    I
    Mount and Blade flashbacks , imagine stacks of Sea Raiders roaming around the countryside. Would be a good addition for immersion.

  20. #20

    Default Re: Scripts that are or will be in the SSHIP

    Quote Originally Posted by Nemesis2345 View Post
    Mount and Blade flashbacks, imagine stacks of Sea Raiders roaming around the countryside. Would be a good addition for immersion.
    Perhaps "Sea Riders" stacks (not many units) could spawn in Scotland and Northern England coast, I don't know if it'd be possible to make script remove them after some turns, but if so, I think they would be fitting for 12th century, so they'd make devastation, but you could send nobles with their Knight BG to hunt them down optionally, disable if Norway falls. (For northeast coast in 13th century I'd rather see a full-blown historical naval invasion like in the Britannia Kingdoms campaign (I think it was the Haakon IV invasion of 1263).

    I think it would be great for young FM considering the state of the traits. I'd rather have bigger stacks, as uprisings for high tax, many levy units under a minor noble, or a high probability that if mercenaries dont get paid and they're enough (like 6+), they start pillaging the countryside (Trigger in own lands) as a Rebel stack (high devastation).

    Maybe even mix It and have a Rebel captain with a merc. Unit and maybe other mercenary units but less (say 3+ units, including his) join with the commoners and all pillage.

    It'd be great if they would look for your undefended settlements also (specially cities) and sack them and keep going.

    I've written plenty recently, but they're just ideas I get when I read your discussions, please feel free to ignore, pick something, or change whatever.
    Last edited by removeduser_28376423423; November 29, 2020 at 01:07 PM.

Page 1 of 3 123 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
  •