RFE - Lua scripts executed on demand (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


jirik -> RFE - Lua scripts executed on demand (2/11/2018 1:40:48 PM)

Hi,

I'd like to validate one idea. What if Command will support the execution of arbitrary LUA scripts during gameplay?
It can help with task automation a lot.
It could be implemented in two ways - the simple one will be an icon or menu command that will open file browser, the user chooses script which is executed. The more advanced one will be a menu with 10 slots and an arbitrary script file is associated to each slot. The user then just choose the slot that executes the script.

The example use case would be taking the output of Excel Strike Planner that would be converted to the LUA script. This script will pre-create missions as calculated by the planner.

Game Factorio offers similar functionality and it can be very handy in hands of advanced players. Also it would be possible to do lightweight modding of Command.

I suppose this can be already done when the user plays in editor but not too comfortably.

Your opinions about the idea?

jirik




kevinkins -> RE: RFE - Lua scripts executed on demand (2/11/2018 3:59:58 PM)

Hi and welcome to the Forum.

I think the functionality you are describing can be achieved via Special Actions that can execute lua script on demand. I can not chime in on the Excel output since my lua skills are pretty basic other than to say I think any outside of Command data would have to be used while playing within the Editor unless it's hard coded into a scenario's special actions.




Rory Noonan -> RE: RFE - Lua scripts executed on demand (2/11/2018 5:07:33 PM)

This does indeed sound like the Special Action mechanism.

As for referencing external files and outputting that to the mission editor via Lua, I’m not sure it’s possible exactly as you describe, but could be implemented as a variation of that plan; you can load external script files so perhaps if you had an excel spreadsheet that produced .lua files with the appropriate coding.

I already use excel manually to generate long Lua tables via the concatenation function; so the theory is sound in principle.

To load the script you could have a special action that either runs one particular.lua file that is generated and replaced eac time by the excel spreadsheet or you could go further and use the user input to allow the user to put the file name in.




jirik -> RE: RFE - Lua scripts executed on demand (2/11/2018 5:22:38 PM)

Hi,

thanks for the tip - special actions are indeed what I have in my mind. The is one difference though - if I understand it correctly then special actions are defined per scenario. What I have in mind is the same thing but the special actions would not be specific per scenario but would be configured as game global configuration and would be available/shared for all scenarios.




Rory Noonan -> RE: RFE - Lua scripts executed on demand (2/11/2018 6:10:18 PM)

I see. That’s more of a game engine change...

Maybe if you build up something like this you could put it up for others to use? Similar to angsters AI and rescue scripts.

Otherwise it seems the dev team are already looking into the strike planner so I’m not sure where this would fit after that is implemented.




kevinkins -> RE: RFE - Lua scripts executed on demand (2/11/2018 9:35:20 PM)

You are right related to the strike planner. But jirik and apache85's posts make me think special actions are under used. To have a repository of code files residing on a player's drive that could be pulled into any scenario on demand to execute things like cyber-attacks might be interesting. The code would have to be able to determine the exact name of each Side so those names can be used through out the rest of code. But the more I think about it, its probably better to not monkey with a designer's creation with code they never intended to be executed. But for the sand box, the idea may work for players.




Rory Noonan -> RE: RFE - Lua scripts executed on demand (2/11/2018 10:47:14 PM)

The Silent Service makes use of special actions in nearly every scenario, as do some of the Live scenarios. I agree that Special Actions are under-utilised, they're extremely powerful.

I'm currently working on my personal project Seven Days in October, and at current count it has 21 special actions (although not all are available at once). You can really allow the player a lot of options with Special Actions.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.5625