Author Topic: Rationale behind the mod folder location  (Read 6502 times)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Rationale behind the mod folder location
« on: 20 May 2011, 16:47:13 »
Why did we move mod data in 3.5 outside of the installation folder for megaglest for both Linux and Windows? This is due to the fact that when upgrading or uninstalling we did NOT want to automatically or accidentally remove mod content and user settings. Also we had the need to write to a 'safe' location that the user would always have access to write to (given todays security restrictions). As of 3.5.1 we are now compliant in both Windows and Linux in terms of where we store our data. Now if you want an easy way to 'get' at the mod data nothing stops you from creating a shortcut or link to the mod data folder from your installation folder.

<insert feedback here>

</insert feedback here>

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Rationale behind the mod folder location
« Reply #1 on: 20 May 2011, 16:55:34 »
You could even create a "shortcut" to the directory which contains the user data on your Desktop or (quickstart) panel, so that it's easily accessible. It might be a good idea to install such a shortcut by default on Windows when people install using our installer.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Rationale behind the mod folder location
« Reply #2 on: 20 May 2011, 16:56:13 »
As a linux player, I appreciated the change.  It made install mods I downloaded myself much easier

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Rationale behind the mod folder location
« Reply #3 on: 20 May 2011, 22:07:55 »
Yeah it's not really a problem...it was a good change. After it was changed I instantly placed a shortcut on my desktop. Yeah I'm a windows user...  :O
It might be a good idea to install such a shortcut by default on Windows when people install using our installer.
Yep, but if implemented, make it optionable as always.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rationale behind the mod folder location
« Reply #4 on: 21 May 2011, 04:28:15 »
You could even create a "shortcut" to the directory which contains the user data on your Desktop or (quickstart) panel, so that it's easily accessible. It might be a good idea to install such a shortcut by default on Windows when people install using our installer.
Exactly what I did. Appdata is a pain to access otherwise, and I'm relluctant to change from the default because it makes it more difficult to explain configuration to others (ever had one of those "oh, yours has ..." moments?).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Rationale behind the mod folder location
« Reply #5 on: 21 May 2011, 16:07:15 »
Of course I asked for feedback in case anyone had better ideas that would solve losing all of your mod data and user settings and having a safe place to write files to after install.

Thanks

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rationale behind the mod folder location
« Reply #6 on: 22 May 2011, 04:39:35 »
The user folder works well, is easier to access (appdata is hidden, which will probably confuse those who don't type the name of the folder, but try to click it in explorer: "there's no appdata folder!!one!!1!"), more commonly used among games for storing data, always has full write permissions for the user, and is the standard for games to store accessible data.

I also think that the game directory should place a link to each user's data folder somewhere. Don't know how this works if there's multiple users, but Civilization IV did it, and it's very helpful.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Rationale behind the mod folder location
« Reply #7 on: 22 May 2011, 06:12:51 »
I don't know what you mean by 'the user folder'. Please offer more details (and possibly links to additional info) so that I can investigate how viable this is for Windows Xp and higher.

Thanks

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rationale behind the mod folder location
« Reply #8 on: 22 May 2011, 22:04:28 »
For windows XP, this was the "My Documents" folder. For Vista and 7, it is the user's personal folder in the User's folder.

Windows NT:
C:\WINNT\Profiles\[user name]

Windows 2000, XP, Server 2003:
C:\Documents and Settings\[user name]\My Documents

Windows Vista, 7:
C:\Users\[user name]



The %UserProfile% variable on windows will give the following paths:
Windows NT:
C:\WINNT\Profiles\[user name]

Windows 2000, XP, 2003:
C:\Documents and Settings\[user name]
(though, if I recall, most settings used the My Documents folder rather than the base user folder, so "%UserProfile%\My Documents")

Windows Vista, 7:
C:\Users\[user name]

Versions of windows prior to Windows 95 did not have a specified users folder, but I'm confident nobody will play Glest on such an operating system.

http://en.wikipedia.org/wiki/My_Documents
http://en.wikipedia.org/wiki/Home_directory
« Last Edit: 22 May 2011, 22:13:45 by Omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Rationale behind the mod folder location
« Reply #9 on: 26 May 2011, 23:31:44 »
Our compromise was to add a shortcut to the Menu so users can easily find the mod data location.

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Rationale behind the mod folder location
« Reply #10 on: 27 May 2011, 01:04:33 »
Would it be so hard to  make an option weather to use external folders or not? As a modder/developer I have installed about 5-10 different instances of Glest/Megaglest to ensure not to mix up the mods / techtrees. The new mydata folder in the user folder makes it impossible to separate some special configs. And also is "C:\glest-dev\techs...." much easier to wirte in consoles etc. than "C:\User\Username\AppData\Roaming\megaglest\techs\..."

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: Rationale behind the mod folder location
« Reply #11 on: 27 May 2011, 01:09:57 »
One more time. The default folder must be 'writable' for all the windows client variants, thus the use of appdata as recommended by Microsoft (there was a suggestion to move up one level out of appdata into the user folder, but it would have required too much upgrade install script type changes and we wanted to release). Aside from what the game does by default, NOTHING STOPS YOU from changing the defaults. In short to have the game look for mods in mymgfolder\mydata simply edit glest.ini in the folder where mg was installed and edit:

Code: [Select]
UserData_Root=$APPLICATIONPATH/mydata/
This will cause mg to look for everything in mymgfolder\mydata.


MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Rationale behind the mod folder location
« Reply #12 on: 27 May 2011, 01:20:13 »
well I'd actually like to stop applications spamming AppData folders, but I think with that config I will be able to cross the AppData/.../megaglest folder out.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Rationale behind the mod folder location
« Reply #13 on: 27 May 2011, 10:29:07 »
well I'd actually like to stop applications spamming AppData folders,

I agree, I wish microsoft would go back to the way of old windows where everything was in the install folder. Newer windows seem to want to splatter program files all over the HD like linux does  :scared: ugh!
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Rationale behind the mod folder location
« Reply #14 on: 27 May 2011, 10:32:16 »
Using the platform standard location of user data, and with the shortcut for convenience, its hard to fault megaglest nor see a way it can do it better.

If you do something that is not properly recommended by Microsoft, you'll just get a whole bunch of other people shouting about that instead.  And you might run into write permissions minefield.

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Rationale behind the mod folder location
« Reply #15 on: 27 May 2011, 11:04:09 »
The way other great games do is to install not into programs folder. This avoid the permission problems comes up.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: Rationale behind the mod folder location
« Reply #16 on: 27 May 2011, 11:17:29 »
I think the default way MG does it is the recommended way in all living operating systems I know which have any kind of multiuser support.
Programs are installed in one place and the user specific data is stored in another place.
The fact that many windows application ignore(d) this, is caused by the fact that Microsofts rights and user system was very poor or non existent in the past, so it was ignored by most of the developers. But this should be no reason to glorify this behaviour  ;D .
« Last Edit: 27 May 2011, 15:16:50 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rationale behind the mod folder location
« Reply #17 on: 28 May 2011, 07:08:45 »
And just as a tiny reason to use the Documents or User folder (the documents folder is inside the user folder), here's a list of professional games which save their user data there:

-Alien Shooter: Vengeance
-Bioshock
-Company of Heroes
-Civilization IV (and expansion packs)
-Earth 2160
-Fallout 3
-Grand Theft Auto IV
-GRID
-The Last Remnant
-Luxor 2
-Mass Effect
-Mount and Blade
-Mr. Robot
-Overlord
-Perimiter 2: New Earth
-Plant Tycoon
-Sid Meier's Pirates!
-Tom Clancy's Rainbow Six Vegas 2
-SpellForce 2 - Shadow Wars
-Thief: Deadly Shadows
-Titan Quest
-Titan Quest - Immortal Throne
-Tomb Raider: Anniversary
-TrackMania Nations Forever
-Trials 2: Second Edition
-Unreal Tournament 3 Black
-Virtual Villagers 2: The Lost Children
-Virtual Villagers 3: The Secret City
-The Witcher: Enhanced Edition
-X3: Terran Conflict

And this is just a small, dated list that I could find in a quick search of the internet. A fair few of these save in a new folder in the User folder called "My Games" (so "%UserProfile%\My Games" would work).
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Rationale behind the mod folder location
« Reply #18 on: 28 May 2011, 12:24:28 »
But even in spring 2009, when Windows 7 was not yet released and only few used Vista, and the forum post providing this information was composed, it already contained many games which store user data in the proper locations. Since then, Windows 7 has grown to be the most bought Windows version and thus really pushed these new standards further. So I bet it's more games which use the proper paths by now - application developers always take some time to apply to new standards. And, in my opinion, even if it was that MegaGlest is only amongst few applications using proper paths (which it is not by what I can tell), it was no less proper just because others would do things wrong.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

MuwuM

  • Ornithopter
  • *****
  • Posts: 426
  • No Game without Move(ment)
    • View Profile
    • MuwuM - Lexicons
Re: Rationale behind the mod folder location
« Reply #19 on: 28 May 2011, 13:06:23 »
well i (as a developer) still don't like splitting up program folders, because it lead to changes in multiple folders than one,and make an installation nessesary, you can not simply copy and paste a new instance of a progam , but if this is the way it will be the new standart I will accept it (when still trying not to use it, I need 5-6 instances of almost every program I work with ;-) ).

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Rationale behind the mod folder location
« Reply #20 on: 28 May 2011, 14:25:33 »
In my opinion, it is more user-friendly to have all of their games' settings in the same place, so (I can't believe I'm saying these words) I agree with Microsoft on this one. :-X :o

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Rationale behind the mod folder location
« Reply #21 on: 28 May 2011, 18:54:29 »
Ok, we'll go more recent, all of these are 2009 or later:

-Crysis 2
-Alien Breed: Impact
-Alpha Protocol
-The Ball
-Mass Effect 2
-Metro 2033
-Sid Meier's Civilization V
-The Misadventures of P.B. Winterbottom
-Batman: Arkham Asylum
-DiRT 2
-Mirror's Edge
-Osmos

[..]
My Documents. The new default location for any documents that the user creates. Applications should be written to save files here by default.
[..]

I may be pressing this a bit, but just trying to demonstrate that the documents folder is also a standard, and the app data folder is very difficult for a new windows user to find. To prove my point, I asked two friends and my parents if they could find their "app data" folder. They could not. They didn't think to type it in or enable hidden folders, like your average windows user. I just think it would be best to be more user friendly. Some of these games that use the appdata folder, such as Modern Warfare 2, rarely, if ever, need you to ever interact with the files that are saved there, which are pretty much limited to game saves and other data they would have no use for. On the other hand, Glest (MegaGlest) would need very accessible data because mods are installed to this folder, as well as the INI, since these things can't be done in-game.

Notice how modable games tend to use the documents folder, eg: Civilization)?

Also, I seem to have forgotten the most important game on this list which uses the user folder: Glest Advanced Engine. It is very easy to find, without even needing to ask, contrast to the MegaGlest folder, where someone would almost always have to look it up unless they have experience with the appdata folder (again: most windows users do not). I hope when the merger occurs, you will go with that folder.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Rationale behind the mod folder location
« Reply #22 on: 29 May 2011, 01:55:11 »
It's not that hard to find in the first place, and
Our compromise was to add a shortcut to the Menu so users can easily find the mod data location.
:angel: This isn't that big of a deal.

aqeeliz

  • Guest
Re: Rationale behind the mod folder location
« Reply #23 on: 30 May 2011, 09:49:48 »
well i (as a developer) still don't like splitting up program folders, because it lead to changes in multiple folders than one,and make an installation nessesary, you can not simply copy and paste a new instance of a progam , but if this is the way it will be the new standart I will accept it (when still trying not to use it, I need 5-6 instances of almost every program I work with ;-) ).
I understand your point of view, in the past, when I used to use windows and often had to re-install it, I hated it when some programs installed in other partitions would stop working, and loved the ones that didn't need re-install. In the end, I started using 'portable' version of most progams, so that I won't have to re-configure or re-install them again and again.

I think it is best to go with standard though, as long as there is option for power users (and young/new users who keep messing up their system and need special settings to keep things running smoothly) to modify it.

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Re: Rationale behind the mod folder location
« Reply #24 on: 24 June 2011, 15:16:55 »
One more time. The default folder must be 'writable' for all the windows client variants, thus the use of appdata as recommended by Microsoft (there was a suggestion to move up one level out of appdata into the user folder, but it would have required too much upgrade install script type changes and we wanted to release). Aside from what the game does by default, NOTHING STOPS YOU from changing the defaults. In short to have the game look for mods in mymgfolder\mydata simply edit glest.ini in the folder where mg was installed and edit:

Code: [Select]
UserData_Root=$APPLICATIONPATH/mydata/
This will cause mg to look for everything in mymgfolder\mydata.


thanks!

Was it really necessary to post in a nearly month old topic just for a late "thanks"? -- Omega
« Last Edit: 24 June 2011, 18:31:03 by Omega »
WiP Game developer.
I do danish translations.
"i break stuff"

 

anything