RP and RepeatPan's mods

RP has been updated to r1400. I’ve decided to implement a proper naming scheme (basically, [alpha release version][build number], with odd builds representing incomplete development/git versions).

Changelog for r1400:

  • A few changes that were lost when transitioning to the new repos; mostly concerning JS (that nobody seems to use yet).
  • Fixed print()'s tab bug.
  • [JS] rp.dump() now properly recognizes references and links to them
  • ^^^^^^^^^ now formats strings in escaped, quoted format (to indicate the type of the field a bit better)
  • radiant.callv instead of radiant.call and hacks makes life much easier.
  • Make sure we’re logging after we have been initialized.
  • Now using load_manifest instead of load_json.
  • Allow empty calls to print()/log() to insert a newline
  • Re-wrote most of the mod loading:
  • Now using fancy enums for loading status/source! They’re accessible from within the (new) rp.constants table.
  • The list of mods is saved into rp.available_mods. A mod has the following attributes: name, source, status, manifest.
  • Introduced new status for mods, “skipped”: Mods that are not RP mods or have been disabled are labeled as “skipped”. They still show up in rp.available_mods but will not be loaded and do not count as valid rp mod.
  • Improved logging by using more useful messages and adding a few more.

Also introducing a new mod:


Spawn Stuff

Inspired by BFHDD’s version, I’ve decided to sit down and try one myself. This tries to “guess” which entities are spawnable by using a whitelist and some heuristics, i.e. it has no fixed “list” anymore. Abused is again the good ol’ camp standard, which will likely be changed to the firepit or an own entity.

Like I’ve said, this version is reading all mod’s manifests to see if they add “fitting” entities (mostly by folder name). If they are, they’re added to the list. If they have a proper name and/or a proper icon, that’s taken care off too. It’s an early release and I plan to move this out of lua and into JS/HTML at some point in the future; but for now it (hopefully) suffices. There aren’t that many entities that can be spawned.

Excluded are currently especially workbenches and anything related to professions; workbenches require special magic to make them work that really isn’t worth it right now (read: I haven’t investigated enough for that yet).

For developers: Uses the fancy, new in r1400 introduced rp.available_mods to get a list of all manifests/mods to check for entities. Other than that, it’s “How to create a command and then modify it enough so the original JSON file is worth little to nothing” and a bit of entity JSON.

3 Likes