Home » MODDING HQ 1.13 » v1.13 Feature Requests » [Request] Easier Landmine placement
[Request] Easier Landmine placement[message #357438] Tue, 28 May 2019 20:28 Go to next message
smeagol

 
Messages:2733
Registered:June 2008
Location: Bremen, Germany
The mine placing process when no enemies are around is way too time consuming and tedious. Especially with certain kinds of low damage mines this is very likely not worth the spend time (like newly added to AIMNAS PFM-1 butterfly mines... or soon to be added gravel/button mines... which have very low amount of explosives and very light weight, so you need to place A LOT of them to make them even useful... but I really don't look forward to actually placing those little nasties in maps... each time the placing animation for a mine that most certainly will only hurt a guy for like 10-15 damage? no thanks...).

I'd like to suggest an easier placement method for mines (Main problem is, that the animation is very long, therefore I suggest, that we only use the time consuming animation once, after a bunch of mines is placed).

One idea could be, to use the mouse wheel to adjust number of mines to be placed within one animation and then use the cursor with shift or ctrl pressed to select the tiles that will get a mine, double click confirming the placement. skill check should of course be done for each mine seperately, perhaps detonating mines when the check is failed. The merc should probably just remain in the tile he started the action and perform the animation in that tile. Could make planting mines (and / or even fortifications maybe?) way more convenient.

Limit of placebale objects could either be amount carried in merc inventory or directly from sector inventory?

Of course this placement should only be allowed when no enemies are around. Using mines could even lower loyalty in adjacent towns due to danger to civilians.

Also mines are too easy to detect. There could be a modifier for skill check (we already have no metal detection, maybe a tag like "hard to detect" could increase trap level by 2 levels, or maybe a float value).


Re: [Request] Easier Landmine placement[message #357439 is a reply to message #357438] Tue, 28 May 2019 22:03 Go to previous messageGo to next message
silversurfer

 
Messages:2603
Registered:May 2009
Where is the fun in detonating a mine far away from the merc after he failed the skill check? No, I think the placement is working fine as it is.

The only downside I see currently is the need to put the mine into the mercs primary hand. However, we can't simply use a similar item from sector inventory because item status matters, you know? What we could do (maybe) is to "load" another item of that type from the mercs inventory into the primary hand. With that method you could place one mine after the other. You'd only need to load a bunch of mines on the merc.

Detection chance for mines is based on trap level which is based on the skills of the merc who placed them (unless pre-placed by map author). So better use someone with good explosives skill and experience to place mines. Demolitions trait increases trap level by 5 (default value) to a possible maximum of 13 currently.
However, there seems to be a bug, design error or something with the trap level.

The default trap level calculation (old traits) is:
pSoldier->inv[ HANDPOS ][0]->data.bTrap = __min( 10, ( EffectiveExplosive( pSoldier ) / 20) + (EffectiveExpLevel( pSoldier ) / 3) );
Even with a perfect merc you can't get higher than 8.

New traits modified this to:
pSoldier->inv[ HANDPOS ][0]->data.bTrap = __min( max( 10, (8 + gSkillTraitValues.ubDEPlacedBombLevelBonus)), (( EffectiveExplosive( pSoldier ) / 20) + (EffectiveExpLevel( pSoldier ) / 3) + gSkillTraitValues.ubDEPlacedBombLevelBonus) );
The max trap level is the old default 8 + demolition trait bonus. Again, why 8?
I'd say that the calculation with old and new traits should allow a reachable maximum of 10 or higher with demolition trait. For that we should replace the calculations with:

pSoldier->inv[ HANDPOS ][0]->data.bTrap = __min( 10, ( EffectiveExplosive( pSoldier ) / 20) + (EffectiveExpLevel( pSoldier ) / 2) );
and
pSoldier->inv[ HANDPOS ][0]->data.bTrap = __min( max( 10, (10 + gSkillTraitValues.ubDEPlacedBombLevelBonus)), (( EffectiveExplosive( pSoldier ) / 20) + (EffectiveExpLevel( pSoldier ) / 2) + gSkillTraitValues.ubDEPlacedBombLevelBonus) );
respectively.

Makes sense?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: [Request] Easier Landmine placement[message #357440 is a reply to message #357439] Tue, 28 May 2019 22:31 Go to previous messageGo to next message
sevenfm

 
Messages:2007
Registered:December 2012
Location: Russian Federation
silversurfer wrote on Wed, 29 May 2019 00:03
The only downside I see currently is the need to put the mine into the mercs primary hand. However, we can't simply use a similar item from sector inventory because item status matters, you know? What we could do (maybe) is to "load" another item of that type from the mercs inventory into the primary hand. With that method you could place one mine after the other. You'd only need to load a bunch of mines on the merc.
As far as I remember, auto taking of mines was implemented years ago:
sevenfm wrote on Sat, 23 November 2013 20:02
Small convenience feature - improved bomb planting.
With new option IMPROVED_BOMB_PLANTING = TRUE, if you hold SHIFT key while planting new mine, then another mine with same item id will be taken automatically from your merc's inventory. If no such item found, any mine will be taken. If you plant tripwire-triggered mine, then only tripwire-triggered items will be taken. This new feature work only in realtime.
If you are making tripwire network, then this feature can be used to plant another tripwire item with network and hierarchy settings taken from previously planted tripwire. You just plant tripwire as usual, selecting it's settings from dialogue, then if you plant another one while holding SHIFT key, those settings will be used for new tripwire, instead of showing you dialogue.
http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=12557&goto=328470&#msg_328470
I even made a small video demonstrating quick tripwire/mine placement

If you hold SHIFT when clicking to place mine/tripwire, similar mine/tripwire will be taken from inventory after planting, also the game remembers tripwire settings so you don't have to select level/network every time.
r6647, r6876, r6982



7609+fix | 7609+AI (r1386) | Unofficial modpack | Win8+ fix | Experimental project | Youtube

"It's already "dog-eat-dog", friend. Not sure what worse a bunch of zombies could do."


Re: [Request] Easier Landmine placement[message #357441 is a reply to message #357440] Tue, 28 May 2019 23:01 Go to previous messageGo to next message
smeagol

 
Messages:2733
Registered:June 2008
Location: Bremen, Germany
Well, well, well... you can teach old dogs new tricks... never knew about this. Well, then consider this feature request long time ago done. Actually works ingame and is reasonably fast to even allow putting down huge amounts of mine fields rather easily. Thumbs up!


Re: [Request] Easier Landmine placement[message #357442 is a reply to message #357441] Tue, 28 May 2019 23:09 Go to previous messageGo to next message
sevenfm

 
Messages:2007
Registered:December 2012
Location: Russian Federation
@smeagol
It should be easy to quickly plant dozens if not hundreds of mines with this feature - just put many mines into merc's backpack and then hold shift and click, click, click.
If you also set high game timer or hold [-] (which can be redefined to another key) while planting mines, it will be much faster.
I once had an idea of making reusable tripwire networks or advanced mine planting when you can deploy many mines/tripwire with one click, but unfortunately it was never implemented.



7609+fix | 7609+AI (r1386) | Unofficial modpack | Win8+ fix | Experimental project | Youtube

"It's already "dog-eat-dog", friend. Not sure what worse a bunch of zombies could do."


Re: [Request] Easier Landmine placement[message #357446 is a reply to message #357442] Wed, 29 May 2019 01:21 Go to previous messageGo to next message
silversurfer

 
Messages:2603
Registered:May 2009
Thanks Sevenfm, it seems that what I had in mind is exactly how it already works. big grin

I guess I should still fix the trap level calculation or do you think we should leave it as it is?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: [Request] Easier Landmine placement[message #357447 is a reply to message #357446] Wed, 29 May 2019 07:58 Go to previous messageGo to next message
sevenfm

 
Messages:2007
Registered:December 2012
Location: Russian Federation
silversurfer wrote on Wed, 29 May 2019 03:21
I guess I should still fix the trap level calculation or do you think we should leave it as it is?
Looking at the code
pSoldier->inv[ HANDPOS ][0]->data.bTrap = __min( max( 10, (8 + gSkillTraitValues.ubDEPlacedBombLevelBonus)), (( EffectiveExplosive( pSoldier ) / 20) + (EffectiveExpLevel( pSoldier ) / 3) + gSkillTraitValues.ubDEPlacedBombLevelBonus) );
Max trap level is limited to 10 without skill and 13 with skill, while max trap detection level can be as high as 16 with skill (or 16 - 21 when examining).
I think changing the code to
pSoldier->inv[ HANDPOS ][0]->data.bTrap = EffectiveExplosive( pSoldier ) / 20 + EffectiveExpLevel( pSoldier ) / 2 + gSkillTraitValues.ubDEPlacedBombLevelBonus;
should be ok as it will allow trap level as high as 15 which still can be detected with skilled soldier.
Or taking wisdom into account like
pSoldier->inv[ HANDPOS ][0]->data.bTrap = EffectiveExplosive( pSoldier ) / 20 + EffectiveExpLevel( pSoldier ) / 3 + EffectiveWisdom( pSoldier ) / 40 + gSkillTraitValues.ubDEPlacedBombLevelBonus;



7609+fix | 7609+AI (r1386) | Unofficial modpack | Win8+ fix | Experimental project | Youtube

"It's already "dog-eat-dog", friend. Not sure what worse a bunch of zombies could do."


Re: [Request] Easier Landmine placement[message #357451 is a reply to message #357447] Wed, 29 May 2019 12:43 Go to previous message
silversurfer

 
Messages:2603
Registered:May 2009
After further examining the code I'm not so sure anymore if we should change the formula. There are more modifiers to trap level than Demolitions trait. We also have <traplevel> in Backgrounds.xml and <bTrapBonus> in the additional tile properties.

With the modified formula and a perfect merc we could get these max trap levels:

10 from stats
15 from stats + demolitions trait
16 from stats + demolitions trait + background
17 or 18 from stats + demolitions trait + background + tile properties

The question is if we want to make some mines undetectable like this even with a metal detector (if flag NO_METAL_DETECTION is set for the item). It takes a level 10 technician with >80 wisdom to even reach 16 detection level. Of course all of these are extreme values that are usually not reachable unless you build a custom merc and train him heavily.

I think the original JA2 maximum trap level of 8 was a bug but now it is actually quite fitting because we can still reach 8, 13, 14 or 15 (16) trap level with the right stats and terrain. All of these are detectable by the right merc.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Previous Topic: Dynamic music
Next Topic: Likely crazy but... Voxels in JA2?
Goto Forum:
  


Current Time: Tue Dec 10 09:39:18 EET 2019

Total time taken to generate the page: 0.01669 seconds