Rifle butt to the face!


  • Please log in to reply
40 replies to this topic

#21 usmarox

usmarox

    Baron von Tidworth

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male

Posted 22 February 2004 - 07:08 PM

Excellent! So all I have to do is reverse-engineer the whole of TACTICAL.EXE?  Damn, if I'd know that was *all* that was involved, then I'd have done it years ago!

*shakes head and sniggers*


"Don't deny it, Jack.  You're a helluva lot smarter than me."
"Thank you, sir."
"You just lack the sex appeal."
"For someone dragging a dead body, sir, you do talk big."

-May It, Ben Fischer's Kansai Arc

#22 EclipseDog

EclipseDog

    Wagging the Dog

  • Members
  • PipPipPip
  • 98 posts

Posted 22 February 2004 - 07:28 PM

Umm when exactly did I say that..? The orig prog doesn't need to be disassembled then resembled... all that needs to be done is create a trigger entity, create the source code for it (popping up, selecting, hiding again), and then patch it into the existing prog's trigger codeset making it slightly larger. Since the bash code obviously still exists in the orig coding somewhere you wouldn't even have to recreate that. You wouldn't even really have to create a picture for your bash trigger as long as you don't mind it being a 'hidden' feature ala Mario and the mysterious invisible floating boxes to smack his head on.

#23 usmarox

usmarox

    Baron von Tidworth

  • Members
  • PipPipPip
  • 52 posts
  • Gender:Male

Posted 22 February 2004 - 10:53 PM

So you can miraculously create new attack classes without the docs?  And without reverse-engineering anything?  Not only are you one hot goddamned programmer, you're psychic, too.

Ok, let's assume the bash code is still extant.  Fine.  How do you instantiate an attack?  What arguments do you pass to it?  From where? What does it return?  In fact, for that matter, how'd you define a new button for the attack menu?  What's the spec for that?  And patching it into the existing code?  Well, nothing wrong with that, but, errrmmmm....where does it go?

Unless you happen to have the design doc for UFO under your bed, you're going to have to reverse engineer something.


"Don't deny it, Jack.  You're a helluva lot smarter than me."
"Thank you, sir."
"You just lack the sex appeal."
"For someone dragging a dead body, sir, you do talk big."

-May It, Ben Fischer's Kansai Arc

#24 EclipseDog

EclipseDog

    Wagging the Dog

  • Members
  • PipPipPip
  • 98 posts

Posted 23 February 2004 - 05:57 AM

Not really. First off you wouldn't have to redefine the attack menu, only bring up a second menu with the new button in it. This is what I meant by 'popping up'. Once you create the trigger (since we're only adding one thing we don't need an entire array/menu a single entity will work fine) all you need to do is to trigger it to come alive at the same time as the existing attack menu does, this will make 2 things open but if you line it up right it'll appear to only be one. If you code it right (item self-closes on left mouse click regardless of where the click is) you wouldn't have any problem with hanging menus since I know from experience that the item usage menus in the battlefield also self-close on clicks.

As for creating new classes... this whole subject would never have gotten started if the bash attack wasn't already coded into the game.

As for your question regarding how would you limit the attack to only working from 1 square away... that's where the stun gun code comes into effect since it's already been given that limitation.

#25 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,426 posts
  • Gender:Male
  • Location:In my mind

Posted 23 February 2004 - 06:04 AM

The bash attack actually recycles the stun rod's melee attack code. The text label for the attack will still say 'stun'. (they gave it a new label in TFTD).

I'm hoping that there'll be a weapon table somewhere in tactical.exe that defines how each of the objects in obdata.dat behave, and that all you need to do is tweak one byte  (per object) and you'll have your bash command back. I mean, there's something in there that defines unique abilities for specific items in obdata.dat. For example, the electro flare is actually an object that does nothing, but when on the ground, it emits light (you could convert it into a gun, but it'll still emit light when thrown to the ground). The stun rod is actually a gun with no firing stats, but its 'melee attack' command is enabled. The mind probe is the same, only its given the 'probe' command - otherwise it could probably be converted into a gun. However, none of these commands are stored in obdata.dat. So one would have to assume that they're stored as constants in the executable.

What I'm afraid of is that some of these flags are stored in bitfields. For example, the 'under mind control' and 'visible in battlescape' flags are stored in the same byte. Kneeling, flight ability and the in-flight flags (for flying suits when you're in the air - it just changes which leg sprites to display) are all stored in a single byte (plus a few garbage bits, which tends to make the value look unpredictable from time to time). It would be a nightmare to locate a bitfield in an executable without some other point of reference. ;)

What I'm also really interested in finding is what determines the bullet sprite when the gun is fired. You can turn any object into a gun (even corpses), but the bullets default to cannon rounds. It would be nice if you could choose the image. But if you can find this, you can probably find the command flags as well.

- NKF
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.

#26 JellyfishGreen

JellyfishGreen

    Tentacle Pentacle

  • Members
  • PipPipPipPip
  • 790 posts

Posted 23 February 2004 - 10:38 AM

EclipseDog -

Not only is this 1994 game not in Java, it probably predates object-oriented programming in general. Instead of layers, classes, and triggers we have screen regions and branch pointers.

And C isn't an assembly language. Assembly languages are usually specific to the CPU in the computer. E.g. MASM for the 80x86 family.

So reverse-engineering it is...difficult (and the wise will heed NKF's studies of sprites in the wild)
The deadly Lobsterman threat was finally countered by melee combat with power tools. -ufopaedia.org

#27 FullAuto

FullAuto

    Catching the next pimpmobile outta here!

  • Chief Editor
  • PipPipPipPipPip
  • 4,853 posts
  • Gender:Male
  • Location:UK

Posted 23 February 2004 - 05:53 PM

Look, I just want to hit aliens in the face in my favourite game, ok?

Erfworld - the finest comic about turn-based gaming ever.


#28 Lonestar

Lonestar

    Squaddie

  • Members
  • Pip
  • 39 posts

Posted 23 February 2004 - 06:28 PM

What about us guys with the Collecters Edition?  Is possible for us to rifle butt sectoids?

#29 Maugan Ra

Maugan Ra

    Squaddie

  • Members
  • Pip
  • 37 posts

Posted 24 February 2004 - 08:33 AM

Too bad my comp won'tletme play the game anymore...

That melee thingy could have been very useful to me...
See, I've traveled the galaxy, and they sell guns out there that would amaze and astound you.
Of course,by "amaze" I mean "maim" and by "astound" I mean "render you indistinguishalbe from the ground you were standing on"

#30 JellyfishGreen

JellyfishGreen

    Tentacle Pentacle

  • Members
  • PipPipPipPip
  • 790 posts

Posted 24 February 2004 - 11:22 AM

FullAuto, on Feb 23 2004, 05:53 PM, said:

Look, I just want to hit aliens in the face in my favourite game, ok?
;)
Look, just put on your sectoid mask, look in the mirror, and punch yourself in the face, alright?!

(Warning: May cause injury.)
The deadly Lobsterman threat was finally countered by melee combat with power tools. -ufopaedia.org

#31 FullAuto

FullAuto

    Catching the next pimpmobile outta here!

  • Chief Editor
  • PipPipPipPipPip
  • 4,853 posts
  • Gender:Male
  • Location:UK

Posted 24 February 2004 - 06:12 PM

I KNEW I could rely on you JFG!  Cheers!
;)
Ow.

Erfworld - the finest comic about turn-based gaming ever.


#32 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,545 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 28 February 2004 - 11:53 PM

Psy Guy: concerning your question reguarding what would happen if you put 2 stun rods on a Chryssalid, and whether that Chryssalid  would "infest" a person or just stun them. I just tried this and it appears that the Chryssalid prefers HTH (hand-to-hand) combat over stunning. When I mind-controlled the Chryssalid after its attack he still had the stun rods in his hands! Hmm... never knew Chryssalids could juggle and attack at the same time! Ha ha!

Seriously though, it would take the Chryssalid 33 Time Units to use a stun rod once. The Chryssalid used up 26 Time Units out of 110 to get to my soldier. He was able to "impregnate" my soldier SIX times in that round!
110 - 26 = 84 TU available to impreginate. 84/6 = 14 Time Units to impregnate once. If I were that Chryssalid, I would choose HTH over stunning every time, simply because the 33 TU to stun is more than double the 14 TU to impregnate!

Can anyone else verify that the Chryssalid uses 14 TU to use its HTH once? What about how many TU a Silicoid or Reaper use for each HTH?

By the way, the stacking of a Stun Rod on a weapon does not work in the PSX version of the game. *quiet sobbing* Apparently when the game was converted to the Playstation most of the "flaws" were ironed out or eliminated. Not that anyone cares...

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#33 Ki-tat Chung

Ki-tat Chung

    Lieutenant

  • Members
  • PipPipPipPip
  • 818 posts

Posted 01 March 2004 - 09:04 AM

in tftd, the weapon for the deepone is in the right hand i beleive and if you put something in to the RH, you don't see it in the battle. i can't remember if the brains have something in their hands...the lobbie has HTH attacks as well, don't they?
011110010110111101110101
011000010111001001100101
01100100011101010110110101100010

#34 FullAuto

FullAuto

    Catching the next pimpmobile outta here!

  • Chief Editor
  • PipPipPipPipPip
  • 4,853 posts
  • Gender:Male
  • Location:UK

Posted 01 March 2004 - 10:16 AM

Lobster men do indeed have HTH capability, but I've only seen them use it when they've got no other weapons.  Probably cause it's not much good even against unarmoured aquanauts.

Erfworld - the finest comic about turn-based gaming ever.


#35 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,426 posts
  • Gender:Male
  • Location:In my mind

Posted 01 March 2004 - 11:32 AM

A severely crippled lobsterman that woke up killed my Mag Ion Armour trooper who was a veteran of many missions, in the front plates too. I wouldn't underestimate their attack too much. Nasty buggers - almost as bad as the calcinites.

Let's see, I know they use their hand-to-hand attacks when they have no working weapons in their hands or when they're armed with the drill + 4 sonic pulser kit. The AI apparently doesn't know how to use the drills, so it resorts to hand-to-hand attack to give the illusion that it's using the drill. Other aliens will just stand there looking silly.  

As for arming deep-ones, they have a 'HWP turret' type weapon installed, so any weapons in their hands will be merely for show. Of course, when under your control, you won't be able to use anything but the 'turret'. But I don't know if the AI will let them use handheld weapons.

Chryssalids armed with weapons use the weapons in their hands (same thing goes for the zombies too - especially when the game forgets to drop the equipment it's carrying). Don't let their 0 accuracy fool you. They might not hit their target, but the bullet is bound to his something.

- NKF
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.

#36 Bomb Bloke

Bomb Bloke

    The Smily Admin

  • Admin
  • PipPipPipPipPip
  • 4,625 posts
  • Gender:Male
  • Location:Tasmania (AU)

Posted 02 March 2004 - 10:07 PM

So if you give them psi-amps, I presume that makes them fairly useless units?
BB's X-Com Projects Page - X-Com Games At GamersGate
You're just jealous 'cause the voices only talk to me :P
We love Tammy! :)

#37 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,545 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 03 March 2004 - 04:25 AM

Bomb Bloke, NKF - Chryssalids, Zombies and Silacoids, oh my! Give these guys anything under "Equipment" and they appear harmless, but looks can be deceiving.
Equipment such as the Mind Probe, Electro-Flare, Stun Rod, Psi-Amp, Medi-Kit, Motion Scanner and the Smoke Grenade are practically useless to normal aliens. Fill the hand slots of those 3 aliens with any combination of the above list and well... they are still harmless in the sense that they will not use them!

I intentionally pre-primed a Smoke Grenade for a "lucky" Silacoid, but all he wanted to do was engage in HTH combat. I taunted, tempted, and lured, even with multiple targets, but everything I tried didn't get it to throw that grenade. Attempted this with an alien grenade - same deal. Chryssalids and Zombies are the same way - they will fiercely attack with HTH rather than use equipment occupying the hand slots.

Weapons are a different matter alltogether.
Gave a Chryssalid one pistol. Result : HTH combat.
Gave him two pistols. Result : HTH combat.
Gave him two Heavy Lasers. Result : HTH combat.
Gave him two Heavy Plasmas. Result : HTH combat.
Gave him one Heavy Plasma. Result : HTH combat.
Gave a Zombie a Laser Pistol. Result : HTH combat.
Gave a Silacoid a Laser Pistol. Result : HTH combat.
Do you see a trend developing here?

I hovered in the air with Flying Suits (no possible way to attack with HTH, in order to force Chryssalid to fire gun). Result : he just stood there looking silly.
Multiple targets on the ground didn't help - the closest soldier got the claw!
This Chryssalid had its full Time Units (110), morale was 100, and it always faced a soldier (no wasting time searching for a target).
The result was the same each time : a target an the ground = HTH attack on target during alien movement phase. A target in the air = Chryssalid looking quite perplexed.

Step a soldier into view of a Chryssalid with full TU and wielding a gun during X-COMs round : REACTION FIRE!!!!
Fire an auto-shot salvoe of a laser pistol at a Silacoid with full TU (also with laser pistol) and it will reaction fire back if you do not kill it!
Chryssalids, Zombies, and Silacoids will utilize opportunity fire if they have a gun and enough TU to use it.
Normally, they would be idle during X-COMs turn, so the chance to inflict some damage with opportunity fire must be too good to pass up.
Granted, those shots have to connect first, and with 0% Firing Accuracy it is near-impossible...

Sorry, I guess I'm a little off-topic here, but this needed to be explained.
If anyone has Chryssalids, Zombies, or Silacoids using guns during the alien movement phase let me know how you did this. I will stand corrected!

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#38 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,426 posts
  • Gender:Male
  • Location:In my mind

Posted 03 March 2004 - 11:41 AM

I think the ability for melee aliens to use ranged weapons via reaction fire when under the control of the AI makes sense. It's automatic and built in, so to say. Everyone has it.

Try arming a civilian with a weapon. The civilian will not manually attack with the weapon when the civilian gets to move. However, if any creature that does not belong to the civilian's group (i.e. civilian) moves and the civilian just so happens to get a higher reaction score, the civilian will get an opportunity to react.

What this means is that the AI script for opportunity fire is shared by all unit types.

Regarding control during the AI's turn, the distance between units seems to affect the behaviour of Ai controlled units. For example, any alien unit with a gun will use snapshots when they're 4+ tiles away from you, but when they're below that, they'll willingly utilise automatic fire if the gun has that mode available. I don't think this will be relevant for the case of arming melee units with pistols, but hey, it's still a valid case scenario.

- NKF
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.

#39 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,545 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 08 March 2004 - 10:03 PM

NKF - Yeah, I took the distance factor into account before doing the simulation (in an alien base). It is pretty tough to get a Chryssalid out of its hand-to-hand combat range (110 - 14 + 1 = 97 Time Units, or about 25 squares) and yet, still able to target (see) your soldier in a base. This is mainly due to the fact that the largest "blocks" in an alien base are 19 squares in any direction (19squares * 4TU/square = 76 TU). This is much less than the minimum 97 TU necessary to get the Chryssalid out of its HTH range. Sure, the corridors are plenty long (sometimes spanning the entire length of the base), but there is a point where the Chryssalid cannot see you anymore due to darkness or obstructions. The minimum a soldier can see is a 19 tile separation between himself and the target. The aliens can see greater than or equal to 21 tiles in their base.

It comes of no surprise to me that the maximum distance you can see an alien in their base is a 19 square separation. Maybe if I can get a Chryssalid on some flat ground outside during full daylight, perhaps the distance could be extended. The Silacoid and Zombie, which can only move 40 TU per round (or 10 normal squares), preferred charging at my soldiers rather than shooting them at distances between 11 and 20 squares (44 to 80 TU, or 1-2 turns away). You would think that the weapon in their hand would be used in this instance, but it was not. I am guessing that the code written for determining HTH combat with a Silacoid or Zombie is the same as the code for the Chryssalid (or they share it). If that is the case, then you will never see a HTH combat-only alien using ranged-weapons during their round no matter what the distance.

There is one exception: the Blaster Launcher! Just on a whim, I gave a Silacoid a blaster launcher (loaded with a blaster bomb). Can you guess what happened? He fired it during the alien movement phase! They were too dim-witted to actually load a blaster bomb into the launcher if they had both items in their hand slots though. It takes 66% of a unit's TU to use this weapon, and the accuracy the game gives is 120%, but this is negated by this aliens' firing accuracy: 0%. The ability to set waypoints must offset this penalty. However, HTH combat-only aliens are somewhat stupid and lack the necessary intelligence to accurately position those waypoints. Misfires will happen quite often with them!

Finally, distance did matter in this special case. If the Silacoid was 1 to 6 squares (4 - 24 TU) away he would attack with HTH as normal. Distances between 7 and 12 squares (32 - 48 TU) would induce what I call a state of confusion - he couldn't (or wouldn't) attack with HTH, yet was far too close to fire the blaster launcher safely. In this case it just wandered around in the area, occasionally charging my soldiers but falling back before he got too close (4 squares). A distance of 13 tiles (52 TU) seems to be the closest the Silacoid or Zombie will fire due to safety concerns, but only around 25% of the time. The Chryssalid will fire the Blaster Launcher during its round with a 21 tile difference between itself and its intended target. As a final point, multiple targets prompted these aliens to fire the Blaster Launcher far more often than a single target.

I double-checked my Chryssalid HTH Time Unit usage per attack, and it always seems to take 14 TU. Zombies also require 14 TU per attack. Silacoids seem to take 15 TU, though it may also be 14 TU. I cannot really determine TU usage with Silacoids that accurately because they are symmetrical when rotated around the z-axis. A 45-degree turn (1 TU) is easy to spot with a Chryssalid or Zombie, but damn near impossible with a Silacoid! If the Reaper ends up at being 14 TU, then most likely all hand-to-hand attacks require 14 TU.

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#40 BladeFireLight

BladeFireLight

    Xcomutil Developer

  • Members
  • PipPipPipPip
  • 665 posts
  • Gender:Male
  • Location:Joplin, Missouri, USA

Posted 09 March 2004 - 05:32 AM

Quote

What I'm also really interested in finding is what determines the bullet sprite when the gun is fired. You can turn any object into a gun (even corpses), but the bullets default to cannon rounds. It would be nice if you could choose the image. But if you can find this, you can probably find the command flags as well.

NKF: The Sprite and Sound used are based on the damage type in obdata.dat. However I have no clue what makse it choose between what verson of the sound (lite, med, heavy) of that weapon type. (I remember messing with it once but my notes for that some how got overwritten.

-Blade FireLight
QUOTE
Combat is very simple, there is a first place and second place, second place is laying face down in the mud, sometimes, so is first place.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users