Starbound

Starbound

TR [1.0: Content Update]
 This topic has been pinned, so it's probably important
Lo-op  [developer] 20 Jul, 2024 @ 9:43pm
Remap Existing Techs using this Framework Easily
To easily add your own tech to other slot, or map to different moves:
1)In the .tech file add "/tech/tr_control/single.lua" to “scripts”, or add "/tech/tr_control/double.lua" for double taps.

2)Add "key", its values can be "dir"(for each of "left" and "right") "up" "down" "jump" or "special1".

3)In the corresponding .lua file, copy this:
self.key = config.getParameter("key", "dir")
self.maxtime = config.getParameter("maxtime", 0.25)
self.result = false

to the init function.

4) Replace args.moves[SOMEKEY] with tr_on(args) if it is responsible for activating the tech.

Important: if a given args.moves[SOMEKEY] is used twice, then do:
Add "self.result = tr_on(args)";
Replace args.moves[SOMEKEY] with self.result.
Since tr_on works with delta time, and calling twice causes problems.
Last edited by Lo-op; 22 Jul, 2024 @ 1:03am