Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
glenzinho

Adding an inanimate object with Decorate / GLDEFS (updated)

Recommended Posts

Hi all, I'm looking for help (what else is new;).... I'm trying to make a tree... I have a few tree sprites that I want to add to my map. I'm looking everywhere for info about Decorate, but there's a lot to sift through. I don't want to do anything fancy, no animated sprites or sprites with some kind of behaviour, just a plain inanimate tree.

I remember a few wads that have custom trees and such in them, but I can't find any right now when I need to know! Also, how do I use the custom sprites in DB2?

Share this post


Link to post

Easiest way around your problem is to recycle an existing script.

ACTOR BigTree 54
{
  Game Doom
  Radius 32
  Height 108
  +SOLID
  States
  {
  Spawn:
    TRE2 A -1
    Stop
  }
}
Give the actor a new name and a number that's not in this list. change the radius and height to more-or-less match your sprite and give the sprite a 6-character name that end with A0. Replace TRE2 (in the Spawn: state) with the first four characters of the sprite's name. The actor name, number and sprite name all must be unique, otherwise there'll be errors which could prevent your wad from running.

Once you're happy with the DECORATE script, use Slade to import script and sprite into your wad, you might be able to get away with having DoomBuilder add them to your map as a directory resource but I haven't tried that with scripts.

Share this post


Link to post

Also, if you want Doom Builder to put your new tree with the others, you should add special comments the DECORATE code, as explained here.

Share this post


Link to post

Cheers GreyGhost and Gez....

Now I've inserted the sprites, I can see them in DB2, and I can "feel" them in the map... however I can't SEE them in the map, and I can see errors when GZDoom is loading up.

Here is my Decorate:

ACTOR GreenTree 6000
{
	//$Category decoration
	//$Sprite NTREA0
	//$Title "Tree - Big Green"
	Radius 32
	Height 108
	+SOLID
	States
	{
	Spawn:
	  NTRE A -1
	  Stop
	}
}

ACTOR PineTree 6001
{
	//$Category decoration
	//$Sprite NTR1A0
	//$Title "Tree - Pine"
	Radius 16
	Height 108
	+SOLID
	States
	{
	Spawn:
	  NTR1 A -1
	  Stop
	}
}

ACTOR DeadTree 6002
{
	//$Category decoration
	//$Sprite NTR2A0
	//$Title "Tree - Big Dead"
	Radius 32
	Height 108
	+SOLID
	States
	{
	Spawn:
	  NTR2 A -1
	  Stop
	}
}
And this is what I see when GZDoom is loading:

LoadActors: Load actor definitions.
Tried to register class 'GreenTree' more than once.
Tried to register class 'PineTree' more than once.
Tried to register class 'DeadTree' more than once.
R_Init: Init Doom refresh subsystem.
DecalLibrary: Load decals.
Editor number 6000 refers to hidden class type 'GreenTree'
Editor number 6001 refers to hidden class type 'PineTree'
Editor number 6002 refers to hidden class type 'DeadTree'
Warning: GreenTree and GreenTree both have doomednum 6000.
Warning: PineTree and PineTree both have doomednum 6001.
Warning: DeadTree and DeadTree both have doomednum 6002.

...and then it goes on with the normal startup stuff...

I'm sure this is something simple to fix or something I've missed.

Share this post


Link to post

You are somehow loading your DECORATE code twice.

Can you show the rest of the console log? I'm curious about the "W_Init: Init WADfiles." section, as the answer might be there.

Alternatively, you can use the "dumpactors" console command. It'll give you a huge list of absolutely all actor types in the game, including all the standard ones; complete with the exact file and lump in which they are defined. Load the console log in a text editor and search for, say, PineTree, to see where it is defined. So you should find two of them, with the two different places from which they are loaded.

Share this post


Link to post

I've figured out where my Decorate was being loaded twice.... I've got my Decorate in a "stuff" wad which I load when testing my wad and using DB that's full of my textures and music and sprites, and that was being added in DB2 at startup and AGAIN at testing..... removed the one at testing and it's all good now...

However, although I don't get errors on startup now, I still can't see the sprites in the game but can still feel their presence.

I have them in my stuff wad between the markers SS_START and SS_END... is this the correct way to do it?

Share this post


Link to post

I got these sprites out of a Realm667 texture pack... I'm not sure which one now! What should they be offset to?

Share this post


Link to post

Appropriate values.

Using SLADE 3, look at them. If they have offsets of [0, 0], you need to reset them. For monsters, offsets should be set so that the X offset is about half the width of the sprite, and the Y offset is nearly equal to the height of the sprite.

If they aren't set, SLADE can automatically modify offsets on a large number of sprites at once. Select them all, then right-click and selects Gfx -> Modify Offsets. Choose "automatic offsets" and "monster".

Projectiles should have offsets that make them centered: X about half of width, and Y about half of height.

Share this post


Link to post

I'm curious now because the sprites are supposed to have correct offsets already set in the Realm 667 packs. So, which one was it?

Share this post


Link to post

Hard to remember.... I've downloaded all of the texture packs and looked through most of them to find what is useful to me or what's available... The 3 sprites came from the same pack that's all I remember. There's very few of those packs with sprites in them if that helps.

EDIT:

The original sprite names are SMITA0, TRE1A0, TRE2A0 .. maybe can narrow the search down... Also I exported them from the pack they were in and imported to my resource wad so I don't know if that would've reset the offsets. I am using SlumpEd.

GLDEFS

I'm trying to get some lava glow going in GZDoom. This is my GLDEFS:

Glow
{
Flats 
{ 
   LAVA1 
   LAVA2
   LAVA3
   LAVA4
}
}
This works, but is very basic. I've seen maps where the flats REALLY glow.. I was wondering what kind of arguments or such that I throw in there to help, can't find any examples.

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
Sign in to follow this  
×