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..
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..
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
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
(written anywhere in the script outside of any monitor)Code:disable_shortcuts strat_ui stop_character true
or this
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.Code:monitor_event GameReloaded campaign_wait 0.1 disable_shortcuts strat_ui stop_character true end_monitor
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
i.e., reenablaing all the shortcuts every time you load the game, and then disable the specific shortcut you wantCode:monitor_event GameReloaded campaign_wait 0.1 disable_shortcuts false campaign_wait 0.1 disable_shortcuts strat_ui stop_character true end_monitor
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)
terminate_battle - another for the list, I can confirm that it terminates the entire campaign script and it has been reported by Withwnar.
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:
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=headsCode: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
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
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