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 Go to next message
Moa is currently offline 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.

http://i.imgur.com/ZHItuv0.png

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:
http://www7.pic-upload.de/thumb/12.09.13/7l7yhd6wxqt7.jpg
(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):
http://www7.pic-upload.de/thumb/12.09.13/khxrjrep4b3.jpg
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:
http://www7.pic-upload.de/thumb/12.09.13/sacf97pa3rm5.jpg
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 Wink
Also I have 'unvisited' A10 Omerta using the debugger to better demonstrate the settings
[/color]





http://www7.pic-upload.de/12.09.13/51rjipcy8aec.jpg
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

http://www7.pic-upload.de/12.09.13/p7ypmwvrsf6.jpg
- RESTRICT_ROAMING=TRUE

http://www7.pic-upload.de/12.09.13/68jnoozo7sm.jpg
- 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

http://www7.pic-upload.de/12.09.13/bsgjrzsgmp.jpg
- 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!

http://www7.pic-upload.de/12.09.13/2s87nvc3jyaj.jpg
- ALLOW_DYNAMIC_RESTRICTED_ROAMING=TRUE
Conquest based: Liberating a town will increase the accessible sector count.
See Data-1.13/TableData/Map/DynamicRestrictions.XML

http://www7.pic-upload.de/thumb/12.09.13/wi8zorq3wnwu.jpg
- 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.

http://www7.pic-upload.de/12.09.13/cgur1tqvcs9.jpg
- 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 #325111] Thu, 12 September 2013 20:29 Go to previous messageGo to next message
Kriplo is currently offline Kriplo

 
Messages:256
Registered:February 2008
Location: Zagreb - Croatia
Militia is nothing but cheat code and one big bug, and although all improvement and options done to them is great addition, in current state using them just destroys game play (this also go to automatic resolve cheat).

You have option to hire 32 mercs a much of them for free and even more for peanuts and have free get army for after one Boxing match in San Mona, after two you get veterans, and till recently they came with their own weapons :silly:

And after all I read surprises how enemy wouldn't attack your barely defended positions, that is so strange... Razz

In JA1 this was implement far far better, there was limited numbers for hire, you have to pay for their services (at least they need to fed their families) and if your progress is staling or they dying they will quit.


Hoping Moa will correct this imbalances :ok:

Report message to a moderator

Master Sergeant
Re: [Fix] Catched the mobiles[message #325118] Thu, 12 September 2013 21:21 Go to previous messageGo to next message
Gambigobilla

 
Messages:693
Registered:July 2008
Kriplo

In JA1 this was implement far far better, there was limited numbers for hire, you have to pay for their services (at least they need to fed their families) and if your progress is staling or they dying they will quit.


Also occasionally they needed a raise. Enemies getting tougher as the game progresses, so there should be fewer people volunteer to become militia. By the way what kind of militia are those, they are fighting for money not hearth and home. They are just bunch of ragtag mercenaries. :snake:

Report message to a moderator

First Sergeant
Re: [Fix] Catched the mobiles[message #325133] Fri, 13 September 2013 06:09 Go to previous messageGo to next message
Buggler is currently offline Buggler

 
Messages:211
Registered:November 2009
Good fix.

To addon, for middle-to-endgame balance:
can look at having a geometric formula rate increase for training/upkeeping mobile militia. Town militia can remained as it is.
e.g. >50 mobile militia force - 5% fee increase, >100 mobile militia force - 15% fee....

Or chance of mobile militia deserting when each time mobile militia moves to a new sector/during daily update. Protecting and defending their town is one thing, risking lives for a deliberate armed conflict away from home is another.

So Queen's army vs Our army will be less of a likelihood. Can also serve as a small counterbalance with our burgeoning coffers in late game.

Report message to a moderator

Sergeant 1st Class
Re: [Fix] Catched the mobiles[message #325137] Fri, 13 September 2013 09:51 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
Nice fix moa!
I have just committed the patch.

Report message to a moderator

Sergeant Major

Re: [Fix] Catched the mobiles[message #325162] Fri, 13 September 2013 21:23 Go to previous messageGo to next message
Uriens is currently offline Uriens

 
Messages:345
Registered:July 2006
I love this fix.
Thank you Moa!

On the similar note, militia following mercs feature is little buggy. Usually mobile militia will move to merc position if they are located one sector close to them. However, the problem is that sometimes they just split up and half group goes to militia location and half remain at the same position. You have to wait significant amount of time until the other half decides to move (quite often 6 or more hours). Because of this it can take more then 2 days to get from Drassen to Cambria if you get 'lucky' and have militia split up 3-4 times on route. By my experience there is close to 50% chance that militia will split up instead move to merc location.

If you could fix this and make militia always go to merc location in full numbers without splitting up, it would be great.

Report message to a moderator

Master Sergeant
Re: [Fix] Catched the mobiles[message #325171] Sat, 14 September 2013 07:14 Go to previous messageGo to next message
Moa is currently offline Moa

 
Messages:58
Registered:September 2013
Actually I never used the mobiles before Wildkitty on IRC mentioned a bug there. So thank you all for the input at what needs to be done to make the feature more userfriendly.

Kriplo
limited numbers for hire, you have to pay for their services (at least they need to fed their families) and if your progress is staling or they dying they will quit

The last part can be handled after autoresolve, limiting them should also be no problem, the question is how? And if they quit should the player be able to train more to compensate?
Or should the limiting be an arbitary fixed value depending on number of liberated major towns or on current progress?
I dont like the idea of progress staling, not only because there is no good hook to implement this, but also because they should be more happy to join when it is more peacefully and to keep it peacefull.

Buggler
-having a geometric formula rate increase for training/upkeeping mobile militia.
-chance of mobile militia deserting when each time mobile militia moves to a new sector/during daily update

This would also limit the numbers, but on a financial base. However I like the idea of deserting.

Uriens
make militia always go to merc location in full numbers without splitting up

The splitting of groups seems to be intended. I am not sure it is good or not. Maybe there is no benefit at all and this is some drawback to balance the mobiles? Dont know.
If they are following then they should not split, consider this as to be added to my todo list.

Report message to a moderator

Corporal
Re: [Fix] Catched the mobiles[message #325172] Sat, 14 September 2013 10:42 Go to previous messageGo to next message
Kriplo is currently offline Kriplo

 
Messages:256
Registered:February 2008
Location: Zagreb - Croatia
@Moa

This would be optional of course, fine tunned through ini setting, to everybody game taste get satisfied :cheerleader:

If possible to create some kind of militia recruiting pool or maximum number currently possible depending on your progress (liberated towns, population opinion, dying rate, paying them or not similar to MERC...) to train rather then just pay 5000 and get bunch of them (you still pay for training them and some fee for weekly salary). Presuming needed progress variables or similar stuff existing somewhere in strategic project.
They could start randomly quiting when this maximum number drop below number of them already active, during those progress effect write above. About staling didn't necessarily mean you do nothing but for this progress effects.

Great things you are done already so if you are in mood to create even greater stuff Very Happy

I know, it's far from easy Wink Thanks.

Report message to a moderator

Master Sergeant
Re: [Fix] Catched the mobiles[message #325183] Sat, 14 September 2013 22:39 Go to previous messageGo to next message
pheloncab is currently offline pheloncab

 
Messages:278
Registered:August 2004
Location: So. Cal. or texas
the options Ini already has a section for a base cost per day for the militia regular and mobile, its just that many common mods have the cost at 0 like vanilla or really cheap.

I'd like to see something to modify it.. so it would be base cost * progress/20 or something like that.. that way early militia are cheap, and as they and gear are better (progress) the rate goes up. it could also be done where the divisor is a variable in the ini so modders could chose and tweak how much of a 'raise' militia get.

Report message to a moderator

Master Sergeant
Re: [Fix] Catched the mobiles[message #325191] Sun, 15 September 2013 11:03 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:438
Registered:April 2010
Location: Russia,Sevastopol

How about limit player with mobile militia like this:How much player controlled city sectors-like drassen-3 sectors=3*20(or not 20,decided by max militia per sector option in ja2.option.ini)=60 mobile militia can be trained.So,each controlled city sector gain player additional squad of militia to defend.On standart options of 1.13 mod militia lose in 70/30 percent of battles.

[Updated on: Sun, 15 September 2013 11:05] by Moderator

Report message to a moderator

Master Sergeant
Re: [Fix] Catched the mobiles[message #325207] Sun, 15 September 2013 22:03 Go to previous messageGo to next message
pheloncab is currently offline pheloncab

 
Messages:278
Registered:August 2004
Location: So. Cal. or texas
Parkan
How about limit player with mobile militia like this:How much player controlled city sectors-like drassen-3 sectors=3*20(or not 20,decided by max militia per sector option in ja2.option.ini)=60 mobile militia can be trained.So,each controlled city sector gain player additional squad of militia to defend.On standart options of 1.13 mod militia lose in 70/30 percent of battles.


That sounds like a good option for limiting, Just as long as there is some variable to adjust it that the Ini can have. got to leave some Mod options open.

Report message to a moderator

Master Sergeant
Re: [Fix] Catched the mobiles[message #325548] Mon, 23 September 2013 11:05 Go to previous messageGo to next message
Moa is currently offline 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

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 #325573] Mon, 23 September 2013 21:55 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Oh, shiny. That seems like a very good idea. :thumbsup:

I would at least consider Manuel another rebel (and Enrico never shows up anyway). Perhaps one could include Maddog, but that's debatable, as he's just some random idiot who joins.

There is also a value for strategic morale, perhaps this could also be used for a setting?

I 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.

Report message to a moderator

Captain

Re: [Fix] Catched the mobiles[message #325575] Mon, 23 September 2013 22:40 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
The code has struct RPC_PROFIL gProfilesRPC[ NUM_PROFILES ] to store rebels. Didn't check if this is used and what for.

According to this struct the following profiles count as RPC:

57 Miguel
58 Carlos
59 Ira
60 Dimitri
61 Devin
62 Robot
63 Hamous
64 Slay
65 Eskimo <- who was that?
66 Dynamo
67 Shank
68 Iggy
69 Vincent
70 Conrad
71 not used
72 Maddog
73 Darrel
74 Perko

That list has some strange entries... Very Happy

Report message to a moderator

Lieutenant
Re: [Fix] Catched the mobiles[message #325576] Mon, 23 September 2013 22:43 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Eskimo was a planned RPC that never made it further than very general concept. But we still drag his ghost along in the xmls :angel:

Report message to a moderator

Captain

Re: [Fix] Catched the mobiles[message #325582] Tue, 24 September 2013 00:39 Go to previous messageGo to next message
Faalagorn is currently offline Faalagorn

 
Messages:153
Registered:February 2012
Location: Poland
Darrel and Perko aren't recruitable either AFAIK, yet they are indeed recognizeda as an RPC. Maybe they were planned to be recruitable at some points? Anyone knows?

Report message to a moderator

Staff Sergeant
Re: [Fix] Catched the mobiles[message #325641] Tue, 24 September 2013 20:00 Go to previous messageGo to next message
Moa is currently offline Moa

 
Messages:58
Registered:September 2013
silversurfer
The code has struct RPC_PROFIL gProfilesRPC[ NUM_PROFILES ] to store rebels


Will use this, thanks!

flugente
There 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.

flugente
I 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


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 #325642] Tue, 24 September 2013 20:04 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
In the last picture, do they desert before the fight? Otherwise you would end up below maximum, as the excess militia could replace the dead..

Report message to a moderator

Captain

Re: [Fix] Catched the mobiles[message #325643] Tue, 24 September 2013 20:09 Go to previous message
Moa is currently offline 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
Previous Topic: Problem with APs and inventory
Next Topic: training bug
Goto Forum:
  


Current Time: Mon Dec 02 01:21:16 GMT+2 2024

Total time taken to generate the page: 0.01327 seconds