diegoami / Diplado

Diplado - Yet Another DIplomacy 4.3+ Clone (Mount and Blade - Warband)
6 stars 3 forks source link

Bug fixes for bodyguard qty and bodyguards not spawning #15

Open WuphonsReach opened 3 years ago

WuphonsReach commented 3 years ago

Bodyguard script does not look like it paid attention to the leadership skill. Looking at all of the other uses of getting the player's leadership value, they all pass that in as a string and not a variable name.

https://github.com/WuphonsReach/Diplado/commit/1b8d27496083496e2e562485e6c2df880b1bf1be

When attempting to infiltrate a castle, I was spotted and then the guards beat me down and captured me. This resulted in the $g_mt_mode flag being stuck "on" (i.e. I was permanently flagged as disguised). My suggestion for fixing this is that whenever the player gets captured, we set the flag back to the default. (Later, I got myself captured again and it cleared the stuck flag as expected.)

https://github.com/WuphonsReach/Diplado/commit/841e62a29044c396721b594c88d670d87d293c2c

(These commits are all on my "beggars-1" branch.)

WuphonsReach commented 3 years ago

More details on "why bodyguards fail to spawn" (and why https://github.com/WuphonsReach/Diplado/commit/841e62a29044c396721b594c88d670d87d293c2c may not be the best fix)

There are other lines of code in the scripts that call (assign, "$g_mt_mode" and assign values of 1. In particular:

It looks like very few of those then set the global variable back to value zero. I'm wondering if setting tcm_disguised to a more unique value like 99 would break things or help fix things.

Update: Changing to 99 seems to cause no ill effects and definitely makes the bodyguards spawn as expected.