Help Needed for adding animation sprites
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Help Needed for adding animation sprites
Update 2/17/2011:
Official release for this wad can be found here: http://forum.zdoom.org/viewtopic.php?f=19&t=28825
Original Post:
I'm trying to figure out how to add more frames of animation to the BFG using sprites from the Beautiful Doom wad(http://www.doomworld.com/idgames/index.php?id=15965) and adding them to the Smoother Weapons animation wad ( http://www.doomworld.com/vb/doom-editin ... -released/). I'm a relative noob to the weapon definitions thing, I mean, I understand how the file name thing works, but for specifics, I'm lost. And for those who suggest the zDoom wiki, way ahead of you, but I'm still confused. If anyone could help me, I'd most appreciate it.
Though specifically, I would like someone to look at the DECORATE info of the BFG from both wads, and tell me what I would need to do to transfer info from one to the other so that it works properly.
This is the normal DECORATE for the BFG which is also how it is in the Smooth Weapons Animation Wad: (http://zdoom.org/wiki/Classes:BFG9000)
Official release for this wad can be found here: http://forum.zdoom.org/viewtopic.php?f=19&t=28825
Original Post:
I'm trying to figure out how to add more frames of animation to the BFG using sprites from the Beautiful Doom wad(http://www.doomworld.com/idgames/index.php?id=15965) and adding them to the Smoother Weapons animation wad ( http://www.doomworld.com/vb/doom-editin ... -released/). I'm a relative noob to the weapon definitions thing, I mean, I understand how the file name thing works, but for specifics, I'm lost. And for those who suggest the zDoom wiki, way ahead of you, but I'm still confused. If anyone could help me, I'd most appreciate it.
Though specifically, I would like someone to look at the DECORATE info of the BFG from both wads, and tell me what I would need to do to transfer info from one to the other so that it works properly.
This is the normal DECORATE for the BFG which is also how it is in the Smooth Weapons Animation Wad: (http://zdoom.org/wiki/Classes:BFG9000)
Last edited by BlueFireZ88 on Thu Feb 17, 2011 3:17 am, edited 4 times in total.
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
Just so people know, I have brushed up a bit on this via the GunLabs blog (http://gunlabs.blogspot.com/2011/01/wel ... rmory.html), I am still confounded by this particular problem. I'm not sure what I'm doing wrong, so really ANY help is appreciated!
- Salad Viking
- Posts: 752
- Joined: Tue Apr 20, 2010 8:58 pm
- Location: In high orbit
Re: Help Needed for adding animation sprites
To add more frames to the animations, you'll have to inherit from the BFG and override its states. If you're having problems, you should show us your source code or upload your wad so we can look at it..
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
*facepalm* Now I feel like an idiot for not thinking of that before. Anyway...
Here's the code from the Smooth Animation wad entitled "Enhanced":
// --------------------------------------------------------------------------
//
// BFG 9000
//
// --------------------------------------------------------------------------
ACTOR BFG9000 : DoomWeapon 2006
{
Game Doom
Height 20
SpawnID 31
Weapon.SelectionOrder 2800
Weapon.AmmoUse 40
Weapon.AmmoGive 40
Weapon.AmmoType "Cell"
//Weapon.PreferredSkin "BFG-Marine"
+WEAPON.NOAUTOFIRE
Inventory.PickupMessage "$GOTBFG9000"
States
{
Ready:
BFGG A 1 A_WeaponReady
Loop
Deselect:
BFGG A 0 A_PlaySound("weapons/select")
BFGG A 1 A_Lower
goto Deselect+1
Select:
BFGG A 1 A_Raise
Loop
Fire:
BFGG A 20 A_BFGsound
BFGG B 10 A_GunFlash
BFGG B 10 A_FireBFG
BFGG B 20 A_ReFire
Goto Ready
Flash:
BFGF A 11 Bright A_Light1
BFGF B 6 Bright A_Light2
Goto LightDone
Spawn:
BFUG A -1
Stop
}
}
From what I've seen this looks almost if not identical to the original BFG DECORATE (http://zdoom.org/wiki/Classes:BFG9000)
Here's all of the text information from Beautiful Doom ver. 5.0 as originally written:
//**********
// BFG-9001
//**********
Actor BFG9001 : BFG9000 replaces BFG9000
{
Weapon.Selectionorder 280
inventory.pickupsound "weapons/bfg/draw"
weapon.upsound "weapons/bfg/draw"
states
{
Select:
// TNT1 A 0 A_raise
BFGN A 1 A_Raise
loop
Deselect:
// TNT1 A 0 A_lower
BFGN A 1 A_lower
loop
Ready:
BFGN A 1 A_Weaponready
loop
loop
Fire:
TNT1 A 0
TNT1 A 0 A_playsound("weapons/bfg/start")
BFGN ABCDE 4
BFGF ABCDE 2
TNT1 A 0 Radius_Quake(3,20,0,2,0)
BFGF F 5 bright A_firecustommissile("BFGBall1",0,1)
BFGF EBA 2
TNT1 A 0 A_ReFire
TNT1 A 0 A_Playsound("weapons/bfg/cool")
BFGN EEEEDDDDCCCCBBBBAAAA 1 A_FireCustomMissile("SmokeSpawner",0,0,random(-5,5),random(-4,-6))
goto ready
}
}
Actor BFGBall1 : BFGBall replaces BFGBall
{
+FORCEXYBILLBOARD
+THRUGHOST
renderstyle ADD
alpha 1.0
decal BFGLightning
seesound "weapons/bfg/fire"
deathsound "weapons/bfg/explosion"
translation "192:207=112:127"
States
{
Spawn:
BFGB ABCDEFGH 1 bright A_Spawnitem("BFGTrail")
loop
Death:
TNT1 A 0
TNT1 A 0 Radius_Quake(4,34,0,4,0)
BFE1 AB 8 bright
BFE1 C 8 bright A_BFGSpray
BFE1 DEF 8 bright
stop
}
}
Actor BFGTrail
{
+FORCEXYBILLBOARD
renderstyle ADD
alpha 0.3
+NOTDMATCH
+NOCLIP
+NOINTERACTION
+NOGRAVITY
translation "192:207=112:127"
states
{
Spawn:
TNT1 A 0
TNT1 A 0 Thing_ChangeTid(0,390)
BFGB ABCDEFGH 1 A_fadeout(0.01)
loop
}
}
// not used since ver. 3.4
Actor BFGBall2 : BFGBall1
{
decal BFGScorch
scale 0.2
damage 30
States
{
Spawn:
BFGB ABCDEFGH 1 bright A_Spawnitem("BFGTrail1")
loop
Death:
BFE1 A 8 bright A_Explode(160,128,0)
BFE1 BCDEF 8 bright
stop
}
}
Actor BFGTrail1 : BFGTRail
{
scale 0.2
states
{
Spawn:
BFGB A 1 A_fadeout(0.08)
loop
}
}
Hopefully this can give people a better insight to my problem. The sprites are easily transferable from one wad to another, and as far as I know only the coding needs to be converted.
Here's the code from the Smooth Animation wad entitled "Enhanced":
// --------------------------------------------------------------------------
//
// BFG 9000
//
// --------------------------------------------------------------------------
ACTOR BFG9000 : DoomWeapon 2006
{
Game Doom
Height 20
SpawnID 31
Weapon.SelectionOrder 2800
Weapon.AmmoUse 40
Weapon.AmmoGive 40
Weapon.AmmoType "Cell"
//Weapon.PreferredSkin "BFG-Marine"
+WEAPON.NOAUTOFIRE
Inventory.PickupMessage "$GOTBFG9000"
States
{
Ready:
BFGG A 1 A_WeaponReady
Loop
Deselect:
BFGG A 0 A_PlaySound("weapons/select")
BFGG A 1 A_Lower
goto Deselect+1
Select:
BFGG A 1 A_Raise
Loop
Fire:
BFGG A 20 A_BFGsound
BFGG B 10 A_GunFlash
BFGG B 10 A_FireBFG
BFGG B 20 A_ReFire
Goto Ready
Flash:
BFGF A 11 Bright A_Light1
BFGF B 6 Bright A_Light2
Goto LightDone
Spawn:
BFUG A -1
Stop
}
}
From what I've seen this looks almost if not identical to the original BFG DECORATE (http://zdoom.org/wiki/Classes:BFG9000)
Here's all of the text information from Beautiful Doom ver. 5.0 as originally written:
//**********
// BFG-9001
//**********
Actor BFG9001 : BFG9000 replaces BFG9000
{
Weapon.Selectionorder 280
inventory.pickupsound "weapons/bfg/draw"
weapon.upsound "weapons/bfg/draw"
states
{
Select:
// TNT1 A 0 A_raise
BFGN A 1 A_Raise
loop
Deselect:
// TNT1 A 0 A_lower
BFGN A 1 A_lower
loop
Ready:
BFGN A 1 A_Weaponready
loop
loop
Fire:
TNT1 A 0
TNT1 A 0 A_playsound("weapons/bfg/start")
BFGN ABCDE 4
BFGF ABCDE 2
TNT1 A 0 Radius_Quake(3,20,0,2,0)
BFGF F 5 bright A_firecustommissile("BFGBall1",0,1)
BFGF EBA 2
TNT1 A 0 A_ReFire
TNT1 A 0 A_Playsound("weapons/bfg/cool")
BFGN EEEEDDDDCCCCBBBBAAAA 1 A_FireCustomMissile("SmokeSpawner",0,0,random(-5,5),random(-4,-6))
goto ready
}
}
Actor BFGBall1 : BFGBall replaces BFGBall
{
+FORCEXYBILLBOARD
+THRUGHOST
renderstyle ADD
alpha 1.0
decal BFGLightning
seesound "weapons/bfg/fire"
deathsound "weapons/bfg/explosion"
translation "192:207=112:127"
States
{
Spawn:
BFGB ABCDEFGH 1 bright A_Spawnitem("BFGTrail")
loop
Death:
TNT1 A 0
TNT1 A 0 Radius_Quake(4,34,0,4,0)
BFE1 AB 8 bright
BFE1 C 8 bright A_BFGSpray
BFE1 DEF 8 bright
stop
}
}
Actor BFGTrail
{
+FORCEXYBILLBOARD
renderstyle ADD
alpha 0.3
+NOTDMATCH
+NOCLIP
+NOINTERACTION
+NOGRAVITY
translation "192:207=112:127"
states
{
Spawn:
TNT1 A 0
TNT1 A 0 Thing_ChangeTid(0,390)
BFGB ABCDEFGH 1 A_fadeout(0.01)
loop
}
}
// not used since ver. 3.4
Actor BFGBall2 : BFGBall1
{
decal BFGScorch
scale 0.2
damage 30
States
{
Spawn:
BFGB ABCDEFGH 1 bright A_Spawnitem("BFGTrail1")
loop
Death:
BFE1 A 8 bright A_Explode(160,128,0)
BFE1 BCDEF 8 bright
stop
}
}
Actor BFGTrail1 : BFGTRail
{
scale 0.2
states
{
Spawn:
BFGB A 1 A_fadeout(0.08)
loop
}
}
Hopefully this can give people a better insight to my problem. The sprites are easily transferable from one wad to another, and as far as I know only the coding needs to be converted.
- Salad Viking
- Posts: 752
- Joined: Tue Apr 20, 2010 8:58 pm
- Location: In high orbit
Re: Help Needed for adding animation sprites
You know you could just copy-paste the code from Beautiful Doom into your DECORATE file, right? By the way, DO NOT copy the base DECORATE classes into your wad. They are already defined and redefining them in your wad is illegal (not in the law sense). Once again, if you want to make alterations to the weapons, inherit from them. Also, put your code between
Code: Select all
tags next time.
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
I did not originally write the code in question. It was like that when I had originally downloaded it. Also, simply copy and pasting it over does not prove to be helpful. When using basic cheats to test the gun, the entry itself (the 7 on the HUD bar) remained dark while the others were lit, to which the gun was inaccessible. Nothing would happen even when pressing the 7 key or even using the next weapon key function. You now see my dilemma, more refinement is needed for this to work. Why did you think I posted this question on here to begin with?
Re: Help Needed for adding animation sprites
Spoiler: Too long, don't readNEW NOTE:
Code: Select all
Actor BFG9001 : BFG9000 replaces BFG9000
{
}
With the above code, "give bfg9000" gives the weapon properly (and lights slot 7).
"Give BFG9001" gives BFG9001, which is not associated with a weapon slot and is not selectable once you deselect it.
Give all seems to fail for the replaced item.
Weapons can define their weapon slots, or player classes can define their weapons; the wiki or other members should be able to help you with that.
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
"Why did you think I posted this question on here to begin with?" Presumably because you wanted help from friendly helpful people who do their best to understand what you want and guess what you might have missed or done wrong."
This being true, I don't mean to appear hostile, but I'm trying my best to explain my situation, and it's certainly not easy.
My purpose of this conversion is to give the BFG more animation sprites so that it may fit in better with the rest of the wad, which in turn, adds more frames of animation to each weapon, giving a more fluid motion. The only weapons left out of this process by the wads original creator is the chainsaw (Which doesn't really need any work) and the BFG, which is my goal. I'm sorry if I did not specify this before.
I notice entries in red and yellow appear in the console when loading up the game, but there are too many to type out manually. Is there some kind of log I can refer to so maybe I can copy and paste the information?
I am merely running the "enhanced.wad" with the original Ultimate Doom and Doom 2 IWADS for testing. For the most part the wad works perfectly left alone. But for what I'm trying to do, for whatever reason, being DECORATE or Sprites or otherwise, It isn't as simple as I original thought it would be when I started this venture.
BFGG A 0 A_PlaySound("weapons/select")
This sound is exclusive to the Enhanced wad, and applies to the other weapons as well. For whatever reason, only minor changes were made to the DECORATE by the original author such as the sound, and for the most part, the same as the default settings.
The smoke spawner I believe is a feature exclusive to the Beautiful Doom wad. The wad comes with the sprites in question, it is simple to move them from one wad to another, but I still feel the coding is the issue.
"give bfg9000" does work as it generates the original weapon, the modified version is not present as you know. So if the cheat fails, would I need to find it physically in-game to test? The weapon slot also seems like a possibility, though I'm not sure.
Even looking at the DECORATE for the BFG in the zDoom PK3 leaves me more confused, but for the sake of help I'll post it anyway:
// --------------------------------------------------------------------------
//
// BFG 9000
//
// --------------------------------------------------------------------------
ACTOR BFG9000 : DoomWeapon 2006
{
Game Doom
Height 20
SpawnID 31
Weapon.SelectionOrder 2800
Weapon.AmmoUse 40
Weapon.AmmoGive 40
Weapon.AmmoType "Cell"
+WEAPON.NOAUTOFIRE
Inventory.PickupMessage "$GOTBFG9000"
States
{
Ready:
BFGG A 1 A_WeaponReady
Loop
Deselect:
BFGG A 1 A_Lower
Loop
Select:
BFGG A 1 A_Raise
Loop
Fire:
BFGG A 20 A_BFGsound
BFGG B 10 A_GunFlash
BFGG B 10 A_FireBFG
BFGG B 20 A_ReFire
Goto Ready
Flash:
BFGF A 11 Bright A_Light1
BFGF B 6 Bright A_Light2
Goto LightDone
Spawn:
BFUG A -1
Stop
OldFire:
BFGG A 10 A_BFGsound
BFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
BFGG B 0 A_Light0
BFGG B 20 A_ReFire
Goto Ready
}
}
ACTOR BFGBall
{
Game Doom
SpawnID 128
Radius 13
Height 8
Speed 25
Damage 100
Projectile
+RANDOMIZE
RenderStyle Add
Alpha 0.75
DeathSound "weapons/bfgx"
Obituary "$OB_MPBFG_BOOM"
States
{
Spawn:
BFS1 AB 4 Bright
Loop
Death:
BFE1 AB 8 Bright
BFE1 C 8 Bright A_BFGSpray
BFE1 DEF 8 Bright
Stop
}
}
ACTOR BFGExtra
{
+NOBLOCKMAP
+NOGRAVITY
RenderStyle Add
Alpha 0.75
States
{
Spawn:
BFE2 ABCD 8 Bright
Stop
}
}
This being true, I don't mean to appear hostile, but I'm trying my best to explain my situation, and it's certainly not easy.
My purpose of this conversion is to give the BFG more animation sprites so that it may fit in better with the rest of the wad, which in turn, adds more frames of animation to each weapon, giving a more fluid motion. The only weapons left out of this process by the wads original creator is the chainsaw (Which doesn't really need any work) and the BFG, which is my goal. I'm sorry if I did not specify this before.
I notice entries in red and yellow appear in the console when loading up the game, but there are too many to type out manually. Is there some kind of log I can refer to so maybe I can copy and paste the information?
I am merely running the "enhanced.wad" with the original Ultimate Doom and Doom 2 IWADS for testing. For the most part the wad works perfectly left alone. But for what I'm trying to do, for whatever reason, being DECORATE or Sprites or otherwise, It isn't as simple as I original thought it would be when I started this venture.
BFGG A 0 A_PlaySound("weapons/select")
This sound is exclusive to the Enhanced wad, and applies to the other weapons as well. For whatever reason, only minor changes were made to the DECORATE by the original author such as the sound, and for the most part, the same as the default settings.
The smoke spawner I believe is a feature exclusive to the Beautiful Doom wad. The wad comes with the sprites in question, it is simple to move them from one wad to another, but I still feel the coding is the issue.
"give bfg9000" does work as it generates the original weapon, the modified version is not present as you know. So if the cheat fails, would I need to find it physically in-game to test? The weapon slot also seems like a possibility, though I'm not sure.
Even looking at the DECORATE for the BFG in the zDoom PK3 leaves me more confused, but for the sake of help I'll post it anyway:
// --------------------------------------------------------------------------
//
// BFG 9000
//
// --------------------------------------------------------------------------
ACTOR BFG9000 : DoomWeapon 2006
{
Game Doom
Height 20
SpawnID 31
Weapon.SelectionOrder 2800
Weapon.AmmoUse 40
Weapon.AmmoGive 40
Weapon.AmmoType "Cell"
+WEAPON.NOAUTOFIRE
Inventory.PickupMessage "$GOTBFG9000"
States
{
Ready:
BFGG A 1 A_WeaponReady
Loop
Deselect:
BFGG A 1 A_Lower
Loop
Select:
BFGG A 1 A_Raise
Loop
Fire:
BFGG A 20 A_BFGsound
BFGG B 10 A_GunFlash
BFGG B 10 A_FireBFG
BFGG B 20 A_ReFire
Goto Ready
Flash:
BFGF A 11 Bright A_Light1
BFGF B 6 Bright A_Light2
Goto LightDone
Spawn:
BFUG A -1
Stop
OldFire:
BFGG A 10 A_BFGsound
BFGG BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_FireOldBFG
BFGG B 0 A_Light0
BFGG B 20 A_ReFire
Goto Ready
}
}
ACTOR BFGBall
{
Game Doom
SpawnID 128
Radius 13
Height 8
Speed 25
Damage 100
Projectile
+RANDOMIZE
RenderStyle Add
Alpha 0.75
DeathSound "weapons/bfgx"
Obituary "$OB_MPBFG_BOOM"
States
{
Spawn:
BFS1 AB 4 Bright
Loop
Death:
BFE1 AB 8 Bright
BFE1 C 8 Bright A_BFGSpray
BFE1 DEF 8 Bright
Stop
}
}
ACTOR BFGExtra
{
+NOBLOCKMAP
+NOGRAVITY
RenderStyle Add
Alpha 0.75
States
{
Spawn:
BFE2 ABCD 8 Bright
Stop
}
}
Re: Help Needed for adding animation sprites
Hmm... Maybe you should check out Wildweasel's GunLabs. There's a thead about that somewhere, and a link. It has, or will have, tutorials related to weapon modding, and may well provide you with the information you require to properly and complete replace a standard weapon with your modified version.
I haven't checked out "enhanced.wad" but it (or your copy) might be a little out of date or poorly designed. The fact that it duplicates/redefines the existing BFG-actor and doomednum seems to conflict with current best practices. It might not be a good basis for further work and experimenting, but could still be a source of resources and ideas, and perhaps you could learn something from trying to "fix" it.
I do believe that your primary problem (that which isn't merely ill advised, but also unsuccessful) is that the replacement weapon is not assigned to a weapon slot. To solve this you will probably need to modify either the player class(es) or use some extra weapon property and assign it to an item slot. Check out "Weapon.SlotNumber" on [wiki]Actor_properties[/wiki] and general info under [wiki]Weapon_slots[/wiki]
I haven't checked out "enhanced.wad" but it (or your copy) might be a little out of date or poorly designed. The fact that it duplicates/redefines the existing BFG-actor and doomednum seems to conflict with current best practices. It might not be a good basis for further work and experimenting, but could still be a source of resources and ideas, and perhaps you could learn something from trying to "fix" it.
I do believe that your primary problem (that which isn't merely ill advised, but also unsuccessful) is that the replacement weapon is not assigned to a weapon slot. To solve this you will probably need to modify either the player class(es) or use some extra weapon property and assign it to an item slot. Check out "Weapon.SlotNumber" on [wiki]Actor_properties[/wiki] and general info under [wiki]Weapon_slots[/wiki]
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
I have read the GunLab tutorials, and while helpful, only covers the basics of making new weapons. It might be useful for other projects, but I'm not so sure with this one. Seems far more complicated.
The Enhanced.wad I have is not the original. This was a bug fixed version released later in that same Doom World Forum that I posted a link to in my first post. The reason for this is that the original wad seems to be missing, as the website (drdteam or something like that) didn't seem to be there anymore. So obtaining any wad from that location was impossible (which almost all of them were linked with that site). The only reason I was able to get this one was because it was hosted on Media Fire or something similar, but I remember that it was on page 5 of that particular discussion.
I tried adding the Weapon.SlotNumber 7 line to the DECORATE, and didn't really do anything. Checked my spelling and that wasn't the issue. I'll be sure to keep this property in mind.
The Enhanced.wad I have is not the original. This was a bug fixed version released later in that same Doom World Forum that I posted a link to in my first post. The reason for this is that the original wad seems to be missing, as the website (drdteam or something like that) didn't seem to be there anymore. So obtaining any wad from that location was impossible (which almost all of them were linked with that site). The only reason I was able to get this one was because it was hosted on Media Fire or something similar, but I remember that it was on page 5 of that particular discussion.
I tried adding the Weapon.SlotNumber 7 line to the DECORATE, and didn't really do anything. Checked my spelling and that wasn't the issue. I'll be sure to keep this property in mind.
Re: Help Needed for adding animation sprites
Code: Select all
Actor BFG9001 : BFG9000 replaces BFG9000
{
Weapon.SlotNumber 7
}
Then I tested the BFG9001-actor as you posted it (unmodified and without necessary graphics). I cannot successfully "give BFG9001" with that, but its probably because of the graphics.
Replacing all graphics in the BFG9001-code with graphics I had available (BFGG) caused "give BFG9001" to function. (Are you able to give yourself the weapon explicitly?)
After making sure it was possible to get the BFG9001 at all, I assigned it to slot 7 with Weapon.SlotNumber, and tested "Give all". That also worked correctly.
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
I tested the code as you presented it and I received the same result. "giveall " lit up the 7th spot and "take bfg9001" also worked as you described.
What exact changes did you make to the code for it to work with the standard graphics? This was one of the issues I was having given the more numerous amount of entries compared to other weapons.FDARI wrote:Replacing all graphics in the BFG9001-code with graphics I had available (BFGG) caused "give BFG9001" to function. (Are you able to give yourself the weapon explicitly?)
Re: Help Needed for adding animation sprites
I was just testing the concept. In order to test if it would work if all necessary graphics were present, I changed all graphics in the decorate code to BFGG A. If making that change causes the weapon to appear (although all graphics will be the same, unchanging image), it is an indication that your problem is missing graphics. If it turns out you are missing graphics, find out what graphics the weapon actually requires, and what graphics you actually have. If finding the graphics you have is difficult (proper tools should let you do it, Slade3 might be the thing), you can also test by removing/altering parts of the code until what is left works.
Another approach, which might be more feasible:
Start with the near empty definition ( Actor BFG9001 : BFG9000 replaces BFG9000{ Weapon.SlotNumber 7 } ) and add code step by step.
First, add all the properties you want, possibly some of these:
Weapon.Selectionorder 280
inventory.pickupsound "weapons/bfg/draw"
weapon.upsound "weapons/bfg/draw"
Test. Does it work? If yes, proceed.
Next, add the "States"-block and a single state. If you want to work with the 9001-redefinition, I recommend adding segments one by one, from the top and down. The first state to test would be:
Select:
// TNT1 A 0 A_raise
BFGN A 1 A_Raise
loop
If the weapon appears on "give all" and/or "give "bfg9001"; good start. If not, you might be missing BFGNA0. Try adding the graphic, or changing the decorate-code to BFGG A 1 A_Raise. If it works, the graphics in this region cause a problem.
Continue with suitable code chunks until you have added and fixed all desired weapon states.
The weapon will not work properly until you create the other actors, but their absence is not critical in this phase. The weapon will show, even if the projectile actor is not defined.
You might need to go through a similar process with the projectiles and other related actors afterwards.
Another approach, which might be more feasible:
Start with the near empty definition ( Actor BFG9001 : BFG9000 replaces BFG9000{ Weapon.SlotNumber 7 } ) and add code step by step.
First, add all the properties you want, possibly some of these:
Weapon.Selectionorder 280
inventory.pickupsound "weapons/bfg/draw"
weapon.upsound "weapons/bfg/draw"
Test. Does it work? If yes, proceed.
Next, add the "States"-block and a single state. If you want to work with the 9001-redefinition, I recommend adding segments one by one, from the top and down. The first state to test would be:
Select:
// TNT1 A 0 A_raise
BFGN A 1 A_Raise
loop
If the weapon appears on "give all" and/or "give "bfg9001"; good start. If not, you might be missing BFGNA0. Try adding the graphic, or changing the decorate-code to BFGG A 1 A_Raise. If it works, the graphics in this region cause a problem.
Continue with suitable code chunks until you have added and fixed all desired weapon states.
The weapon will not work properly until you create the other actors, but their absence is not critical in this phase. The weapon will show, even if the projectile actor is not defined.
You might need to go through a similar process with the projectiles and other related actors afterwards.
- BlueFireZ88
- Posts: 1087
- Joined: Tue Jan 18, 2011 9:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Tallon IV
- Contact:
Re: Help Needed for adding animation sprites
The first method doesn't work, though I'm not sure if I even did that right to begin with. The second held more interesting results.
When I added the first state to the decorate and proceeded to test, no change was seemed to be made. The game simply acted like that particular sprite wasn't even there. Even the sprite in question IS in the same wad as the decorate along with the other sprites that it's associated with.
I do have my own theories to why this isn't working, but really don't have any evidence to support them, but I ultimately feel we might be hitting some kind of dead end with these sprites. It isn't possible to hard code sprites to where they can't be used anywhere outside of their original wad, is there?
But I do have an idea I want to pitch to you:
Is it possible we can edit the original BFG sprites to where they are identical to the B-Doom counterparts, that we can simply add them instead? We would have to edit the code a bit of course, but I think that might be an alternative to look into.
When I added the first state to the decorate and proceeded to test, no change was seemed to be made. The game simply acted like that particular sprite wasn't even there. Even the sprite in question IS in the same wad as the decorate along with the other sprites that it's associated with.
I do have my own theories to why this isn't working, but really don't have any evidence to support them, but I ultimately feel we might be hitting some kind of dead end with these sprites. It isn't possible to hard code sprites to where they can't be used anywhere outside of their original wad, is there?
But I do have an idea I want to pitch to you:
Is it possible we can edit the original BFG sprites to where they are identical to the B-Doom counterparts, that we can simply add them instead? We would have to edit the code a bit of course, but I think that might be an alternative to look into.
Re: Help Needed for adding animation sprites
I am getting slightly confused. I did not quite understand your idea. However, if you have all the graphics, perhaps you could import them to a mini-project dedicated to producing a working BFG-replacement / enhancement. The mod would only contain decorate and graphics for that particular weapon (and eventually, its ammo and projectiles), and once you get it working, put it back in context and get it working in the complete wad/pk3. Also: Try using pk3 if you haven't already.
I think, if I am to be of any more use to you, I will need the wads you are working with. A note on graphics lumps though: They might be understood differently depending on their location in the wad or pk3. In wads, marker lumps such as S_START|S_END (or SS_START|SS_END) inform the game that graphics have a specific purpose. Folders provide similar information in the pk3-structure. It might be possible for the graphics to be misplaced and therefore not used for your weapon. Graphics lumps might also contain offsets and perhaps other data that I have little knowledge of.
Actually, when working with graphics you should hope for a better helper than me. I'm primarily good at locating the code-line that fails and guessing the reason.
I think, if I am to be of any more use to you, I will need the wads you are working with. A note on graphics lumps though: They might be understood differently depending on their location in the wad or pk3. In wads, marker lumps such as S_START|S_END (or SS_START|SS_END) inform the game that graphics have a specific purpose. Folders provide similar information in the pk3-structure. It might be possible for the graphics to be misplaced and therefore not used for your weapon. Graphics lumps might also contain offsets and perhaps other data that I have little knowledge of.
Actually, when working with graphics you should hope for a better helper than me. I'm primarily good at locating the code-line that fails and guessing the reason.