You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fidius-jko opened this issue
Dec 24, 2023
· 4 comments
Labels
A-AppBevy apps and pluginsA-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!
What problem does this solve or what need does it fill?
I want to add mods at runtime so I don't have to reload the game to add a mod. Replacing system for mod can change game logic.
What solution would you like?
Plugins
Add Plugin parameter ModPlugin.with_label(ModLabel("ModName")) or with_label(ModPlugin, ModLabel("ModName"));
If there is the same plugin with the same label, then panic.
Label varies by ParticalEq.
Add App function: remove_plugin::<T: PluginType, L: PluginLabel>(label: L), and it removes plugin with all its configurated systems, resources, states, etc.
And add resource AppCommands<Label> for change App with label. And resource AppSettings for get current settings.
Example:
Fidius-jko
changed the title
Add plugins at runtime. And remove it by label.
Add plugins at runtime. And remove it by label. Replacing systems
Dec 24, 2023
This is an extension of #279, which does this for systems. It's closely related to #2160, which proposes tools to work with plugins as a meaningful unit of organization, rather than just a trivial mutating function on App.
Maybe this should remain open if it isn't covered directly by the other mentioned issues?
I'm just interested in these types of features so feel free to disregard this if its inappropriate.
A-AppBevy apps and pluginsA-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!
What problem does this solve or what need does it fill?
I want to add mods at runtime so I don't have to reload the game to add a mod. Replacing system for mod can change game logic.
What solution would you like?
Plugins
Add Plugin parameter
ModPlugin.with_label(ModLabel("ModName"))
orwith_label(ModPlugin, ModLabel("ModName"))
;If there is the same plugin with the same label, then panic.
Label varies by
ParticalEq
.Add App function:
remove_plugin::<T: PluginType, L: PluginLabel>(label: L)
, and it removes plugin with all its configurated systems, resources, states, etc.And add resource
AppCommands<Label>
for change App with label. And resourceAppSettings
for get current settings.Example:
App commands runs after all system.
System replace
Make passage to get SystemId and replacing by SystemId. For example:
What alternative(s) have you considered?
Plugins
Create your own plugin system for the runtime, but it will be limited (for example, no SubApp).
System replace
Make
run_if
condition for disable it.The text was updated successfully, but these errors were encountered: