Using Your Own Arena2 Folder

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
Interkarma
Posts: 5478
Joined: Sun Mar 22, 2015 1:51 am

Using Your Own Arena2 Folder

Post by Interkarma » Mon Apr 27, 2015 2:50 am

Crossposting this from http://www.reddit.com/r/dftfu/comments/ ... a2_folder/.

This was originally suggested by mingorau. I wasn't fan of the idea at first, simply because it added extra steps for end users and introduced the possibility of bad Arena2 folders caused support problems. But after some thought, I'd like to admit this idea has great merit and have introduced it as an option starting from version 1.3.10. I think this will also greatly simplify the process of creating standalone builds for developers. Here's how it works:
  • In builds (i.e. not in editor) the application bootstrap will look for a valid Arena2 folder inside your Application.dataPath folder. For example, this would be AppName_Data\arena2 in Win/Linux builds. Web builds are sandboxed and cannot load from local filesystem.
  • The FileProxy search order will remain Resources first, Arena2Path second. This means that if you want to use an Arena2 folder in your data path, there must not exist a .bytes version of that same file in Resources. This gives you the option to override specific binary files with your own .bytes version in Resources.
So what does this mean for developers? When creating a standalone build you now have more options on how that build can be distributed. For example, you could distribute a minimum-size build and users could supply their own Arena2 folder. Or you could bundle a known-good Arena2 folder into the AppName_Data folder. Or you could keep using .bytes and Resources like before. Or mix and match as needed. Options!

Such a simple change opens up a lot of new possibilities. I'm sorry I resisted this earlier. :)

User avatar
Interkarma
Posts: 5478
Joined: Sun Mar 22, 2015 1:51 am

Re: Using Your Own Arena2 Folder

Post by Interkarma » Mon Apr 27, 2015 2:52 am

As an added bonus, the local Arena2 folder seems to be a bit quicker and use less RAM than loading heavily from Resources. It would also be trivial for developers to set their Arena2 path from an INI file, for example.

Post Reply