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.
francot514
Posts: 87
Joined: Wed May 21, 2014 6:26 am

Command line arguments using external Stratagus editor...

Postby francot514 » Mon Jun 01, 2015 5:58 am

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?

Postby Andrettin » Mon Jun 01, 2015 6:02 pm

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?

Postby francot514 » Tue Jun 02, 2015 6:48 am

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?

Postby Andrettin » Tue Jun 02, 2015 7:48 pm

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?

Postby francot514 » Wed Jun 03, 2015 5:39 am

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?

Postby Andrettin » Wed Jun 03, 2015 7:43 am

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...

Postby francot514 » Thu Jun 04, 2015 7:12 am

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...

Who is online

Users browsing this forum: No registered users and 1 guest