Home » MODDING HQ 1.13 » v1.13 Bug Reports » [Fix] Catched the mobiles
[Fix] Catched the mobiles[message #325103]
|
Thu, 12 September 2013 18:49
|
|
Moa |
|
Messages:58
Registered:September 2013 |
|
|
Mobile Militita is a great feature. The map view for restricting them was a pain.
Player could not get the militia to move except he has set ALLOW_DYNAMIC_RESTRICTED_ROAMING = TRUE in ini. Furthermore some settings dont had any effect at all. Restricting was not possible, orders are ignored and the queens army was smarter. Therefore I never realy used this feature until someone in IRC mentioned the oddity.
He wasnt able to get the militia in F13 to move. Albeit he was playing 4870 the problem is the same.
Here are some picture on revision 6394:
(ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS = FALSE anything else true)
Militia is sitting around the town and dont move. They are waiting for the queens army, I have to agree. The opponent is moving allways to a town, so why move?
or this (ALLOW_DYNAMIC_RESTRICTED_ROAMING = FALSE anything else true):
Here you couldnt even manually adjust the green sectors. Militia is moving, but not in the green area but instead along the the dynamic area which I have turned off!!
Turning both on is not better:
Here one is able to manually restrict, unfortunatly not everywhere. Militia will not move to the green area, but it seems like we have done something and it looks like they will do eventuelly something. They no want to move nowhere!
Now something positive about the current implementation:
Militia is following the mercs - this is great for attacking.
The reinforcement in battles and to town garisions works as well. They are not attacking the SAM site even when it is green - thats how it is supposed to work. Source code for the mobile militia is commented very well beeing the typical Headrock.
So there was just the problem to change that behavier a bit to make it more 'userfriendly'.
Probably there are still some oddities but I think its presentable.
The mobiles are moving correctly in the green area, stop at yellow and dont cross the red areas. Gray sectors are not manually restrictable and militia will not enter.
[color:#330000]What you will see are pictures taken using a debugger to speed up things, please ignore the positions of the militia.
It works!! I promise
Also I have 'unvisited' A10 Omerta using the debugger to better demonstrate the settings[/color]
visit sectors
Catched the mobiles!
This corrects some issues with the awesome mobile militia feature by Headrock.
Each setting in ini now has the effect that the user expects,
he now sees the correct restrictions on the map,
and is able to adjust manually as neccessary
- RESTRICT_ROAMING=TRUE
- and RESTRICT_ROAMING=FALSE
activates the manual adjustable restrictions based on exploration and/or conquest.
Any of the following settings can be mixed as you like
- ALLOW_MILITIA_MOVEMENT_THROUGH_EXPLORED_SECTORS=TRUE
Exploration based: any liberated sector is potentially accessible for mobile militia.
You need to load the map and defeat all enemies. Walking through on strategic view is unsufficient!
- ALLOW_DYNAMIC_RESTRICTED_ROAMING=TRUE
Conquest based: Liberating a town will increase the accessible sector count.
See Data-1.13/TableData/Map/DynamicRestrictions.XML
- ALLOW_MILITIA_MOVEMENT_THROUGH_MINOR_CITIES=TRUE
yea its realy minor, its such a small city that the picture dont need to be big. You wouldnt see it if the picture were larger. (click on it to enlarge)
Mobile militia can move thru cities where militia training is not allowed(e.g. Tixa, San Mona, Omerta,...)
In earlier versions those cities where allready included in DynamicRestrictions.XML which rendered this setting allmost useless.
- Everything on
You can mix all of the settings as you like
NOTE:
Older savegames have still the 'gray' sector restriction set.
Those will be converted to 'red' according to the settings in Ja2_Options.INI on load.
>>>>download patch files<<<<
Report message to a moderator
|
Corporal
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: [Fix] Catched the mobiles[message #325548]
|
Mon, 23 September 2013 11:05
|
|
Moa |
|
Messages:58
Registered:September 2013 |
|
|
Thank you all for your input. I skipped the financial modifier, there are allready so much of em in ini. If they need to be tweaked somewhat to make them scale better thats ok, but adding another modifier is just to much.
Originally planned to release a patch today which limits the militia. But I am also working on the deserting feature proposed by Buggler which is triggered whenever the militia group is threatened by enemies.
During implementaion of deserters I found some oddities in the code related to automated training of militia.
Toggle Spoiler
; Determines which method of training is used.
; If set to FALSE, will generate a group of Mobile Militia at each conquered city every N hours. This also disables all
; "Leadership and Mobile Militia Training settings", below.
MUST_TRAIN_MOBILE_MILITIA = TRUE
This does not deactivate the leadership requirement. Instead it checks the sector for a player's merc and uses this leadership. If none is present you have to pay and receive no squad!
Also that code generates militia in ANY town.
And most important: if activated it stops any militia movement through a city.
Until that is fixed and deserting works as well you have to settle for a preview.
;------------------------------------------------------------------------------------------------------------------------------
; These settings determine the maximum of mobile militia that can be active at the current time.
; If more then the maximum are active they will desert BEFORE next fight leaving nothing then a message that they left.
; So be warned if you use current progress or number of towns sectors ec. Those can lower the maximum over time!
; However, you can deactivate the deserting feature as well...
; As you will notice the mode is actually a bit field, so feel free to use any combinations you like. If more then one maximum
; is used (e.g. 21 for current progress, town sectors liberated and deserting activated) then the lowest one is choosen.
; Add 128 to this numer then the highest one is choosen.
; Rule of thumb: use even numbers to deactivate deserting.
;
; modifier: floating point 0.01 .. 99.9, Mode: 0..255:
; 0 = no maximum (default)
; 1 = deserting feature activated
; 2 = total active <= town sectors under player control * MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR
; 3 = see 2 but deserting feature is activated.
; 4 = total active <= town sectors liberated at least once * MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR
; 5 = see 4 but deserting feature is activated.
; 6 = total active <= minimum of (see 2) and (see 4)
; 8 = total active <= number towns under player control * 3 * MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR
; 9 = see 8 but deserting feature is activated.
; ...
; 16 = total active <= current progress% * 5 * MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR
; 17 = see 16 but deserting feature is activated.
; ...
; 32 = total active <= max progress% * 5 * MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR
; 33 = see 32 but deserting feature is activated.
; ...
; 64 = total active <= number of recruitable rebels in your team * 3 * MOBILE_MILITIA_MAX_ACTIVE_MODIFIER * MAX_MILITIA_PER_SECTOR
; 65 = see 16 but deserting feature is activated.
; 128 = uses highest instead of lowest maximum.
; 168 = total active <= maximum of (see 32) and (see 8), deserting deactivated
;------------------------------------------------------------------------------------------------------------------------------
MOBILE_MILITIA_MAX_ACTIVE_MODE = 127
MOBILE_MILITIA_MAX_ACTIVE_MODIFIER = 0.5
I tried to balance the limits somewhat so that one can use multiple of them.
Currently I have used the following mercs as rebels: Ira, Dimitri, Dynamo, Carlos, Miguel, Enrico.
Here are my questions:
Is some rebel missing or is there allready external data which defines a rebel? How does it work in other mods - does it break something?
When militia is allowed to take gear from sector inventory and it was decided that he is a deserter, should he steal the equipment (delete those items)?
Is the description for both settings in ini understandable, is it to complicated?
Report message to a moderator
|
Corporal
|
|
|
|
|
|
|
Re: [Fix] Catched the mobiles[message #325641]
|
Tue, 24 September 2013 20:00
|
|
Moa |
|
Messages:58
Registered:September 2013 |
|
|
silversurferThe code has struct RPC_PROFIL gProfilesRPC[ NUM_PROFILES ] to store rebels
Will use this, thanks!
flugenteThere is also a value for strategic morale, perhaps this could also be used for a setting?
Unless there is another value I suppose you are refering to SOLDIERTYPE.aiData.bStrategicMoraleMod?
Cant use it as it is bound to a soldier (or civ in that case). The sector needs to be loaded in order to work and even then there might be no civs in that sector.
flugenteI think a message would be useful when training additional militia and close to the current maximum, so that the player does not train militia needlessly.
Good point, but currently I implemented the maximum different. If just below maximum player IS allowed to train, but eventuelly before next fight some of them will desert. They are still usefull and no money is wasted. If above maximum the player is not allowed to train at all.
An example:
Player has 29 active militia and maximal allowed is 30. He trains one time and gets 10 additional. Now he is above maximum. So next time he wants to train he is not allowed to do so.
If I implement different so that player will only get 1 additional mobile - that would be no good as the new trained mobile becomes a group of 1 and is not usefull. The one man army needs to merge with another group. Cant even dismiss a mobile militia. I dont like that.
On the other hand the player might exploit and train multiple militia groups at once when just below maximum. Either punish the cheater or punish the cheater and the regular player.
Some screenshot:
Toggle Spoiler
Training not allowed, MOBILE_MILITIA_MAX_ACTIVE_MODE = 127
Training not allowed, MOBILE_MILITIA_MAX_ACTIVE_MODE = 255
Before attacking some became deserters. Would realy like to show that box, but is not possible as there is an issue preventing the fight if a msgBox delayed the prebattle and therefore autoresolve screen. So I have to use the map screen message log after fight.
Deserters are missing in fight(was a group of 20), MOBILE_MILITIA_MAX_ACTIVE_MODE = 127
Message only possible after fight.
Patch: http://www.file-upload.net/download-8112723/mobile_militia_limiting.zip.html
Report message to a moderator
|
Corporal
|
|
|
|
Re: [Fix] Catched the mobiles[message #325643]
|
Tue, 24 September 2013 20:09
|
|
Moa |
|
Messages:58
Registered:September 2013 |
|
|
They are removed from 'squad' after they have moved into the new sector and before the fight starts. Code after the removal sees the new numbers and builds a group. But will test what happens if no one is left. Good point!
Edit: Does work.
game goes into autoresolve, no one there, victory for enemy - closing autoresolve screen - and the message that 20 militia deserted apears in msg log.
[Updated on: Tue, 24 September 2013 20:21] by Moderator Report message to a moderator
|
Corporal
|
|
|
Goto Forum:
Current Time: Fri Nov 29 19:47:35 GMT+2 2024
Total time taken to generate the page: 0.01688 seconds
|