PDA

View Full Version : Release of the SD mod tool



Tellos Athenaios
12-15-2011, 17:05
Over at Europa Barbarorum II, we've created a new tool to help us generate SD files. Today we release it to the wider modding community in the hope it may prove useful for other modders as well.

I feel I should mention Alpaca's .sd converter (https://forums.totalwar.org/vb/showthread.php?81320-.sd-Converter-(interface-files)) here, which is a much older tool to generate SD files. Alpaca did the hard work of dissecting and reverse engineering the SD file format itself; and his converter proved a most helpful reference guide when I wrote this tool.

The tool was designed to solve the following problems:

Find errors in SD.XML code through validation: the tool will check and point out (potential) problems with your code before it generates any SD file.
For example, if you declare a sprite on a 512 × 512 page with a “left” offset of 516 (i.e. 4 pixels beyond the rightmost pixel) this tool will catch that error.
Overcome the bugs in the M2TW engine which prevent it from creating a strategy.sd file normally.


The project can be downloaded from our FTP server right here: ftp://europabarbarorum.org/SD-src-dist.7z. The download consists of a single compressed 7zip archive containing:

Java source code (requires Java 1.6 JDK to build) and resources
A sd.js script which you can use as basis for your own compiler scripts.
A COPYRIGHT file containing the licence under which the project is made available (see below)
A readme.html file containing instructions for building from source, running it and using it to get some modding done. The file also contains links to download additional required software: it is very much recommended that you read this file.
Ant build scripts to make building from source easy (requires Ant 1.7.1 or higher to build)
A POSIX sh script which you can use as example for creating your own scripts that run the program under specific settings. Note that it is not required to use such a script; also note that it is not a batch file.

Programs such as 7-zip can be used to extract these contents. (You can get 7-zip from here: http://www.7-zip.org/ or commandline equivalent p7zip from here: http://p7zip.sourceforge.net/ )

People who do not want to build from source can download the following compressed 7-zip archive instead: ftp://europabarbarorum.org/SD-bin-dist.7z. This version contains:

The tool in the form of a single JAR file (dist/SD.jar)
A sd.js script which you can use as basis for your own compiler scripts.
A COPYRIGHT file containing the licence under which the project is made available (see below)
A readme.html file containing instructions for building from source, running it and using it to get some modding done. The file also contains links to download additional required software: it is very much recommended that you read this file.
Code documentation for use as reference material when building more complex scripts to automate the tool. (dist/help/javadoc)


Both versions (source and binary only) are made available under the following licence:


Copyright (c) 2011, The Europa Barbarorum Team
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of The Europa Barbarorum Team nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL The Europa Barbarorum Team BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


The tool depends on the CUF tool (https://forums.totalwar.org/vb/showthread.php?128084-Release-of-the-CUF-(font-amp-text-rendering)-mod-tool) in order to run, in fact the tool amounts to a software library that can be used from within the CUF tool (https://forums.totalwar.org/vb/showthread.php?128084-Release-of-the-CUF-(font-amp-text-rendering)-mod-tool). For more instructions refer to the readme.html file included with the downloads.

Comments, criticism, improvements and bug reports are welcome. Regards,

The Europa Barbarorum Team.

Tellos Athenaios
12-30-2012, 05:52
Update:

Tweaked project.properties file so the project builds with Java 7 right away, without need for head scratching. (Culprit: -Xlint:depreciation.)
Update project to NetBeans 7.2.

Removal

sd.js example script has been removed, better code is now offered as example in the readme.html. The sd.script.path property is no longer passed/available either.