Author Topic: launcher feature request  (Read 7472 times)

0 Members and 1 Guest are viewing this topic.

Offline RandomTiger

  • Senior Member
  • 211
What about the storage of settings?
Which settings need to be stored for each MOD and which dont?

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
just store all settings - it's simplier
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Quote
Originally posted by RandomTiger
What about the storage of settings?
Which settings need to be stored for each MOD and which dont?


Which settings? The other command line flags? As far as I know those don't alter depending on the selected mod at the moment anyway.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline redmenace

  • 211
Quote
Originally posted by RandomTiger
If the community draws up a plan of what they want and how they want it to work I will consider implementing it.

:eek2:  You're back. I thought you were gone for good.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
I like the mod-list-checkbox idea. Esp b/c of something I was thinking of looking into doing...

Have a file of some sort on the warpcore and/or indiegames server that stores a list of mod names and download locations. Implement some basic HTTP/FTP getting functionality (I think there's already stuff in the code for that) and use that to download the list. Then add that to the mod list, with some sort of marker to denote that they're remote mods. (Ideally there'd be some sort of description with each one, some relevant links or screenies or something). If one of the remote mods is chosen, the Launcher auto-downloads and installs it to a moddir.

If version numbers could be attached to files, that'd be doubly convenient, making it easy to get the latest version of mods (or mVPs).

Something else I'd like to see, the description of a command line displayed without it being necessary to open a browser window. Could be done with a new dialog, or tooltip style.

Welcome back. ;)
-C

 

Offline RandomTiger

  • Senior Member
  • 211
I was wondering if it would be a good idea for the launcher to store a ini file in a mod dir when you idenify it as a MOD. It could use that to pick it up later by scanning the dirs on that level for this ini file.

The ini could hold all the settings for that MOD. In thoery MOD'ers could create the ini's themselves and distribute it with the MOD's so it had the settings they wanted.

WMCoolmons download idea sounds great but a bit over the top perhaps?

The point of putting the descriptions in html was so coders or even normal users could edit the wiki to keep it up to date without having to touch the code.

The one thing about the Launcher is that its best if you keep the number of revisions down, because everyone gets confused about which version works with which version of fs2_open.

Personally I think we should keep it simple and flexible. If anyone wants to write fs2_open_stream then go ahead but I think it would be better to keep the main effort on the game itself.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
The point of putting the descriptions in html was so coders or even normal users could edit the wiki to keep it up to date without having to touch the code.


Coders still have to edit the code to add the command line parameter to the list. ;)

Code: [Select]

struct ModListItem
{
int type;
char* path;

//If a remote mod
char* name;
char* description;
}

void LoadModList()
{
std::vector ModList;
AddModDirsToList(&ModList);
char* buffer;
HTTPGetFile(&buffer, "http://fs2source.warpcore.org/mods.lst");
ParseRemoteMods(buffer, &ModList);

size_t num = Modlist.size();
for(unsigned int i = 0; i < num; i++)
{
   AddListItem(ModList[i].name, &ModList[i]);
}


Download/extraction is harder, you'd need a progress dialog and some sort of decompression lib for windows. The upside is that with RAR or something, a mod dir could be created and the RAR directly extracted into that, so mod setup would be pretty quick and easy.

Anyway, I just think it'd be a good way to publicize mods, the system we have now is looking for release threads in the campaign forum. ;)
-C

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Quote
Originally posted by RandomTiger
I was wondering if it would be a good idea for the launcher to store a ini file in a mod dir when you idenify it as a MOD. It could use that to pick it up later by scanning the dirs on that level for this ini file.

The ini could hold all the settings for that MOD. In thoery MOD'ers could create the ini's themselves and distribute it with the MOD's so it had the settings they wanted.



:yes: :yes: :yes: :yes:
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by RandomTiger
I was wondering if it would be a good idea for the launcher to store a ini file in a mod dir when you idenify it as a MOD. It could use that to pick it up later by scanning the dirs on that level for this ini file.

The ini could hold all the settings for that MOD. In thoery MOD'ers could create the ini's themselves and distribute it with the MOD's so it had the settings they wanted.

Already doing that.  Using the registry is being ditched in favor of an ini file (in the moddir) like Linux uses.  It will have all of the video settings, cmdline options and flags for the new SCP options screen (held up at the moment).  There flags in the options screen (and cmdline options for those that aren't replaced) will allow a defaults ini file which could be distributed by the mods.  The system specifc ini file would override those only if different.

I halted all of this for now (the basic ini file is working though) since I had a bad thought about the new options screen and want to rework some stuff to make it more useful and much easier to add new options to.  Also been working on bugs primarily and OSX support so this isn't really high on my todo list.

 

Offline RandomTiger

  • Senior Member
  • 211
Quote
Originally posted by WMCoolmon


Coders still have to edit the code to add the command line parameter to the list. ;)


Yes but its the build exe they edit not the launcher.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
:doubt: That's what I mean, have the description in the EXE with the other parameters, in the array in sexp.cpp.
-C

 

Offline RandomTiger

  • Senior Member
  • 211
I dont see why thats better than having it on twiki.
Has anyone got an ini parser class/file handy?

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Quote
Originally posted by RandomTiger
Has anyone got an ini parser class/file handy?

I'm just using a slightly modified (for memory stuff) version of osresigtry_unix.cpp to replace the Windows and Linux version in the game.  Haven't done any useful Launcher work on that yet since I kept changing my mind on how it should be handled.  The ini file layout is something like this though:

Code: [Select]
[Default]
VideocardFs2open=OGL -(1024x768)x32 bit
Gamma=1.00
LastPlayer=
SpeechVolume=100
SpeechVoice=0
SpeechTechroom=1
SpeechBriefings=1
SpeechIngame=1

[PXO]
FS2OpenPXO=1
Login=
Password=
SquadName=
Supress_TO_Warning=1

[Options]
Cmdline_nospec=0
Cmdline_noglow=0


This file is named fs2_open.ini.  The options specific ini file only contains the [Options] block, it is named fso_opt.ini.  Both can be specific to a moddir and it will only use the first one found of each.  The options that are in the options block will be renamed from Cmdline to keep things sane for us and be removed from the set of cmdline options (ie. Cmdline_nospec -> Option_nospec).  These will instead be on the new options screen in-game and can be changed on the fly.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by RandomTiger
I dont see why thats better than having it on twiki.
Has anyone got an ini parser class/file handy?


Code:
- Add another entry to the array

To view:
- Double click on the entry and a dialog comes up

Wiki:
- Open up browser
- Find wiki in the bookmarks list (if you're lucky) or open up HLP and find a link
- Find the command lines entry
- Click edit
- Login
- Click edit again
- Find where the new entry should go
- Add the new entry, with a bookmark
- Submit it
- Copy the url, go back to the code, and add it in along with the bookmark name to the code.

Oh, and of course, if gamespy is down, then you can't add it to the wiki and have to remember to do all this at a later time.

To view:
Double click on the entry and wait for your browser to load up. Take a few seconds to find the command line entry on the screen (Hopefully, it's at the top of the screen since they're bookmarked)

What I don't mention is that this also takes care of versioning - if a command-line option isn't there, then it means it's not supported. With the wiki, you have to add the date it was added and the build's date has to be checked or else you get 'well, it was on the wiki, why isn't it in the launcher?'
-C

 

Offline RandomTiger

  • Senior Member
  • 211
Yes, that does make sense actually.
Feel free to implement it.

 
Quote
Originally posted by RandomTiger
I dont see why thats better than having it on twiki.
Has anyone got an ini parser class/file handy?


freshmeat :)

http://inilib.sourceforge.net/
http://ndevilla.free.fr/iniparser/
http://freshmeat.net/projects/stl_ini/

 

Offline RandomTiger

  • Senior Member
  • 211
Quote
Originally posted by karajorma


My first suggestion would be support for selecting multiple mods. The code cand do it now but since the launcher doesn't support it most people haven't noticed.


Do people use multiple MOD's often?
I take it the first takes priority for common data (eg interface)?
Is this something we deliberately support for a reason or does it 'just work' due to the way its implemented?

Is this something that we should open up to the casual user with a proper interface or leave advanced users to use the command line to specify more than one MOD?

You can currently specify your primary MOD with the 'Select MOD' button and specify secondrys from the custom flags line.

Im temped to refuse this request for now, since multiple mods can be used via instructions on how to use the Launcher or the MOD's could be merged at the directory level and supporting it raises all kind of complications with implementing a settings file for the MOD's.

What I will do is make the 'Select MOD' button specify its MOD as the first as the the moment it puts it last.
« Last Edit: March 05, 2005, 08:22:28 pm by 848 »

 

Offline RandomTiger

  • Senior Member
  • 211
Quote
Originally posted by Nuke
and ad a fred tab, so that it may be lanched with mods and other command line options.


Quote
Originally posted by karajorma

:yes: :yes:
I tend to use multiple icons but that's certainly not ideal.


Request refused, for the moment. Sorry.

If I'm going to spend time on Fred it should be to fix bugs.
Multiple icons arent ideal but they are cheap and chearful.

 

Offline RandomTiger

  • Senior Member
  • 211
Quote
Originally posted by mrduckman


freshmeat :)

http://inilib.sourceforge.net/
http://ndevilla.free.fr/iniparser/
http://freshmeat.net/projects/stl_ini/


Thanks duckman, iniparser looks good.
Im going to start with a basic system to begin with.
We can scale it up to Taylors vision later on.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Quote
Originally posted by RandomTiger
Yes, that does make sense actually.
Feel free to implement it.


Can I use the Launcher sources in CVS, or is there anything special I need to do to get a copy of the source for a version that supports the current FS2Open version?
-C