Starke Von Oben Posted September 17, 2009 Trying to find one. I basically want to know how to make a basic actor/decoration (a hanging light). Do any such tutorials exist? Step by step ones? 0 Quote Share this post Link to post
Gez Posted September 17, 2009 Here's a list of steps that you can follow. You only need the first to make a lamp, though, but I'd recommend also reading the second anyway. http://zdoom.org/wiki/Creating_non-interactive_decorations http://zdoom.org/wiki/Using_inheritance http://zdoom.org/wiki/Creating_new_projectiles http://zdoom.org/wiki/Creating_decorations_that_can_be_%28de%29activated http://zdoom.org/wiki/Creating_new_monsters_or_other_complex_items http://zdoom.org/wiki/Creating_new_weapons http://zdoom.org/wiki/Creating_new_player_classes There's also a couple of tutorial threads on Skulltag. IMO, they aren't more helpful than the wiki, but to each their own. http://skulltag.com/forum/viewtopic.php?f=43&t=14416 http://skulltag.com/forum/viewtopic.php?f=43&t=7151 0 Quote Share this post Link to post
Starke Von Oben Posted September 17, 2009 I assume with DECORATE I can write this all out in notepad? I don't need any additional programs other than XWE? 0 Quote Share this post Link to post
DuckReconMajor Posted September 18, 2009 You can create a new lump in your wad in XWE called DECORATE and write it all out there. Or, if you're insistent on using Notepad you can write it out with that and import it. 0 Quote Share this post Link to post
Kappes Buur Posted September 18, 2009 Starke Von Oben said:I assume with DECORATE I can write this all out in notepad? I don't need any additional programs other than XWE? While both have their little quirks, SlumpEd 0.7 is an attractive alternative to XWE. For text lumps, like DECORATE, it presents text with coloured highlighting. 0 Quote Share this post Link to post
Starke Von Oben Posted September 18, 2009 So much info, and it's hard to navigate all the way through it! Could someone provide me with a basic step by step guide what I would need to do to make a simple decorative object (e.g. hanging object decoration)? I'm pretty sure once I know exactly what to do all that info above will fall seamlessly into place. 0 Quote Share this post Link to post
Gez Posted September 18, 2009 Okay. Take a look at this: http://zdoom.org/wiki/Classes:Chandelier It's a pre-existing hanging decoration. ACTOR Chandelier 28 { Game Heretic Radius 20 Height 60 +SPAWNCEILING +NOGRAVITY States { Spawn: CHDL ABC 4 Loop } } ACTOR: signals the decorate parser that we're beginning a new actor declaration. Chandelier: name of the class. 28: map editor number. To use this chandelier on a map, use thing number 28. {: open the list of properties. Game Heretic: signal that this actor is specific to Heretic. This is here only to prevent number conflicts with doom editor numbers and spawn ID (but this actor does not have a spawn ID anyway). Here we have a conflict because 28 is used as the map editor number for heads on a stick in Doom, a burned tree stump in Hexen, and a light in a cage in Strife. See the list of standard map editor numbers to prevent conflicts from happening. The actor could still be used in Doom, Hexen, Strife or Chex Quest, but you'd need to use a script or another decorate item to make it appear. Radius 20: this decoration has a radius of 20 map units. Despite what "radius" means, collision boxes are not cylindrical but square; the misnomer is from id's part. Height 60: this decoration has a height of 60. So now you know it's a block that's 40x40x60 in dimension. +SPAWNCEILING: gives it the SPAWNCEILING flag, which makes the game place it on the ceiling when spawned. It starts with a + because you add this flag. You could remove it with a -SPAWNCEILING flag as well. +NOGRAVITY: gives it the NOGRAVITY flag, which means the object will not fall down (and therefore, remain on the ceiling). States: Signals that we're going to list the states for the actor. {: open the list of states Spawn: create the spawn state for the actor. CHDL ABC 4: A short way of saying that the actor will go through the CHDLA*, CHDLB*, CHDL* frames each for a duration of 4 tics. Loop: Tell to go back to the last state label (here, Spawn:) once the last frame is finished. So it'll be an endless ABCABCABCABCA dance, which makes our chandelier animated. }: close the list of states }: close the list of properties. This one is pretty simple. Only way you could make it simpler would be with a decoration that isn't even animated. Say, for example, you have a CHDLD0 sprite that corresponds to an unlit chandelier. You could have simply: States { Spawn: CHDL D -1 Stop } -1 means "forever" and Stop means the object ceases existing when it leaves the previous state. Which will never happen since it lasts forever. And now here comes the wonderful part of DECORATE: inheritance. You can base an actor on one that already exists. The new actor will inherit everything from the old except for its class name (obviously), its editor number, its spawn ID, and its "game" selector. Note that an actor does not need to have a map editor number, a spawn ID, or a game selector anyway. The game selector is only needed to avoid conflicts with the two above numbers. So, you're making an unlit chandelier. You'll want to give it map editor number 1337, as an example. You can inherit from the existing chandelier:ACTOR UnlitChandelier : Chandelier 1337 { States { Spawn: CHDL D -1 Stop } } The flags, height and radius will be the same as the parent actor, so that's less thing you need to declare. 1 Quote Share this post Link to post
Kappes Buur Posted September 19, 2009 Gez's post clearly shows the DECORATE progression for a static decoration. Another nice step by step explanation, which you might find illuminating, was given by Hotwax a couple of years back http://forum.zdoom.org/viewtopic.php?f=3&t=15465&start=15 0 Quote Share this post Link to post
Starke Von Oben Posted September 19, 2009 Thank you all very much for your help :D 0 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 Ok I am encountering problems yet again. I have my image. I understand how the code works, but how do I tell the code to use a specific image in my wad as the sprite in question? 0 Quote Share this post Link to post
Torn Posted September 20, 2009 Starke Von Oben said:Ok I am encountering problems yet again. I have my image. I understand how the code works, but how do I tell the code to use a specific image in my wad as the sprite in question? I don't know what you have named your image in your wad. But eg: if you have named it MYLAMPA0, you would just use spawn: MYLAMP A -1 loop just like in the example. 0 Quote Share this post Link to post
Kappes Buur Posted September 20, 2009 Torn said:spawn: MYLAMP A -1 loop Uhh, not quite like this. The sprite name is always 4 characters long. So, LAMP would be a good name, but not MYLAMP. See also http://zdoom.org/wiki/Sprite 0 Quote Share this post Link to post
Gez Posted September 20, 2009 edit: ninjaed A Doom lump may have up to 8 characters. For a sprite, it's spread up in this way: IDEN F A [M A] IDEN: identifier (always exactly four letters, never more, never less) F: frame, must be in the range A-Z or one of these three characters: [\] A: angle for rotation. Either 0 if the sprite has no rotation (like a decoration item) or a number between 1 and 8. 1 is front, 2 is 45°, 3 is 90°, and so on until 8 which is 315°. M: Mirrored frame. This is optional. It allows to define two frames with just one picture: the first will be normal, and the second will be mirrored horizontally. A: angle for the mirrored frame. E.g., BOSSA2B8 corresponds to BOSS A2 and BOSS B8 at the same time, with the latter a mirrored version of the former. The angle does not matter in DECORATE, since it only concerns the renderer. So you'll just say "BOSS A" to say "frame A of the BOSS sprite" and the game will pick the angle itself as appropriate. 1 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 I wish the wiki was as clear and precise as this. Thanks again. 0 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 Still having troubles. I get an ! symbol when I load up my patch with the sprite. I decided to copy the data from here: http://zdoom.org/wiki/Creating_non-interactive_decorations And i put in an image called HAW6.bmp into the wad. But nothing has happened. 0 Quote Share this post Link to post
WH-Wilou84 Posted September 20, 2009 Try to rename your HAW6.bmp into HAW6A0.bmp, this may work. 0 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 Just renamed the sprite to HAW6A10 and it's crashed the game! Got the error "Bad frame characters in lump HAW6C10". Obviously naming my sprites wrongly. Can someone upload an example wad with a series of static sprites in it for me to look at? 0 Quote Share this post Link to post
Gez Posted September 20, 2009 Starke Von Oben said:HAW6.bmp VADE RETRO SATANAS! Okay, there are two problems here. The first and most immediately apparent was, indeed, that your sprite does not have a frame nor a rotation number. HAW6A0 is a valid name. The second problem is that you are using a BMP file. This format is not supported by ZDoom because it is too cumbersome. Using BMP pictures is like using uncompressed .wav files for music. It is something that should never be done and therefore, in their infinite wisdom, Graf and Randy purposefully did not implement support for this format. So unless you converted it to a supported format (Doom's native graphic format, PNG, or even TGA) it will not work. Note that XWE converts stuff automatically unless you go to great pains to tell it not too. Slumped, on the other hand, does not convert anything unless you tell it too. So make sure that it's not in BMP in the wad. Starke Von Oben said:HAW6A10 This can not work. Let's analyze: HAW6: sprite name - valid A: frame name - valid 1: rotation number - valid 0: mirrored frame name - INVALID! : mirrored frame rotation number - MISSING! Starke Von Oben said:HAW6C10 What, it's HAW6A10 or HAW6C10? Either way, what you want is HAW6A0 or HAW6C0. Not 10, 0. 0 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 [WH]-Wilou84 said: Try to rename your HAW6.bmp into HAW6A0.bmp, this may work. Yes, that worked! Break that down for me - I am finding this naming of sprites somewhat confusing. 0 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 So this is how one makes a standard static sprite in Zdoom? actor Eagle 10242 { height 128 radius 24 +SOLID states { Spawn: EAGL A 10 loop } } The name of the sprite is EAGLA0. It appears in the game, but as I said I'm still somewhat confused with sprite naming. 0 Quote Share this post Link to post
Gez Posted September 20, 2009 Starke Von Oben said:So this is how one makes a standard static sprite in Zdoom? actor Eagle 10242 { height 128 radius 24 +SOLID states { Spawn: EAGL A 10 loop } } Since it's not animated and it doesn't do anything (no codepointer), instead of "EAGL A 10" you should use "EAGL A -1". -1 means "forever" so the game won't bother running the tick counter for this actor and going back to the same state. Sure, it's doubtful it'll make even one FPS of difference, but well... Starke Von Oben said:as I said I'm still somewhat confused with sprite naming. If only someone had posted a detailed explanation above... Maybe something that would have read like this: Gez said:A Doom lump may have up to 8 characters. For a sprite, it's spread up in this way: IDEN F A [M A] IDEN: identifier (always exactly four letters, never more, never less) F: frame, must be in the range A-Z or one of these three characters: [\] A: angle for rotation. Either 0 if the sprite has no rotation (like a decoration item) or a number between 1 and 8. 1 is front, 2 is 45°, 3 is 90°, and so on until 8 which is 315°. M: Mirrored frame. This is optional. It allows to define two frames with just one picture: the first will be normal, and the second will be mirrored horizontally. A: angle for the mirrored frame. E.g., BOSSA2B8 corresponds to BOSS A2 and BOSS B8 at the same time, with the latter a mirrored version of the former. The angle does not matter in DECORATE, since it only concerns the renderer. So you'll just say "BOSS A" to say "frame A of the BOSS sprite" and the game will pick the angle itself as appropriate. 0 Quote Share this post Link to post
Starke Von Oben Posted September 20, 2009 Gez you are a genius! Yes it's slowly starting to make a lot of sense now. I've just made a series of Static Trees and an animated camp fire :D Is it also possible with Decorate to scale down images? Let's say I have a massive sprite that's 256 pixles high, but I want to scale it down in the game engine (similar to Blood). Is that possible with Decorate/Zdoom? 0 Quote Share this post Link to post
Torn Posted September 21, 2009 You should really read more into the wiki instead... 0 Quote Share this post Link to post
Starke Von Oben Posted September 21, 2009 Torn said:You should really read more into the wiki instead... Reading the wiki is now far easier and worthwhile for myself as a result of this thread. Consider it a "Decorate for Dummies" that I'm using to get to grips with it. 0 Quote Share this post Link to post
Starke Von Oben Posted September 21, 2009 How would one go about giving an object a sound? Let's say I want to give my campfire the sound of crackling fire. How would I go about that? Are there particular names you need to give .wav files similar to sprites? 0 Quote Share this post Link to post
aaglo Posted November 8, 2009 Hi! I had similar troubles with the simplest sprites. But the Doom Builder 1 does not know the dimensions or the looks of the sprites in the editor. My code looks like this: ---------------------- actor TMS1 10242 { Height 40 Radius 20 +SOLID States { Spawn: TMS1 A -1 stop } } ----------------------- The editor still doesn't show the sprite, dimensions, ect. It doesn't even show in the 3d-mode. But it shows in the game. Why's this? 0 Quote Share this post Link to post
aaglo Posted November 10, 2009 Starke Von Oben said:How would one go about giving an object a sound? Let's say I want to give my campfire the sound of crackling fire. How would I go about that? Are there particular names you need to give .wav files similar to sprites? I did something like that in this way: 1. Add this line (or similar) to the SNDINFO-lump $AMBIENT 3 vile/firecrkl POINT 4 CONTINUOUS .55 (3 is the ambient sound thing no., vile/firecrkl is the archvile fire-sound, 4 is the falloff distance (the smaller, the shorter distance IIRC) and .55 is the volume. 2. Add the Ambient sound thing to the fireplace. That'll propably take care of it :) 0 Quote Share this post Link to post
Kyka Posted November 10, 2009 *Bookmarks page.* Thanks guys. Stuff like this is invaluable. 0 Quote Share this post Link to post
noigs2015 Posted August 30, 2020 I come from future because I have a similar issue. Â I'm use Slade and GZDB, and I did what it said, and when I use the 3D mode on GZDB all things appears, but in the actual test, the textures doesn't exist. Â Â 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.