Author Topic: Question about data folder and vp priorities  (Read 5301 times)

0 Members and 1 Guest are viewing this topic.

Offline ARSPR

  • Preys On Mantis
  • 29
Question about data folder and vp priorities
I always have doubts about which file has the highest priority and will override the rest.

So imagine I've got a mod in MOD_Folder which also has a mod.ini with:

Code: [Select]
[multimod]
primarylist  = ,PRI-A,PRI-B,PRI-C;
secondrylist = ,SEC-A,SEC-B,SEC-C;

And in every folder I've got vps and of course data folders with a FILE.POF (or whatever) inside. (I'm going to name all the vps "aaa.vp" and "aab.vp" to show its alphabetical order).

Can anyone check if the following priority list is OK or post the correct priority list?

01. Freespace2\data
02. Freespace2\aaa.vp
03. Freespace2\aab.vp
04. PRI-A\data
05. PRI-A\aaa.vp
06. PRI-A\aab.vp
07. PRI-B in the same way
08. PRI-C in the same way
09. MOD_folder in the same way
10. SEC-A and then SEC-B and then SEC-C

OTOH. Is it needed the comma at the begining of "Primarylist  = ,PRI-A,PRI-B,PRI-C" as it happens with "Secondrylist" because of the launcher bug?
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Question about data folder and vp priorities
In each case there is a recursive seach for files, then a recursive search for VPs (so I'm not listing each one even though it applies to all).

1) PRI-A  (files then VPs)
2) PRI-B  (files then VPs)
3) PRI-C  (files then VPs)
4) SEC-A  (files then VPs)
5) SEC-B  (files then VPs)
6) SEC-C  (files then VPs)
7) Freespace2  (files then VPs)

VPs are found in alphabetical, then directory/alphabetical order, so:

aaa.vp
bbb.vp
data/aaa.vp
data/bbb.vp

Files are found in the following order and file type/extension filter per root (same basic rule applies to directories and files inside of VPs):
/   (mve, avi, mpg)
/data  (cfg, log, txt)
/data/maps   (pcx, ani, eff, tga, jpg, dds)
/data/text   (txt, net)
/data/missions   (fs2, fc2, ntl, ssv)
/data/models  (pof)
/data/tables  (tbl, tbm)
/data/sounds  (wav, ogg)
/data/sounds/8b22k  (wav, ogg)
/data/sounds/16b11k   (wav, ogg)
/data/voice  ()
/data/voice/briefing  (wav, ogg)
/data/voice/command_briefings  (wav, ogg)
/data/voice/debriefing  (wav, ogg)
/data/voice/personas  (wav, ogg)
/data/voice/special  (wav, ogg)
/data/voice/training  (wav, ogg)
/data/music  (wav, ogg)
/data/movies  (mve, msb, avi, mpg)
/data/interface  (pcx, ani, tga)
/data/fonts  (vf)
/data/effects  (ani, eff, pcx, neb, tga, jpg, dds)
/data/hud  (ani, pcx, tga)
/data/players  ()
/data/players/images (pcx)
/data/cache  (clr, tmp, ibx)
/data/players  (hcf)
/data/players/single  (pl2, cs2, plr, csg, css)
/data/players/multi  (plr)
/data/multidata  (pcx, fs2)
/data/config  (cfg)
/data/players/squads  (pcx)
/data/demos  (fsd)
/data/cbanims  (ani)
/data/intelanims  (ani)
/data/scripts  (lua, lc)

If a file exists in one of those directories and doesn't end in an entension listed in the filter list for the directory then the file will just be ignored, even if that file would otherwise be supported.

Builds running on Linux and OS X will also search a special $(HOME) directory for all files and VPs first.   On Linux this directory is $(HOME)/.fs2_open and on OS X it's $(HOME)/Library/FS2_Open.

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Question about data folder and vp priorities
Just to be sure:

A. MOD_Folder would be 3.5) in your list, (you forgot it). Am I right?

B. The searching order would be:

1.1 PRI-A files
1.2 PRI-A vps
2.1 PRI-B files
2.2 PRI-B vps (and so on)

NOT
1 to 7) PRI-A to Freespace2 files
8 to 14) PRI-A to Freespace2 vps


Taylor, thank you for your patience with FS2-illiterates like myself.  (You've got my answered-questions record, chased not far by Karajorma) :yes:
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Question about data folder and vp priorities
re: A.  Oops, I did forget that one. :)  But yes you are right, it would be 3.5 in the list.

re: B.  Correct.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Question about data folder and vp priorities
The primary list option isn't hugely useful. I think I've used it once and I can't even remember why :D

Still if you ever do have a reason why you'd need to override a mod folder it's there :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Question about data folder and vp priorities
Hmm.. i just tried different mod.ini files

mod.ini
Code: [Select]
[multimod]
primarylist  = ,ModB;
secondrylist = ,Mediavps;

Resulted in following debug spew:
Code: [Select]
  -mod ,ModB, ModA, ,Mediavps
Building file index...
Searching root 'd:\games\freespace2\'
Searching root pack 'd:\games\freespace2\root_fs2.vp'
Searching root pack 'd:\games\freespace2\smarty_fs2.vp'
...
So according to the fs.log it didnt even check any of the mod directories

mod.ini
Code: [Select]
[multimod]
primarylist  = ;
secondrylist = ,ModB,Mediavps;

Resulted in following debug spew:
Code: [Select]
  -mod ModA, ,ModB,Mediavps
Building file index...
Searching root 'd:\games\freespace2\ModA\'
Searching root 'd:\games\freespace2\ \'
Searching root 'd:\games\freespace2\ModB\'
Searching root 'd:\games\freespace2\Mediavps\'
Searching root pack 'd:\games\freespace2\Mediavps\mv_adveffects.vp'
...
Searching root 'd:\games\freespace2\'
Searching root pack 'd:\games\freespace2\root_fs2.vp'
...
So IMHO something isnt working as it should with the primarylist..
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Question about data folder and vp priorities

So IMHO something isnt working as it should with the primarylist..


As I've asked in my first post, maybe the initial comma isn't needed in Primarylist  :confused:
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Re: Question about data folder and vp priorities
OK.. then another attempt

mod.ini
Code: [Select]
[multimod]
primarylist  = ModB;
secondrylist = ,Mediavps;

Resulting debug spew:
Code: [Select]
   -mod ModB, ModA, ,Mediavps
Building file index...
Searching root 'd:\games\freespace2\ModB\'
Searching root 'd:\games\freespace2\ ModA\'
Searching root 'd:\games\freespace2\ \'
Searching root 'd:\games\freespace2\Mediavps\'
Searching root pack 'd:\games\freespace2\Mediavps\mv_adveffects.vp'
...
Searching root 'd:\games\freespace2\'
Searching root pack 'd:\games\freespace2\root_fs2.vp'
...
so it inserted an empty space before the mod directorys (ModA) name...  And didnt load anything from the selected mod directory (ModA)

Its a lot easier to just insert directories in correct order to the command line than to fool around with that mod.ini anyway.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Question about data folder and vp priorities
The issue with the added space is also covered within this thread http://www.hard-light.net/forums/index.php/topic,39089.0.html. And I also posted the initial comma bug in Mantis (758) which it is related to it, (I notice now).

As it is said in the other thread, the problem is that launcher 5.3 inserts blank spaces when joining folder lists:
     PrimaryList + Extra Wrong Space + ActualModFolder + Extra Wrong Space + SecondaryList

At least in Windows, you can add a comma before SecondaryList (,MediaVPs,LightspeedNebulas;) so you will make FS2 looking in a folder called " " before secondary mods. As this folder usually never exists, FS2 SCP works fine. But in other OS this can cause other behaviours.

With PrimaryList space, it will cause that FS2 SCP will look in " ActualModFolder" rather than in "ActualModFolder". This folder will not exist and then you are not loading the mod itself.

I think the best way to solve this is making FS2_open.exe ignoring starting/ending spaces in the folder names. (But I know NOTHING AT ALL about coding ...)



PS to SCP guys, mainly Phreak: Mantis 758 has been closed as the available launcher code is for 6.0. Would you like me to add this info to it anyway?
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Question about data folder and vp priorities
I think the best way to solve this is making FS2_open.exe ignoring starting/ending spaces in the folder names. (But I know NOTHING AT ALL about coding ...)
This isn't an FSO bug though, it's a launcher bug.  An easily fixed launcher bug to boot, but no one gives a damn about it (the current launcher that is).  I'm working on a new launcher and it won't have this problem, plus fix all of the other bugs currently associated with the launcher.  I don't know that any coders actually care about the current launcher enough to spend time on it considering that the new launcher should be available in about month.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Question about data folder and vp priorities
That's the main reason I haven't taken a better look at it. By the time we had distributed launcher 5.4 to everyone it would be time to start with your launcher.

Speaking of which when are we going to have that chat about how the replacement for mod.ini will work?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Question about data folder and vp priorities
Speaking of which when are we going to have that chat about how the replacement for mod.ini will work?
Probably not until I get the first test version out to you.  I'm already on my third UI for the thing, second total rewrite, not to mention several features I've totally redesigned since I started coding, so I don't want get into details until I'm happier with where it's headed.  This is a rather large rewrite of functionality of the launcher and requires numerous game code changes as well.  I really just want to wait until I hack some more on the profiles feature.  That should be significantly better than the current mod.ini files, but I haven't exactly nailed down what all I plan to do with it at first.  I want to get it done as far as my basic thoughts go, then go over the changes and redesign anything that we can't all agree on.

Depending on how busy I am otherwise, considering that I'm not going to be bug fixing for a few months, I should have something for you by the end of April (or sooner).

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Question about data folder and vp priorities
In each case there is a recursive seach for files, then a recursive search for VPs (so I'm not listing each one even though it applies to all).

1) PRI-A  (files then VPs)
2) PRI-B  (files then VPs)
3) PRI-C  (files then VPs)
4) SEC-A  (files then VPs)
5) SEC-B  (files then VPs)
6) SEC-C  (files then VPs)
7) Freespace2  (files then VPs)

VPs are found in alphabetical, then directory/alphabetical order, so:
.....


I think all this info should be in Wiki. But where can I put it?
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio

 

Offline ARSPR

  • Preys On Mantis
  • 29
Re: Question about data folder and vp priorities
I've decided not been lazy and I've made the try myself. So I'm editing my previous post:

Hi, I'm trying to start learning about modding, tables and so on. And I've got another question about priorities.

Now, I know the priority about reading files. So I know which "weapons.tbl" will be read the first, and would be in fact the Applied One. But if you have two thousand xxx-wep.tbm files, how are their changes applied over the tbl? Do FS_open apply the same priority order?

I ask this because in this way the last changes, (and because of it final changes), would be from the last read file, so "FS2Folder > Last_vp > Last_tbm" would be in fact the most important one.

Or am I totally wrong, and priority order is reversed for tbm files to make the first read one the most important one?

Thank you


And as everyone could suppose I was totally wrong.  :no:  So to any new begining modder as lazy as myself:

1. Modular (.tbm) files are applied in reversed order so the highest priority changes go to PRI-A\data\tables\aaaaa-wep.tbl

2. Nevertheless, all the tables are also applied. You'll get less priority tbm settings if they're not overriden by highest priority ones.
« Last Edit: April 20, 2006, 10:53:28 am by ARSPR »
IF YOU HAVE TROUBLES WITH FS2:
  • Please, please, please, READ and UNDERSTAND the sticky threads in FreeSpace & FreeSpace Open Support board.
    A lot of people are willing to help you, but, as anyone can understand, seeing the very same "issues" repeated again and again can become quite depressing. Please, spend a bit of time trying to solve the issue by yourself.
    (Lobo deserves a monument).
  • Then, if you aren't still able to solve your issue, feel free to ask for help in that same board.
    FYI, most of the troubles are caused by wrong mod installations which lead to either missing data or undesired cross-effects between them. Always follow the mod installation instructions and keep a clean FS2 installation as explained in the sticky threads. Two additional links about how the game handles game data:
  • If you think that you've discovered a bug, mantis it.
    Provide as much info as you can, and try to narrow it down. A lonely "FS2 doesn't work" is not a good report.

Whoever Hanlon was: Never attribute to malice that which can be adequately explained by stupidity.
Albert Einstein: Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

Dell Dimension 9200 - Vista 32-bit Ultimate
Core 2 Quad Q6600 @2.4GHz - RAM 2 GB DDR2
nvidia 8800 GTX - Integrated Sigmatel Audio