Chaosforge Forum

  • August 16, 2022, 01:56
  • Welcome, Guest
Please login or register.



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

Author Topic: DoomRL Mod Loader Script & Mod Packaging Guidelines  (Read 6252 times)

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
DoomRL Mod Loader Script & Mod Packaging Guidelines
« on: April 25, 2010, 12:33 »

Long ago, there were some requests regarding an easier way to load sandbox mods.
Here is one such way, used until a mod loading menu was implemented by an all-powerful entity (from 0.9.9.1 until 0.9.9.4 RC1).

Attached to this post are the following files:

1. doomrl-mod - The Mod Loader Script (Linux version) by me.
2. doomrl-mod.bat - The Mod Loader Script (Windows version) by Malek Deneith.
3. doomrl-mod-packaging-guidelines.txt - The official Mod Packaging Guidelines specification, a collective effort by the modding community.

The current version of the files is 2.0.

HOW TO USE THE SCRIPT:

1. Download the script, picking the variant appropriate for your operating system.

2. (Linux only) Make the script executable. One way to do it is with the `chmod +x doomrl-mod` command.

3. Edit the script to your liking. Pay special attention to the "Script Configuration" section, as it contains the variables which define the script's working. Some important variables:

* DOOMRL_DIR - (all variants) - Change this to your DoomRL directory.
* DOOMRL_SHELL - (Linux only) - Change this to your preferred terminal emulator.
* DOOMRL_SHELL_OPS - (Linux only) - This customizes the running options of the terminal emulator selected above. Please note that using the default (gnome-terminal) requires no additional configuration.
* POSTRUN_COMMAND - (all variants) - Put here any command you wish to have executed after the script execution is complete.

4. After you've finished, you can run it from the terminal with `doomrl-mod {MOD_NAME}` (on Linux), or `doomrl-mod.bat {MOD_NAME} (on Windows).

The script will link the custom sound and music files, run the mod and revert everything to the original state when done.


INFORMATION FOR MOD MAKERS:

The script assumes a very specific mod packaging scheme, henceforth referred to as "Mod Packaging Guidelines".

To learn about the essence of the Mod Packaging Guidelines, see the attached doomrl-mod-packaging-guidelines.txt file, which contains the complete specification.

The suggested packaging scheme is regarded as solid, clear and uncluttered - enough to consider pushing it onto all sandbox modding from this point onwards. I, for one, will be porting and re-uploading all my files, repackaged according to the scheme to show a good example.

The 0.9.9.2 release of DoomRL introduces a new sandbox hook, core.play_music(musicID), that can be used to play music as well, which can be used instead of supplying a music.lua.

INCOMPATIBLE MODS:

Some existing mods are not packaged according to the Mod Packaging Guidelines.

Some yet consist of no more than a single .lua file.

To run these mods with the Mod Loader Script, create a directory for the mod under the "sandbox" directory and put the .lua file there. The Mod Loader Script will load such mods, but will not link any custom sound and music binds which may or may not cause DoomRL to crash. To resolve this, either request the mod author to repackage the mod in accordance with the Mod Packaging Guidelines, or make the necessary changes yourself.

Alternatively, you can simply use the existing `doomrl -sandbox {PATH_TO_MOD_FILE}` command, bypassing the Mod Loader Script altogether.


VERSION AND UPDATES:

You are encouraged to check for new versions from time to time, but the script is expected to generally remain backwards compatible.

Previous updates (oldest to newest):
- File uploads complete. Also, set the default POSTRUN_COMMAND="", because, as i've been pointed out, not everyone has fix-doomrl-mortem (http://forum.chaosforge.org/index.php/topic,2904.0.html), even though they should seriously consider it.
- Fixed a small, insignificant error. Silly me.
- Uploaded the script and spec files (version 1.1). Rewrote the post to reflect the current state of events.
- Updated the scrips and spec files to version 2.0. The Windows version is attached a few posts below.
- Kornel promised that the capability in this script is going to be implemented in one of the next releases and asked that the desired capabilities are listed in a related forum thread, urging the modding community to participate in the discussion: http://forum.chaosforge.org/index.php/topic,4470.0.html
- Mod Packaging Guidelines updated to version 2.1, relaxing some of the requirements and updating the phrasing for DoomRL 0.9.9.3 and modified the loader script to match.
- A proper mod loading infrastructure has been implemented in DoomRL since 0.9.9.4 RC1. This module loading script is, thankfully, deprecated.
« Last Edit: September 13, 2011, 03:31 by Simon-v »
Logged

yaflhdztioxo

  • Programmer
  • Local Inquisitor
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 298
  • Lost Sole
    • View Profile

What about mods that are nothing more than a lua file?
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert

What about mods that are nothing more than a lua file?

You can either run them as you did until now, or repackage them to fit the new standard. The choice is yours.

EDIT: I, personally, would prefer that people followed the standard, as it ends up making things a lot less cluttered. But, in the end, you are your own master.
« Last Edit: April 25, 2010, 15:19 by Simon-v »
Logged

Malek Deneith

  • Grand Inquisitor Emeritus
  • Grand Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1256
    • View Profile
Re: DoomRL Mod Loader Script & Mod Packaging Guidelines
« Reply #3 on: April 26, 2010, 14:37 »

Bumping to bring the update of original post to attention. A windows batch file was made, and guidelines how to package mods to make them usable with the script were revisited and put in separate file. Hope this will be of use for the community.
Logged
Inquisition - saving your soul, one bolter shell at a time.
Spoiler: "Hackmaster Kills" (click to show/hide)

Malek Deneith

  • Grand Inquisitor Emeritus
  • Grand Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1256
    • View Profile
Re: DoomRL Mod Loader Script & Mod Packaging Guidelines
« Reply #4 on: February 14, 2011, 04:27 »

Postin 0.9.9.2 compatible version of windows .bat file. No backwards compability at the time I'm afraid - maybe at later point when I have time and will to try and make it so, but for now for DoomRL below 0.9.9.2 use the file from first post.
« Last Edit: July 12, 2011, 16:33 by Malek Deneith »
Logged
Inquisition - saving your soul, one bolter shell at a time.
Spoiler: "Hackmaster Kills" (click to show/hide)
Pages: [1]