Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

RFE - Lua scripts executed on demand

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> RFE - Lua scripts executed on demand Page: [1]
Login
Message << Older Topic   Newer Topic >>
RFE - Lua scripts executed on demand - 2/11/2018 1:40:48 PM   
No New Messages
jirik
Matrix Recruit


 

Posts: 33
Joined: 12/14/2005
Status: offline
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
Post #: 1
RE: RFE - Lua scripts executed on demand - 2/11/2018 3:59:58 PM   
No New Messages
kevinkins
Matrix Elite Guard



Posts: 2257
Joined: 3/8/2006
Status: offline
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.

< Message edited by kevinkin -- 2/11/2018 4:00:31 PM >

(in reply to jirik)
Post #: 2
RE: RFE - Lua scripts executed on demand - 2/11/2018 5:07:33 PM   
No New Messages
Rory Noonan
Matrix Legion of Merit


 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
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.

< Message edited by apache85 -- 2/11/2018 5:10:28 PM >


_____________________________


(in reply to kevinkins)
Post #: 3
RE: RFE - Lua scripts executed on demand - 2/11/2018 5:22:38 PM   
No New Messages
jirik
Matrix Recruit


 

Posts: 33
Joined: 12/14/2005
Status: offline
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.

(in reply to Rory Noonan)
Post #: 4
RE: RFE - Lua scripts executed on demand - 2/11/2018 6:10:18 PM   
No New Messages
Rory Noonan
Matrix Legion of Merit


 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
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.

_____________________________


(in reply to jirik)
Post #: 5
RE: RFE - Lua scripts executed on demand - 2/11/2018 9:35:20 PM   
No New Messages
kevinkins
Matrix Elite Guard



Posts: 2257
Joined: 3/8/2006
Status: offline
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.

(in reply to Rory Noonan)
Post #: 6
RE: RFE - Lua scripts executed on demand - 2/11/2018 10:47:14 PM   
No New Messages
Rory Noonan
Matrix Legion of Merit


 

Posts: 2816
Joined: 12/18/2014
From: Brooklyn, NY
Status: offline
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.

_____________________________


(in reply to kevinkins)
Post #: 7
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> RFE - Lua scripts executed on demand Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

4.063