Savage 2: A Tortured Soul Forum

Savage 2: A Tortured Soul Forum (
-   Documentation (
-   -   Modding in K2 (

Stanz 01-02-2008 07:13 AM

Modding in K2
I've just cleaned up this post a bit (ok, a lot) to make it more relevant and up to date.
Original post (Modibility of K2) can be seen here.

A list of some frequently asked questions (well.. actually, not really; I just made them up, but y'know.)

What is K2?

Essentially K2 is the engine that Savage 2 is built on, the underlying core. It will be updated frequently as it will be used in some of s2games' other projects. Savage 2 will also be kept up to date to make sure it makes use of the current version of K2.

What is Modding?

Modding or 'modifying' essentially just means to change something from the norm but in the gaming sense it is usually used more strictly to refer to something that allows a game to act outside it's normal behaviour either visually or game-play wise.

Where can I find more information on creating mods?

The Savage 2 modding wiki here.

How do I open the editor?

The retail installer should automatically put a shortcut on your desktop. But if that isn't the case here is how to create it:

Create a shortcut to Savage2.exe by right clicking it and going to 'Create Shortcut', put this on your desktop or wherever you want it. Now right click it and goto 'Properties'. Under the 'Shortcut' tab modify the 'Target' field so that after ...savage2.exe" (remember to leave the quote where it is) add: "pushmod editor; Set host_autoExec StartClient" (Without quotes). It should then read something like:"C:\Program Files\Savage 2 - A Tortured Soul\savage2.exe" pushmod editor; Set host_autoExec StartClient
Now click 'Ok' and your new shortcut should now launch the editor.

How will we play with other people on Custom Maps?

There is an 'Unofficial servers' tab available from the server browsing screen. These servers can be run privately and will be able to play non-ranked maps.

Will unofficial maps appear on official servers?

Normal maps have a chance to be added into the official server rotation. There's no confirmation on whether this privilege will be given to Custom/Modded maps though.
I've broken down the summary of interface modding in K2 into 3 parts.
Interface Modding
Interface modding in Savage 2 allows you to easily modify any visual elements in the user interface as well as a limited amount of how they behave.
It does this by the use of .XML files that can be easily edited and used. The XML (eXtensible Mark-up Language) used in K2 has been built around the purpose of interface modding in K2 so will use tags that relate to UI elements available in K2 but is essentially very similar in syntax to HTML.

Currently .CFG files can also be used, which are essentially just a list of console commands to be run when called from the XML files using Exec(). The .CFG files will eventually be removed as the need for them will be replaced in favour of a new <script> tag for XML files.
Map Modding
Map modding in Savage 2 will not only allow you to make advanced Savage 2 maps but will also give you a lot of power to almost make a separate game using a 'trigger' approach as seen in games such as Warcraft 3.

Maps are currently stored in a .S2Z file (which is essentially just a renamed .ZIP file) and contain the data for the map as well as any custom models, textures, music and props etc. Maps can also provide total replacements for UI elements allowing for a very configurable map. A list of pre-built in triggers can also be used to allow you to easily make very heavily scripted maps, essentially creating a mini mod within a map without needing any direct C/C++ programming.
Full Modding (Total Conversions)
Full modifications or Total conversions are essentially modifications that still make use of the engine of the game (what takes care of a lot of the basic stuff) but can essentially create a whole new gaming experience.

It is not currently known how extensive and user friendly the ability to do this is but it can be assumed that C/C++ is used for the core programming of the modifications and that since Savage 2 is actually a modification itself built on top of K2, it should be fairly powerful.
Known Projects
I'll try and keep this updated as long as there's good evidence beyond 'I heard there'll be a so and so mod' ;). If something on here needs adding or changing just request it in a post or PM and I'll get around to updating it.
Savagecraft - Total Conversion.

Creators: SKOPE, Joshu.
Description: An unofficial mod to bring Starcraft's feel to Savage 2. [input needed?]

Strata TD - Map Mod.

Creators: Stanz.
Description: First map I'll be making mostly as a personal test to see the ease of use and power of the map modding possibilities in K2. The reason for this is it's a fairly simple concept and should be reasonably simple to make but will depend a lot on the power and flexibility of the K2 engine's scripting functionality. I will likely try and turn this into a very playable and fun map. I plan to release updates and sequels to keep improving on the TD concept within Savage 2.

Stanz' MDK - Map Development Kit.

Creators: Stanz.
Description: I essentially plan to create a set of available XML interfaces and easily understandable and modifiable script files to ease and speed up the development of custom maps (trigger maps) for Savage 2. These will probably see their first use in my TD maps.

Defence of the Ancients - Map Mod.

Creators: Dustin.
Description: A remake of the popular DoTA map originally for Warcraft 3.

I will try and add stuff to this thread if it seems relevant and will try and keep it updated as more information about modding in K2 becomes available.

Feel free to use this thread for general discussion on modding in K2. :)

Donut 01-02-2008 07:28 AM

Supposedly, I HOPE, that you can make a "Single Map Mod" as easy as in WC3. I HOPE that a class tree and such will be added.. that; or you can right click and entity and label it as "Source", and everything else of that entity will be exactly to the settings as the Source.

KPLX I want the ability a Tower Defense mod easier than in Wc3; such as a entity labeled "Flood Spawn Point"; spawning a number of NPC's over a time frame, and such.

I beleive i heard someone else wanting to do this, not quite sure though.

Stanz 01-02-2008 11:30 PM

Here is what I've been working on atm based on what I would of hoped to be implemented into savage 2 itself eventually (excluding the random little addon used more as an example and test):

There was only so much I could do due to the lack of string manipulation functions available currently. But that is essentially all that is keeping this mod from working properly.

S2Kyle 01-02-2008 11:34 PM

The lack of string manipulation functions, eh?

Trust me, all you need is there. Tell me what you're looking to do and I'll tell you how. :)

Llama 01-02-2008 11:49 PM

well, afaik theres going to be a savagecraft and a DotA mod and they are allready in the planning them.... i hope :D these sound great as well as the trigger maps etc

Donut 01-03-2008 12:13 AM

If not someone else i'll do a Tower Defense mod.

Gantrof 01-03-2008 12:37 AM

So... um... I edited shapeshifter skin to make him look like ice :D

Donut 01-03-2008 12:43 AM

We can allready do skinning no problem, its just as easy as in S1.

Gantrof 01-03-2008 12:44 AM

I know :D

Just extract and convert to .tga ...

Stanz 01-03-2008 12:44 AM


Originally Posted by Donut (Post 117186)
If not someone else i'll do a Tower Defense mod.

Was already first on my list of maps to make. Very basic idea that should be easy to make. Will be a good test to tell just how user friendly the map editor will be and if the engine will be powerful enough to pull off the proper pathing and object handling etc.

All times are GMT. The time now is 10:47 PM.