DoomRL > Modding

A couple questions

(1/5) > >>

I'm looking to create a mod that modifies the enemies, weapons, pickups and consumables of DOOMRL, but not the levels. Basically, new stuff but no new levels (for now). Is this possible? I can't seem to find the tables for the original game stuff, so I can't modify them. Is it possible for me to find the tables that display the enemy, weapon and item (powerups and pickups) and mods in the game so I can modify them from there, or do I have to start from scratch? I was also wondering if you can re-name klasses. Thank you in advance.

All the basic things that you normally have access to in a module (cells, items, beings, etc) are declared in code that runs from doomrl.wad which is still closed source.  You can, however, still modify things after they are declared.  (This doesn't always work quite as you expect since the declaration functions do some processing.  Feel free to ask if something in particular isn't working.)  Prototypes stored in global tables indexed by both number id and string id.  For example, items are in "items" and beings are in "beings".  There's nothing preventing you from printing out the contents of these tables if you need more info.  In fact, I've attached a logging library (from my own module "inferno") should help with logging the contents of the tables (although I haven't bothered to make it print in the correct order).

Use this code to print out the contents of e.g. the items tables (replace MY_MODULE_NAME):

--- Code: ---require "MY_MODULE_NAME:lib_item"
require "MY_MODULE_NAME:lib_being"
require "MY_MODULE_NAME:lib_log"

MY_MODULE_NAME.log = lib_log.make_log_function("lib_log")

for _, it in ipairs(items) do -- It may take a minute to print all this out.

--- End code ---
Then check log.txt.

To actually modify stuff, just do e.g.

--- Code: = "my pistol" -- P.S., this doesn't work great for starting equipment

--- End code ---

To create a game with all the basic levels, you want an "episode" type module.  Since you say "no new levels", the hooks you care about are OnCreateEpisode which sets up special levels and the over all path of the game, and OnGenerate which creates random levels.  If you don't want to do anything special, you can just call DoomRL.CreateEpisode() and DoomRL.OnGenerate() respectively.

Apparently you can't call DoomRL.CreateEpisode, but you can still replicate it pretty closely.  See here

Thanks for the info and files. However, I was looking for the original stats for the items and beings in DOOMRL. I was wondering if you could, er, 'loan' them to me. If that's not possible I can make up my own stats, but I'm really looking to make modified versions of the vanilla stuff.

Most stats should be on the wiki, but you can also just use a value directly while registering your item:

--- Code: ---register_item "yourid" {
  <item_property> = items.<itemid>.<desiredproperty>,

--- End code ---

or after registering the item:

--- Code: ---items.yourid.<item_property> = items.<itemid>.<desiredproperty>

--- End code ---

This should work for most properties.


--- Quote from: tehtmi on March 29, 2013, 11:47 can just call DoomRL.CreateEpisode()

Apparently you can't call DoomRL.CreateEpisode, but you can still replicate it pretty closely.  See here

--- End quote ---
Isn't it DoomRL.OnCreateEpisode()?


[0] Message Index

[#] Next page

Go to full version