How to use the res-folder effectively
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
How to use the res-folder effectively
by silly freak » 16 Nov 2009, 17:59
i thought i'd point out what the new system of properties files really gives you as the user. i guess many of you have a situation similar to this: every time a new version comes out, you unzip the archive to a new folder, and move your pics folder to the new version, maybe also the decks.
while this is perfectly possible, it somehow misses the point that the properties-system gives you full control over your files' locations (other that forge.properties, which has to stay together with run-forge.jar) by just changing some lines in the files
before i go on, note that it's always a good idea to backup your files before doing any changes
for me, my installation looks like this:
now the real magic going on is in the res/main.properties file of every single version. you have to change two lines:
you are, of course, not limited to that. say you have multiple users playing forge, and everyone wants his own separate deck directory, you can just put
as a note in the end, i don't just point forge.properties to a shared main.properties for a specific reason: the res directory is not fully compatible between versions. besides there being a "program/version" property, the rarities-files, as mentioned with every release are NOT backwards-compatible
hope i helped, and have fun!
while this is perfectly possible, it somehow misses the point that the properties-system gives you full control over your files' locations (other that forge.properties, which has to stay together with run-forge.jar) by just changing some lines in the files
before i go on, note that it's always a good idea to backup your files before doing any changes
for me, my installation looks like this:
- Code: Select all
/forge
/forge/versions
/forge/versions/20091112
/forge/versions/20091101
/forge/versions/20091017
(and so on)
- Code: Select all
/forge
/forge/versions
/forge/versions/20091112
/forge/versions/20091101
/forge/versions/20091017
(and so on)
/forge/res/pics
/forge/res/decks
now the real magic going on is in the res/main.properties file of every single version. you have to change two lines:
- Code: Select all
decks-dir--file=../../../res/decks
image/base--file=../../../res/pics
you are, of course, not limited to that. say you have multiple users playing forge, and everyone wants his own separate deck directory, you can just put
- Code: Select all
decks-dir--file=~/decks
image/base--file=../../../res/pics
as a note in the end, i don't just point forge.properties to a shared main.properties for a specific reason: the res directory is not fully compatible between versions. besides there being a "program/version" property, the rarities-files, as mentioned with every release are NOT backwards-compatible
hope i helped, and have fun!
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: How to use the res-folder effectively
by DennisBergkamp » 16 Nov 2009, 18:16
Yeahhh, I personally really like the addition of the properties files, thanks again for spending time adding them silly freak
What would be very cool also is to have a separate folder for token pictures (for instance /res/pics/tokens ?).
Now, I don't remember exactly, but this might require some extra coding when trying to fetch the image for the token to display.
What would be very cool also is to have a separate folder for token pictures (for instance /res/pics/tokens ?).
Now, I don't remember exactly, but this might require some extra coding when trying to fetch the image for the token to display.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: How to use the res-folder effectively
by silly freak » 16 Nov 2009, 18:26
the properties files are no problem, basically a line in main.properties and NewConstants.java, but i'm not so into the rest of the code and don't know what it would take
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: How to use the res-folder effectively
by weirdingway » 26 Nov 2009, 08:16
Awesome! Moving files would have been more and more cumbersome as this wonderful project got larger and larger. Now I can keep them all organized in one spot! Way to go with the quality of life improvement here!
- weirdingway
- Posts: 57
- Joined: 19 Nov 2009, 12:39
- Has thanked: 0 time
- Been thanked: 4 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 110 guests