Page 7 of 8 FirstFirst 12345678 LastLast
Results 121 to 140 of 151

Thread: List of non or mal functioning script terms (events, conditions and commands)

  1. #121

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Hello guys, is there a known CTD with the faction_emerge command?

    We use it on sship to simulate a civil war with cities emerging to slave faction. I'm on mobile right now, but can post more details in a few hours if needed.

    EDIT: here is the script we use actually (inside a monitor_event PreFactionTurnStart FactionType slave):
    Code:
    if I_FactionLeaderTrait spain Usurper > 2
                and I_EventCounter civil_war_spain_going_on = 0
                and RandomPercent > 50
    
                set_event_counter civil_war_spain_going_on 1
                historic_event civil_war_spain
                increment_kings_purse spain -1000
    
    
                if I_NumberOfSettlements spain > 2
                    faction_emerge slave spain 1 100.0 0.0 1.2 town true
    
                    if I_NumberOfSettlements spain > 5
                        faction_emerge slave spain 1 100.0 0.0 1.2 town true
    
                        if I_NumberOfSettlements spain > 8
                            faction_emerge slave spain 1 100.0 0.0 1.2 town true unused_label1 unused_name 30
    
                            if I_NumberOfSettlements spain > 11
                                faction_emerge slave spain 1 100.0 0.0 1.2 town true unused_label1 unused_name 30
    
                                if I_NumberOfSettlements spain > 14
                                    faction_emerge slave spain 1 100.0 0.0 1.2 town true unused_label1 unused_name 30
                                end_if
                            end_if
                        end_if
                    end_if
                end_if
    
            end_if
    I tried wait 0.1 before and after, still CTD at various points in the "if" chain.
    Last edited by Belovèse; January 09, 2021 at 05:44 PM.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

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

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    The slave faction never dies, right? In which case you're emerging a faction that is already emerged (alive). That would be fair grounds for a CTD I'd say.

  3. #123

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    That's what I thought, but the script can also sometime work perfectly fine, and I also found this post in one of your threads. For now all the faction slots are use in SSHIP, so using the method you describe (emerge settlement to a hidden faction the give_all to a living faction (would require some sacrifice). I'll make more tries an report any findings.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  4. #124
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Quote Originally Posted by Withwnar View Post
    The slave faction never dies, right? In which case you're emerging a faction that is already emerged (alive). That would be fair grounds for a CTD I'd say.
    Not true at all Im afraid. It might be problem with the usual emerging events, but this one is special.

    Afaik there is no issue using faction_emerge for faction already in the game. (Especially if its a slave faction ). It just gives the faction a setttlement(s) in such case

    I think Brittania DLC might be also doing it possibly (for BA), be it uintentionally or intentionally

    When requirements for a condition are not met (too high popuarity in all settlements), it simply doesnt happen (in case you have hit "true" to scroll to show up, it will inform you that "rebellion failed") so that shouldnt be cause of CTD

    Only thing that could possibly cause the CTD is posibly the unused_label and unused_name perhaps? Try removing them. The if chains dont exclude each other, hence spawning a character leader with the same name/label like this could cause an issue perhaps?

    Perhaps, also try to make the if chains exclude each other (so the first fire only if spain has from 2 to 5 settlements, etc), perhaps when its happening all at once, it migh bring up issues....
    Last edited by Jadli; January 10, 2021 at 03:31 AM.

  5. #125

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    I tried with and without character label, with true and false for scroll to show up (wich it never does by the way even if the script works, could it be related to the CTD?). I tried firing it during a few different factions turn. I used this for testing purpose.
    Code:
        monitor_event PreFactionTurnStart FactionType slave
            log SOULD TEST EMERGENCE
            if I_EventCounter civil_war_byzantium_going_on = 0
                ; and RandomPercent > 50
    
                log TEST EMERGENCE
                ; set_event_counter civil_war_byzantium_going_on 1
                ; historic_event civil_war_byzantium
                ; increment_kings_purse byzantium -1000
    
    
                if I_NumberOfSettlements byzantium > 2
                    log FIRST EMERGE
                    faction_emerge slave byzantium 1 400.0 0.0 1.2 town false
                    ; campaign_wait 0.1
                end_if               
    
                ; if I_NumberOfSettlements byzantium > 3
                    ; log SECOND EMERGE
                    ; faction_emerge slave byzantium 1 100.0 0.0 1.2 town false
                    ; campaign_wait 0.1
                ; end_if
    
                ; if I_NumberOfSettlements byzantium > 4
                    ; log THIRD EMERGE
                    ; faction_emerge slave byzantium 1 100.0 0.0 1.2 town false
                    ; campaign_wait 0.1
                ; end_if
    
                ; if I_NumberOfSettlements byzantium > 5
                    ; log FOURTH EMERGE
                    ; faction_emerge slave byzantium 1 100.0 0.0 1.2 town false
                    ; campaign_wait 0.1
                ; end_if
    
                ; if I_NumberOfSettlements byzantium > 6
                    ; log FIFTH EMERGE
                    ; faction_emerge slave byzantium 1 100.0 0.0 1.2 town false
                    ; campaign_wait 0.1
                ; end_if
                
            log END TEST EMERGENCE
            end_if
        end_monitor
    so in my last test, almost everything was commented out but it was still crashing. Here is the log
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  6. #126
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Nothing of interest in the log it seems....

    Regarding the scrolls, I think it shows up only for other factions from what I found out (ie, if the rebellion happens to Byzantium, you will see the scrolls only as other fation than byzantium. So for byzantium, you need to make an event to inform the byzantium player about it I suppose.

    Check this guide, in it the guy explains how to use use something like this and shows how the script should look, so try his structure with campaign_waits I guess (section 2 "Gifting regions")

    And if that doesnt help...

    Also, perhaps just try to switch "slave" to some other faction and see what happens, perhaps it helps to localize the issue?

    And perhaps... it doesnt work well with PreFactionTurnStart? In all instances I have seen it used in my installed mods and in my own mod (where it works fine, though I dont use it for civil wars) its used withFactionTurnEnd of a target faction.... so in your case FactionTurnEnd FactionType byzantium?
    Last edited by Jadli; January 10, 2021 at 05:24 AM.

  7. #127

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Thanks for all the infos! Just did some test with this
    Code:
        monitor_event PreFactionTurnStart FactionType slave
            log SOULD TEST EMERGENCE
            if I_TurnNumber > 0
                log TEST EMERGENCE
                if I_NumberOfSettlements byzantium > 2
                    log FIRST EMERGE
                    wait 0.1
                    faction_emerge norway byzantium 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
                    wait 0.1
                end_if               
            log END TEST EMERGENCE
            end_if
        end_monitor
    and it works sometime but is still a hit and miss. I had looked at the guide you linked yesterday, tried it and couldn't make it work in my case, but I'm not quite sure I fully understood everything.
    I had also tried it with FactionTurnEnd, same results. It seems to be a hit and miss: sometimes it works more than 5 turns in a row, sometimes it CTD in the first attempt.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  8. #128
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Well, any news? Were you trying this test script without the spawn of new FL/general as well?

    Anyway, regarding the thought behind the script itself, there is zero reason for you to script a faction leader/general to emerge as well (via the last three parts of faction_emerge), right? Because the rebels dont need a new one... (and it might give a general to the rebel settlement anyway?). And if you are using this extensively, it may be delaing turn times as you are making lof ot new characters, which would be the case if these are not unusual...

  9. #129

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Hello Jadli, I'm still testing options. Mainly I'll have to test the faction emergence in EBII to see if there is something wrong with SSHIP, and I'll have other persons test it to see if there is something wrong with my install. I'll report any findings!
    I did test:
    - with wait commands
    - with/without scripting a new FL
    - with various factions, alive or dead
    - with/without slaves
    - at various moments: FactionTurnStart, PreFactionTurnStart, FactionTurnEnd, all these with various factions
    - on different turns, from 1 to 5 (or 0 to 4 in internal counting)

    For now I'm also working on a replacement script that uses both settlement_add_turmoil and provoke_rebellion:
    Code:
      monitor_event FactionTurnEnd FactionType FACTION
        
            ; here conditions and counters, same as current script
        
            if I_FactionLeaderTrait FACTION Usurper > 2
                and I_EventCounter civil_war_FACTION_going_on = 0
                
                set_event_counter civil_war_FACTION_going_on 1
                historic_event civil_war_FACTION
                increment_kings_purse FACTION -1000
    
                if I_SettlementOwner SETTLEMENT = FACTION
                    and RandomPercent < 40        ; or any other 
                    
                    add_settlement_turmoil SETTLEMENT 1000
                    provoke_rebellion SETTLEMENT
                end_if
            end_if
    
            ; duplicate for every settlement
            ; add a way to remove the huge turmoil, maybe with counters?
        end_monitor
    I did test what was said in various post, and provoke_rebellion command is active any number of turns until conditions are met, eg the target settlement goes bellow 70% public order, BUT it doesn't survive loading the saved game.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  10. #130
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Hm, yay, shame... I was hoping this could work reliably...

    Though, one other thought.. Have you tested this when playing as the target or source faction? Or as different faction (a faction not affected by this at all)?

  11. #131

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Yes, I have tested both as one of the affected faction or as a non-affected faction. But I cannot yet rule out that there is a problem with either SSHIP or my own install, I'll post here again after some more testing.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  12. #132
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Hm, perhaps Withwnar actually knows something? https://www.twcenter.net/forums/show...1#post15755663

    That could explain why its CTDing sometimes?

  13. #133

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Thanks for the link, I'll have a look. In the meantime I can say that emerging a dead faction from slave seems to be working fine, when emerging slaves from a living faction creates random CTD.
    I'm putting logging entries in the new SSHIP version to track this, I hop we'll have more data and reports to understand what is happening.
    But not too much reports, I mainly hope it works fine!
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

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

    Default Re: List of non functional script terms (events, conditions and commands)

    Another one for the list.

    This...

    Code:
    monitor_event ArmyTakesCrusadeTarget IsJihad
    ...only fires when the army - all units within it - is on jihad. It does not fire if the army is a mixture of jihad and non-jihad. And does not fire if the army is not on jihad at all. And therefore does not fire if the army is of another faction (non-islam).

    This works just fine...
    Code:
    monitor_event GeneralCaptureSettlement IsJihadTarget
    Presumably, the same applies to crusades but I didn't test that. I don't have the demons handy so don't know the equivalents but from memory they'd be "not IsJihad" for the first one an IsCrusadeTarget for the second.

  15. #135

    Default Re: List of non functional script terms (events, conditions and commands)

    I can't test it right now, but do you know if GeneralTakesCrusadeTarget has the same problem?
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

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

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    No I don't know.

  17. #137
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    btw, I found out that if in EDB you use for example

    recruit_pool "Stormcloacks Th" 1 0.15 2 0 requires factions { scotland, } and region_religion catholic 25 and event_counter is_the_4th_era 0

    it doesnt work, you have to write "and not event_counter is_the_4th_era 1" instead.

    Not sure if its known or not...

  18. #138
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    I believe NumEnemiesInBattle can be used used PostBattle (it counts the numer of remaining enemies), and it doesnt crash even when you fought multiple armies (tested with two)

  19. #139
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,132
    Blog Entries
    35

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Added link to your post in the respective line in the OP.










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

    Default Re: List of non or mal functioning script terms (events, conditions and commands)

    Quote Originally Posted by Jadli View Post
    I believe NumEnemiesInBattle can be used used PostBattle (it counts the numer of remaining enemies), and it doesnt crash even when you fought multiple armies (tested with two)
    In my notes I've got that it causes a crash if three AI armies are involved. I've never tested it, it's just from somebody's entry in the deep past.

Page 7 of 8 FirstFirst 12345678 LastLast

Tags for this Thread

Posting Permissions

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