Page 8 of 8 FirstFirst 12345678
Results 141 to 151 of 151

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

  1. #141
    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 mean after battle. In that moment, the armies are already on the run/dead, and it didnt crash no matter how many armies were originally there afaik..

  2. #142
    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,125
    Blog Entries
    35

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

    Hence why I linked to both references in the OP. battle script = crash reported with more then 2 armies. campaign script = apparently fine all along.










  3. #143
    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, no, it still crashed for me when used before battle. But after battle it worked fine, and I believe it counted corretly the amount of of survivors

  4. #144
    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,125
    Blog Entries
    35

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

    NumEnemiesInBattle doesn't count survivors, it counts initial enemy combatants afaik.










  5. #145
    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 found out that if you want to disable a hortcut permanently, its bugged in a very unfortunate way

    If you for example wanted to disable the backspace shortcut, this
    Code:
    disable_shortcuts strat_ui stop_character true
    (written anywhere in the script outside of any monitor)

    or this
    Code:
    monitor_event GameReloaded
     
     campaign_wait 0.1
     disable_shortcuts strat_ui stop_character true
     
    end_monitor
    works correctly only the moment you start the campaign. But once you save the game, and load the save from this campaign, all other shortcuts are disabled (quicksaving, space, etc), hence a huge issue.

    Apparently there is some bug with this kind of command, in the process of saving it likely disables all shortcut together...

    So the solution is this

    Code:
    monitor_event GameReloaded
     
     campaign_wait 0.1
     disable_shortcuts false
     campaign_wait 0.1
     disable_shortcuts strat_ui stop_character true
     
    end_monitor
    i.e., reenablaing all the shortcuts every time you load the game, and then disable the specific shortcut you want

  6. #146
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

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

    toggle_perfect_spy could be added to the list: toggle_perfect_spy - only works in script although it needs to be prefixed with console_command
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  7. #147

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

    terminate_battle - another for the list, I can confirm that it terminates the entire campaign script and it has been reported by Withwnar.

  8. #148

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

    Guys, I made some tests that contradict what is said in the OP about I_ConflictType. The short version: for the player testing I_ConflictType gives the intended results. I did not test for the AI, and I did not test the conflict type Withdrawal as it is a bit harder to set up reliably.

    I made the test in a simplified version of Bare Geomod : no scripts in CS except my test. Iengaged in all the types of battle except Withdrawal, and every time the log showed the right message and only that one.

    the testing script:
    Code:
    monitor_event PostBattle not IsFactionAIControlled
    	log ==============================================================================================================================
    	log A BATTLE IS TESTED
    end_monitor
    
    ; WORKS AS INTENDED
    monitor_event PostBattle I_ConflictType SuccessfulAmbush
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> SuccessfulAmbush
    end_monitor
    
    ; WORKS AS INTENDED
    monitor_event PostBattle I_ConflictType FailedAmbush
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> FailedAmbush
    end_monitor
    
    ; WORKS AS INTENDED
    monitor_event PostBattle I_ConflictType Normal
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> Normal
    end_monitor
    
    ; WORKS AS INTENDED
    monitor_event PostBattle I_ConflictType Siege
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> Siege
    end_monitor
    
    ; WORKS AS INTENDED
    monitor_event PostBattle I_ConflictType SallyBesieger
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> SallyBesieger
    end_monitor
    
    ; WORKS AS INTENDED
    monitor_event PostBattle I_ConflictType Naval
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> Naval
    end_monitor
    
    ; PARTIALLY TESTED
    ; if you withdraw during battle, I_ConflictType is still Normal
    ; my guess is Withdraw triggers when you flee from one battle and trigger another battle when withdrawing --- Belovese 
    monitor_event PostBattle I_ConflictType Withdraw
    and not IsFactionAIControlled
    	log --- CONFLICT TYPE ==> Withdraw
    end_monitor
    If you want to download the CS to try yourself, or even the entire set-up I made a gitlab where I host my tests: https://gitlab.com/Belovese/modder_s...ref_type=heads

    So in conclusion I would suggest someone try to replicate the result I had, and if it confirms it the OP should be updated.

    EDIT: my guess is that it was reported bugged because "I_ConflictType bananas" returns "true", but AFAIK any invalid condition test returns "true" in med2 scripting.
    Last edited by Belovèse; September 02, 2023 at 09:23 AM.
    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

  9. #149
    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,125
    Blog Entries
    35

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

    I made a note in the OP regarding your results. I assume from your description that only ever one log message was listed in the log, hence proving the condition works provided the value is correct?










  10. #150

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

    Yes, exactly, only one log message for every battle involving the player.

    Thanks for the note in the op!
    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

  11. #151
    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,125
    Blog Entries
    35

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

    Updated with I_SoundPlaying condition findings.










Page 8 of 8 FirstFirst 12345678

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
  •