Author Topic: File system restructure  (Read 11783 times)

Offline xracer

  • Commander
  • *****
  • Posts: 565
  • X-COM lover, we've gone at it everywhere
    • View Profile
Re: File system restructure
« Reply #15 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 :)

Volutar

  • Guest
Re: File system restructure
« Reply #16 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.
« Last Edit: May 16, 2013, 07:42:47 pm by Volutar »

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: File system restructure
« Reply #17 on: May 18, 2013, 12:11:15 pm »
Wow, that sounds like a great feature!



No wonder it's already available, since version 0.3 even, and we're 15 posts into this without anyone fact-checking! Thread dismissed.

I LOL'd :D

Volutar

  • Guest
Re: File system restructure
« Reply #18 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.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: File system restructure
« Reply #19 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...

Volutar

  • Guest
Re: File system restructure
« Reply #20 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.
« Last Edit: May 26, 2013, 10:46:56 am by Volutar »

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: File system restructure
« Reply #21 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 :)

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
Re: File system restructure
« Reply #22 on: June 03, 2013, 08:36:49 pm »
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'.
« Last Edit: June 04, 2013, 10:56:53 am by AndO3131 »

Offline Angelus_EV

  • Colonel
  • ****
  • Posts: 181
  • Trust no one
    • View Profile
Re: File system restructure
« Reply #23 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
« Last Edit: February 14, 2014, 04:28:44 pm by Angelus_EV »