How do i discover the ID of something?
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.
- Jekyll Grim Payne
- Global Moderator
- Posts: 1120
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
- Contact:
Re: How do i discover the ID of something?
Guys, you aren't being very clear, so no wonder OP is confused.
But it's true you might mean lots of different things. So let's try to give all possible answers.
There are SpawnIDs, which all vanilla Doom actos have, and there are Thing IDs, which are identifiers that you have to attach to objects.
Spawn numers aka SpawnIDs are unique identifiers that every standard Doom actor has (and if you create a new actor in DECORATE, you can also give it a SpawnID). Everything you need to know about these can be found on the page I linked, including a link to spawn numbers of default Doom actors.
You can use SpawnIDs to spawn things via [wiki]Thing_Spawn[/wiki]: notice it requires a spawn point's TID (see below) and also an actor's type — this 'type' is actually a SpawnID. You can use it in ACS scripts.
Now, Thing IDs aka TIDs are a different thing. Actors don't have them, you have to assign them manually. These are just numbers that you give to actors so that you can do something to them later. That can be done manually in Doom Builder: you just right-click an actors, assign a number and later use it -- for example, you need to assign TIDs to spawn points (which are usually Map Spots) if you want to spawn something via Thing_Spawn (see above). TIDs are also often used for [wiki]Thing_Hate[/wiki]. But the important thing is, TIDs are just numbers that you assign manually, actors don't just have them.
You can also spawn things simply by name (like "DoomImp") using [wiki]SpawnSpot[/wiki].
But it's true you might mean lots of different things. So let's try to give all possible answers.
There are SpawnIDs, which all vanilla Doom actos have, and there are Thing IDs, which are identifiers that you have to attach to objects.
Spawn numers aka SpawnIDs are unique identifiers that every standard Doom actor has (and if you create a new actor in DECORATE, you can also give it a SpawnID). Everything you need to know about these can be found on the page I linked, including a link to spawn numbers of default Doom actors.
You can use SpawnIDs to spawn things via [wiki]Thing_Spawn[/wiki]: notice it requires a spawn point's TID (see below) and also an actor's type — this 'type' is actually a SpawnID. You can use it in ACS scripts.
Now, Thing IDs aka TIDs are a different thing. Actors don't have them, you have to assign them manually. These are just numbers that you give to actors so that you can do something to them later. That can be done manually in Doom Builder: you just right-click an actors, assign a number and later use it -- for example, you need to assign TIDs to spawn points (which are usually Map Spots) if you want to spawn something via Thing_Spawn (see above). TIDs are also often used for [wiki]Thing_Hate[/wiki]. But the important thing is, TIDs are just numbers that you assign manually, actors don't just have them.
You can also spawn things simply by name (like "DoomImp") using [wiki]SpawnSpot[/wiki].
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: How do i discover the ID of something?
... I don't see a single thing related to spawn IDs anywhere in this thread. Everything's been around TIDs - the first post made that pretty dang clear.
- Jekyll Grim Payne
- Global Moderator
- Posts: 1120
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
- Contact:
Re: How do i discover the ID of something?
The OP asked about 'finding the ID of the monster'. If the person is asking this, then they clearly need an explanation on what Spawn numbers and what Thing IDs are, how they're different, and how they're assigned and 'found out'. It's true that you didn't say anything about SpawnIDs; it doesn't mean the OP didn't need information on that. Plus, I don't think your answers clearly described the whole picture for somebody who doesn't seem to fully understand how IDs work. Anyway, I think I gave a detailed enough answer.Arctangent wrote:... I don't see a single thing related to spawn IDs anywhere in this thread. Everything's been around TIDs - the first post made that pretty dang clear.
-
- Posts: 380
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: How do i discover the ID of something?
Thank you! So basically TID is something that actors don't have? You have to assign it to them? And i can use The name of the actor in thing_hate? If yes, I think i solved my problem, If i still (Somehow) can't fix it, No problem, I will try to search on the wiki. Thanks for everyone help.
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: How do i discover the ID of something?
No, I think you just got confused more by that post. 
[wiki]Thing_Hate[/wiki] has to use a TID. In fact, it needs two TIDs, one for the hating actor and one for the target. Spawn IDs are completely useless outside of some very outdated functions, and you'll probably never use them ever.
If you're using a function that affects a specific alter, it's 99% of the time going to require a TID. Which, yes, actors don't have by default, and need to be given one by some way.

[wiki]Thing_Hate[/wiki] has to use a TID. In fact, it needs two TIDs, one for the hating actor and one for the target. Spawn IDs are completely useless outside of some very outdated functions, and you'll probably never use them ever.
If you're using a function that affects a specific alter, it's 99% of the time going to require a TID. Which, yes, actors don't have by default, and need to be given one by some way.
-
- Posts: 380
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: How do i discover the ID of something?
Jeez. After seeing my post, I think that TID caused a lot of discussions, Didn't it?Arctangent wrote:No, I think you just got confused more by that post.
Re: How do i discover the ID of something?
The reason why SpawnID didn't come up before is because you can't use Thing_Hate with SpawnIDs. Has to be with TIDs.
I still use them regularly for new actors with functions like Thing_SpawnFacing and Thing_ProjectileAimed.Arctangent wrote:Spawn IDs are completely useless outside of some very outdated functions, and you'll probably never use them ever.
-
- Posts: 380
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: How do i discover the ID of something?
Which, yes, actors don't have by default, and need to be given one by some way.
And how i'm supposed to give the TID to the actor? (Look, I'm new to decorate, So yeah, I'm a noob)
Re: How do i discover the ID of something?
TIDs are given through the map editor either directly or with an ACS script. TIDs have nothing to do with DECORATE.XASSASSINX wrote:Which, yes, actors don't have by default, and need to be given one by some way.
And how i'm supposed to give the TID to the actor? (Look, I'm new to decorate, So yeah, I'm a noob)
-
- Posts: 380
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: How do i discover the ID of something?
Alright. Got it. So, To see the TID of something, I need to go to doom builder 2 (Or any other editor), Click on the monster on that tab where you choose the thing (Monster, Weapon, Ammo) that will spawn, And it will show the TID. I got that. The problem is, That the monster that i wanna see it's TID is a monster that IT DOESN'T appear on the menu! Also, The only way to summon it is via a item that you can get on the mod (I'm changing some stuff on the mod that i'm talking about)! So how i'm gonna discover it???
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: How do i discover the ID of something?
The last parameter of [wiki]A_SpawnItemEx[/wiki], as I've said.
If the function doesn't have that last parameter or the monster is spawned through other means, and there's nothing else changing its TID ( like, said, calling [wiki]Thing_ChangeTID[/wiki] or it being spawned by [wiki]Spawn[/wiki] or the like with a tid of 1 or greater ), then it doesn't have a TID.
If the function doesn't have that last parameter or the monster is spawned through other means, and there's nothing else changing its TID ( like, said, calling [wiki]Thing_ChangeTID[/wiki] or it being spawned by [wiki]Spawn[/wiki] or the like with a tid of 1 or greater ), then it doesn't have a TID.
-
- Posts: 380
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: How do i discover the ID of something?
Alright. So, If i wanna use Hate_Thing, What i'm supposed to do then? If the monster that is spawned via other ways doens't have a tid? (Look, I'm pretty sure that all of you are screaming at the monitor saying "JEEZ, How this guy can't understand something so simple, But i'm new to decorate, So yeah...)
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: How do i discover the ID of something?
You can't.
That's not to say what you want to do is impossible, but you're going to have to find a way to give the monster a TID yourself. Thing_ChangeTID can be called in Decorate, so if you inherit from and replace the monster being spawned, you can force it to have a certain TID - though that method will cause all monsters of that type to have the same TID.
Alternatively, Thing_Hate accepts a TID of 0 as the activator of the script - or the actor itself, if called in Decorate. So, if you do override the monster, you can just call Thing_Hate directly if you've already got a TID for the target.
That's not to say what you want to do is impossible, but you're going to have to find a way to give the monster a TID yourself. Thing_ChangeTID can be called in Decorate, so if you inherit from and replace the monster being spawned, you can force it to have a certain TID - though that method will cause all monsters of that type to have the same TID.
Alternatively, Thing_Hate accepts a TID of 0 as the activator of the script - or the actor itself, if called in Decorate. So, if you do override the monster, you can just call Thing_Hate directly if you've already got a TID for the target.
-
- Posts: 380
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: How do i discover the ID of something?
Hey, So, I used Thing_ChangeTID. I'm making a friendly monster, And i'm using Thing_Hate to all monster's attack the friendly monster when they see him, The problem is, That i didn't work! I waste like 20 minutes, And after putting thing_hate to all monster, It didn't work! Here is the script:
The friendly monster:
And an example of the thing_hate on a monster:
The friendly monster:
Code: Select all
Spawn:
LEXT ABCD 3 A_Chase
LEXT ABCD 3 A_Chase
LEXT ABCD 3 A_Chase
LEXT ABCD 3 Thing_ChangeTID(0,90)
loop
Code: Select all
Spawn:
WIZL A 10 A_Look
WIZL A 10 Thing_Hate(0,90,3)
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: How do i discover the ID of something?
Post the entire thing. Lots of reasons why that could be going awry.