Author Topic: better standalone/total conversion options  (Read 5334 times)

Mr War

  • Guest
better standalone/total conversion options
« on: 23 November 2011, 16:19:12 »
in the longer term, can MG start-up/interface be adapted to allow total conversions (Annex, Sci-Fi pack, cold war pack etc) to to 'fit' better within main version of MG rather than creating standalones? 

Not sure how this would work, but think it's one of the underlying challenges that's worth addressing.

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: better standalone/total conversion options
« Reply #1 on: 23 November 2011, 16:45:06 »
Yes a small launcher before game start if a standalone mod(s) is detected in a standalone folder the standalone folder would be inside the megaglest folder.
WiP Game developer.
I do danish translations.
"i break stuff"

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: better standalone/total conversion options
« Reply #2 on: 23 November 2011, 17:26:59 »
If I could add some things, I would like to somehow be able to have mods own appdata, and somehow be compatable with a completly standalone version in multiplayer. Would that be possible?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: better standalone/total conversion options
« Reply #3 on: 23 November 2011, 18:07:54 »
added a new commandline option in svn:

--load-mod=x

where x is the path to a folder containing the complete standalone mod. MG will first look here for files and if not found will fallback to defaults allowing modders to override the files they want to display their standalone mod. The value of x can contain special macros such as:

$HOME
$APPDATA
$USERNAME
$APPLICATIONPATH

so for example megaglest --load-mod=$APPLICATIONPATH/mymod

would tell MG to look in the folder where the megaglest binary is running from and in the mymod subfolder should contain all files that would normally be found in the root MG folder.

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: better standalone/total conversion options
« Reply #4 on: 23 November 2011, 18:20:19 »
thanks softcoder :thumbup: :thumbup: :thumbup:

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: better standalone/total conversion options
« Reply #5 on: 23 November 2011, 19:43:32 »
hmm, im a little busy with moving il look at this later. however if the user needs to pass this manually, its kinda moot. Then the user could just have another folder with the stand alone mod, and then a shortcut to the folder.

I can't really see the great use for this command.
WiP Game developer.
I do danish translations.
"i break stuff"

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: better standalone/total conversion options
« Reply #6 on: 23 November 2011, 19:54:10 »
Whats wrong with supplying a custom startup script with your mod which simply calls mg with this parameter. This way you could support multiple mods + mainline MG all at the same time.

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: better standalone/total conversion options
« Reply #7 on: 23 November 2011, 20:45:47 »
I agree with softcoder. It's the easiest way to load mod's on startup.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: better standalone/total conversion options
« Reply #8 on: 23 November 2011, 22:10:23 »
It'd be pretty easy to give a batch file or a shell script for users, though the only issue I could think of would be distributing the mod, as giving them a batch/shell file would not go well with the mod download center, as they'd have to crawl through half a dozen folders just to find the script, which would depend on the path to the MegaGlest program, as well... However, I don't like the concept of having a window appear every time at startup if one of these overhaul mods is installed, as every time you run MegaGlest, you'd have to choose something from the window.

Personally, I like civilization's approach to mods the best. They have a menu option which will list all overhaul mods (in MegaGlest's case, an addition to the techtree XML could denote a mod as being an "overhaul" mod). When this mod is selected, the game restarts with the overhaul mod loaded, which (in Civ IV's case) allowed the background for the menu and more to be changed, without impacting the other mods or the standalone game at all. When the game is restarted, it's back to normal.

Now, back to the whole command line option, how well does it really work? I haven't tested it, nor do I have much experience with batch or shell files myself, but it must point to the MegaGlest binary. If it's an absolute path, there's no way to know what the path would be, is there (eg, "Program Files" or "Program Files (x86)", not to mention if people have installed MegaGlest somewhere else, such as how I sometimes install with version numbers to allow multiple installed versions)? If it's a relative path, the issue still applies unless the batch/shell file was in the installation directory, which would make a hassle for distributing this file (since mods are supposed to be installed in an entirely different folder).

Speaking of mods, the default on windows is $APPDATA/roaming/megaglest, but it differs per OS, etc. Is there any cross-platform method? Perhaps a "magic word" that would become a link to the megaglest data folder (eg, $DATAFOLDER)?
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: better standalone/total conversion options
« Reply #9 on: 24 November 2011, 00:20:45 »
I'm sry to tell, but we are using $APPDATA/megaglest/  because AppData on Windows means  C:\Users\UserName\AppData\Roaming  ... I don't see a big problem in building startup scripts.. the only thing wich is need to be done is "translating" them to the diferent OS's.

For the future a special mod menu, where you can switch to any mod easily would be a even better solution but as addition, not as a replacement because (at least) on Windows this commandline all can be easily used in an installer setting up an Link in startmenu or on desktop.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: better standalone/total conversion options
« Reply #10 on: 24 November 2011, 01:11:31 »
For the future a special mod menu, where you can switch to any mod easily would be a even better solution but as addition, not as a replacement because (at least) on Windows this commandline all can be easily used in an installer setting up an Link in startmenu or on desktop.
Definitely agreeable. I forgot about installers and links, thinking only about the "traditional" ways of distributing a mod: an archive or the MDC.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: better standalone/total conversion options
« Reply #11 on: 24 November 2011, 04:14:30 »
So if done this way, would it be possible to play multiplayer of An Annex Standalone, and an Annex Total Conversion (running on megaglest) without any data mixing?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: better standalone/total conversion options
« Reply #12 on: 24 November 2011, 06:52:18 »
So if done this way, would it be possible to play multiplayer of An Annex Standalone, and an Annex Total Conversion (running on megaglest) without any data mixing?
Yep. You basically tell MegaGlest to use an alternative folder instead of the data folder, falling back to the data folder for files not in the specified alternative.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: better standalone/total conversion options
« Reply #13 on: 24 November 2011, 13:11:55 »
Wow this is quick progress. I would prefer keeping all folders in the main megaglest subtree as the roaming folder is hidden on typical windows setup which makes it a pain to navigate to. And that way the URL of the override folders is always the same relative to MG folder so easier to distribute startup scripts(?).

A related issue is tech-tree / map / tile set pairings. The standard tile sets dpnt fit with non-magitech factions because of the objects. And some maps are designed with specific tile sets in mind (eg the towns in scifi pack)

Somehow the standalone setting would influence the maps and tile sets too, but not require duplication of the files


MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: better standalone/total conversion options
« Reply #14 on: 24 November 2011, 13:23:05 »
... the roaming folder is hidden on typical windows setup which makes it a pain to navigate to.
try %AppData% in explorer window

Wow this is quick progress. I would prefer keeping all folders in the main megaglest subtree [...] And that way the URL of the override folders is always the same relative to MG folder so easier to distribute startup scripts(?).
I'd prefer $APPLICATIONPATH/mods/mymod as default.

A related issue is tech-tree / map / tile set pairings. The standard tile sets dpnt fit with non-magitech factions because of the objects. And some maps are designed with specific tile sets in mind (eg the towns in scifi pack)

Somehow the standalone setting would influence the maps and tile sets too, but not require duplication of the files

maybe add the possibility to disable look for some files with special mods/modname/modname.xml

Mr War

  • Guest
Re: better standalone/total conversion options
« Reply #15 on: 24 November 2011, 13:30:36 »
Just to clarify the point about urls is that whilst MG is an acquired taste with small player population, we'd surely want to make it as accessible as possible. Typical new players may not know codes like that, and we need to be able to explain where to unzip the latest mod they downloaded etc

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: better standalone/total conversion options
« Reply #16 on: 24 November 2011, 13:56:59 »
So if done this way, would it be possible to play multiplayer of An Annex Standalone, and an Annex Total Conversion (running on megaglest) without any data mixing?
Yep. You basically tell MegaGlest to use an alternative folder instead of the data folder, falling back to the data folder for files not in the specified alternative.

Somehow I feel that it couldn't, due to the fact that in a standalone version data would be stored in main directory, while a megaglest version would be stored in appdata. Both might see the other as a different version...

Just to clarify the point about urls is that whilst MG is an acquired taste with small player population, we'd surely want to make it as accessible as possible. Typical new players may not know codes like that, and we need to be able to explain where to unzip the latest mod they downloaded etc

Yea I agree
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: better standalone/total conversion options
« Reply #17 on: 24 November 2011, 13:57:53 »
yeah what we want is for all downloads to go through MG itself.  It already has a download centre, so perhaps what is needed is to put a mod picker at the top-level menu there with a 'more' that takes you to the current management-style screen; and the currently selected mod, if it contains all the total-conversion-type files, themes the whole UI?

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: better standalone/total conversion options
« Reply #18 on: 24 November 2011, 19:31:27 »
yeah what we want is for all downloads to go through MG itself.  It already has a download centre, so perhaps what is needed is to put a mod picker at the top-level menu there with a 'more' that takes you to the current management-style screen; and the currently selected mod, if it contains all the total-conversion-type files, themes the whole UI?

NO!, And while scripts is good, i just don't see this as a userfriendly option not to mention the modder actually need to know a scripting launage that is crossplatform. What is the harm of a simple Launcher inside the megaglest folder so there is

Megaglest.exe
Megaglest_launcher.exe

The launcher looks if any standalone mods are present and if they are lists them for the user to chose, the megaglest game would obivously be a standlone mod by this standard.
WiP Game developer.
I do danish translations.
"i break stuff"

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: better standalone/total conversion options
« Reply #19 on: 24 November 2011, 21:51:09 »
If you can write all the xml for a mod, I'm sure you can handle a few lines of shell script.  ::)

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: better standalone/total conversion options
« Reply #20 on: 25 November 2011, 03:24:36 »
yeah what we want is for all downloads to go through MG itself.  It already has a download centre, so perhaps what is needed is to put a mod picker at the top-level menu there with a 'more' that takes you to the current management-style screen; and the currently selected mod, if it contains all the total-conversion-type files, themes the whole UI?

NO!, And while scripts is good, i just don't see this as a userfriendly option not to mention the modder actually need to know a scripting launage that is crossplatform. What is the harm of a simple Launcher inside the megaglest folder so there is

Megaglest.exe
Megaglest_launcher.exe

The launcher looks if any standalone mods are present and if they are lists them for the user to chose, the megaglest game would obivously be a standlone mod by this standard.
Um, at least a few commercial games have used a feature like Will's suggesting, such as Civilization IV, and they were very user friendly. It's the same as a launcher, except you choose the "overhaul" mod AFTER running MegaGlest, without trying to figure out if you're supposed to launch the direct executable or some launcher program (1 program > 2 programs). That's it for the user. Just choose one menu option and select the mod from the list. Done.

For the modder, there'd be some method of telling the game the mod is meant to be an "overhaul mod" (defined as changing anything in the data folder, such as the menu model, language files, etc). Let's pretend this is specified in the techtree XML with the added line: <overhaul-mod value="true" data-folder="mydata" />. Now because value is true, the mod is considered to be an "overhaul" mod and will be displayed in this new menu option. The folder parameter will give the folder to the overhaul mod's new base folder, relative from the techtree XML (so if this was Magitech, for example, the path would be ./techs/magitech/mydata. This folder would be the same as the base folder of MegaGlest (namely the installation directory), and would be used in place of stuff actually inside the data folder, tileset folder, etc, of MegaGlest.

So for example, let's pretend the overhaul mod changes the main menu, and nothing else. So in ./techs/magitech/mydata/data/core/menu/main_model there might be a new menu_main.g3d file (and corresponding textures). Thus, MegaGlest would use this new model instead of the default found in ./MegaGlest/data/core/menu/main_model. However, there's no language file in this overhaul mod, so MegaGlest would use the default language file found in ./MegaGlest/data/lang, as always.

What changes does this mean for the author of an overhaul mod? They'd have to move the contents of their map folder, data folder, etc to a new folder in their techtree folder and add one line of XML to the techtree XML, specifying the path to this newly created folder. I'm sure after the 10,000 XML lines they put into that mod, they handle one more. The contents of the data folder, tileset folder, etc are not changed, nor their folder structure, but now they can provide this "overhaul" style of a mod that can be (1) downloaded in the MDC, (2) compatible with other overhaul mods (and the default setup), and (3) provides a user-friendly method of handling these overhaul mods.

Overall, there's less work for the modder since they wouldn't have to try and create an installer for each OS with new version of MegaGlest, and prevents the users from having to have multiple MegaGlest's installed. Plus, anything compatible with the MDC is way more user friendly than any installer or archive.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: better standalone/total conversion options
« Reply #21 on: 28 November 2011, 11:30:18 »
Quote
Um, at least a few commercial games have used a feature like Will's suggesting, such as Civilization IV, and they were very user friendly. It's the same as a launcher, except you choose the "overhaul" mod AFTER running MegaGlest, without trying to figure out if you're supposed to launch the direct executable or some launcher program (1 program > 2 programs). That's it for the user. Just choose one menu option and select the mod from the list. Done.

That was actually my point

It should have been like this

Megaglest_engine_launcher.exe -pops up a small menu in wich you can chose from installed mods.

WiP Game developer.
I do danish translations.
"i break stuff"

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: better standalone/total conversion options
« Reply #22 on: 29 November 2011, 01:22:09 »
That was actually my point

It should have been like this

Megaglest_engine_launcher.exe -pops up a small menu in wich you can chose from installed mods.
I actually had more in mind the player choosing the mod AFTER the game starts up. Two executables is too confusing and making it pop up every time would just be an annoyance. Though, I'd gladly take it over how "total conversion" mods are done now.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: better standalone/total conversion options
« Reply #23 on: 29 November 2011, 10:24:10 »
i got that, but id want a full-game experience, there will be a MG techtree available, but for starters my standalone mod, would use its own .exe file, and or /.bin ect.
WiP Game developer.
I do danish translations.
"i break stuff"

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: better standalone/total conversion options
« Reply #24 on: 29 November 2011, 11:34:56 »
I think it would be possible to do all 3 methods:
  • command-line: it's done, yet
  • Start-up-scripts/executables: Should be shipped with mods; scripts should be very easy (just call megaglest with mod specific parameters), executables same as scripts, but compiled (forces diverences between OS's)
  • Ingame menu to change mod.