OpenXcom Forum

OpenXcom => Suggestions => Topic started by: Volutar on May 15, 2013, 11:46:19 am

Title: File system restructure
Post by: Volutar on May 15, 2013, 11:46:19 am
https://openxcom.org/forum/index.php/topic,1235.0.html (https://openxcom.org/forum/index.php/topic,1235.0.html)

Actually it might be quite a common problem - misunderstanding of how openxcom is related to xcom.
People are expecting extra exe and some data in ufo:defence folder.
Like
C:\Games\Ufo Defense\OXC\openxcom.exe
C:\Games\Ufo Defense\OXC\*.dll
C:\Games\Ufo Defense\OXC\readme.txt
C:\Games\Ufo Defense\OXC\COPYING
C:\Games\Ufo Defense\OXC\Languages\*.*
C:\Games\Ufo Defense\OXC\Ruleset\*.*
C:\Games\Ufo Defense\OXC\Shaders\*.*
C:\Games\Ufo Defense\OXC\SoldierName\*.*
C:\Games\Ufo Defense\OXC-user\*.*
It will use "\\" folder as vanilla data. "OXC" folder name is optional, and can be changed to whatever you want. Even having multiple OXC versions at once. But "OXC-user" is fixed folder for saves and screenshots. Because it's better to be shared between different versions.

It simply would be easier to control versions. They could be placed into different foldiers, like C:\Games\Ufo Defence\OXC-git1844\ and C:\Games\Ufo Defence\OXC-git1932\, without making multiple copies of XCOMEU data. And that's more logical from user perspective.

I strongly advice reconsider folder structure in order to make it more logical and easy to use and update.

P.S.: Dos version have executables in \UFOEXE\GEOSCAPE.EXE and \UFO2EXE\TACTICAL.EXE, with GO.BAT in main folder. So having openxcom in some \OXC\ folder will nicely fit original concept.
Title: Re: File system restructure
Post by: SupSuper on May 15, 2013, 01:14:44 pm
Mixing OpenXcom with original will just cause confusion, specially when we support different games and mods. And OpenXcom already supports various data/user paths, since different platforms use completely different folder structures, so if people wanna have such advanced configurations, they can set them up themselves.

For example, if people wanna have different copies without copying the same Data all over, they can just use a common data path (https://www.ufopaedia.org/index.php?title=Installing_(OpenXcom)) for the X-COM data, and an individual Data path for each version's OpenXcom data.
Title: Re: File system restructure
Post by: Volutar on May 15, 2013, 01:36:42 pm
Actually it is mixed already, since people have to copy vanilla copyrighted content inside of openxcom/data folder. Which is not really good. But adding extra (openxcom) folder inside of vanilla folder is more consistent.

Using command line is okay, but GUI users know very little about command line arguments. And thing is - this data folder must have shaders, language, soldiername and rulesets folder, THOUGH it's not vanilla content. So you still have to copy this data into vanilla folder, and another data outside of this folder. From my perspective it causes more mess than order. Mixing lots of vanilla folders with lots of openxcom folders was not very nice idea in first place.
My sugestion is to separate vanilla from openxcom, and by that make data more consistent.
Title: Re: File system restructure
Post by: SupSuper on May 15, 2013, 01:40:56 pm
You can already have multiple data folders. Hell you can probably even put OpenXcom directly in a vanilla folder sans "data" path (so the folder is the data) and it would work.
Title: Re: File system restructure
Post by: Volutar on May 15, 2013, 01:45:08 pm
How can I have shaders/rulesets/soldiername/languages OUTSIDE of vanilla data folder? In order not to mix them with vanilla.
I mean, if i want to have openxcom.exe and openxcom data set in one place, and vanilla game in another?
Title: Re: File system restructure
Post by: xracer on May 15, 2013, 06:37:30 pm
Not that i understand any of what you guys are talking about but
would it it be easier to have something like

C:\Games\OXC\Ufo Defense\*.*
C:\Games\OXC\TFTD\*.*
C:\Games\OXC\Apoc\ *.*
C:\Games\OXC\mypersonalmods\ *.*

that way you do not mix and mess with the original files and since eventually other X-COM games will be supported.

just my $0.02
Title: Re: File system restructure
Post by: Volutar on May 15, 2013, 08:56:29 pm
XRacer, And how would you make 4 different OXC versions working with them?
Cloning 4 games 4 times? Not very good idea, speaking gently.

C:\Games\OXC\Ufo Defense\*.*
C:\Games\OXC\TFTD\*.*
C:\Games\OXC\Apoc\ *.*
C:\Games\OXC\mypersonalmods\ *.*
C:\Games\OXC2\Ufo Defense\*.*
C:\Games\OXC2\TFTD\*.*
C:\Games\OXC2\Apoc\ *.*
C:\Games\OXC2\mypersonalmods\ *.*
C:\Games\OXC3\Ufo Defense\*.*
C:\Games\OXC3\TFTD\*.*
C:\Games\OXC3\Apoc\ *.*
C:\Games\OXC3\mypersonalmods\ *.*
C:\Games\OXC4\Ufo Defense\*.*
C:\Games\OXC4\TFTD\*.*
C:\Games\OXC4\Apoc\ *.*
C:\Games\OXC4\mypersonalmods\ *.*

TFTD is stand alone game, as Ufo Defense is. They should stay where they are, without mixing lots of "modded" stuff.
C:\Games\Ufo Defense\*.*
C:\Games\TFTD\*.*
C:\Games\OXC\*.*
C:\Games\OXC\mypersonalmods\*.*

P.S. There are about 0 chances of APOC being played with openxcom.
Title: Re: File system restructure
Post by: xracer on May 15, 2013, 09:31:55 pm
i wasn't actually talking about the original games, just OXC version

People do like to keep things separate, or rather that is my personal preference. and why woudl you want 4 different versions in any case,
 the method i was trying to describe,

is basically the root directory c:\Games\ with the OXC\ and the main folder and then from there split into whatever version you want. as such it would look something like this.

C:\Games\OXC\Ufo Defense\*.*
C:\Games\OXC\TFTD\*.*
C:\Games\OXC\Ufo Defense2\ *.*
C:\Games\OXC\TFTD2\*.*
C:\Games\OXC\mypersonalmods\ *.*
.
.
.

This keeps all games with in that parent folder as a cohesive group under OXC. Then again i do not know why you want to be running multiple copies of a game unless you are doing revisions or trial code.

and don't worry you don't have to speak gently, i think we are all adults here as long as you don't insult me, you can say that is "moronic idea" or "the stupidest idea" is ok, i won't run to tell my mommy :)

the idea of everything under OXC is simply to understand that all code in that folder belongs to the OXC branch if you wanted it will be
C:\Games\OXC\awesomly-HD-with-ubber-sptries-version-of-UFO-Defense-done-by-me\*.*

in any case as a non-programmer maybe i just don't' understand  filesystem hierarchy enough.

the original games need not be touched so they can stay in their original folder
C:\Games\Ufo Defense\*.*
C:\Games\TFTD\*.*
or wherever that may be.

I think mixing with the original folders will cause confusion, furhteremore i think this will be easier to pass onto multiple OS sicne file structures do differ in that case it will simply be

...\OXC\Ufo Defense\*.*
...\OXC\TFTD\*.*
...\OXC\Ufo Defense2\ *.*
...\OXC\TFTD2\*.*
...\OXC\mypersonalmods\ *.*
That way programmers can readily tell people, no you idiot you are looking in the wrong folder :P


EDIT:

I just reread the whole thread, what you don't want is to have to copy the data from the original multiple times, personally i wouldn't care :) but as Supsuper mentioned i think it could be done in different way with the common data paths.
Title: Re: File system restructure
Post by: Volutar on May 15, 2013, 10:17:04 pm
There's some sort of legality flaw when you're mixing VANILLA games with your alterations. Because of that putting vanilla game into openxcom data, and putting there shaders/language/soldiername/rulesets is not quite acceptable.

C:\Games\Ufo Defense\ - vanilla ufo1 WITHOUT RULESETS AND any non-vanilla stuff (pure clear ufo1 folder)
C:\Games\Terror from the deep\ - vanilla ufo2 -"-
C:\Games\OpenXCom\ - openxcom exe / non vanilla stuff
C:\Games\OpenXCom\Shaders\ - why make multiple copies of same data set??? Shaders aren't subject to mod for particular game versions!!!
C:\Games\OpenXCom\SoldierName\ - same thing -there's no need to clone data
C:\Games\OpenXCom\ufo1\Rulesets\ - non vanilla custom openxcom data for xcom1
C:\Games\OpenXCom\ufo1\Language\ -"-
C:\Games\OpenXCom\ufo2\Rulesets\ - non vanilla custom openxcom data for xcom2
C:\Games\OpenXCom\ufo2\Language\ -"-
C:\Games\OpenXCom\user\ - config foldier + saves (basically similar rules but not INSERTED into vanilla game folder at all)

And just couple of lines for each game type in options.cfg
like
==========
games:
  xcom1:
    vanilla: C:\Games\Ufo Defense\
    openxcom: \ufo1\
  xcom2:
    vanilla: C:\Games\Terror from the deep\
    openxcom: \ufo2\
============


And switch thingy in game, where you can change game data/rules.

I'm telling once more: mixing vanilla content with non vanilla is really bad and stupid strategy. Having location paths for vanilla data is incomparable better.
With a time some vanilla data could be replaced with "custom", not by changing vanilla data (which is not really legal) but by putting into this "non vanilla" foldiers. And this custom data will work in overriding manner.

In this case when you'd like to make some "testing" version added (with different rulesets and language files), you won't need to copy vanilla data, you just create C:\Games\OpenXCom test\ with other "testing" data, and referencies to vanilla data locations. You can even put flac files for custom music into vanilla foldier, and it will be shared between versions. In other case you'd need to copy 400 mbytes of sound data in each testing location. And that won't look very good.
Title: Re: File system restructure
Post by: Yankes on May 15, 2013, 11:16:02 pm
I agree with Volutar, we should leave vanilla xcom alone :)
Overriding data without modifying original data great addition to that.
Title: Re: File system restructure
Post by: moriarty on May 16, 2013, 06:26:03 pm
Just a personal opinion here: I like to have all data that belongs to a game within ONE folder. No references to the outside. So the way it is now, with openxcom grabbing and copying the game data, suits me just fine. That's because I like to play around with modified files, and if I modify one copy of the game, I don't want a different game to suddenly use those modified files, too.

Just my 2 cents.
Title: Re: File system restructure
Post by: Volutar on May 16, 2013, 06:40:02 pm
moriarty, at first ask Take-two for copy rights and modification rights for data of xcom1/2.
Title: Re: File system restructure
Post by: moriarty on May 16, 2013, 06:44:08 pm
The way I understand it, I can pretty much do what I want with the data I have, as long as I don't re-distribute it...?
Title: Re: File system restructure
Post by: Volutar on May 16, 2013, 06:47:05 pm
moriarty, that's discussible.
And with my proposal you can easily set :
========
  xcom1:
    vanilla: \ufo1\
    openxcom: \ufo1\
========
i.e. to same path and it won't be "outside"
I see no contraversal.
Thing is, when I want to use 4 different openxcom versions, I would need to copy vanilla games 4 times, including huge flac music.

For the sakes, when you set
===========
  xcom1:
    vanilla: \data\
    openxcom: \data\
===========
that would be exactly the same as current file structure
Title: Re: File system restructure
Post by: SupSuper on May 16, 2013, 07:16:45 pm
Wow, that sounds like a great feature!

(https://i.imgur.com/fikSFegs.jpg) (https://i.imgur.com/fikSFeg.jpg)

No wonder it's already available (https://www.ufopaedia.org/index.php?title=Installing_(OpenXcom)#Data_Folder), since version 0.3 even (https://www.ufopaedia.org/index.php?title=Development_History_(OpenXcom)), and we're 15 posts into this without anyone fact-checking! Thread dismissed.
Title: Re: File system restructure
Post by: xracer on May 16, 2013, 07:23:58 pm
how dare you come and ruin this awesome argument, with your "facts"!!!!!!

on the other hand it is nice to see that is already done :)
Title: Re: File system restructure
Post by: Volutar on May 16, 2013, 07:40:17 pm
SupSuper, you're referring to something that not quite related to subject discussed.

And subject is about making paths in options file, not in command line arguments which is noone knows already. And in perspective - about making those "games" switchable from inside of game.

And that's not even close to be done.
Title: Re: File system restructure
Post by: pmprog on May 18, 2013, 12:11:15 pm
Wow, that sounds like a great feature!

(https://i.imgur.com/fikSFegs.jpg) (https://i.imgur.com/fikSFeg.jpg)

No wonder it's already available (https://www.ufopaedia.org/index.php?title=Installing_(OpenXcom)#Data_Folder), since version 0.3 even (https://www.ufopaedia.org/index.php?title=Development_History_(OpenXcom)), and we're 15 posts into this without anyone fact-checking! Thread dismissed.

I LOL'd :D
Title: Re: File system restructure
Post by: Volutar on May 18, 2013, 01:27:21 pm
What's so funny? Thread is about different thing. Though people tend to not to open their eyes properly.
Title: Re: File system restructure
Post by: Daiky on May 26, 2013, 10:31:12 am
There's some sort of legality flaw when you're mixing VANILLA games with your alterations. Because of that putting vanilla game into openxcom data, and putting there shaders/language/soldiername/rulesets is not quite acceptable.

C:\Games\Ufo Defense\ - vanilla ufo1 WITHOUT RULESETS AND any non-vanilla stuff (pure clear ufo1 folder)
C:\Games\Terror from the deep\ - vanilla ufo2 -"-
C:\Games\OpenXCom\ - openxcom exe / non vanilla stuff
C:\Games\OpenXCom\Shaders\ - why make multiple copies of same data set??? Shaders aren't subject to mod for particular game versions!!!
C:\Games\OpenXCom\SoldierName\ - same thing -there's no need to clone data
C:\Games\OpenXCom\ufo1\Rulesets\ - non vanilla custom openxcom data for xcom1
C:\Games\OpenXCom\ufo1\Language\ -"-
C:\Games\OpenXCom\ufo2\Rulesets\ - non vanilla custom openxcom data for xcom2
C:\Games\OpenXCom\ufo2\Language\ -"-
C:\Games\OpenXCom\user\ - config foldier + saves (basically similar rules but not INSERTED into vanilla game folder at all)

And just couple of lines for each game type in options.cfg
like
==========
games:
  xcom1:
    vanilla: C:\Games\Ufo Defense\
    openxcom: \ufo1\
  xcom2:
    vanilla: C:\Games\Terror from the deep\
    openxcom: \ufo2\
============

I was discussing this with Warboy yesterday, and we came to the conclusion that it might even be interesting in some cases to have two language files. One with common strings for example all the strings related to the new options screen. Otherwise if a new option would be added, you need to add it to both ufo1 and ufo2 folder.

Also, there need to be a way to have user mods in either ufo1 or ufo2 folder + user mod strings in a language file. Also, if a user mod adds new strings, will they all be translated in the different languages?

And there is a new folder by now "Resources" where you have the pathfinding orbs now (which is common between all mods), but there can be specific Resources for ufo1 or ufo2 or user mods.

So if I compile that into your structure proposal, I have this:

C:\Games\Ufo Defense\ - vanilla ufo1 WITHOUT RULESETS AND any non-vanilla stuff (pure clear ufo1 folder)
C:\Games\Terror from the deep\ - vanilla ufo2 -"-
C:\Games\OpenXCom\ - openxcom exe / non vanilla stuff
C:\Games\OpenXCom\Shaders\ - why make multiple copies of same data set??? Shaders aren't subject to mod for particular game versions!!!
C:\Games\OpenXCom\SoldierName\ - same thing -there's no need to clone data
C:\Games\OpenXCom\Language\ - common  strings
C:\Games\OpenXCom\Resources\ - common graphics
C:\Games\OpenXCom\ufo1\Rulesets\ - non vanilla custom openxcom data for xcom1
C:\Games\OpenXCom\ufo1\Language\ -"-
C:\Games\OpenXCom\ufo1\Language\mod\ -"-
C:\Games\OpenXCom\ufo1\Resources\ -"-
C:\Games\OpenXCom\ufo1\Resources\mod\ -"-
C:\Games\OpenXCom\ufo2\Rulesets\ - non vanilla custom openxcom data for xcom2
C:\Games\OpenXCom\ufo2\Language\ -"-
C:\Games\OpenXCom\ufo2\Language\mod\ -"-
C:\Games\OpenXCom\ufo2\Resources\ -"-
C:\Games\OpenXCom\ufo2\Resources\mod\ -"-

==========
games:
  xcom1:
    vanilla: C:\Games\Ufo Defense\
    openxcom: \ufo1\
    rulesets:
     - XCom1Ruleset.rul
     - myxcom1mod.rul
  xcom2:
    vanilla: C:\Games\Terror from the deep\
    openxcom: \ufo2\
     - XCom2Ruleset.rul
============

Or is it too complicated? :) there are probably several ways to structure it...
Title: Re: File system restructure
Post by: Volutar on May 26, 2013, 10:39:26 am
It might be more complicated than it it, but hell, it inavoidably getting more complicated, we just need to handle this properly. You missed keyword "rulesets:" for xcom2

I think all moddable things should be in ONE place. I mean, you want to add mod "sniper rifle". It should be ONE folder, like in
c:\Games\OpenXcom\ufo1\mods\SniperRifle1.2\*.*
where language files will be, graphics, and additional rulesets. SO you can easily delete it without diggin up whole structure.
Inner "mods" folder structure can replicate root structure of both vanilla ufo (overriding files), and openxcom files.

Like in quake for example. They are using virtual FS which is composed of "zip" files with whole structure inside. And mods have priority over vanilla data, so you won't need to modify original files at all, even if you'd like to replace battlescape control icons.
Title: Re: File system restructure
Post by: AndO3131 on May 26, 2013, 02:47:44 pm
Folder structure seems ok to me. I have a question about configuration layout. Will player choose which game to play ('xcom1' or 'xcom2') or will they be loaded one after another? I would strongly suggest second option :)
Title: Re: File system restructure
Post by: AndO3131 on June 03, 2013, 08:36:49 pm
https://github.com/AndO3131/OpenXcom/tree/Folder_support (https://github.com/AndO3131/OpenXcom/tree/Folder_support)

That's a branch made to allow multiple folders to be used with Openxcom. It's based on @Daiky's idea. Configuration file has additional structure:

==========
games:
  xcom1:
    vanilla: ufo1/
    openxcom: ufo1_rulesets/
    rulesets:
      - name: XCom1Ruleset
        folder: ufo1/
      - name: Pathfinding
        folder: ""
      - name: myxcom1mod
        folder: mymoddata/
============

'vanilla' and 'openxcom' are subdirectories of DATA directory. 'vanilla' contains original data. 'openxcom' cantains 'rulesets' folder, where rul files are located. 'folder' is directory containing this ruleset data. Code has been compiled on Linux and Windows. Additional game entries are not yet supported, but this structure has potential.

To get it working with current data structure, put in 'settings.cfg'

==========
games:
  xcom1:
    vanilla: ""
    openxcom: ""
    rulesets:
      - name: Xcom1Ruleset
        folder: ""
      - name: Pathfinding
        folder: ""
============

Devs, what do you think about this?

Edit: We wouldn't have to copy original data anymore, just make a shortcut to original data folder, put this shortcut in DATA directory and set this shortcut as 'vanilla' and Xcom1Ruleset 'folder'.
Title: Re: File system restructure
Post by: Angelus_EV on February 14, 2014, 04:24:48 pm
I was discussing this with Warboy yesterday, and we came to the conclusion that it might even be interesting in some cases to have two language files. One with common strings for example all the strings related to the new options screen. Otherwise if a new option would be added, you need to add it to both ufo1 and ufo2 folder.

Also, there need to be a way to have user mods in either ufo1 or ufo2 folder + user mod strings in a language file. Also, if a user mod adds new strings, will they all be translated in the different languages?

And there is a new folder by now "Resources" where you have the pathfinding orbs now (which is common between all mods), but there can be specific Resources for ufo1 or ufo2 or user mods.

So if I compile that into your structure proposal, I have this:

C:\Games\Ufo Defense\ - vanilla ufo1 WITHOUT RULESETS AND any non-vanilla stuff (pure clear ufo1 folder)
C:\Games\Terror from the deep\ - vanilla ufo2 -"-
C:\Games\OpenXCom\ - openxcom exe / non vanilla stuff
C:\Games\OpenXCom\Shaders\ - why make multiple copies of same data set??? Shaders aren't subject to mod for particular game versions!!!
C:\Games\OpenXCom\SoldierName\ - same thing -there's no need to clone data
C:\Games\OpenXCom\Language\ - common  strings
C:\Games\OpenXCom\Resources\ - common graphics
C:\Games\OpenXCom\ufo1\Rulesets\ - non vanilla custom openxcom data for xcom1
C:\Games\OpenXCom\ufo1\Language\ -"-
C:\Games\OpenXCom\ufo1\Language\mod\ -"-
C:\Games\OpenXCom\ufo1\Resources\ -"-
C:\Games\OpenXCom\ufo1\Resources\mod\ -"-
C:\Games\OpenXCom\ufo2\Rulesets\ - non vanilla custom openxcom data for xcom2
C:\Games\OpenXCom\ufo2\Language\ -"-
C:\Games\OpenXCom\ufo2\Language\mod\ -"-
C:\Games\OpenXCom\ufo2\Resources\ -"-
C:\Games\OpenXCom\ufo2\Resources\mod\ -"-

==========
games:
  xcom1:
    vanilla: C:\Games\Ufo Defense\
    openxcom: \ufo1\
    rulesets:
     - XCom1Ruleset.rul
     - myxcom1mod.rul
  xcom2:
    vanilla: C:\Games\Terror from the deep\
    openxcom: \ufo2\
     - XCom2Ruleset.rul
============

Or is it too complicated? :) there are probably several ways to structure it...

this have my vote
and and and.....


maybe a new topic (i will make one)

Xcom Apocalypse its so ugly, maybe as a real community achieve we can make a theme mod for oxc whit altered tech tree altered aliens races and ships and maybe altered soldier sprites, whit a futuristic view of the cities....
trying to have the same atmosphere of the XCA but using the game mechanics what we all love