Maps/mods in subdirectories

Maps/mods in subdirectories

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Maps/mods in subdirectories

Post by Tobi »

Is there anyone who uses the undocumented feature of Spring to put mods/maps in subdirectories of the mods and maps directories?

For example:

Code: Select all

C:\program files\spring
 maps
   StandardMaps
      SmallDivide.sd7
      FloodedDesert.sd7
      Mars.sd7
    Downloads
      CometCatcher.sd7
      DeltaSiege.sd7
I have currently disabled the functionality, because combined with disabling another piece of code it makes load Spring/unitsync with (lots of) .sdd archives a lot faster.

The only disadvantage is that if you change modinfo.tdf in a .sdd you may need to force an ArchiveCacheV*.txt update by creating a dummy file in the .sdd archive and removing it immediately afterwards (to update the directory modification time).

If modders/mappers don't agree however, I wouldn't mind making it slower again :-)
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Does this mean you can't load unpacked mods? I could see modmakers preferring to test with the mod unpacked so they could easily change things.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

LordMatt wrote:Does this mean you can't load unpacked mods? I could see modmakers preferring to test with the mod unpacked so they could easily change things.
That's what a .sdd is :P

I'm all for this...speeding up unitsync sdd handling is definitely a priority over a minor undocumented subfolder feature, for me at least.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

LordMatt wrote:Does this mean you can't load unpacked mods?
No.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I think nobody actually realises this feature existed.

I'd reccomend keeping the feature disabled but allowing the exception of the downloads folder, and then putting a downloads folder in the installer.
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Post by det »

I use this feature to keep the http://snapshot.caspring.org SubVersion repository checked out in ~/.spring/mods/ca-svn/. Couldn't you acheive the same performance improvement by just not recursing in .sdd directories?

Speaking of slowdowns from massive stat'ing on scanning archives. I think it would be desirable to have an "incoming" directory for Spring. Spring/UnitSync would only scan this directory and move the archives there to an internal folder. All checksums for files in the internal folder would be assumed to be correct.

edit: Of course, this doesn't solve the .sdd problem. I think your solution it the best that can be done. There just needs to be a better way to tell Spring to rescan the .sdd directory.
Last edited by det on 22 Nov 2007, 09:57, edited 2 times in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

so that's why spring.exe loads so fast now.

Please, keep it the way you have it in svn. It's so much faster.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

det wrote:I use this feature to keep the http://snapshot.caspring.org SubVersion repository checked out in ~/.spring/mods/ca-svn/.
If you grab their trunk directly and have it in ca-svn.sdd you won't need the sub dir.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

If I recall, some did use this functionality in the past, but I don't believe anybody currently does.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

I remember this functionality causing me unexpected problems before, but thats about it.
+1 for glad its gone?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

With this gone I can store deactivated mods and maps within subfolders instead of a separate folder.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

This has been changed so that only sub-directories with the .sdd
extension are omitted from the scan (as Tobi originally suggested
in IRC, and seconded by det in this thread).

P.S. I've just added a feature that allows you to have directories
that start with "hidden" that will not be scanned.
Post Reply

Return to “Engine”