The Modding Requests: March Edition

The second round of The Modding Requests is here. The first thread can be found here.

Submissions accepted until Monday, March 15th, 2014.

This thread has two purposes: It lists (and prioritizes) modding API requests and modding-related questions that the community has for Team Radiant. Those will be collected and sorted by me. Every week, the five or so most important requests and questions will be checked by Team Radiant. Please read the short FAQ below before posting :slight_smile:

To discuss the entries, the prioritization or anything else that is not a request or question, please visit this thread!

Proposals and questions that will be submitted:


  • @RepeatPan: ability to intercept JSON loading

  • event to modify the JSON before it is mixed in/radiant.resources.load_json'd. Does not have to apply to manifests (if mixintos are even applicable there)

  • allows writing customized mixinto behaviour (e.g. to remove, map or merge elements)

  • @RepeatPan: generic resource component

  • similar to ResourceCallHandler:harvest_node draft before R48

  • allows adding multiple custom resource node (components) to entities that can be independently timed/evented

  • callbacks in the component to deal with the behaviour (on_harvesting, on_harvested, can_harvest(worker))

  • could allow re-factoring current harvesting functions into one single one

  • examples: fruit trees could have wood (non-renewable), saplings (renewable, timed) and fruit (renewable, timed)

  • @RepeatPan: disable input in lua and JS

  • add function to enable/disable things such as is_down and capture_input in lua/$('keydown keyup') in JS

  • useful for <input>, cinematics or similar

  • bonus: modal behaviour where only this one input is receiving events

  • @RepeatPan: modify start menu

  • add, query and remove current start menu by lua/JS and JSON mixinto

  • @RepeatPan: change tags to be array based

  • in the very least allows other mods to tag existing resources as something new

  • if JSON modifications are possible, also allows re-tagging/untagging certain resources to balance things


(None yet!)

How can I propose a modding-related feature?

Simply reply to this thread. Please keep the following things in mind:

  • Your proposal should be related to modding. This includes (but is not limited to!) a new interface for lua, a new event in JavaScript, the possibility to tweak something using JSON, …
  • Keep it short but precise. Don’t be vague and don’t be too general. If you have an idea but are unsure how to phrase it, come and visit us in the discussion thread. We’re happy to help :smiley:
  • Propose things that you think are useful. The main priority is to get things into the game that modders can profit early on - so things that can be utilised immediately will have a higher priority than something that, for example, requires another game feature to be present first. Explain what could be done if your proposal got implemented.

Your proposal will then be added by me, which means that I may need to rewrite parts of it. In any case, I’ll post an update to the discussion thread, so you should get a ping about the status.

How can I ask a modding-related question?

Just reply to this thread. As with proposals, a few tips:

  • Your question should be related to modding.
  • Keep it short but precise. Don’t be too vague.

As with proposals, your questions will be added to the list by me. Questions that have already been answered will not be added to the list (or get removed early).

Who decides what will be submitted this week?

That would be me! I volunteer to collect everyone’s modding feature requests and questions and sort them by a few points:

  • Generality: Something that many different mods can profit from will be ranked higher than something that is useful to a few.
  • Time investment/Feature gain: Smaller or simpler things are more likely to be implemented soon and therefore get better spots.
  • Distance: Something that is related to mods that currently exist, or mods that are currently in development take priority over stuff for “upcoming mods” or “mod ideas”.
  • Community: I’ll follow and participate in the discussion over at the discussion thread. If you disagree with a decision, feel free to start a conversation about it. It will be a fairly democratic process, so your voice does matter!
  • Reasoning: Entries that have a reason or goal attached to it (e.g. “I am currently developing mod X and could use Y”) take priority over “pure curiosity” proposals and questions. It might make sense to include the “what” in your proposals (questions not necessarily) to get a bit of context what you are doing.

Both proposals and questions can move between “submitted” and “moved to next week” at any time. Once the deadline’s up, all entries that were not done this week will be carried over to the next week’s thread.

For questions, criticism, concerns and similar, here’s the discussion thread!

Things considered for the next thread:


  • @RepeatPan: recipe management

  • enable, disable, add, remove recipes from carpenters by lua/JS

  • @RepeatPan: support for lua binary modules

  • either directly in archives or dedicated folder

  • security issues: certification required/user acknowledgement?

  • @RepeatPan: event listener ordering

  • allow to tag events with a priority (number)

  • bonus: define mods whose events should run after/before this event, including a magic “all” element

  • @RepeatPan: Point3/Point3f compatibility

  • _add, _sub both without errors (likely returning a Point3f)

  • implicitly convert Point to Point3f (and vice versa)

  • @RepatPan: configuration management

  • save configurations (similar to radiant.util.get_config)

  • bonus: (simple) validation of configs using JSON scheme or similar

  • bonus: pass mods their configuration as argument (e.g. ...?), add default_config section in manifest.json

  • @RepeatPan: component/buff removal

  • functions to remove buffs/components from an entity

  • @Teleros: bone attachment managing (already somewhat possible?)

  • attach (other) entities to bones of entities, specified with relative position/rotation

  • query bone position/rotation

  • @Teleros: dynamic reload files during runtime (medium term candidate)

  • reload textures/models/materials during runtime (automatically)

  • probably not scripts

  • @RepeatPan: start camp overhaul (incomplete)

  • JSON based approach for easier mixinto/override

  • entity ref/model that is used for choosing the location (i.e. default: the banner)

  • list of entities that are initially spawned (i.e. default: banner, firepit, workers, logs, saw)

  • lua events to add more dynamic content/events

  • make this part of the faction data?

  • @RepeatPan: faction overhaul (incomplete?)

  • reduce factions to a simple name/object instead of (name, json).

  • add callbacks/virtual functions/events to determine gender, entity ref, name, personality/stats

  • event when a new faction is created (or json-defined lua file that is executed to extend/modify the faction’s object), or a new citizen is spawned

  • provide a function that spawns a “more complete” citizen (like NewGameCallHandler:place_citizen)

  • relations between factions (i.e. Faction:can_use(Faction other, Entity entity, Action action)) instead of hardcoded comparisons

  • @Miturion: fine-tuned control about building creation (incomplete?; announced)

  • define which block/brick is used at which location in a building/wall

  • general look of buildings (?)

  • using any (scaled) entity/model as brick, not just 1x1x blocks (?)

  • @RepeatPan: world generation (incomplete; research being done)

  • define flora in JSON: lua callback handler to generate noise map, list of entries/rules for entities


(None yet!)