Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: individual militia
Individual Militia Bug Fix (DEV - 8551)[message #353051 is a reply to message #345324] Wed, 11 April 2018 07:53 Go to previous message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001
DEV BUILD - 8551


Hello everyone & Flugente,


I've tracked down the issue with mobile militia entering loaded sectors and will be submitting this to the BugFixes thread in addition to here. It took about 30 minutes of working through the MoveIndividualMilitia functions but it appears to be a missing MoveIndividualMilitiaProfiles(); func call in a if/elseif/else chain, that's all.


Corrected code below:


[[ Strategic Movement.cpp ]] { BUGGED CODE } :


Toggle Spoiler



[[ Strategic Movement.cpp ]] { CORRECTED CODE } :


Toggle Spoiler



(( This is optional, but I commented out the redunant 'Catch-All' feature that creates new militia profiles if none are detected in the sector. This caused more problems than it solved, and most people start new games or have updated their old game already. I highly recommend disabling the redunant 'Catch-All'.

There's a second 'Catch-All' in the FOR loop, which has only a 'return;', which may cause problems if it's ever triggered. That has also been commented out. ))


[[ Militia Individual.cpp ]] { BUGGED CODE } :


Toggle Spoiler





[[ Militia Individual.cpp ]] { CORRECTED CODE } :


Toggle Spoiler









Thank you Flug or whoever who corrected the scope issues relating to recruiting militia. This combined with the above bug fixes should effectively fix 90% of mobile milita issues.

Disbanding militia seems to work just fine. So far.


@GiantBasher: Your issue was related to the bug above. As some point you moved militia into a sector you had loaded and it duplicated the profiles and orphaned others. The only fix is to load a point BEFORE it happened or restart your game or hex your save file and remove them. You can also set 'Individual Militia' to FALSE in your JA2_Options.ini and then turn it back to TRUE, but they will still be there most likely.




There's some optional changes I'd like to recommend as well, such as disabling the 'Milita could not find gun to use, uses harsh language instead!' chat spam that happens whenever unarmed militia are moving around the map. This occurs in every sector movement, resulting in 180 messages for a stack of 60 unarmed militia over three sectors (for example).





[[ Militia Individual.cpp ]] { ORIGINAL CODE } :

Toggle Spoiler





[[ Militia Individual.cpp ]] { CHANGED CODE } :


Toggle Spoiler





One more problem remains: There is one more bug to fix and it's related to militia in a group traveling into the same sector in which mercs arrived and the sector is occupied by enemies. If this occurs, the militia DO NOT equip any inventory they had with them and will be unarmed for combat when they arrive at the sector edge. I assume this is also a very easy fix, anyone who knows what function call or method directly affects this please check it out or submit to trunk. I'd love you long time.




.

Report message to a moderator

Corporal 1st Class
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message light45.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message thumbs26.png
Read Message
Read Message
Read Message
Read Message bug6.png
Read Message
Read Message bug6.png
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New feature: advanced repair/dirt system
Next Topic: New (unofficial) mercs: The Ryder twins (Mass Effect: Andromeda)
Goto Forum:
  


Current Time: Mon Dec 02 15:40:18 GMT+2 2024

Total time taken to generate the page: 0.02338 seconds