wololo wrote:Starting with Wagic 0.17, the folders of Wagic are changing.
A bit of history to explain this change:
Initially all files in Wagic where in a subfolder called "Res". This caused 3 types of issues:
- The amount of files to install wagic was huge, and took a long time on poor USB devices
- The amount of files to install was so huge that it caused massive lags in recent PSP firmwares. Because of that, at some point we moved the Resource files of Wagic in a folder called psp/wagic_res, which caused other types of troubles
- People who modded Wagic and made the game crash had no easy way to revert their changes and had to entirely reinstall the game
New since 0.17
In order to address all the issues above , we came up with a new folders structure:
Wagic now has access to 2 resource folders, the system folder, and the user folder.
On PSP and on Windows, the system folder is called Res, and the user folder is called User
on iOS (TODO)
On other platforms, these two folders are actually one single folder (On Android, for now these two folders are common, in /sdcard/Wagic/Res)
In addition to this dual folder system, Wagic now supports its resources to be zipped. In Wagic 0.17, the default resources for the game are found in the system folder (Res) and are called core_017.zip. We expect further versions of the game to keep a similar naming convention.
Both these 2 things (the dual folder and zip support) constitute the new Wagic folder structure. This system offers features and limitations that you will need to understand if you want to mod the game, add images, cards, etc...
Things mentioning the User and the System folders only apply to systems which use both these folders. Some systems such as Android only use one folder instead, in that case just ignore the comments comparing User and Res folder.
1. Zipping is not compulsory, and you can get back to the old system if you prefer
First of all, zipping is not compulsory, and basically Wagic is still compatible with the old "not zipped" file structure. If you were a user of Wagic 0.16 or older versions and want to "get back on your feet", you can do the following:
- unzip core_017.zip into the User folder (for systems where there is only one folder - see above - the User folder is actually the Res folder) , then delete core_017.zip
- that's it, you should basically feel at home now, except that for PSP and Windows you work in the User folder instead of the Res folder
However I do not recommend to do this as you will lose some of the benefits of the zip system (consistency of the install file so less risk of losing stuff, and Res/User separation allows you to quickly erase your mods if you want to get back to a vanilla install)
- (for systems that have two folders) The User folder takes precedence over the System (Res) folder. This means that if you have two files with the same name (and full path) in the User folder and in the Res folder, the one from the User folder will be used. Additionally, Wagic will always save files and create new files in the User folder.
- Real files have priority over zipped files. If you have a file in a zip archive (ex: Res/core_017.zip/sets/primitives/mtg.txt) and the same file outside of a zip archive (ex: Res/sets/primitives/mtg.txt), the "real" file will be used by wagic instead of the zipped one.
- With the two rules above, the User folder always has precedence (for systems where there is a dual folder mechanism), and therefore if you have a file in a zip inside the User folder, it will take precedence over a real file in the Res folder
- zip files are read in alphabetical order, and the "greatest" file takes precedence. For example, if you have the same file in two zip archives, for example in the Res folder, (ex: Res/core_017.zip/sets/primitives/mtg.txt and Res/core_018.zip/sets/primitives/mtg.txt), the latest one will "win" (in my example, Res/core_018.zip/sets/primitives/mtg.txt).
Summary of priorities (highest priority on top)
User folder's real files
User folder's zipped files(reverse alphabetical order, e.g. b.zip has more priority than a.zip)
Res folder's real files
Res folder's zipped files (reverse alphabetical order, e.g. b.zip has more priority than a.zip)
Wagic always writes/saves content in the user folder
3. How to mod/add content to Wagic
The rule of thumb is that you should never add any content in the System (Res) folder, but always in the User folder (except for systems that have no "User" folder of course)
As explained in 1. you can extract all wagic's files from core_017.zip into the User folder, and start modding in there. I personally however recommend to only extract the files you want to mod, or even create new ones when it makes sense. For example if you want to add a set named "WOLOLO", just create a folder "sets/WOLOLO" in the User folder, and add your _cards.dat file in there.
If you want to add your set images, the same is true. technically you could add them to the System(Res) folder, but it is recommended to add them in the User folder.
3. Zip format
You can zip files as you want, create as many zip files as you want, and put whatever you want in them. This is very convenient for modders as you can create your mod, zip it, and tell users to just put the zip file in their "User" folder. There are only 2 rules:
- One very important thing is that the only supported zip format is "Store" (no compression). All zip utilities I know have this option, so be sure to use that. If you use a compressed zip in Wagic, the behavior is undocumented. Most likely the system won't find your files, but potentially the game could crash.
- Secondly, the insides of your zip files need to follow the Wagic folders structure (ex: if you want to add sets, your zip needs to contain a folder set, and then subfolders for each set...). It's difficult to explain, bu just by looking at core_017.zip you should grasp the idea
Historically Wagic supported zip files for images. As an exception, Wagic now supports zips inside zips (all of them need to use the "store" compression!) for images only. This is very convenient as you can now put all your images in one single file! Here's what it should look like:
Just one file: User/images.zip
inside, you will have a subfolder sets, then a subfolder for each set, and then the card images zip file. It looks like this:
Remember that all zip files should use the store compression method, even the zips inside the zip.
You can also have the following structure, which involves only one zip file, instead. This technique is NOT recommended on the PSP because it lacks Ram, and building the zip index for thousands of files would take time and space:
and so on...
I messed up my mods, and wagic stopped working, what do I do?
Assuming you did all your changes in the User folder and never touched the core_017.zip file, you can easily get back to a working version of Wagic by deleting your User folder. If you're on a system that doesn't have a User folder and/or changed some stuff in the Res folder, delete everything except the core zip file (core_017.zip). Always do a backup of your files somewhere before deleting them, you might then want to put them back progressively in order to get your achievements, decks, etc... back
im pretty newby about all this is there a simplified instructions, like how to make a .dat file seeing how i dont have that save option when trying to save the text document, please i really want my zendikar decks in, please help me.