Expanded Feature: Move militia in strategic map, part 2
While we already could move militia clumsily, this was rather tedious. I have now improved that - we can order our militia around in strategic view just like our mercs or the helicopter. A little demo:
Things you should know:
For internal reasons, there can only be up to 30 militia groups traveling at a time.
Militia requires someone nearby to tell them to move. For simplicity, we require the mercs simply to not be in a coma, asleep is okay (otherwise we have to wake them up, give the order, set them asleep again - tedious!).
This can be achieved in several ways:
1. they are in the same sector
2. they are in the same town (otherwise we'd have to do tedious town-internal travel)
3. they are a radio operator in an adjacent sector
4. they are a radio operator in a sector adjacent to the militia's town
5. they are a radio operator in a town adjacent to the militia's sector
If, however, we control the Alma military HQ, and if someone capable enough - an experienced merc with enough wisdom and leadership (lvl 5, WIS 70, LDR 70) - staffs it, then we can order militia around the entire country. Because, uhm, the HQ has maps and plans and radio equipment and.. stuff.
Militia travels as fast as mercs do (without any ranger or background boni). Note, however, that they travel slower at night, because they need their sleep. You might not now that, but army patrols also do that.
Militia travel is similar to enemy travel. This means that during the travel, it stays in its origin sector, an once the travel is completed, it is transferred to the target sector. So this is different from mercs, who are in between sectors while traveling.
Traveling militia can not be redistributed in the militia redistribution screen, because duh, they are traveling.
Militia will engage any hostile force it encounters.
Militia will not move out of a sector if there is currently a fight in that sector.
The facility assignment trains leadership and wisdom a tiny bit.
While the HQ is staffed, mobile militia does not wander around randomly on its own. Because why should it?
This is incompatible with mobile militia - while this is active, mobile militia won't, because its pretty pointless in that case.
The previous feature is not active anymore.
Ini settings:
[Militia Strategic Movement Settings]
;------------------------------------------------------------------------------------------------------------------------------
; If ALLOW_MILITIA_STRATEGIC_COMMAND is TRUE, we can plot paths for militia jut like for merc groups or the heli.
; To command militia, display militia in the strategic map, then leftclick on a sector with militia in it.
; This requires either control and staffing of a military HQ, a merc in the same sector/town, or a radio operator in an adjacent sector.
;
; : If ALLOW_MILITIA_STRATEGIC_COMMAND is TRUE, ALLOW_MOBILE_MILITIA and its subsequent settings are IGNORED!
;------------------------------------------------------------------------------------------------------------------------------
ALLOW_MILITIA_STRATEGIC_COMMAND = FALSE
This actually was a lot harder then I expected. While I know now how to make essentially any faction (civs, zombies...) travel, I don't currently plan so...
Updating this for individual militia will be a bloody nightmare.
Does not break savegame compatibility.
Requires exe r7727 and GameDir r2204.
[Updated on: Mon, 09 February 2015 13:07]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
This applies to ALL militia. There never was a difference between static and mobile militia to begin with - militia outside of town was simply allowed to occasionally move, which made it somewhat mobile.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
This gives me more of an incentive to move all of a town's items into one sector and then train from there, but that's okay, it makes it more like a HQ for the town.
As of r7731, the nighttime movement penalty to militia groups no longer applies for movement inside a town. I figured the player might just want to rotate his troops, no need to punish him for that
As simultaneous attack of mercs and militia are a good thing in my book, arrival in an enemy-occupied sector can now be coordinated, like it can be for merc squads. If multiple groups are inbound for the same location, the usual prompt will show up and allow to wait until all groups are in place (r7733).
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Perhaps I shouldn't ask about that, but I just can't wait to play with all those great options: When do you plan to release a stable (r7733?) version with all this great stuff?
Stable? I hope not in the next few years, because the last stable was lots of additional work.
These new features are in the unstable, however, which DepressivesBrot regularly updates. The only difference between 2014 stable and unstable is that the stable does not receive any new features created after Jan 1st 2014. And we don't update that thing anymore, because there is no reason to update a branch that wont get any more releases anyway.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
This feature will be in the newest SCIs from DepressivesBrot, linked above. I don't know the exact date he released the last one, so the newest code from 1 or 2 days ago might not be in, but this is the easiest way to get up-to-date exes.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
When clicking on a sector to start militia pathing, and the sector does not have static militia but militia groups, select the last militia group instead of creating a new empty one. This removes the issue where clicking on a sector whose militia are all in movement groups creates a new, empty group. Now the last group of the list is selected (realistically, that's what you want in over 90% of the times anyway).
The final sector in a militia group's path is shown while plotting in the strategic map. Usefulin case you forgot where you sent your team to...
Militia can now retreat from autoresolve if one clicks the 'retreat' button. However, this command needs to be given to them by our mercs, thereby fitting in with the rest of the feature. Like stated in the first post, a merc can order militia if any of the following are true:
they are in the same sector
they are in the same town (otherwise we'd have to do tedious town-internal travel)
they are a radio operator in an adjacent sector
they are a radio operator in a sector adjacent to the militia's town
they are a radio operator in a town adjacent to the militia's sector
the military HQ is staffed by qualified personnel
If the militia was in a group, they will retreat to the sector they came from. If they were static (like, say, in a city) they will retreat to the closest (in regards to travel-time) non-hostile adjacent sector. If no such sector exists, they will stay in the sector of the battle, 'cause what else am I gonna do?
Note that, as to keep this in line with the general enemy and militia movement behaviour, they will move to this sector instantly.
[Updated on: Sat, 21 February 2015 01:40]
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Now I think I already noticed bug like this one mentioned around, but couldn't find the post and I possibly got another one, so here we go:
In this saved game, for build 7835, if you try to issue order to militia in C5 sector, you'll get assertion failure on line 606 in Strategic Movement.cpp, Invalid IDENTICAL waypoint being added for group ID4. AM 0
There was similar problem in E13, you know.
Also, when you enter tactical in E13, you will notice some stuff got moved into unreachable location. In case of this sector its just Brenda's wardrobe, so no big problem. But I think same problem caused lots of unreachable things in C13 Drassen and this stuff is gonna be there for ever now. This happens even after I move all militia away (using radio), so may be it's a different bug.
Should it help you somehow, in this saved game for build 7866 http://ulozto.net/xRzqNtRH/movementbugeverywhere-zip
you get assertion error on line 2935 in Strategic Movement.cpp when you try to issue order to any militia.
This happened after I called reinforcement from neighboring sector to a farm in B8, when enemy entered sector. Before battle, trying to give order to that group already meant assertion error.
Here is a saved game http://ulozto.net/xZ8eBMuP/movementbug-zip
The error you get in this one is Assertion Failure on 3314 in Strategic Movement.cpp, Group 65 (AI) attempting illegal move from sector 16, dir 3 (EDGEOFWORLD).
Hmm. Fixed a number of possible bugs from these saves in r7876. However, the problem remains that movement is yucky. There are several instances where past waypoints aren't properly erased, thereby possible screwing up future movements. You can remove that yourself, by selecting a group and then right-clicking, thereby erasing the previous movement plans. Afterwards, issue the movement order as normal.
However, the entire strategic movement code (whether for mercs, enemy or militia) is relatively volatile. There are parts of the code that are unsafe or even wrong, and the game simply works because those functions are never called in a certain way (e.g. I fixed an issue where a pointer was NULLed and then used immediately afterwards again). SirTech's method of error handling - 'if there is an error, crash the game' - isn't exactly helping.
For no, upgrade to this exe if possible, and clear militia movement orders before issuing new ones.
The inaccessible gear does not seem militia-related (considering that lots of that gear is LBE). Not sure how to fix that though.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Thanks. I already solved the problem the way you suggest - seems to be ok now.
And yes, the problem with stuff is probably unrelated - it has manifested now in my saved game in more harsh way and it seems to have appeared during a battle where there was not even militia reinforcement. Before it there was like 5000 items in sector and after it 10 000, many inaccessible, way to many kits, and later on things multiplied in neighboring sector...If I figure out any reasonable cause I post in proper thread, but I guess I wont spot the actual point, where the bug occurs in this case.
I'm getting a bug that sounds similar to the one described above: a CTD when you attempt to move a militia unit in the strategic map. The militia are in C9 and they are being led across country to reinforce Chit Mine. I could've just gone to Chit mine and trained them there, but I wanted to fiddle with these features and see how they work.
This problem seems a bit different though and I'm not sure your explanation for why it was happening up above would apply. Reason being: militia movement into three of the adjacent sectors causes CTD (C8, B9 or C10), but movement to D9 is legal and functional and causes no errors.
That was in fact how I got around it. I just moved them to D9, then took them west along the D-sector path.
I fixed a bug in r8243: If a sector had more than MAX_STRATEGIC_ENEMY_GROUP_SIZE militia (as in, not already moving), then attempting to plot a path with those militia caused the militia count to be cut to MAX_STRATEGIC_ENEMY_GROUP_SIZE, thereby removing militia.
Theoretically this could also happen to the AI, but as troops in groups are always created out of thin air, this likely never happens.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
As you might now, the old mobile militia feature has been deleted, so this is now the only way to move the green guys. In case someone is now heartbroken that they need to take Alma in order to swamp the country with militia, fear not: as of r8548 & GameDir r2415, if MILITIA_STRATEGIC_COMMAND_REQUIRES_MERC is FALSE (default TRUE), militia can always be commanded from strategic screen, regardless of whether you control the HQ or mercs are nearby.
Also useful if one were to test militia autoresolve behaviour without constantly teleporting mercs around
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Messages:65
Registered:July 2001 Location: Birmingham, UK
When moving these militia, is it possible to split the group before moving? I have 20 in a town sector and I'd prefer to keep 10 back (until I can replace them) but I can only move the whole sector-full of militia.
Also, If I have 10 militia in a sector and try to move 20 more into that sector, it seems they don't/won't move...because it exceeds the limit of 20 militia per sector??
Eh, yes. Like seen in the video, there are small '+' and '-' signs in the troop counter in the small pop-up that appears while plotting a path.
Stupid question: if you gave them a moving order, did you wait the time for them to arrive?
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Messages:65
Registered:July 2001 Location: Birmingham, UK
I'm not able to see the video...(due to this computer I'm using).
Yes, I did wait (a long time) for the militia to arrive...but I will give it another go and wait a gameday or so if necessary.
It wasn't a stupid question but I wasn't stupid enough to overlook that possibility...for once!
At least now I know what to look for I should be able to get it working.
Messages:65
Registered:July 2001 Location: Birmingham, UK
Flugente,
I finally got the knack of moving just a few militia. The 'walking man' turns into a pointer when positioned correctly (but I can't see any +- icons... Anyway, I'm now able to do what I wanted, thanks.
There is a technical issue. If I have Drassen (for example) loaded with 20 militia in each town sector and I move 20 from one sector into the wilderness, I'm unable to manually move militia (via the in-town method). I presume it's because the 20 militia I've ordered away are still technically in their original sector until they complete their move...
However, if I use the 'auto' redistribution button, then 13 or 14 militia will be allocated to this town sector.
First, forgive me please for posting here. I have experimented over 2 days with this feature and watched the video even at 1/4 speed over 20 times.
Like, 3iff, I cannot for the life of me figure out how to select another group, nor add or subtract by any +- icons. Non show on the upper left Groups List pop-up in SCI Build 8589. Non show on the sectors, that I can see at 1024x768. Using any plus or minus key, either from the row of numbers at top row of keyboard, or from numpad, with or without Numlock on, do anything. (These Militia are all in the TOWN SECTORS of Drassen, if that limits anything, which it might)
In addition, if I may say so, the video does a lot of things, but a lot more is going on than most people can figure out for themselves:
1) I believe some right clicking and some left clicking is done. Right clicking cancels previous moves of the selected group, but to know that you have to review much of the video to follow as nothing is explained step by step in text anywhere, not even in the description on YouTube.
2) The Next Column shows the next sector on the path, so you have to be aware of that. It does not show final destination, that is shown, as Flugente says only on the Strategic Map on mouseover of the Militia Group.
3) Within a Town Sector, as 3iff states, you can't separate groups unless there is some more detailed explanation as to how to do it. Luckily you can Right click on any Town Sectore STILL, and allocate Militia Numbers within a town.
4) Although the Coordination of Militia and Merc Group Simultaneous Arrival prompt does come up once the first group is due to arrive in that sector, there are lots of concerns with it for a noob user. First, Militia seem to not move at all at night. You can wait for 5 plus hours for them to arrive together. For me, the Mercs actually were shown in the Destination sector, but at first could not be selected, which I presumed would be consistent. But daylight and 9am came and still nothing. I found by accident that my Mercs were selectable and able to be used in Tactical even without the Militia being there, that is they were totally usable in the DESTINATION SECTOR, without the Militia having arrived. (? <shrug>?)
5) As Flugente points out, your Militia do not actually arrive until final arrival time. They are not considered, per the game and my understanding of what he said, in transit, but remain in the origin sector or previous sector until they arrive.
5b) This also means that since I do not know how to move only 2 militia of 4 from a Town Sector to another sector, my North Drassen was empty. During which a Bandit Raid occurred <facepalm> and killed a civilian, even though the Militia were onway to the sector, and even though the Mid Drassen sector had Militia in it. So this means that RAIDS/AMBUSHES such as Bandit Raids, Zombie Raids, and Bloodcat Raids do not trigger adjacent sector reinforcement since they are attacking civilians only (my guess as to the reasoning). So if you move militia out of a town sector, you better reallocated the remaining in the town to cover that exited sector.
I'm trying not to express my huge frustration too much.
** If someone could please detail in a step by step manner how to change the group size from the default of all Militia to a lesser number, or how to create another group, I'd be much obliged. I was unable to do this using left click, right click, cursor keys, number keys, numpad keys, minus or plus buttons. Plus one needs to know WHEN in the process, after choosing a destination or after highlighting such and such, one then does such adding or subtracting. It is much more complicated (IT SEEMS) than just following the description above or that video.
Perhaps someone might create another video at higher resolution or zoom showing such steps. If I figure out how it is done, I will do my best to write the steps required. At this point, all I can think of is that unless I can create 2 groups I will not have the option. But this is not possible from the same Militia Start Sector. One must first start by moving Militia Groups from 2 different sectors to create 2 Moving Groups. Then maybe these plus or minus icons , if any, will show up. Going to try that next.
If need be, move this post to wherever required. I simply wanted to make clear that over an 2-3 hours experimentation and research did not clear this up for me yet.
Just to update on the 8589 SCI Revision game. It seems that any coordinated move ends up with the Mercs being screwed up afterwards for movement. Although it is daylight and although Kaboom has Ira with him, it is now well over 3 hours to go back west from the Sector East from North Drassen. The Militia returned okay, but the Mercs show as heading from B14 to B13, but there is no ETA given, and it has been over 3 hours since the command was given.
Meanwhile I now cannot redistribute the Militia in the Town Sector because it considers any enemy patrols inbound to a sector as locking such Militia allocation out, as well as disabling moves within the town sectors.
I I don't entirely get those problems. Using r8598 works exactly as in the video. The only way to increase or lower the amount of troops moving is via the little overlay from the video, clicking anywhere else won't do anything.
If you don't have the overlay to begin with, something is wrong. ALLOW_MILITIA_STRATEGIC_COMMAND is still TRUE, right?
AI groups get a penalty when moving at night. Enemy groups have a chance to get a delay, for obvious reasons that would be a bad choice for player-ordered movement, so I made it a smaller but guaranteed penalty.
Militia reinforcements are triggered when they can reinforce someone to begin with. If there is nobody there, no fight happens, so they can't reinforce, same way as for enemy forces.
As to the creation of a second group, this works if there are still troops not assigned to move in there (such as if you've clicked the minus before) the moment you click on the sector again. You can then choose between groups to move on the overlay.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
2)Finally got the minus and plus over a single militia group to show and work, that's a big step.
3)Had another weird Bug happen with Militia:
a)Currently there are Militia in S and N Drassen, Mid Drassen became empty to reinforce the South after a Zombie Raid, then an immediate Enemy Attack. Actually, I just remembered there may be 1 zombie left in S Drassen which may be key. (THERE IS NO ZOMBIE LEFT, I HAD KILLED IT. At one point someone said Sniper, after a Militia accidentally shot one of my men. I do have more than 10 Militia in that sector, there is a small chance I may have an Assassin, but I believe I am below the 25% story progress, so no -- I don't know what warning you get when you have an Assassin/Militia Traitor). In case it matters, all Mercs are tasked out in S Drassen now and one civilian acts jumpy.
b)So South Drassen is Greyed Out in the Militia Allocation Screen available via Right Click. I could not select South Drassen, probably due to combat. I could select other sectors.
c)Just for the hell of it, I hit Auto Allocate (for Militia). Result was a "Possible Error: Not Enough Individual Militia in PickIndividualMilitia" or a message very similar in log at bottom colored in Red. PLUS, I gained Militia every time I did AutoAllocate, going from 5 in North, 0 in Mid, 14 in South, to after several AutoAllocates, 13 in each Drassen Sector.
But there may be some problem with not having enough pre-made named Militia (I did not fool with making those, just used default) and AutoAllocate in such a situation.
I hope after that Ira and Kaboom will finally arrive, but since I get no ETA or Yellow Arrow on the Strat screen (even though the Merc Origin and Destination are updated, arrows may have changed also since seems so for militia arrows), I think they may never come. But if I try command again nothing changes and I don't want to reset the timer each command also (if that happens).
My remaining issues are AutoAllocating of Militia bugs out and creates militia out of the blue, as described in previous post. And so far, my Merc moves are still not working, at least when they had a Militia Group also timed to move with them in coordination. I'll update if Ira/Kaboom team ever arrive.
However, the workaround for AutoAllocating bug is that you can actually use the group moves even in the greyed out sector, so avoidable (but it is a real bug).
For those wondering, next to each number in the overlay -- but actually to the RIGHT of the column of that number for each type of militia, you will see a darker colored dash or hyphen, looking like a minus in dark red or brown. It looks like this sorta:
Group Number Green Mil Vet Mil Elite Mil
127 4 - 2 - 2 -
Ok, so what you have to do is go to the right of the NUMBER of each type of militia and put your mouse cursor over that hyphen or minus. So if you want to reduce or increase Vet Militia, you have to place your mouse cursor almost adjacent to the Elite Mil Number, which is counter-intuitive, but whatever. Now, you have to play with that mouse cursor, because you have a bit of a fudge area around that hyphen to get the mouse cursor to flicker. Once your mouse cursor is flickering, you are either above the reduce minus function, or above the increase plus function. You adjust the values by left-click while flickering. If you reduce the Current Moving Yellow Group, then that number goes into the Unassigned White Colored Group Name above. Whatever is in the Unassigned Group remains in the Original hex. There is not a lot of room to play with this location with the mouse. Increase is a bit higher up than the Reduce function, both are where the mouse flickers, you only get feedback between clicks showing a dark red minus or plus, and it is hard as heck to know which while clicking, so just look at what it does to the Unassigned Group Numbers. The increase mouse area is a tiny bit above the decrease area for me, but both are slightly below the actual number's place adjacent, it is more like just at or a tad below where the hyphen is in height.
Is it possible to move your militia around via skyrider? I recall a feature being showcased in one of the militia improvements was being able to load skyrider with militia and basically use him to airdrop militia in. I recall it being touted as "Making your militia more like your mercs than ever!" but I can't seem to find it anywhere.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
For the life of me, I cannot get this to work. I can only select the entire sector of militia, the columns appear in the upper left, usually named "Unassigned Group XX," and I can select a destination and show a movement path. No matter the ETA to the destination, the militia will not move.
I don't know if this answer will help any. I found that I could not play with this feature IF I also had zombies on. The reason is that the sector will remain often in combat, even after you clear it. So then any Militia using this Strategic Movement Feature will not move, as they consider that there is combat in the starting area, so movement is canceled until that is solved.
My guess is that this is causing the issue. I turned Zombies Off, and instead compensated for it by allowing the Raids with Bandits and Bloodcats to have a higher value for number of attackers during a Raid. This means I larger garrisons to avoid the Raids occurring, and makes Raids more likely since the test for occurrence is Number of Bloodcats or Bandits > Number of Militia + Mercs in City Sector results in a Raid. Otherwise a Raid does not occur.
So I still get a fair amount of chance to use up ammo, although the Bloodcats give valuable pelts, teeth, claws plus the Bandits can provide some drops and experience. I'd rather have Zombies On, as it is experience gained but ammo lost with no drops, but there are just too many possible bugs with Zombies On. You can even end up breaking the starting Fatima/Rebel HQ quest if you have Zombies respawn near Fatima.
So, perhaps try with Zombies Off. You might be able to simply Turn Off Zombies in the in-game Preferences, and if it takes immediate effect, you may find that after you move the clock forward and perhaps reissue any Strategic Move Command, it may work. Might be a good idea to try and exit and then return with Mercs/Militia in the troublesome sector after some clock time passes, also go into Tactical Map after, then see if you can return to Strategic and Move your Militia.
However, back when, I found that once they got bugged, they did not seem to release, but I did not try everything for certain.
Ok, the colour for the + and - in the overlay is something like dark-purple on black, so even if you look at 1:07 of the video, it might be hard to see what's going on.
I did kinda guide on this, with enlarged screenshots showing an example how to split a militia group into two moving groups. Might help if you are as blind as me ...