Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Never dropping weapon
#1
Any way to make character not drop a weapon, even after falling, but only opointing this weapon once?
Reply
Thanks given by:
#2
Not possible if you want to keep original character mechanics; state 10 and 12(used for grabbed and falling respectively) both force characters to drop their weapon. Even characters like Lighto have to respawn their weapon.

Assuming you wish to keep state 12 (falling) exactly as normal(because going without it will cause a LOT of problems), what you can do instead is:
1. in those frames, wpoint x: 9999999999999
2. when the character flips or wakes up, re-opoint the weapon
3. Check if you need to modify frames 0-15 of the weapon.

The rationale for #1 is that while you can't control the weapon's frames on being dropped, you can control WHERE its dropped. Might as well use a very large number so that you will drop the weapon off-screen. This will allow you to even use an default unmodified weapon(particularly handy if you want to create weapon-based AI)!

Modifying frames 0-15 may be necessary to cover for point (1) depending on how you code this thing (see point (a) below).


Other points:
a. Dropping via state 10/12 will send the weapon into frame 0-15 at random
b. Dropping via wpoint kind 3 will only send the weapon into frame 0-5 at random.
c. You can change the data.txt "type" of the weapon.

Changing the type into anything other than 1,2,4,6(weapons) will do a few particular notable things in general:
i. You cannot throw the weapon using wpoint dvx
ii. The weapon is no longer vulnerable to F9
iii. The weapon no longer counts towards LF2's maximum weapon count(4) when checking whether to drop new weapons from the sky.
[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: The_Hari
#3
Always nice to read these additional indications, anyway, i kinda did it.

Wanted to make two characters in one file, my oldish ninja minion to be more specific. So one would use swords using regular moveset and the other throw shurikens, from weapon specific frames.
The shuriken one would be spawned in stage mode with opoint kind 2 regular boulder, as it gives him range ai as you noted in original thread.
Now, I can't put this opoint in let's say frame 219, because that would make also sword guy change into shuriken one after being knocked down.

So here is what I did:

Code:
<frame> 19 on_ground
   pic: 5  state: 3005  wait: 0  next: 1299  dvx: 0  dvy: 0  centerx: 29  centery: 56
<frame_end>

<frame> 20 on_ground
   pic: 5  state: 3005  wait: 0  next: 0  dvx: 0  dvy: 999  centerx: 29  centery: 56
   itr:
      kind: 8  x: -1000  y: -1009  w: 2000  h: 46  zwidth: 999  dvx: 19
   itr_end:
<frame_end>

Code:
<frame> 0 in_the_sky
   pic: 0  state: 3005  wait: 0  next: 30  dvx: 0  dvy: 0  centerx: 29  centery: 56
<frame_end>

<frame> 30 in_the_sky
   pic: 0  state: 3005  wait: 0  next: 1000  dvx: 0  dvy: 0  centerx: 29  centery: 56
   opoint:
      kind: 1  x: 29  y: 56  action: 350  dvx: 0  dvy: 0  oid: 505  facing: 0
   opoint_end:
<frame_end>

Character drops boulder in frame 180, it hits the ground and goes into frame 20 with itr kind 8 reacting with bdy in lying frames of character. So now they're in the same place. Boulder disappear and opoints invisible type 0 that reacts with itr kind 8 in frame 219, which sends character to copy of that frame with opoint kind 2 of the exact same boulder. This way he's back to being shuriken version only if he started as this one.

Data isn't polished but everything was working, then I realized he won't be using range ai with just any type 2 weapon, must be either id of crate or original boulder. Managed to get it work too with type 3 and edit of original boulder file, but again forgot, now I can't get rid of sprites and shadow when character drops the weapon :/

Also now your post made me realize there is catching and flipping to work out yet. Might be possible, but still not really any way to get ranged ai to work.

Too bad, still the whole point of 2 in 1 character was just to give myself some puzzle (as making any project nowadays is), but gameplay wise it makes more sense to just split them into two files.
Reply
Thanks given by:
#4
Ah, so you're looking for a form switcher.
Just so happens I have tested a system just like that for a female Rudolf concept.

You can trick LF2 into thinking a character is still holding onto a weapon, but the weapon has already been dropped on the floor.
The trick is to hold the weapon A in a frame that is also attempting to opoint kind 2 another weapon B.

This causes Weapon A to hold Weapon B as you would expect, but makes the Character drop Weapon A. However, as the character did not explicitly throw or drop Weapon A, the game thinks the Character is still holding the weapon, even if he gets grabbed/throws/falls etc. The only way to "fix" this bug is for Weapon A to get destroyed or re-picked up by anyone.

By the way, Weapon A will be dropped by the Character into its current frame instead of 0-15 or 40, so this has other applications as well.

This bug is related to why characters sometimes swing/drink air by pressing A AFTER(not during/before) the weapon is already destroyed by F9 or deleted several seconds ago.

For your case, in order to keep the AI Behavior and also induce this behavior, you will have to modify at least the Rock weapon.


Addendum:
[Image: sJjQbiM.gif]
This GIF is my old proof of concept.
When Davis picks up the Rock, notice that the Rock spawns an Ice Sword, and then Davis stays in the heavy weapon moveset indefinitely.
  • If Davis had picked up the Rock via Opoint Kind 2, he would use normal light weapon moveset as expected.
  • Davis's moveset will NOT change even if the Rock changes to a different object.
  • However, Davis's(COM) AI Behavior WILL change accordingly when the Rock changes to something else.

Example:
Davis spawns Rock via opk2. Davis's moveset is HeavyWeapon LightWeapon, and behavior is RockID(150).
The Rock is transformed into a Milk.
Davis remains with LightWeapon moveset, but Davis's AI behavior changes, attempting to run away and drink as if he were holding a milk.
[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: The_Hari
#5
(03-20-2020, 10:20 AM)STM1993 Wrote:  Ah, so you're looking for a form switcher.
Just so happens I have tested a system just like that for a female Rudolf concept.

You can trick LF2 into thinking a character is still holding onto a weapon, but the weapon has already been dropped on the floor.

The trick is to hold the weapon A in a frame that is also attempting to opoint kind 2 another weapon B.

This causes Weapon A to hold Weapon B as you would expect, but makes the Character drop Weapon A. However, as the character did not explicitly throw or drop Weapon A, the game thinks the Character is still holding the weapon, even if he gets grabbed/throws/falls etc. The only way to "fix" this bug is for Weapon A to get destroyed or re-picked up by anyone.

By the way, Weapon A will be dropped by the Character into its current frame instead of 0-15 or 40, so this has other applications as well.

This bug is related to why characters sometimes swing/drink air by pressing A AFTER(not during/before) the weapon is already destroyed by F9 or deleted several seconds ago.

For your case, in order to keep the AI Behavior and also induce this behavior, you will have to modify at least the Rock weapon.
STM1993 these informations about coding characters is insane. Will you ever make additional characters in the future using your knowledge?
Reply
Thanks given by:
#6
Amazing, exactly what i needed, works great!

(03-20-2020, 11:01 AM)Dinothundah Wrote:  STM1993 these informations about coding characters is insane. Will you ever make additional characters in the future using your knowledge?

Yeah, Rebalance beta please
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)