Command line arguments using external Stratagus editor...

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.
Post Reply
francot514
Posts: 87
Joined: Wed May 21, 2014 6:26 am

Command line arguments using external Stratagus editor...

Post by francot514 »

Hey, i want to ask if possible to allow binaries to have some command line arguments like for loading a map without entering the menu, just directly to the game...
Last edited by francot514 on Wed Jun 03, 2015 5:39 am, edited 1 time in total.
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Command line arguments can be included in binaries?

Post by Andrettin »

francot514 wrote:Hey, i want to ask if possible to allow binaries to have some command line arguments like for loading a map without entering the menu, just directly to the game...
Yes, it is possible, but if you want to add any new ones you would have to program them.
francot514
Posts: 87
Joined: Wed May 21, 2014 6:26 am

Re: Command line arguments can be included in binaries?

Post by francot514 »

Yes i know, i was able to load map directly in stratagus 2.3 version, now my point is what c++ script code will needed for do stuff like outpout game data or units, like for example adding iolib into the source...
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Command line arguments can be included in binaries?

Post by Andrettin »

francot514 wrote:Yes i know, i was able to load map directly in stratagus 2.3 version, now my point is what c++ script code will needed for do stuff like outpout game data or units, like for example adding iolib into the source...
iolib is already in the source. You mean adding new units with a command line argument? You could use a command line argument that loads a lua file defining the new unit. But why do these things through command line arguments at all?
francot514
Posts: 87
Joined: Wed May 21, 2014 6:26 am

Re: Command line arguments can be included in binaries?

Post by francot514 »

I want to run map and scripts from external editor to stratagus im developting, that is why i need to use io lib and loadmap directly, calling the command line...

Do you know how to use the io lib??, like for example to outpout unit stats...
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Command line arguments can be included in binaries?

Post by Andrettin »

francot514 wrote:I want to run map and scripts from external editor to stratagus im developting, that is why i need to use io lib and loadmap directly, calling the command line...

Do you know how to use the io lib??, like for example to outpout unit stats...
Can't you just use the Load() function to load the scripts/maps your external editor generates? Or maybe I misunderstood something?
francot514
Posts: 87
Joined: Wed May 21, 2014 6:26 am

Re: Command line arguments using external Stratagus editor...

Post by francot514 »

Can't you just use the Load() function to load the scripts/maps your external editor generates? Or maybe I misunderstood something?
Yes, youre, i need the use of the iolib to oupot units properties from the map to be able to load them, into editor, the stuff about load maps directly from editor is different stuff.. im using booth to allow the editor a good way to triggering in maps...
Post Reply