Author Topic: Override folder  (Read 1924 times)

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
Override folder
« on: December 23, 2006, 09:45:53 pm »
This has been smoldering for a while, and the revival of the Custom soundtracks thread prompted me to actually post this.

What I have in mind is a folder (called "override", in the main PS folder) which contains the complete PS folder structure (except override itself, of course), but empty. The VFS system would check for any file that is needed in this override folder's substructure before looking at the built-in files in the standard location. This is like an advanced version of the override folder used in for example NWN (where it was mostly used for updates, which is bad).

With the override folder / substructure, you would put the modified version of a file in the same place as the original, just in the override substructure, and leave it there. In case of zip files, you would create a zip file containing only the file(s) you changed, nothing else, and put that in the appropriate place, naming it like the original zip file.

Example:
original location of archive:
/PS/art/characters.zip

modified files from archive:
dermm.cal3d

appropriate override .zip file:
/PS/override/art/characters.zip

contents:
dermm.cal3d

The reason is two-fold.
First, it eases modding. Right now you need to change the contents of the zip files, and possibly keep a backup of the original contents elsewhere.

Second, it removes the need to write-protect things for the updater to not override them, with the additional benefit that one always gets a fully updated client while retaining the modded parts, without the need of file-shuffling. Also, currently one has to reassemble any modified zip files each time there is an update to that file.

This isn't an important thing, not even necessary, but something to maybe look at in the future when things are more mature and stable.

Under the moon

  • Forum Addict
  • *
  • Posts: 2335
  • Writer extraordinaire.
    • View Profile
Re: Override folder
« Reply #1 on: December 23, 2006, 10:07:31 pm »
This would work quite well with this: http://hydlaa.com/smf/index.php?topic=25453.0 For modding your own textures for each race.

I am not sure how the code would work, but the server would send out the unique IDs for each race and gender. The client would then check the override folder to see if the texture for that ID has been modded. If not, it would fall back to the default texture. In action:

Server sends out ID for Diabloi female, which does not have a model of its own. Client checks the override to see if there is a fboli file. If yes, then it uses that. If no, then the client redirects the ID to the Fynwnn (default for now) file in the the default art folders.

This could be used to get rid of all those 'piles of dust' as well.

Idoru

  • Hydlaa Notable
  • *
  • Posts: 981
    • View Profile
Re: Override folder
« Reply #2 on: December 23, 2006, 10:12:09 pm »
Sounds like an excellent idea. I have ended up with many folders and files in my main PS folder from playing about with modding.

Quote
This could be used to get rid of all those 'piles of dust' as well.

It cant be hard to make a little grey cone for that model lol

"May there only be peaceful and cheerful Earth Days to come for our beautiful Spaceship Earth as it continues to spin and circle in frigid space with its warm and fragile cargo of animate life."

miadon

  • Hydlaa Notable
  • *
  • Posts: 934
    • View Profile
Re: Override folder
« Reply #3 on: December 23, 2006, 10:16:47 pm »
Quote
This could be used to get rid of all those 'piles of dust' as well.

It cant be hard to make a little grey cone for that model lol
but those poor dwarves will be out of work then :(
- MiadonCam (Refresh page to see live in game Miadon Action!!)

Nikodemus

  • Prospects
  • Veteran
  • *
  • Posts: 1808
    • View Profile
Re: Override folder
« Reply #4 on: December 23, 2006, 11:44:59 pm »
Oh yeah, its what PS modder really need.
Would save loads of work while updating client.
I also love the idea with putting only the modded files in the zip archieve. Its is also what the updater is missing. It say it needs to change only one file in the zip, but it downloads it whole. Waste of bandwich and time.
What for all the stuff is zipped anyway? i know about the world maps, but why skins?
Did you know that if you zip a .png image its filesize is bigger zipped than before?



What you can failure tommorow, failure today.


Better click for shiny stylez Help me with images!

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
Re: Override folder
« Reply #5 on: December 24, 2006, 12:38:32 am »
the updater is missing. It say it needs to change only one file in the zip, but it downloads it whole. Waste of bandwich and time.
AFAIK, it does this only if the amount of data to be fetched is bigger than some threshold, maybe 50% of the archive size. IIRC, you can even set this threshold in the updater config. At least for me, it has been merging a lot of stuff instead of downloading entire archives for quite some time now.
What for all the stuff is zipped anyway? i know about the world maps, but why skins?
Did you know that if you zip a .png image its filesize is bigger zipped than before?
Yes, this is known, but given the size of the zipped stuff, this is negligible. I suppose it's done to remove clutter, both in the folders as well as in the filesystem. Folders with lots and lots of files take longer to access, and they also waste a lot of space on the harddisk.
For example, a file with only one byte in it will still occupy 1KB, or even more on large disks, due to the segmentation by the filesystem. Thus, you could easily end up with 1.5% the actual file size used up if you don't use zips.

IIRC, there already is a model plus skin for piles of fine-ground material. There was with mushrooms as well, and they were put ingame only a long time later. Maybe simply noone has bothered yet.