Opened 10 years ago

Last modified 10 years ago

#2597 new enhancement

Need to display invaild command line option messages

Reported by: kanetaka Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description

Pyrogenesis.exe has some command line options, but it just ignores invalid command line options and returns no reply. Users who fail to load mods get confused if they don't receive any error messages.

Change History (5)

comment:1 by kanetaka, 10 years ago

Keywords: simple added

comment:2 by leper, 10 years ago

Keywords: simple removed

Doing this for all options probably isn't that simple. Doing it for just mods is though (especially checking if that folder is actually present).

comment:3 by historic_bruno, 10 years ago

Not all users run the game from the command line, notably those on Windows and OS X, so they will still be confused :) The best option is to not require the command line for enabling basic game functionality (mod selection should have a GUI).

That said, it's not a terrible idea to have command line checking and help displayed, but I'm sure we don't need to "roll our own", we should be able to find a decent existing solution for managing such options, instead of scattering the logic all over.

in reply to:  3 ; comment:4 by kanetaka, 10 years ago

Replying to historic_bruno:

Not all users run the game from the command line, notably those on Windows and OS X, so they will still be confused :) The best option is to not require the command line for enabling basic game functionality (mod selection should have a GUI).

GUI feedback is also required, I agree with you. But the command line is still useful; robust, minimum dependency, portable, and easy for automation.

That said, it's not a terrible idea to have command line checking and help displayed, but I'm sure we don't need to "roll our own", we should be able to find a decent existing solution for managing such options, instead of scattering the logic all over.

I suppose using both GUI and command line doesn't scatter the logic.

in reply to:  4 comment:5 by historic_bruno, 10 years ago

Replying to kanetaka:

I suppose using both GUI and command line doesn't scatter the logic.

I'm referring to how it's implemented now, there is no central definition of valid command line options. The engine doesn't validate them until it needs them, which is bad, and adding a help message at each point would be a bad idea. Instead, there should be a library which handles this for us (preferably with options and help defined in some flexible, standard format stored in data file). As options get parsed and validated, they go into a centralized config system, later the program can use them knowing that they are OK.

Last edited 10 years ago by historic_bruno (previous) (diff)
Note: See TracTickets for help on using tickets.