samedicorp / dualuniverse-feedback

Dual Universe Suggestions and Bugs
0 stars 0 forks source link

Script Elements (Modular Lua Scripts) #52

Open samdeane opened 3 years ago

samdeane commented 3 years ago

My scripts have a controller object and a bunch of module objects. Each module registers with the controller for flush, update and the other events.

Each instrument or flight mode is a module. I can customise which ones are installed on a vehicle.

Unfortunately the game doesn't really support this model. You can only install one script on a controller, and you have to list the events you want to receive up-front.

A better approach would be to have script elements, and be able to load them into a controller (similar to loading schematics into industry, but allowing multiple items to be active simultaneously).

They would be blueprint-able, protectable with permissions, and saleable as independent units.

This would allow us to:

samdeane commented 3 years ago

https://upvote.dualuniverse.game/suggestions/138266/modular-lua-scripts

samdeane commented 3 years ago

I want to be able to make little re-usable things that I can sell, but it's pretty impossible right now.

Like it would be great if I could sell my industry monitor script as a little package - a screen, a keyboard, etc, all wired up with the script - that you could just install in your factory. Right now it's impossible because they all have to be attached to the actual factory core...

If you could attach scripts and other elements to a tiny dynamic core, and then somehow dock that to the host core, so that the script had a way of reading information from the host - that would be perfect.