Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New Feature: drag people & corpses
New Feature: drag people & corpses[message #350989] Sun, 17 September 2017 00:16 Go to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Once a merc has no APs left, they cannot move. This can lead to situations where, well, mercs die, even if allies are around, because they cannot help them.

Now they can.


This is simple. If a merc is crouched and the main hand is free, they can grab a prone person (even hostile) or corpse next to them (press $ to get the selection menu). If they then move, whomever they drag moves along. Their AP cost for movement is increased according to
; AP costs for movement are multiplied by this if we drag someone.
; Valid values are from 1.0 to 10.0 .
; Default is 1.5
DRAG_MOVEMENT_APCOST_MODIFIER		= 1.5

in Item_Settings.ini. As I am not good with graphics, the fact that a merc currently drags someone is now marked with the runs of chaos undivided on the merc's face (see Fidel's portrait in the above video).

  • I am fully aware that the grapics aren't exactly to write home about, but hey. Would be weird otherwise.
  • While it would be slightly more reasonable (and useful) if the dragged person would look away from the dragging merc, this causes issues, as then the prone person's legs would be in the same location as the merc, so I don't do that.
  • After careful consideration, I've decided that only the main hand needs to be free (unlike in the above video). This will make this a bit more userfriendly. No more need to send me images from your favourite gung-ho movie about how people drag around fully equipped soldiers with one hand while suppressing full auto with an M4 in their other hand.
  • I've fiddled around with movement a bit more, corpses now move a little bit smoother compared to the video.
  • As the overwhelming majority of the feedback called for the weight of the dragged person to be taken into account, it now is taken into account during breath point calculation. We add the other guy's inventory weight, and the estimated weight of the person (or corpse) to our weight. The estimated weight depends on bodytypes and was hardcoded by me, which will stay that way.

    And no, dragging somone a few meters doesn't suddenly drop breath to a half. You people have no issues stuffing a merc with 2 ARs, dozen grenades, mortars and body armour and expecting them to jump around, so don't suddently complain about non-realistic behaviour angry

This feature has been added in r8474 & GameDir r2386.
This is fully savegame compatible.
Using the new exe without the new GameDir will cost you dearly.

[Updated on: Mon, 18 September 2017 01:28]




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

Captain

Re: New Feature: drag people & corpses[message #350991 is a reply to message #350989] Sun, 17 September 2017 03:37 Go to previous messageGo to next message
BattleGnome is currently offline BattleGnome

 
Messages:60
Registered:April 2016
Very sneaky! Now my medics have a chance to heal a downed merc who was flanked or caught in the open without the medic having to be sent on a suicide mission; they can just drag the downed merc into cover first.

As to the action point cost: would it perhaps make more sense for the cost to be dynamic based on the strength of the crouched merc realative to the weight being carried by the prone / unconscious merc? A merc should not be able to move another merc carrying 100kg of gear as easily as they could move a merc carrying no gear at all. Maybe this could be done by counting the weight of the prone merc as part of the couched mercs weight and letting it affect their AP the same way it would if the crouched merc was carrying all that gear themself.

Report message to a moderator

Corporal
Re: New Feature: drag people & corpses[message #351001 is a reply to message #350991] Sun, 17 September 2017 15:42 Go to previous messageGo to next message
Someone64 is currently offline Someone64

 
Messages:47
Registered:May 2015
Location: Philippines
Wouldn't this lead to funny situations where a viable tactic is to have a prone sniper with a very slow sniper rifle be dragged around by another merc so he can use his APs for firing instead of moving in and out of cover?

Report message to a moderator

Corporal
Re: New Feature: drag people & corpses[message #351006 is a reply to message #351001] Sun, 17 September 2017 23:04 Go to previous messageGo to next message
Panzer is currently offline Panzer

 
Messages:89
Registered:February 2016
Location: Altis, Sometimes Tanoa
He makes a good point.


I have no Wife, Children, or real Job. This also means I have 24 hours a day and 7 days a week to think of a rebuttal. You have been warned.

"I got another problem: I am being overrun by Dinosaur Nazis on Hoverboards!" -Ravenhugger

"Before you judge a man, walk a mile in his shoes. After that who cares? He's a mile away - and you've got his shoes!" - Unknown Criminal

Report message to a moderator

Corporal 1st Class
Re: New Feature: drag people & corpses[message #351008 is a reply to message #351006] Mon, 18 September 2017 01:33 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
As SVN is back up, this feature has been added in r8474 & GameDir r2386.
This is fully savegame compatible.
Using the new exe without the new GameDir will cost you dearly.

  • I am fully aware that the grapics aren't exactly to write home about, but hey. Would be weird otherwise.
  • While it would be slightly more reasonable (and useful) if the dragged person would look away from the dragging merc, this causes issues, as then the prone person's legs would be in the same location as the merc, so I don't do that.
  • After careful consideration, I've decided that only the main hand needs to be free (unlike in the above video). This will make this a bit more userfriendly. No more need to send me images from your favourite gung-ho movie about how people drag around fully equipped soldiers with one hand while suppressing full auto with an M4 in their other hand.
  • I've fiddled around with movement a bit more, corpses now move a little bit smoother compared to the video.
  • As the overwhelming majority of the feedback called for the weight of the dragged person to be taken into account, it now is taken into account during breath point calculation. We add the other guy's inventory weight, and the estimated weight of the person (or corpse) to our weight. The estimated weight depends on bodytypes and was hardcoded by me, which will stay that way.

    And no, dragging somone a few meters doesn't suddenly drop breath to a half. You people have no issues stuffing a merc with 2 ARs, dozen grenades, mortars and body armour and expecting them to jump around, so don't suddently complain about non-realistic behaviour angry
AP cost does not depend on weight, breath does, which is what happens now. AP cost can already be set higher by DRAG_MOVEMENT_APCOST_MODIFIER.

Yes, one can drag around a sniper. Note that if you want to get the sniper in firing position, the merc doing the dragging will have to move in front of them, which will put them into the firing line. The 'dragger' also now has way fewer APs, so he likely cannot shoot himself, which seems like somewhat of a compromise.
Yes, you could create a situation where cheap mercs effectively shuttle a sniper around, but... what's the point, really?



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

Captain

Re: New Feature: drag people & corpses[message #351014 is a reply to message #351008] Mon, 18 September 2017 11:28 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Awesome feature again - nice!

Report message to a moderator

Master Sergeant
Re: New Feature: drag people & corpses[message #359263 is a reply to message #351014] Wed, 25 March 2020 21:56 Go to previous messageGo to next message
Deleted.

 
Messages:2657
Registered:December 2012
Location: Russian Federation
Noticed that when dragging corpses, merc can move in normal or alt mode, but dragging people is only possible in alt mode, in normal mode the dragged person is dropped soon. Is that intentional?


Left this community.

Report message to a moderator

Lieutenant

Re: New Feature: drag people & corpses[message #360547 is a reply to message #359263] Thu, 09 July 2020 23:48 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
It wasn't, no. The issue was that in the function where we move our soldier (and whatever they drag), we move the soldier before we move whomever they drag - which caused the game to notice we were too far away, and thus cancel the dragging action. Fixed in r8855.


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

Captain

Re: New Feature: drag people & corpses[message #360672 is a reply to message #360547] Fri, 24 July 2020 01:07 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
BEHOLD:



  • We can now drag any 1-tile, structure that is not a wall/roof/light/switch/person/corpse/vehicle/cavewall/fence and is defined in TableData/Items/StructureMove.xml. In there we have entries like this:
    <STRUCTURESLIST>
    	<STRUCTURE><!--  -->
    		<szTileSetDisplayName>Gas cylinder</szTileSetDisplayName>
    		<szTileSetName>ASTUFF1.sti</szTileSetName>
    		<allowedtile>0</allowedtile>
    		<allowedtile>1</allowedtile>
    	</STRUCTURE>
    
    that define what specific tiles from which tileset can be dragged, and under what name.
  • We obviously can't drag through walls, or into water etc. The structure will be placed in the tile we just left when we move.
  • Ordering a merc to drag a structure works as usual: be in crouched position, have your main hand free and be next to the thing.
  • If the item is a container, moving over items will place them inside. Otherwise the items will be placed on top.
  • Items now also move with dragged corpses. This has the amusing sideeffect of corpses functioning like vacuum cleaners, though they do leave obvious marks behind...
  • No, you cannot move minefields this way. Mines and some action items don't move, which we saw in the video with the switch-activated explosion. Traps on locks do, however, which Trevor shows off.
This feature has been added in r8870 & GameDir r2558.
This is fully savegame compatible.
Using the new exe without the new GameDir will cause your mom to publically denounce you as an asset flip.

[Updated on: Fri, 24 July 2020 01:12]




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

Captain

Re: New Feature: drag people & corpses[message #360673 is a reply to message #360672] Fri, 24 July 2020 05:49 Go to previous messageGo to next message
Hawkeye is currently offline Hawkeye

 
Messages:2433
Registered:October 2005
Location: Australia
Nice feature, will Fox have interior design as a trait now? big grin

This should add some more flexibility with dealing with a counter attack, or opening locked doors when there's no explosives or lock-picking specialists around.

What's the deal with some of the names of each prop? Gas cylinder for oil drums? Could you add different sound effects dependent on item? though a screeching locker in game would be too grating for the ears after a while.

Seems a step closer to the build your own base like in the old days of X-Com, if things like walls and fences were 'moveable' or buildable, at least to some degree you can create more open plan 'renovations'.

Report message to a moderator

Lieutenant

Re: New Feature: drag people & corpses[message #360674 is a reply to message #360673] Fri, 24 July 2020 10:52 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
I hope this feature doesn't lead to deadlocks, when people barricade themselves inside buildings and the enemy tries to find a way inside.


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

Report message to a moderator

Lieutenant
Re: New Feature: drag people & corpses[message #360678 is a reply to message #360674] Fri, 24 July 2020 19:13 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Yeah, I foresee someone raiding all the houses in D13 and preparing for the DCA by hunkering down in a cupboard/oven/chair bunker.

I looked at each and every vanilla tileset, so at some point it became tedious and I just made one entry for every tileset, thus the not always fitting names. It's no problem to make the names fit better by dividing the entries though, in case someone wants to do that work ;)

Different sounds would be possible by adding another tag to the xml, but... do we actually have a large collection of different drag sounds to begin with?

Theoretically you can drag anything. I had my share of fun with my mercs demolishing houses by dragging away the walls during development. Or them dragging around cars, or trees... theoretically they can drag light.
It would be possible to move an entire house, it would just require a bit of code voodoo.
I added restrictions later on. The most important one being that we can only drag 1x1-structures, because we can be sure those will fit the gridno the merc just left. Otherwise you have weird issues with structures blending in, which is not a good thing.
As there then was the issue that some draggable things wouldn't be draggable in RL, like trees, or solid columns and statues. Thus I added the xml.

The AI no longer finding a path is more an AI issue, though I have an idea or two for that. Generally the pathfinding takes these things into account though, so I haven't found an issue so far.

As we can only drag and not push though, there is the amusing possibility of the player accidentally walling themself in and not being able to free themselves without 'outside' help. I see no good way to implement pushing, as that would require the merc to walk into the place currently occupied by the structure, which the code takes care to ensure not to happen.
The best idea I can think of is 'merc moves structure by kicking it', which would be very amusing but tedious to code and order ingame.
We could add a 'merc dropkicks fridge onto next tile, this squishes an enemy standing there' moment, which would at least be chuckleworthy for a moment.



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

Captain

Re: New Feature: drag people & corpses[message #360680 is a reply to message #360672] Fri, 24 July 2020 22:40 Go to previous messageGo to next message
Kitty

 
Messages:473
Registered:October 2017
Location: Germany
Flugente wrote on Fri, 24 July 2020 01:07



... structure that is not a wall/roof/light/switch/person/corpse/vehicle/cavewall/fence ...

On which definition is this exclusion based ? Is it jsd-Flags? Or based on Index-Nr in ja2setdat.xml ? Or something completly different?

So, if I don't want a vehicle to be moved, is it enough that it is bigger then 1 tile, or is the jsd-flag vehicle required?

Or, if using WireFence instead of fence in jsd-flags, would this result in moveable Wirefences?

And as for names, do I understand it correctly, that

<STRUCTURESLIST>
	<STRUCTURE><!--  -->
		<szTileSetDisplayName>Gas cylinder</szTileSetDisplayName>
		<szTileSetName>ASTUFF1.sti</szTileSetName>
		<allowedtile>0</allowedtile>
	</STRUCTURE>

        <STRUCTURE><!--  -->
		<szTileSetDisplayName>Gas Barrel</szTileSetDisplayName>
		<szTileSetName>ASTUFF1.sti</szTileSetName>
		<allowedtile>1</allowedtile>
	</STRUCTURE>


would result in different names (Gas cylinder / Gas Barrel) for content of the same .sti ?


I just try to grasp the details, otherwise I think this can be a fun feature.



How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: New Feature: drag people & corpses[message #360682 is a reply to message #360680] Sat, 25 July 2020 08:22 Go to previous messageGo to next message
Hawkeye is currently offline Hawkeye

 
Messages:2433
Registered:October 2005
Location: Australia
In regard to sounds There's a few effects in Wizardry 8, ROCK SCRAPE.WAV would be a good candidate, not sure in Vanilla though. There's also plenty of foley effects on the net, but that has it's own issues. Good to know it's possible though.

Report message to a moderator

Lieutenant

Re: New Feature: drag people & corpses[message #360684 is a reply to message #360680] Sat, 25 July 2020 15:20 Go to previous messageGo to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
Kitty wrote on Fri, 24 July 2020 19:40

Quote:
... structure that is not a wall/roof/light/switch/person/corpse/vehicle/cavewall/fence ...
On which definition is this exclusion based ? Is it jsd-Flags? Or based on Index-Nr in ja2setdat.xml ? Or something completly different?
It's the flags from the jsd, yes.
https://i.imgur.com/b1Kdx2C.png
These flags correspond to the structure flags:
Toggle Spoiler

and I'm excluding any structure with these flags:
if ( pCurrent->fFlags & ( STRUCTURE_CORPSE | STRUCTURE_PERSON | STRUCTURE_ROOF | STRUCTURE_SWITCH | STRUCTURE_WALLSTUFF | STRUCTURE_MULTI | STRUCTURE_CAVEWALL | STRUCTURE_LIGHTSOURCE | STRUCTURE_VEHICLE | STRUCTURE_ANYFENCE | STRUCTURE_TREE ) )
{
	pCurrent = pCurrent->pNext;
	continue;
}


Kitty wrote on Fri, 24 July 2020 19:40

So, if I don't want a vehicle to be moved, is it enough that it is bigger then 1 tile, or is the jsd-flag vehicle required?

Or, if using WireFence instead of fence in jsd-flags, would this result in moveable Wirefences?
See above. I'm exluding both flags.

Kitty wrote on Fri, 24 July 2020 19:40

And as for names, do I understand it correctly, that

<STRUCTURESLIST>
	<STRUCTURE><!--  -->
		<szTileSetDisplayName>Gas cylinder</szTileSetDisplayName>
		<szTileSetName>ASTUFF1.sti</szTileSetName>
		<allowedtile>0</allowedtile>
	</STRUCTURE>

        <STRUCTURE><!--  -->
		<szTileSetDisplayName>Gas Barrel</szTileSetDisplayName>
		<szTileSetName>ASTUFF1.sti</szTileSetName>
		<allowedtile>1</allowedtile>
	</STRUCTURE>


would result in different names (Gas cylinder / Gas Barrel) for content of the same .sti ?
Yes. Exactly like that.



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

Captain

Re: New Feature: drag people & corpses[message #360692 is a reply to message #360684] Sat, 25 July 2020 23:25 Go to previous messageGo to next message
Kitty

 
Messages:473
Registered:October 2017
Location: Germany
Thanks for the patience towards my questions!

Now, with this detailed answer, I know what I have to look out for when using changed Tilesets.

And learned something new about flags, wasn't aware that there are Combination Flags like "anyfence".






How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: New Feature: drag people & corpses[message #360786 is a reply to message #350989] Sat, 01 August 2020 14:21 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
@sevenfm: Any chance the drag structures component will be integrated in the AI+ mod? Would be very cool to be able to have the ability to form barricades against a competent AI.

Report message to a moderator

Sergeant
Re: New Feature: drag people & corpses[message #360793 is a reply to message #360786] Sat, 01 August 2020 19:18 Go to previous message
Deleted.

 
Messages:2657
Registered:December 2012
Location: Russian Federation
crackwise wrote on Sat, 01 August 2020 16:21
@sevenfm: Any chance the drag structures component will be integrated in the AI+ mod? Would be very cool to be able to have the ability to form barricades against a competent AI.
No, since it requires new XMLs which will break compatibility.



Left this community.

Report message to a moderator

Lieutenant

Previous Topic: New feature: Improved trade menu
Next Topic: New feature: exploration
Goto Forum:
  


Current Time: Mon Dec 02 19:33:28 GMT+2 2024

Total time taken to generate the page: 0.02054 seconds