Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua: Allow using Lua to manipulate effects and define requirements #2514

Open
XHawk87 opened this issue Jan 20, 2025 · 1 comment
Open

Lua: Allow using Lua to manipulate effects and define requirements #2514

XHawk87 opened this issue Jan 20, 2025 · 1 comment
Labels
enhancement New feature or request server This issue requires changes to the server spec-file Related to Rulesets, Tilesets, Musicsets, Soundsets, etc.

Comments

@XHawk87
Copy link
Collaborator

XHawk87 commented Jan 20, 2025

Is your feature request related to a problem? Please describe.
Lua scripts can be very useful, but currently they are based around creating handlers for emitted signals and adding behaviour to occur at these moments. Effects on the other hand are used to modify existing functionality by feeding data back to something that is processing a behaviour based on a set of rules. I would like to be able to leverage the power of Lua for effects also, and define more advanced requirements for effects.

Describe the solution you'd like

  • Add an effects.create(name, type, value, multiplier, reqs) function to define an effect.
    • The requirements can be a function name, similar to how signal.connect() works, that accept the contextual parameters and returns true or false for if the effect should be applied
  • Add an effects.remove(name) function to remove an effect.
  • Add an effects.define(type) function for defining new custom effect types that we can use with effects.X_bonus() functions in signal handlers.

Additional context
Discussion thread in Discord

@XHawk87 XHawk87 added enhancement New feature or request server This issue requires changes to the server spec-file Related to Rulesets, Tilesets, Musicsets, Soundsets, etc. labels Jan 20, 2025
@lmoureaux
Copy link
Contributor

Should keep #2326 in mind, I think effects in general are reaching their limit in terms of flexibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This issue requires changes to the server spec-file Related to Rulesets, Tilesets, Musicsets, Soundsets, etc.
Projects
None yet
Development

No branches or pull requests

2 participants