Chaosforge Forum

  • March 28, 2024, 03:18
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: What are the items numerical IDs?  (Read 3584 times)

SPTX

  • Sergeant
  • *
  • Offline Offline
  • Posts: 77
  • Lost Soul
    • View Profile
What are the items numerical IDs?
« 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?
« Last Edit: April 13, 2013, 02:40 by SPTX »
Logged

Equality

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 174
  • Lost Soul
    • View Profile
Re: What are the items numerical IDs?
« Reply #1 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.
Logged
Once advanced DoomRL player
Find mysterious sword Dragonslayer
Say "Best thing ever found!" and start jumping around...
But he can't get the sword from the ground

SPTX

  • Sergeant
  • *
  • Offline Offline
  • Posts: 77
  • Lost Soul
    • View Profile
Re: What are the items numerical IDs?
« Reply #2 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.
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4562
    • View Profile
    • http://chaosforge.org/
Re: What are the items numerical IDs?
« Reply #3 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.
Logged
at your service,
Kornel Kisielewicz

Autoquark

  • Backer
  • Lance Corporal
  • *
  • *
  • Offline Offline
  • Posts: 23
  • Lost Soul
    • View Profile
Re: What are the items numerical IDs?
« Reply #4 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?
Logged
Pages: [1]