Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weapon: is it possible? new weapon
#1
Hello. I would like to create a weapon like painkiller. When the charakter eat it, painkiller gain his life about 1/4.

Painkiller may be like a milk or a beer but char can make only one sip.
Reply
Thanks given by:
#2
There are a few ways to make a pill that heals an exact amount of HP instantly.

1) Done in an X-LF2 mod. Weapon drops from sky, when it lands, it transforms into a criminal. This criminal has a catching itr kind 3. If anyone walks into it, it will catch the person and go into a frame with an itr that hits the person with negative injury values.

2) A better version of the above is to use itr kind 8 as it won't interrupt a character as badly and doesn't require transforming into a criminal. When a character touches the pill, the pill will go into the frame number that the itr kind 8 "dvx" uses. This frame will hit the person with an itr with negative injury values. The reason why the injury tag in itr kind 8 isn't used is because it only heals dark red HP.
To see how exactly itr kind 8 works, see John's D^J healing spell in john_ball.dat.

3) This pill is a weapon can be picked up when you want to take it, causing it to go a specific on_hand frame (24 for all characters I think), which has a next leading to a frame that opoints a ball. This ball needs to have state 18(unless you change the characters' pickup frame to use state 12) and hits the character with an itr.

Normally you can stop there, but if you're going for a full mod anyway, the ball can then grab the character and bring him into a special frame. In the special frame, he will spawn a hidden milk and then drink it just for a very short while, then destroy the milk. The purpose of this is to prevent HP from exceeding 500.

Hope that helps.
[Image: uMSShyX.png]
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza
Reply
Thanks given by: kakuratso
#3
@STM1993: I think it's still supposed to be a normal bottle object you can drink from, but it should instantly heal a big chunk with just one sip and be empty.
Reply
Thanks given by: kakuratso
#4
Oh.

Only thing I can add on so far is to ensure the weapon is type 6 on the data.txt, make the weapon opoint an itr kind 8 ball in frame 31, have a bdy on drinking frames. If drinking is detected, the ball will activate, get the state 18 negative injury itr. Catch character, force him into a specific new frame to drop/destroy the drink. If need be, after dropping, give him milk to deal with the 500HP exceed. I tried giving a test weapon the itr k8 directly in frame 31, but it didn't work.

Can't figure something better without a full mod change and without more details on what he wants >_>
[Image: uMSShyX.png]
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza
Reply
Thanks given by:
#5
I have got a idea.

In all chars I will change drink frame:

    DC-Code:
<frame> 55 weapon_drink
   pic: 132  state: 17  wait: 3  next: 999  dvx: 0  dvy: 0  dvz: 0  centerx: 32  centery: 79  hit_a: 0  hit_d: 999  hit_j: 0
  sound: data\042.wav 
   wpoint:
      kind: 1  x: 49  y: 25  weaponact: 31  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
   bdy:
      kind: 0  x: 15  y: 12  w: 37  h: 67
   bdy_end:
<frame_end>



and in frame of weapon:

    DC-Code:
<frame> 31 on_hand
   pic: 31  state: 9998  wait: 0  next: 0  dvx: 0  dvy: 0  centerx: 24  centery: 40  hit_a: 0  hit_d: 0  hit_j: 0
   wpoint:
      kind: 2  x: 37  y: 19  weaponact: 0  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
   itr:
      kind: 5  x: 19  y: 15  w: 22  h: 14  dvx: 8  fall: 20  bdefend: 16  injury: 789  
   itr_end:
   opoint:
      kind: 1  x: 0  y: 0  action: 50  dvx: 0  dvy: 0  oid: 200  facing: 0
   opoint_end:
<frame_end>



but i don't know how i must change the john ball data to ball hit char with negative injury values.


this is the data of john ball -> heal ball:

    DC-Code:
<frame> 50 healball
   pic: 24  state: 3002  wait: 3  next: 51  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 9  hit_d: 55 hit_j: 0
   itr:
      kind: 8  x: 25  y: 13  w: 32  h: 34  dvx: 40  injury: 100  
   itr_end:
<frame_end>
 
<frame> 51 healball
   pic: 25  state: 3002  wait: 3  next: 52  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 9  hit_d: 55 hit_j: 0
   opoint:
      kind: 1  x: 40  y: 39  action: 42  dvx: 0  dvy: 0  oid: 200  facing: 0
   opoint_end:
   itr:
      kind: 8  x: 25  y: 13  w: 32  h: 34  dvx: 40  injury: 100  
   itr_end:
<frame_end>
 
<frame> 52 healball
   pic: 26  state: 3002  wait: 3  next: 53  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 09 hit_d: 55 hit_j: 0
   opoint:
      kind: 1  x: 40  y: 39  action: 44  dvx: 0  dvy: 0  oid: 200  facing: 0
   opoint_end:
   itr:
      kind: 8  x: 25  y: 13  w: 32  h: 34  dvx: 40  injury: 100  
   itr_end:
<frame_end>
 
<frame> 53 healball
   pic: 28  state: 3002  wait: 3  next: 54  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 9  hit_d: 55 hit_j: 0
   itr:
      kind: 8  x: 25  y: 13  w: 32  h: 34  dvx: 40  injury: 100  
   itr_end:
<frame_end>
 
<frame> 54 healball
   pic: 27  state: 3002  wait: 3  next: 51  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 9  hit_d: 55 hit_j: 0
   opoint:
      kind: 1  x: 40  y: 39  action: 42  dvx: 0  dvy: 0  oid: 200  facing: 0
   opoint_end:
   itr:
      kind: 8  x: 25  y: 13  w: 32  h: 34  dvx: 40  injury: 100  
   itr_end:
<frame_end>
 
<frame> 55 healball
   pic: 29  state: 3002  wait: 2  next: 56  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 56 healball
   pic: 30  state: 3002  wait: 1  next: 57  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 57 healball
   pic: 31  state: 3002  wait: 1  next: 1000  dvx: 0  dvy: 0  centerx: 40  centery: 26  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
Reply
Thanks given by:
#6
That's a good idea. Here are a few tweaks to it:

(04-04-2014, 04:16 PM)kakuratso Wrote:  In all chars I will change drink frame
Don't change the characters drinking frame. That will mess up all normal bottle drinking and you would have to edit every character it is supposed to work with.

(04-04-2014, 04:16 PM)kakuratso Wrote:  and in frame of weapon
Spawning a healing object is a good idea. However Johns heal is a little unfitting, so let's just spawn a new frame from the bottle object itself:
    DC-Code:
<frame> 31 on_hand
   pic: 31  state: 1001  wait: 0  next: 0  dvx: 0  dvy: 0  centerx: 24  centery: 40  hit_a: 0  hit_d: 0  hit_j: 0
   wpoint:
      kind: 2  x: 37  y: 19  weaponact: 0  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
   itr:
      kind: 5  x: 19  y: 15  w: 22  h: 14  dvx: 8  fall: 20  bdefend: 16  injury: 789  
   itr_end:
   opoint:
      kind: 1  x: 24  y: 40  action: 390 dvx: 0  dvy: 0  oid: #bottle-id# facing: 0
   opoint_end:
<frame_end>


That new frame will look like this:
    DC-Code:
<frame> 390 heal
   pic: 99  state: 9997  wait: 1  next: 1000  dvx: 0  dvy: 0  centerx: 24  centery: 40  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 8  x: 19  y: 15  w: 22  h: 14  dvx: 390 injury: 1
   itr_end:
<frame_end>


The injury 1 may not be a high healing value, but it won't make the hp bar flash like Johns heal does. Also the on_hand frame 31 will opoint this frame pretty often. That way it should heal rather fast (only all dark red hp though). To make sure this bottle empties out quickly, just give it a low weapon_hp.


Only problem with this method is, that the character will hold the bottle in frame 31 at other times too (not just drinking).
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)