New windows or frames?

All discussions & material related to Command's Lua interface

Moderators: angster, RoryAndersonCDT, michaelm75au, MOD_Command

Post Reply
ReddZed
Posts: 6
Joined: Sun Sep 20, 2020 12:54 pm

New windows or frames?

Post by ReddZed »

(copied from Mods and Scenarios who said "wrong forum"...hopefully this is more appropriate)

Hey, I've been playing with the editor and would love to model a Private Military Contractor (PMC) who have to purchase all their weapons, fuel, servicing, etc. from local markets and pick up mercenary missions etc to pay the bills.

So I'm curious, is there enough capability in the Lua environment to open custom windows to display finances, markets, maintenance...maybe even add buttons to them?

I've scanned through some of the various resources and I am not hopeful, but wanted to double check.

Thanks in advance.
TheOriginalOverlord
Posts: 337
Joined: Tue Jun 20, 2000 8:00 am
Location: The Marines

RE: New windows or frames?

Post by TheOriginalOverlord »

ORIGINAL: ReddZed

(copied from Mods and Scenarios who said "wrong forum"...hopefully this is more appropriate)

Hey, I've been playing with the editor and would love to model a Private Military Contractor (PMC) who have to purchase all their weapons, fuel, servicing, etc. from local markets and pick up mercenary missions etc to pay the bills.

So I'm curious, is there enough capability in the Lua environment to open custom windows to display finances, markets, maintenance...maybe even add buttons to them?

I've scanned through some of the various resources and I am not hopeful, but wanted to double check.

Thanks in advance.
What game is this?
Semper Fi!

Jeremy

Image
ReddZed
Posts: 6
Joined: Sun Sep 20, 2020 12:54 pm

RE: New windows or frames?

Post by ReddZed »

I was interested in building this as a mod/scenario for CMO.

Wasn't sure if there was sufficient support/access to the game functions to do what I wanted - from what I could see in the docs, Lua is just being used for automation/scripting of existing game actions.
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

RE: New windows or frames?

Post by KnightHawk75 »

The only thing you can do to spawn a window is the really the special message window which you can fill with html to display\format information. Example: fb.asp?m=4828868
For buttons not really other than using Special Actions that invoke an action or question with a yes\no\cancel dialog, or simple text input (ie show a simple text list and have user enter a number etc) followed by taking specific steps based on the input given.

You can sort of accomplish what you're talking about in terms of building the functionality via SA's to purchase and manage stocks or take missions etc but it's not gonna be 'pretty' persay. If one could use full LUA (perhaps with pro version) with external module access and io namespace re-enabled, instead of the sandboxed version, you could easily do what you wanted by just invoking and building your own .net winforms etc.


Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: New windows or frames?

Post by Rory Noonan »

Hey ReddZed,

Like the others mentioned, the Command Lua API has a set of user interaction options that primarily rely on the Special Action functionality and pop-ups. In the past I've used this to allow players to 'order' munitions and request reinforcements etc, it works pretty well.

If there's something specific you need let us know and we'll look at adding it [:)]
Image
ReddZed
Posts: 6
Joined: Sun Sep 20, 2020 12:54 pm

RE: New windows or frames?

Post by ReddZed »

Thanks KnightHawk75 - that has both answered my question and given me some food for thought on how I might be able to implement some of this idea.

Rory Noonan - it's VERY early days for this idea, but I'll certainly let you know :)

Post Reply

Return to “Lua Legion”