Need help with a DECORATE decoration (noninteractive)

Archive of the old editing forum
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.
Locked
User avatar
cq75
Posts: 1212
Joined: Sun Dec 27, 2009 9:28 pm
Graphics Processor: nVidia with Vulkan support
Location: Just beyond the line horizon

Need help with a DECORATE decoration (noninteractive)

Post by cq75 »

I just started editing DECORATE lumps, and I came up with this for my code for a new decorate actor called "BrownBarrel"

Image

The sprite is called BARRA0, I exported it from another wad.

In doombuilder, the Thing shows up with cyan around it

Image

and in game, it shows up as an exclamation point flag... what went wrong?

I went through this tutorial http://zdoom.org/wiki/Creating_non-inte ... ecorations



In some wads I saw that DECORATE referenced actors as <sprite name> <letter> -1 if there was only one sprite in the loop, e.g., for my sprite it would be BARR A -1.

Why doesn't it mess it up, though? I thought that number designated angle, does -1 mean from all angles, or does it not matter what the number on the end is if there's only one sprite of that name and letter?

Also, does it matter whether I use "Stop" or "loop"? Do they do the same thing in this case?
User avatar
ZDG
Posts: 918
Joined: Sat Jan 02, 2010 12:01 pm
Location: in SlumpEd

Re: Need help with a DECORATE decoration (noninteractive)

Post by ZDG »

That's because index 245 of the palette is NOT CYAN AND NOT TRANSPARENT!
and the number at the end (your -1) is the DURATION of the frame.
Gez
 
 
Posts: 17943
Joined: Fri Jul 06, 2007 3:22 pm

Re: Need help with a DECORATE decoration (noninteractive)

Post by Gez »

Code: Select all

BARR A 0
There's the first mistake here. While the sprite is named BARRA0, this is not what you should put in the code. The number in the code does not correspond to the angle to show (since it depends on the angle, after all) but to the length that the actor must remain in that state. The number in the sprite does correspond to the angle (0 for all angles, and 1-8 or 1-F otherwise). So, do not confuse sprite name and state declaration.

So what you want is

Code: Select all

BARR A -1
-1 means "infinite".

With a duration of 0, it means that the actor instantly quits that state, and then reaches the stop, which means that it ceases existing. That's why you get an error symbol.

A loop wouldn't help, because with a 0 duration, you'd get an infinite loop -- it'd freeze the whole game.
User avatar
cq75
Posts: 1212
Joined: Sun Dec 27, 2009 9:28 pm
Graphics Processor: nVidia with Vulkan support
Location: Just beyond the line horizon

Re: Need help with a DECORATE decoration (noninteractive)

Post by cq75 »

Ok, thanks, I didn't know that the sprite name didn't need to (and shouldn't, this time) match the name in the code.

fixed that

Image

but it still shows up as an error symbol


what does the letter in the sprite name mean, just wondering?



And I don't think this has anything to do with transparency... I exported it directly from another doom wad.
User avatar
ZDG
Posts: 918
Joined: Sat Jan 02, 2010 12:01 pm
Location: in SlumpEd

Re: Need help with a DECORATE decoration (noninteractive)

Post by ZDG »

The letter is the frame letter, it's when you have multiple frames. Also, is your sprite name BARRA0?
Gez
 
 
Posts: 17943
Joined: Fri Jul 06, 2007 3:22 pm

Re: Need help with a DECORATE decoration (noninteractive)

Post by Gez »

You should still have a stop (or loop, or wait, whatever) after the state.
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: Need help with a DECORATE decoration (noninteractive)

Post by DBThanatos »

I was told actually that it didnt matter, since the barrel wont ever get past the -1 frame.
User avatar
cq75
Posts: 1212
Joined: Sun Dec 27, 2009 9:28 pm
Graphics Processor: nVidia with Vulkan support
Location: Just beyond the line horizon

Re: Need help with a DECORATE decoration (noninteractive)

Post by cq75 »

ZDG wrote:Also, is your sprite name BARRA0?
yes
Gez wrote:You should still have a stop (or loop, or wait, whatever) after the state.
DBThanatos wrote:I was told actually that it didnt matter, since the barrel wont ever get past the -1 frame.
It doesn't, same effect even if I put "stop" at the end.
Gez
 
 
Posts: 17943
Joined: Fri Jul 06, 2007 3:22 pm

Re: Need help with a DECORATE decoration (noninteractive)

Post by Gez »

DBThanatos wrote:I was told actually that it didnt matter, since the barrel wont ever get past the -1 frame.
It's just good practice.
cq75 wrote:It doesn't, same effect even if I put "stop" at the end.
Then I guess the problem is with the sprite itself. Although I thought XWE autoconverted them... But maybe you imported a BMP as raw data?

Can you download Slumped or Slade 3 and look at that sprite? If the type is "BMP" then you have your explanation. It should be in a supported [wiki]image format[/wiki]; and BMP isn't (because of its limitations).
Last edited by Gez on Sat Jun 05, 2010 11:02 am, edited 1 time in total.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Need help with a DECORATE decoration (noninteractive)

Post by NeuralStunner »

DBThanatos wrote:I was told actually that it didnt matter, since the barrel wont ever get past the -1 frame.
But it's still a good idea to include it. No sense getting into bad habits. ;)

Also, what image format is the sprite in? The fact that it's showing up with the supposedly transparent area showing indicates that something may be wrong with the image itself. The lump itself exists, is between sprite markers, and is named correctly in Decorate, so logically something else is preventing it from being loaded as a sprite. (If you ever try to put DooM II specific things in DooM 1, you'll notice the same error symbols in-game, as the sprites cannot be found, and thus the object cannot be spawned.)

BTW, "CJVILL11" isn't a sprite, and so shouldn't be in among the sprites. Move it out of the SS markers.

Edit: Bah, ninja'd again! Me and my prose. Or else everyone else's nimble fingers. :P
User avatar
cq75
Posts: 1212
Joined: Sun Dec 27, 2009 9:28 pm
Graphics Processor: nVidia with Vulkan support
Location: Just beyond the line horizon

Re: Need help with a DECORATE decoration (noninteractive)

Post by cq75 »

Gez wrote: Although I thought XWE autoconverted them... But maybe you imported a BMP as raw data?
That was it! I thought I was being slick by loading it as raw data, because it was from one wad to another, but it didn't convert! I never would have guessed that. Thanks! It shows up fine now

I kicked all the sprites in the pwad out, since they were all put in the same way.
User avatar
ZDG
Posts: 918
Joined: Sat Jan 02, 2010 12:01 pm
Location: in SlumpEd

Re: Need help with a DECORATE decoration (noninteractive)

Post by ZDG »

Ok, case closed.
Locked

Return to “Editing (Archive)”