View Full Version : Dominions Skin browser
Leif_-
June 2nd, 2007, 02:23 PM
I have thrown together a small Java utility, the Dominions Skins Browser (http://dominions.dimnakorr.com/skins/DominionsSkinBrowser.jar). It is a GUI tool that makes it quick and easy to change the graphical skin of Dominions 3.
You need to have a Java 1.4 runtime installed to use this. To run it, simply download the jar-file and either double-click on it or start it from the command-line with "java -jar DominionsSkinBrowser.jar". Source code is included in the jar, and is released into the public domain.
On startup, it tries to locate your dominions3 directory -- it should be able to find it on most Linux and Windows installations, don't know about Mac. (If it doesn't find it automatically, you can locate it manually though the "Browse" button.)
Once it has found the dominions3 directory, it looks for a subdirectory skins. If it doesn't already exists the program will create it.
You can now choose from the skins in the dominions3/skins/ directory on a list on the left side of the screen. On the right, you can see any description or screenshots of the skin (more about those in a bit.)
The first time you run it, there will probably be only one choice, "Illwinter default" -- an automatic backup of the current graphics that the program made when it created the skins/ directory.
There are a couple of old skins I made available here (http://dominions.dimnakorr.com/skins/SkinsStarterSet.zip). Unzip this file into the skins directory and restart the Skins browser. You should now have a few skins to choose between.
Select the skin you like and press "Activate." The skin is now installed and you can start Dominions 3.
Skins, as this program understands it, are subdirectories under dominions3/skins which contains three things: variants of the tga image files read by Dominions, screenshots (any file with names like Screenshot_XX.jpg where XX is a number) and a file skin_description.dsc which contains the version number, the name of the author and a description of the skin. Look to the example skins for the format of this file.
(Right now the program is not all that useful, really: it's not that difficult to copy a set of tga files into the dominions3 directory by hand, but I hope to add support for an online repository at a later stage.)
Ballbarian
June 2nd, 2007, 02:43 PM
Great idea Leif. http://forum.shrapnelgames.com/images/smilies/happy.gif
WinXP here, but I use a non standard location for dom3. When I use browse to locate the dom3 directory, it properly creates the skin folder and creates the Illwinter_Default backup of original image files, but nothing appears in the skin browser. No skins appear ready for activation.
I am afraid that I have broken it. http://forum.shrapnelgames.com/images/smilies/frown.gif
Leif_-
June 2nd, 2007, 02:49 PM
Ballbarian said:
I am afraid that I have broken it. http://forum.shrapnelgames.com/images/smilies/frown.gif
Already?! -- Do you get the "Illwinter_Default" choice in the list? Have you tried browsing for the Dominions 3 directory again? (I'm afraid the program doesn't remember where it found it the last time.)
Ballbarian
June 2nd, 2007, 03:47 PM
"C:\Games\dominions3" shows in the Dom3 dir field after I have used the browse button to locate it, but the "Illwinter_Default" choice does not appear in the list. I have tried several restarts and pointing to various levels of the directory tree including pointing to the Skins and the Illwinter_Default directory as well. (Using Java 1.5)
Leif_-
June 2nd, 2007, 04:01 PM
Could you open a CMD window, cd to the directory where you have the DominionsSkinBrowser.jar and run the comman "java -jar DominionsSkinBrowser.jar > DSB.txt" Browse to your Dom3 directory, then close the DominionsSkinBrowser. Send me the DSB.txt file
Ballbarian
June 2nd, 2007, 04:36 PM
Done and sent to the address in your profile.
Gandalf Parker
June 2nd, 2007, 06:03 PM
Hmmm multiple skins leads me to think about setting my icons so that I swap the skins for each nation I play. I would be fun to swap a leafy green forest skin when playing Pangaea for more of a stone skin playing Ulm.
Leif_-
June 3rd, 2007, 04:50 AM
Ballbarian said:
Done and sent to the address in your profile.
Huh. The program has actually found the Illwinter_Default skin; so it has to be a display problem, but everything looks right here.
Try to download the example skins I linked to in my first post, and put those in the skins directory. Then, if nothing happens, try to resize the application window.
Leif_-
June 3rd, 2007, 04:51 AM
Gandalf Parker said:
Hmmm multiple skins leads me to think about setting my icons so that I swap the skins for each nation I play. I would be fun to swap a leafy green forest skin when playing Pangaea for more of a stone skin playing Ulm.
Good point. I'll add some comman-line switches so it can run in batch-mode without the GUI.
Gandalf Parker
June 3rd, 2007, 10:28 AM
Glad to see you back Leif. Id love to see some of your Dom2 stuff regenerated.
Leif_-
June 3rd, 2007, 11:23 AM
Version 0.2 is now up, same location (http://dominions.dimnakorr.com/skins/DominionsSkinBrowser.jar), and it now supports zipped themes and command-line arguments.
Zipped themes must be named on the pattern of SkinName.skin.zip and located in the dominions3/skins directory. The zip file must not contain more than one directory. I've put up an zipped theme (http://dominions.dimnakorr.com/skins/Shiny_Lava.skin.zip) as an example.
The command-line parameters are:
--skin Name Activates the named skin without opening a GUI
--directory Dir Sets the Dominions 3 directory. Note that "Dir" has to be specified with forward slashes and not the usual backslashes used by Windows.
--run Automatically starts Dominions 3
--dom3args Arguments Uses the specified arguments to start Dominions 3
So, putting it all together:
<font class="small">Code:</font><hr /><pre>java -jar DominionsSkinBrowser.jar --dir C:/Game/Dominions3 --skin Jungle_Nights --run --dom3args "-w -a -f -s"</pre><hr />
The above command will start Dominions 3 in a window, with no animated backgrounds, fade effects or sound, with the skin "Jungle_Nights."
Leif_-
June 3rd, 2007, 11:27 AM
Gandalf Parker said:
Glad to see you back Leif. Id love to see some of your Dom2 stuff regenerated.
Oh, I haven't been away as such. Just quiet. What particular stuff did you have in mind? The random map themes thing (.ran files) has been updated to Dominions 3 already. The random mod script should work pretty much as is, but it'll need updating with the new unit abilitites.
Leif_-
June 10th, 2007, 02:10 PM
So, latest upgrade to the SkinsBrowser program is a connection to an online repository of skins. The repository is pretty sparse at the moment (only three skins there yet,) but when I get a free moment I'll try to add to it. I know there were some skins posted to the forums a while ago, so I'll do some thrawling.
The program can be found here (http://dominions.dimnakorr.com/programs/skinsbrowser/DominionSkinsBrowser.zip), and the source-code here. (http://dominions.dimnakorr.com/programs/skinsbrowser/DominionsSkinBrowser_src.zip)
A screenshot of the program is located here. (http://dominions.dimnakorr.com/programs/skinsbrowser/SkinsBrowser_Screenshot.jpg)
Further, the contents of the README.txt:
== Dominions Skins Browser ==
The DominionsSkinsBrowser is a small utility for browsing, downlading
and activating graphical skins for the Illwinter game Dominions 3.
== Prerequisits ==
You need a Java runtime environment for Java 1.4 or later installed on
your computer.
(It can also be a good idea to have Dominions 3 installed, as the
program is pretty pointless otherwise.)
== Installation instructions, Windows ==
Unzip the file DominionsSkinBrowser.zip wherever you want to have
it. The resulting directory DominionsSkinBrowser contains a java jar
file, DominionsSkinBrowser.jar. To run the program, double-click on
this jar file.
Tip: By creating a shortcut to the DominionsSkinsBrowser.jar and
append command-line arguments in the Target field you can create easy
short-cuts to start Dominions with a specific skin:
Right click on the DominionsSkinBrowser.jar file and select "Create
shortcut here".
Next, right click on the created shortcut. In the field Target, after
the rightmost quotation mark, append the command-line arguments you
want, for instance "--skin Shiny_Lava --run" (without the quotation
marks.) This will activate the skin "Shiny_Lava" (if it is available
locally) and start dominions.
Rename the shortcut and give it a descriptive name, for instance
"dom3lava"
== Installation instructions, Linux ==
Unzip the file DominionsSkinBrowser.zip wherever. This creates a
directory DominionsSkinBrowser. Inside you'll find a jar file. To run
the program from the command-line, execute the jar file by the command
"java -jar DominionsSkinBrowser.jar"
Options to the program can be added after the name of the jar-file,
such as: "java -jar DominionsSkinBrowser.jar --skin Shiny_Lava --run"
Tip: Use alias commands in your .bash_profile to set up short-cuts to
starting Dominions with particular skins:
"alias dom3lava java -jar DominionsSkinBrowser.jar --skin Shiny_Lava
--run"
== Useage ==
The first time the program is run, it will try to locate where
Dominions 3 is installed on your system. If it can find this directory
it will create a skins/ subdirectory for storing your skins. Next, it
will create a backup of the default skin and store it in
skins/Illwinter_Default.
The program's GUI will then appear. On the left side you have two
lists, one containing your locally installed skins (the first time the
program is run this will only contain the backup it just made,
Illwinter_Default) and, barring any network errors, one containing the
skins available from the repository.
Selecting a skin, wheter locally or in the repository, will pop up a
skin info box on the right side. This box contains the name,
description and author of the skin, as well as any screenshots that
belong to the skin.
Also on the left side is a field for entering the dominions 3
directory if the program couldn't find it automatically (press
"browse" if you don't want to type in the location.) Just enter the
directory path and press enter.
Local skins can be activated (copied into the Dominions3 directory to
be used by the Dominions 3 program the next time its started), and
skins in the repository can be downloaded into your local skins/
directory. Use the "Activate" and "Download" buttons respectively.
== Command line arguments ==
The program takes the following optional arguments:
--directory DIR_NAME
uses DIR_NAME as the dominions 3 directory. Handy if you have
Dominions installed in a location where the SkinsBrowser won't
find it automatically.
--skin SKIN_NAME
Activates the named skin without opening the GUI.
--run
Starts Dominions 3 (use with --skin to start Dominions 3 with
a specific skin)
== TO DO ==
Allow input of the repository location (no hardcoded address.)
Cache BufferedImages to shorten the time it takes to display a
repository skin.
Add uploading of local skins into the repository.
Add repository support for maps and mods as well as skins.
== Locations ==
The canonical location for this program is at
http://dominions.dimnakorr.com/programs/skinsbrowser/
The source-code (which is released into the public domain) can also be
found there.
== Questions, comments? ==
Direct them to leif dot roar at dimnakorr dot com, or post
them on Shrapnel's Dominions forums.
Gandalf Parker
June 10th, 2007, 03:52 PM
Great program.
And even greater instructions http://forum.shrapnelgames.com/images/smilies/happy.gif Good docs are so often lacking in good programs
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.