Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New Feature: Improved ambush
New Feature: Improved ambush[message #340857]
|
Mon, 04 May 2015 01:04
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
As you surely know, if mercs travel around the landscape, there is a chance that enemy patrols will ambush them. Once that happens, battle starts, with no chance of retreat or autoresolve. Your mercs then start combat, grouped together very tightly, all looking in one direction, with the enemy spawning everywhere. Now, while I get that the mercs are ambushed and thus unprepared, I still have a few problems with that:
- Why would our mercs travel so close to each other? This isn't a japanese subway.
- As they all look in one direction, it is very likely the enemy gets the first turn...
- ... and as they are all grouped so close together, a single grenade can effectively be the death of the entire team. Yeah yeah, 'but it's a surprise attack' and everything, but let's be honest. There's no way to avoid that apart from tedious savescumming. At higher difficulty levels, this is practically unwinnable.
- The enemy does not spawn in any cohesive way - they are all placed as usual. Jeez. You almost think they didn't plan the ambush, as if this is just some small code bit to simulate 'ambush' without any effort on Sirtech's part
- Why would the enemy spawn right next to our mercs, at point blank range? How did he come so close?
Yes, I am aware that having a Scout prevents ambushes, but if a part of the game is so undesirable, why not improve it instead?
I have thus added improved ambushes to the trunk. What now happens is that when our mercs are ambushed, we can simply assume that in the few seconds before we enter tactical, they react somewhat. As a result, they are deployed somewhat randomly in a circle around the entry point they'd normally all be clustered at, and look outward to the possibly advancing enemy. This simulates them instinctively facing the danger without really knowing where it comes from.
Similarly, the enemy will no longer spawn at point blank range, they'll spawn a bit apart (after all, they have to first let us walk to the center before finishing their encirclement). How far is up to your ini. And if you want, you can spawn all of them in an encirclement movement.
The old way of ambushing. Our mercs cuddle in the middle, the enemy is all over the place.
The new way of ambushing. Our mercs are a bit spread, facing possible enemy directions, while the enemy has us encircled (minimap) and faces us.
JA2_Options.ini with default options:
; If set to TRUE and mercs are ambushed, they won't start clustered in one location and looking in one direction.
; Instead they will be spread around the map central entry point, no more than AMBUSH_MERCS_SPREAD_RADIUS tiles away, and all looking outwards.
AMBUSH_MERCS_SPREAD = TRUE
AMBUSH_MERCS_SPREAD_RADIUS = 10
; If set to 1 and mercs are ambushed, enemies nearer than AMBUSH_MERCS_SPREAD_RADIUS to the map central entry point will instead be distributed more outward:
; They will be placed around that point, not closer than AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS1 and not further away than AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS2 tiles.
; They will face the center entry point (and thus the mercs).
; If set to 2, all enemies will be placed that way, not just those nearer than AMBUSH_MERCS_SPREAD_RADIUS.
AMBUSH_ENEMY_ENCIRCLEMENT = 1
AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS1 = 15
AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS2 = 30
This is actually not entirely finished, I still have a few more ideas... but still have to code a bit there, while this part here already seems good to go. Note that these are experimental values. I still haven't played with them - it is highly likely that if there are more enemies, you will want AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS1 and AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS2 to be much higher.
This is fully savegame compatible.
This has been added in r7846 and GameDir r2238.
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.Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: New Feature: Improved ambush[message #340935 is a reply to message #340894]
|
Sun, 10 May 2015 13:30
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
As previously announced, I made another improvement here (r7854 & GameDir r2241):
- The enemy encirclement radii are now dependent on your mercs' experience. The reasoning being that if your mercs are more experienced, they notice the enemy sooner, when he's further away... in pseudocode:
radiusmodifier = ( 10 * (merc's experience level) + 50 * (merc is a scout) + (background ambush radius modifier) ) / 100
This modifier is multiplied with AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS1 and AMBUSH_ENEMY_ENCIRCLEMENT_RADIUS2. It is determined for each merc, the highest value counts. - The radii values have also been increased in the ini. Still needs testing, perhaps even higher would be better, feedback welcome.
- A new background property (<ambush_radius>) is used in the above formula, values from 0 to 50. This effectively increases the range at which an enemy can appear in an ambush, and has been added to some backgrounds - mostly to special forces and mercs very experienced in ambushes.
- If your team has a member that is a very, very good leader, we presume they are quick-witted and determined enough to organize your team before combat - you can then deploy your mercs around the central entry point.
The check needed to pass is
leadership + 50 * (number of squadleader traits) > 120 (new trait system)
respectively
leadership + 30 > 120 (old trait system)
It is determined for each merc, the highest value counts.
As we can only draw rectangular overlays in this screen, some parts of that rectangle are inaccessible (as the allowed deployment zone is a circle), but that is a graphical 'bug' only.
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.Report message to a moderator
|
|
|
|
Re: New Feature: Improved ambush[message #346769 is a reply to message #340935]
|
Thu, 01 September 2016 14:47
|
|
Boojum |
|
Messages:11
Registered:September 2016 |
|
|
Excuse me, but it is quite strange. There are 4 mercs who can organize the team before combat (Miguel, Raider, Leon, and Gus). After the short training Scream is able to do this too. But with the old trait system only Miguel can do this, because merc's leadership must be > 90 for this action. Maybe that value of 90 could be a bit lowered?
Report message to a moderator
|
Private
|
|
|
Re: New Feature: Improved ambush[message #346776 is a reply to message #346769]
|
Thu, 01 September 2016 20:33
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
One can always argue which values are correct. As this should be really hard to pull off, the value seems fine to me.
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.Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Thu Dec 12 17:03:37 GMT+2 2024
Total time taken to generate the page: 0.01071 seconds
|