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

How to change tree graphic in slade?

Recommended Posts

I want to put a christmas tree so I thought I could replace the TRE2A0 large tree image but no dice

 

Is there more to it than that?

 

Thanks everyone

Share this post


Link to post

Sprites go in the sprite namespace (between S_START and S_END markers). Put your TRE2A0 in there and it'll work. (At least in ports. For vanilla it's more complex.)

Share this post


Link to post
6 minutes ago, Gez said:

Sprites go in the sprite namespace (between S_START and S_END markers). Put your TRE2A0 in there and it'll work. (At least in ports. For vanilla it's more complex.)

 

Thanks, I did simply that - trying to get it to run in GZDOOM

 

no dice

 

it's weird I can see it in the editor but not in play

 

image.png.847504d01119a81db7704c4a63d792a1.png

 

image.png.d01070fcf53cbb70ece8ebb98b9213b7.png

 

image.png.0d06f411006bb306851244632f9239dd.png

Share this post


Link to post

OK I figured it out yay!

 

Next question, how can I make this as it's own placable item without interupting the original one, so I can have both exist at the same time? Thanks friend

s

 

image.png.dbc0d9def2e1c3abe82293c34f820088.png

Share this post


Link to post
10 minutes ago, Clippy said:

Next question, how can I make this as its own placable item without interupting the original one, so I can have both exist at the same time? Thanks friend

The simplest for that is to create a small DECORATE lump with code like this:

 

Actor ChristmasTree 2512
{
	Height 100
	Radius 40
	+BLOCKING
	States
	{
	Spawn:
		XMAS A -1
		Stop
	}
}

Rename your sprite to XMASA0. There you go, at least for GZDoom and other ports that can handle simple DECORATE code (Zandronum, k8vavoom, even the ACE engine).

 

By the way, what are your sprite's offsets? From your screenshot SLADE seems to have assumed it had the kind of offsets that HUD sprites have, so it's a bit weird. Offsets should be horizontally about half the sprite's width, and vertically about its whole height.

Share this post


Link to post

crap now the tree is below the ground, how do I reposition it on the graph?? Damn it I had it earlier and lost it :(

Share this post


Link to post

and SLADE3 can set offsets automatically, click on a sprite, and in the preview window there is a button with 2 circles and some lines (near the offsets inputs), click on it and for a decoration you can set Automatic Offset to "Monster", then press Ok, and slade3 set the sprite offsets automatically.

Share this post


Link to post

thanks I put in the script in as requested and this happens

 

image.png.0a75bff74ba05a57f250452c6defabc8.png

 

 

So far I got the xmas tree in there but was hoping to not also have to override the original tree

Share this post


Link to post

Sorry about that, I wrote the code from (faulty) memory instead of checking the flag names on the wiki.

Share this post


Link to post

Thank you both so much for your help, I'm clearly in over my heard here and you guys seem like pros

 

Hopefully last question: I'm using Doom builder to edit the map itself, how to I place my christmas tree decorate item?

Share this post


Link to post

I dont know if DB detects decorate actors (Im using UDB), but you can put a thing anywhere, and where is the "type" input, put the DoomEdNum of the xmas tree (2512)

 

 

Captura.PNG

Share this post


Link to post

It should appear in the DECORATE category but you can add an editor key if you'd rather have it somewhere else. For example:

Actor ChristmasTree 2512
{
	//$Category Obstacles
	//$Title Christmas tree
	Height 100
	Radius 40
	+SOLID
	States
	{
	Spawn:
		XMAS A -1
		Stop
	}
}

That should make it appear in the listing for "Obstacles" with the name "Christmas tree" so it'll look like it was part of the game to begin with.

Share this post


Link to post

I got it working you guys are AMAZING thank you!

 

sure hope I can get new map done by xmas

 

Usually stick to stock resources 

Share this post


Link to post

Ps how did you determine 2512 is this item? How do I know what numbers to use for future items?

Share this post


Link to post
11 minutes ago, Clippy said:

Ps how did you determine 2512 is this item? How do I know what numbers to use for future items?

Gez just picked one when they defined the actor:

 

Actor ChristmasTree 2512

 

You can pick any number you like as long as it doesn't conflict with other numbers. Here's a list of standard thing numbers, any number not in this list is fine. If you're intending to make a map that's compatible with some gameplay mods, or that uses custom things that someone else already made, you might have to check against those thing numbers too.

https://zdoom.org/wiki/Standard_editor_numbers

 

Spoiler

In case you didn't realize, 2512 was chosen in this case because that's numerically the 25th of December

 

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
×