Chaosforge Forum

DoomRL => Modding => Topic started by: SPTX on April 13, 2013, 02:37

Title: What are the items numerical IDs?
Post by: SPTX on April 13, 2013, 02:37
I need the id to be numerical rather than a string and numerical IDs aren't listed on this page : http://doom.chaosforge.org/wiki/Modding:sID
On the same matter, how do you assign a numerical id to your own items?
Title: Re: What are the items numerical IDs?
Post by: Equality on April 13, 2013, 02:42
http://forum.chaosforge.org/index.php/topic,6233.msg54120.html#msg54120

here lib_items, lib_beings and lib_log. And a sample code for use.

Add sample code to your module, run custom game, exit game. Take a log from DoomRL root
Change (items) to (beings), repeat. Take second log.
Title: Re: What are the items numerical IDs?
Post by: SPTX on April 13, 2013, 03:06
Okay, that's quite messy on top of being big. I am going to make a text file out of this for easy referencing.
Title: Re: What are the items numerical IDs?
Post by: Kornel Kisielewicz on April 13, 2013, 06:27
Numerical ID's are assigned automatically by the game, and are not guaranteed to be the same between versions -- except for tracking something within a single game, numerical ID's should NOT be used.
Title: Re: What are the items numerical IDs?
Post by: Autoquark on April 13, 2013, 06:38
Apologies if you already know this, but you realise you can use

Code: [Select]
items["pistol"].nid
to get the numerical id from the string id?