Difference between revisions of "Talk:OBDATA.DAT"

From UFOpaedia
Jump to navigation Jump to search
(TUs for psi amp)
Line 1: Line 1:
 
Would anyone know how to change the TUs needed to work the psi-amp? I don't see anything in OBDATA (all its TU fields are set to 0). It would be helpful to [[MTR_Psi_Testing|psi testing]]. NKF?  ---[[User:MikeTheRed|MikeTheRed]] 16:29, 7 September 2006 (PDT)
 
Would anyone know how to change the TUs needed to work the psi-amp? I don't see anything in OBDATA (all its TU fields are set to 0). It would be helpful to [[MTR_Psi_Testing|psi testing]]. NKF?  ---[[User:MikeTheRed|MikeTheRed]] 16:29, 7 September 2006 (PDT)
  
 +
:In case someone is still interested, I located these pieces of code that may be related to psi attacks (note that 25 = 0x19) :
 +
.text:0041F163 8B 15 88 3E 4A 00      mov    edx, currentUnit_pUnitRef
 +
.text:0041F169 80 7A 0C '''19'''            cmp    byte ptr [edx+0Ch], 25          ; current TUs
 +
.text:0041F16D 0F 82 94 01 00 00      jb      loc_41F307
 +
:and
 +
.text:0041F230 A1 88 3E 4A 00          mov    eax, currentUnit_pUnitRef
 +
.text:0041F235 80 40 0C '''E7'''            add    byte ptr [eax+0Ch], -25        ; consume TUs
 +
:(-25 = 0xE7).
 +
:You may want to change the values I hilighted and see what happens when you try to panic a unit ;-)
 +
:Same for mind control:
 +
.text:0041EE89 80 7A 0C 19            cmp    byte ptr [edx+0Ch], 19h
 +
:and
 +
.text:0041EF55 80 40 0C E7            add    byte ptr [eax+0Ch], 0E7h
 +
Have fun! [[User:Seb76|Seb76]] 14:39, 28 April 2008 (PDT)
 
----
 
----
  

Revision as of 21:39, 28 April 2008

Would anyone know how to change the TUs needed to work the psi-amp? I don't see anything in OBDATA (all its TU fields are set to 0). It would be helpful to psi testing. NKF? ---MikeTheRed 16:29, 7 September 2006 (PDT)

In case someone is still interested, I located these pieces of code that may be related to psi attacks (note that 25 = 0x19) :
.text:0041F163 8B 15 88 3E 4A 00       mov     edx, currentUnit_pUnitRef
.text:0041F169 80 7A 0C 19             cmp     byte ptr [edx+0Ch], 25          ; current TUs
.text:0041F16D 0F 82 94 01 00 00       jb      loc_41F307
and
.text:0041F230 A1 88 3E 4A 00          mov     eax, currentUnit_pUnitRef
.text:0041F235 80 40 0C E7             add     byte ptr [eax+0Ch], -25         ; consume TUs
(-25 = 0xE7).
You may want to change the values I hilighted and see what happens when you try to panic a unit ;-)
Same for mind control:
.text:0041EE89 80 7A 0C 19             cmp     byte ptr [edx+0Ch], 19h
and
.text:0041EF55 80 40 0C E7             add     byte ptr [eax+0Ch], 0E7h

Have fun! Seb76 14:39, 28 April 2008 (PDT)


Unfortunately obdata doesn't store all weapon stats. Unique actions like the costs for priming grenades, throwing stuff, mind probe, psi amp, etc are tucked away in tactical.exe. Hmm, I'm positive that they can be located, but there are so many iterations of similar values that it could take a long while to discover them.

What could make thi worse is the possibility that these in-built actions (perhaps even the in-built alien melee attacks) will not be clustered together near each other.

- NKF


Arg. Well it's not a real big deal. The psi equations are now known quite well; it'll be posted shortly. Reducing psi-amp TUs would make it easier to ultra-tune the psi equations, but it wouldn't make any difference to players. Don't knock yourself out, but if you can find it, that'd be nice! Thanks for the reply ---MikeTheRed 18:40, 8 September 2006 (PDT)

Lazar Blastas!!1

It occurs to me that I have no idea what it is that allows the laser weapons to fire without a clip. At first I thought simply giving them a base power rating (something other weapons don't have) was the key, but apparently giving a clip a power of 0 doesn't render it useless...

Can someone provide some details on this?

-Bomb Bloke 03:32, 4 October 2007 (PDT)


Just a quick gaze at obdata, it seems that the laser's three clip types appear to be set to 255 (or -1 if we think in terms of signed values) to mark that they're not used and the item has a power rating. Apart from that, I can't see anything terribly out of the ordinary. - NKF


To make a weapon clip-less and ammo-less you must set the clip references all to 255 like NKF mentioned. Make sure to set a power rating in [022] (if you want the weapon to do damage that is, this field is not a requirement for a laser-type weapon) and don't forget to switch the damage type in [031] from 255 to a valid number. That combination should create a laser-type weapon without ammo or clips. Hope that's what you were looking for. --Zombie 20:02, 4 October 2007 (PDT)


That sounds about right. Thanks guys. :)

- Bomb Bloke 20:10, 4 October 2007 (PDT)