Author Topic: hand-to-hand fight  (Read 23428 times)

Offline g5-freemen

  • Captain
  • ***
  • Posts: 75
    • View Profile
hand-to-hand fight
« on: August 18, 2012, 03:04:24 am »
Sorry for my english.

Just one small suggestion - how about hand-to-hand fight? I mean if you soldier didn't have any weapon he(she) can make some damage to alien (at least 1 hp) by his hands (punch).
« Last Edit: August 18, 2012, 03:07:28 am by g5-freemen »

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: hand-to-hand fight
« Reply #1 on: August 21, 2012, 01:49:34 pm »
 ;D

Edit: I quite like this idea, though if you think most enemies can take laser blasts to the face, hand to hand combat isn't going to do all that much.
« Last Edit: August 21, 2012, 01:51:07 pm by pmprog »

Volutar

  • Guest
Re: hand-to-hand fight
« Reply #2 on: August 21, 2012, 02:42:53 pm »
Suggest "kick" as knocking-back action, with ability to throw off some bad guys from roof or whatever (even getting them unconscious for a short time - to free narrow corridor for example).
As for kicking - you may have all your hands occupied and still be able to kick some ass. With any weapon (and default - if there's no weapon - with bare hands) - there should be either punch or simple hit. For example you can hit some bad guy with mind probe, specially if it's heavy (and it looks like), or with buttstock of rifle, or with some dead alien.

As for melee with dead aliens. If you "hit" some of aliens with chrysallid (heh, even chrysallid), it may lay some eggs inside and turn this alien into anti-alien-zombie, which will be your ally. The thing is - we can add some "undocumented" features of non-usual use of different things, which still should stay logical :). Like putting grenade into alien's "depths" with guarantied messy explosion after.
I remember Laser Squad (predecessor of UFO) have had a feature of "throwing" things right into someone else, and he will auto-catch this (even with his butt).
« Last Edit: August 21, 2012, 02:55:24 pm by Volutar »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: hand-to-hand fight
« Reply #3 on: August 21, 2012, 11:26:37 pm »
I think melee attacks would definitely make sense, but I guess it's hard to balance. If they are too weak, they are useless. If they do only stun damage, they make the stun rod obsolete. If they are too powerful, the game turns into a weird smoke grenade street fight.

maybe a successful melee attack could knock an enemy around (turn him by 45-90°) to allow you to run away without being immediately shot down by reaction fire? although I think there should definitely be melee weapons like the knife that do real damage, perhaps with a bonus when attacking from behind. that would make for a nice combination: knock the enemy around, then "slit his throat". wouldn't work on a Reaper, of course... can't reach his neck from behind. :P

Offline g5-freemen

  • Captain
  • ***
  • Posts: 75
    • View Profile
Re: hand-to-hand fight
« Reply #4 on: August 22, 2012, 01:55:50 am »
Knife - it's a new item, think it is too much.
Just a little damage if your soldier has gone in panic or just left somewhere weapons.
Or just for fun - kill mind-controlled alien by own hands... maybe a little bit sadistic (but after the "Expendables 2" it looks very kindness :) )

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: hand-to-hand fight
« Reply #5 on: August 22, 2012, 12:19:55 pm »
I like the idea of the punch if you have no weapons. But I guess you will be dead anyway, so I don't know if that 1 HP damage you mention will make difference :) It's a kind of a last hope when things look bad.

But it might be interesting in other ways, to damage certain low-armor terrain objects maybe. Damaging a hedge or wooden fence with a good kick or a little pushing so you can walk through it, makes sense. I wouldn't try it IRL just for fun, you might upset people (unless you own the hedge/fence), but I guess it works :)

I'm sure the amount of damage you do depends on your strength and in case of hand-to-hand on the strength of your opponent.

Volutar

  • Guest
Re: hand-to-hand fight
« Reply #6 on: August 22, 2012, 12:45:50 pm »
I doubt amount of damage depends on strength of opponent... Otherwise it can be treatead as "autoblock everything" which is wrong, I presume. Breaking fences, without wasting precious ammo is nice thing. Though I dont think anyone could break any inner wall with bare hands. Well, we can change damage model and store each tile health, in order to have cumulative damage effect - to break wall with 10th kick for example. Buth with this damage model you could destroy even ufo hull with bare hands if you will be very patient :)

Daiky, what about throwing grenade into alien which stands right before you? He'll just find primed grenade in his inventory, but it will be too late :) And double unit damage if it will explode from inventory position.
And what about melee attack type for every object?

Offline Amunak

  • Colonel
  • ****
  • Posts: 101
    • View Profile
    • My homepage (czech only)
Re: hand-to-hand fight
« Reply #7 on: August 22, 2012, 01:42:52 pm »
But it might be interesting in other ways, to damage certain low-armor terrain objects maybe. Damaging a hedge or wooden fence with a good kick or a little pushing so you can walk through it, makes sense. I wouldn't try it IRL just for fun, you might upset people (unless you own the hedge/fence), but I guess it works :)
It depends on the fence quality. Though in 1999 we can assume cheap fences in most parts of the world (especially near barns and similar things) and those are usually very easy to destroy (kick or two and it's down).

You probably can't destroy ufo walls, brick wall or stone fence, but you can certainly destroy hedges, wooden fences and even wooden walls.
« Last Edit: August 22, 2012, 01:44:33 pm by Amunak »

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: hand-to-hand fight
« Reply #8 on: August 22, 2012, 02:58:15 pm »
Daiky, what about throwing grenade into alien which stands right before you? He'll just find primed grenade in his inventory, but it will be too late :) And double unit damage if it will explode from inventory position.
And what about melee attack type for every object?
You would need a high throwing accuracy to throw exactly in someones inventory. I can see it interesting to pass objects from one soldier to another.
Melee attack type for every object seems too much. I think the melee attack is an attack without objects as the opening post suggests.

edit: I need to add that the way it is programmed now, it will not work to have a melee attack on every object, because melee weapon is an object type, like firearm is an object type and ammo is an object type. Only if an object is defined as a melee weapon, it will have a melee attack menu.
« Last Edit: August 22, 2012, 03:32:20 pm by Daiky »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: hand-to-hand fight
« Reply #9 on: August 22, 2012, 05:05:46 pm »
Adding a melee weapon capability for all weapons seems logical to me - simply make the "melee attack" option invisible unless melee damage is >0.

Throwing into someones inventory for passing stuff forward (grenade relay, anyone?) is kind of unrealistic, and not really necessary since picking up stuff into your hand is rather "cheap" in terms of TUs.

Stuffing grenades into Aliens and having them explode from the inside  ;D ;D ;D now that would be something... although you have an almost-like-that mechanic already, because grenade explosion damage originating in your own square is applied to your weak back armor anyway. If anybody wants to create squishy animations for exploding aliens, go ahead :) - perhaps triggered by an alien receiving damage points of more than half of its original health in the killing blow?  ;D

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: hand-to-hand fight
« Reply #10 on: August 23, 2012, 01:11:08 am »
Melee capability in every weapon is an interesting feature since it used to be in the original UFO but was dropped before release for whatever reason (too complex/useless?). You can still find it referenced in the game manual (Hit attack in p40, p86), OSG and data files (soldiers and weapons have melee stats although they're largely unused) though, might still exist in beta versions too.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: hand-to-hand fight
« Reply #11 on: August 24, 2012, 03:09:05 pm »
interesting. I don't know if every weapon should have a melee attack... although hitting somebody with a missile launcher will probably do a lot of damage, it might just be a little too large to use effectively. :D

but I think the easiest way to implement this would be to add the possibility of melee attacks as a stat for every weapon, and a value of "0" means it isn't even displayed in the game.

how is that done with auto-fire, anyway? does the game have a separate flag for auto-fire enabled/disabled or is that done by specifying a certain value for auto-fire TUs (like "0")?

Volutar

  • Guest
Re: hand-to-hand fight
« Reply #12 on: August 24, 2012, 04:10:30 pm »
moriarty, the thing is... you can do melee attack with everything, not only weapon... even hit with motion detector can make more damage than simple fist punch. though i don't know how flare can affect on aliens. probably they got blind for number of moves if hit with it? It's possible to make not only HP damage..

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: hand-to-hand fight
« Reply #13 on: August 25, 2012, 01:07:11 am »
interesting. I don't know if every weapon should have a melee attack... although hitting somebody with a missile launcher will probably
how is that done with auto-fire, anyway? does the game have a separate flag for auto-fire enabled/disabled or is that done by specifying a certain value for auto-fire TUs (like "0")?
We just have separate values for snap/auto/aimed that automatically enable that mode when specified. I think melee also has separate stats, they might just not be fully implemented yet.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: hand-to-hand fight
« Reply #14 on: August 25, 2012, 12:36:24 pm »
as of now, you read the weapon stats from the original obdata.dat file, right?

looking at the UFOpaedia article on obdata.dat, that file appears to have a lot of unused stuff... for example:
Code: [Select]
41[0x29]: TU% cost when attacking as a melee weapon
 50 Most objects
 30 Stun rod
 40 TFTD thermal tazer
 10 Vibroblade
 15 Thermal lance
 20 Heavy thermal Lance
  0 All Corpses
  0 Electroflare
  0 Plasma Weapon Clips

basically everything except corpses, electroflares and plasma weapon clips has a value for melee attack TU cost. at the same time, the ability to melee attack appears to be hardcoded in the original exe.

how does openxcom handle this? in battlescape.cpp I found this:

Code: [Select]
void ActionMenuItem::setAction(BattleActionType action, std::wstring description, std::wstring accuracy, std::wstring timeunits, int tu)
{
_action = action;
_txtDescription->setText(description);
if (accuracy.length())
_txtAcc->setText(accuracy);
else
_txtAcc->setVisible(false);
_txtTU->setText(timeunits);
_tu = tu;
draw();
}

if I read it correctly, openxcom checks whether an accuracy value for an action has been defined, and if yes, displays the appropriate button.

However, the UFOpaedia article mentioned above states that the accuracy for melee attack is defined as

Code: [Select]
40[0x28]: Melee Accuracy. Zombie found that changing this does not change the Stun Rod's 100% accuracy (nor does changing soldier Melee Accuracy). Thus the Stun Rod appears to be hard-wired to 100% for UFO, but in TFTD it is a valid and effective variable. (TFTD uses much more melee than UFO.)
  0 All Corpses
  0 Electroflare
  0 Plasma Weapon Clips
100 Everything else...

so why doesn't every weapon show the melee attack (except corpses, electroflares and plasma weapon clips) in openxcom?