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

How can I give a different ball of fire to hellknight?

Recommended Posts

I already have the sprites of the different fireballs what What I want to know is if I can add as a new attack these sprites for the Hell Knigt

BAL7A1A5.png.ae702ae4afffce47e184afff3528ef04.pngBAL7A4A6.png.cb68d4652b357c94a03654475b686445.pngBAL7B1B5.png.8db436dfba8be4d665f43ab2c7011c29.pngBAL7B2B8.png.df40884081238307fa24a61d37c27191.pngBAL7B3B7.png.b9fe8da333c7fee5013debaaff270961.pngBAL7B4B6.png.1a79857825a989576176ea71d5c70e2f.pngBAL7C0.png.38bdf8410bb1a4e4ec1704054e2bfd83.pngBAL7D0.png.db187f95f8a5356b3898b0b561ffd42f.pngBAL7E0.png.9a7692ab32dd4b39f46f5ea582df7977.png

(Thanks Teder for this sprites)

BAL7A2A8.png

BAL7A3A7.png

Edited by Bit3s : Because i need to put this sprites bb

Share this post


Link to post

You can simply replace existing fireball sprites, but then baron of hell will use same sprites. Also you can try use inheritance with decorate. I'm not sure, but sprite replacement will work as long as it have same count of frames. 

Share this post


Link to post

Yeah, it depends on what you want. If you want to simply reskin the attack, then you can simply replace the sprites, you can do this by first checking what those specific sprites are called, by either going to zdoom wiki: https://zdoom.org/wiki/Classes:BaronBall And then scrolling down to:

 

 States
  {
  Spawn:
    BAL7 AB 4 Bright
    Loop
  Death:
    BAL7 CDE 6 Bright
    Stop
  }

You could also do it the hard way by opening the doom2 iwad in slade, but it would take longer, and we already know that the sprites are called BAL7.

 

Now a short tutorial on how Doom handles sprites, they start with a four letter/number name (BAL7) and then the invidual sprite frame images are lettered, so the first would be called BAL7A, the second BAL7B and so on. You also need to specify ANGLE, which is the last part of the name. BAL7A0 would mean that it looks the same from all angles. Numbers 1-8 specify specific angles, with 1 being facing forward, and so on (check https://zdoom.org/wiki/Sprite for more info on them). 

 

What this means is that ALL sprite images have names that are exactly six letters/numbers long. Forget one, and it won't work properly.  

 

If you only want to change what the projectile looks, all you need to do is make each of those frames their own images, and name them properly. After that THE SPRITE MIGHT BE LOWER THAN IT*S SUPPOSED TO BE, that's ok, it just means that you need to open your custom wad with SLADE, and move the sprite images so that they're aligned properly. For example, monsters would have the bottom of their feet on X-axis, and have their body split roughly in two by Y-axis. Look at how Iwad sprites are aligned to get the feeling for it.

 

HOWEVER, if you want to create a custom attack for ONLY the Hell Knight, that differs from Baron of Hell's attack, then it takes just a bit more work, and I can explain that soon.

Share this post


Link to post

Part 2: Custom projectiles

 

This is quite simple, even though it might look complex for a beginner. All what we do is simply inherit the baron's attack, and then you can change it how you see it fit.

 

Firstly, you must name the projectile sprite images something different, like say we call this the super yellow hell knight attack, then let's shorten it to YHHK, and call the invidual images something like YHHKA1 and so on.

 

To create new actors, you need to create a text file called DECORATE, and include it with your sprite images. The simplest thing to do right now, would be to use PK3 format, where you can simply make a folder, add another folder inside it called sprites. Into the folder "sprites" you put your sprite images. Decorate doesn't go to the folder "sprites", it goes into the larger folder that has sprites inside it. Now, if you turn the contents of the larger folder into a simple zip file, you can play it with gzdoom, by right clicking the folder and running it with gzdoom. Just rename the file extension from .zip to .pk3 so that GZdoom will detect it automatically, this doesn't change the contents of the file, so you can rename it back into .zip if you need to.

 

DECORATE can be written with slade, or just text editor. This zdoom link will tell you how inheritance works, and gives an example as well: https://zdoom.org/wiki/Using_inheritance

If that doesn't help enough, I'll put it shortly.

 

First line of code is:

actor HellKnightBall : BaronBall

The HellKnightBall is the name of the new projectile we're making, and BaronBall is the name of the projectile it inherits from (the  green projectile that royals lob at you). Press enter and add braces {} All code goes inside of these, and don't forget the other one or Gzdoom will get mad and fail to start your mod. 

 

Then you need states so that the actor can look like something, use the baron ball as an example, just replace BAL7 with YHHK or whatever you call your sprites. Spawn is what the prójectile will look like when it lives, death will be what it looks like when it impacts something . If you look back into the baron ball: https://zdoom.org/wiki/Classes:BaronBall You can notice that it has other parameters like damage before states. Do same, add those things BEFORE states,  don't put them inside the states' own pair of braces, that won't work so just stay outside of those when not working with states. 

 

By default, the actor will inherit all the parameters. If you want your new projectile deal less damage, change the damage to something like:

Damage 4

Here's an example of what your new projectile's decorate code could look like:

actor HellKnightBall : BaronBall
{
 damage 4

 states:
 {
  Spawn:
    YHHK AB 4 Bright
    Loop
  Death:
    YHHK CDE 6 Bright
    Stop
 }

}

Now, this alone won't work, you would have to edit hell knight so that it will throw these projectiles, oh boy. I'll explain that if you need any more assistance. I think that I have lectured too much already.

 

(also, could someone move this topic to Editing Questions? That's where the questions about editing doom should be asked.)

Share this post


Link to post

The most important part, if you don't want the barons to shoot the same projectiles as the knights, is to update one of the monsters' attack states.

 

We'll take the Hell knight:

Actor HellKnightOB : HellKnight replaces HellKnight
{
	States
	{
	Melee:
	Missile:
		BOS2 EF 8 A_FaceTarget
		BOS2 G 8 A_CustomComboAttack("HellKnightBall", 32, 10 * random(1, 8), "baron/melee")
		Goto See
	}
}

First line, we define a new actor type that inherits from the Hell Knight (so that we don't have to copy every property) and replaces it.

We don't need to define any property since it inherits everything from the knight and that's what we want. So instead we redefine some states.

We only define the attack states (Melee and Missile) to give them a new sequence. This sequence is identical to the Hell knight's normal sequence, except that we replaced the attack codepointer A_BruisAttack by something that behaves exactly the same except for the name of the projectile it throws. But if you want, you could change the other parameters too. Perhaps you could replace the third by "10 * random(1, 6)" to make the knight's claws deal a bit less damage, and you could define a new scratch sound in SNDINFO to replace "baron/melee", etc.

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
×