Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Omniarch

How to change weapon raise and lower speed in DeHackEd?

Question

Exactly what it says on the tin. I would not ask the question if I hadn't seen any examples, but @antares031's Antaresian Reliquary seems to achieve this somehow. Opening up its dehacked file didn't help me much, since I am a relative novice in this area.

 

So, how is this done?

 

Edit: To clarify, I want to make the animations faster than vanilla.

Edited by Omniarch

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

Create a new archive, go on states then -weapon- lower/raise and change the value in the ''Duration'' box, if you're using WhackHed4 (and I think it should be the same on other dehack softwares) it should look like this:

 

This is the original with a value of 123.PNG.94c771e7dcdb7145f4df334ab54e5196.PNG

And this is the edited version with a value of 5lower4.PNG.182c1c1eb314984204d335586ad0a17e.PNG

 

In my case I made the ''lower'' animation slower, I don't know if you can make it any faster since it's already at 1 and taking it lower than 0 could create some problems.

 

Share this post


Link to post
  • 0
1 minute ago, TenenteZashu said:

Create a new archive, go on states then -weapon- lower/raise and change the value in the ''Duration'' box, if you're using WhackHed4 (and I think it should be the same on other dehack softwares) it should look like this:

 

This is the original with a value of 123.PNG.94c771e7dcdb7145f4df334ab54e5196.PNG

And this is the edited version with a value of 5lower4.PNG.182c1c1eb314984204d335586ad0a17e.PNG

 

In my case I made the ''lower'' animation slower, I don't know if you can make it any faster since it's already at 1 and taking it lower than 0 could create some problems.

 

Thanks for the reply, but I did indeed want to make it faster. I am familiar enough with dehacked to know that negative numbers will not have the intended effect, and unfortunately it doesn't seem to like decimals.

Share this post


Link to post
  • 1

Make the raise state go to another frame aka 13= raise duration 1 next 880 880= raise duration 0 next 13

This will cause the animation to play at 2x speed, adding more 0 duration frames will make it faster.

Sorry for no images, I'm currently on my phone.

Share this post


Link to post
  • 8

The idea of faster weapon-switching in Antaresian Reliquary was originated from this thread. Basically, you can use Unused 1 and 2 fields from States to change the offset of the weapon sprite from first person view. Positive/Negative value to Unused 1 will give right/left side offset to the sprite, while positive/negative value to Unused 2 will give down/up side offset to the sprite. Somehow, you can use this trick to make your own custom raise/lower states, eliminating vanilla's original smoother, but slower raise/lower states. It's worth mentioning that Raise state must be started with the frame with Raise code pointer, and Lower state should be ended with the frame with Lower code pointer. Lower states also requires at least one frame with edited Unused fields. After playing with some numbers on these unused parameters, this was how I set for Antaresian Reliquary's dehacked:

 

Quote

[Raise state]
Frame#1: Raise - (1,52)
Frame#2: NULL - (1,32)
to [Bob state]

 

[Lower state]

Frame#1: NULL - (1,92)
Frame#2Lower - (0,0)

loop Frame#2
 

*NULL = no code pointer
*Every frame has the duration of 1 tic.

 

These numbers are not the absolute values to make this trick possible, and you can try any numbers that you want. But make sure to give a good enough positive value to Unused 2, or it won't make weapon-switching faster. It's also worth mentioning that you can also actually make Raise state faster, even without editing Unused parameters. All you need to do is just changing the next frame of Raise state from looping the frame to the first frame of Bob state, like this one:

 

Quote

[Raise state]
Frame#1: Raise - (0,0)
to [Bob state]

 

[Lower state]

Frame#1: NULL - (1,80)
Frame#2Lower - (0,0)

loop Frame#2

 

Share this post


Link to post
  • 0
3 hours ago, antares031 said:

Extremely helpful stuff

Thanks for the reply! Those unknown parameters really were driving me nuts. It really is quite amazing how much you can achieve with dehacked, despite the limitations.

Share this post


Link to post
  • 0
On 11/22/2020 at 5:03 AM, Mr.S Retro said:

Make the raise state go to another frame aka 13= raise duration 1 next 880 880= raise duration 0 next 13

This will cause the animation to play at 2x speed, adding more 0 duration frames will make it faster.

Sorry for no images, I'm currently on my phone.

A similar trick incidentally also works with Decorate and ZScript, example:

 

Raise:

 GUNR A 1 A_Raise

 GUNR A 0 A_Raise

Loop

 

Lower:

 GUNR A 1 A_Lower

 GUNR A 0 A_Lower

Loop

 

The more zero length frames of A_Raise or A_Lower you add, the faster it goes. Apparently not everyone knows this.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×