v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Utility:Stonesense/Adding Content

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Quality|Superior|06:39, 4 October 2013 (UTC)}}
 
 
=Basics=
 
=Basics=
  
 
===Creating Distributable Content Files===
 
===Creating Distributable Content Files===
The default way of distributing content for [[Stonesense]] is to create an archive of the XML configs and the image files. Upload this archive together with a description to the [[Utility:Stonesense/Content_repository]] page, in much the same way tilesets and graphic packs are distributed for Dwarf Fortress, see the [[Tileset repository]] for reference.
+
The default way of distributing content for [[Stonesense]] is to create an archive of the XML configs and the image files. Upload this archive together with a description to the [[Stonesense Content Repository]] page, in much the same way tilesets and graphic packs are distributed for Dwarf Fortress, see the [[Tileset repository]] for reference.
  
 
Keep in mind that users installing your content pack will need to place the files in the correct content folder (creatures buildings, etc) and add the XML files to their index.txt file.
 
Keep in mind that users installing your content pack will need to place the files in the correct content folder (creatures buildings, etc) and add the XML files to their index.txt file.
Line 55: Line 54:
  
 
==Creature XML files==
 
==Creature XML files==
 
Stonesense is fully configurable in the way it renders creatures. No information is hardcoded, but rather loaded from the creature databases found in the creatures directory.
 
  
 
===Simple configuration===
 
===Simple configuration===
Line 109: Line 106:
 
===Creature Genders===
 
===Creature Genders===
 
Each <variant> node can be extended with a ''sex'' attribute to add an additional condition for creature gender.
 
Each <variant> node can be extended with a ''sex'' attribute to add an additional condition for creature gender.
For most races. dwarves included, the attribute can have one of two values, "M" for male or "F" for female. However, if the creature has more than two castes, a number must be used, starting from "1", and continuing in order that the castes are listed in the rawfile.  As of Stonesense Felsite v3.1, castes can be specified by name such as caste="WARRIOR".
+
For most races. dwarfs included, the attribute can have one of two values, "M" for male or "F" for female. However, if the creature has more than two castes, a number must be used, starting from "1", and continuing in order that the castes are listed in the rawfile.
 
Again a simple example would be beneficial:
 
Again a simple example would be beneficial:
 
<pre>
 
<pre>
Line 268: Line 265:
 
</pre>
 
</pre>
 
... will still select for dead saplings.
 
... will still select for dead saplings.
 
=Buildings=
 
Building content can be found in the ''buildings'' folder of Stonesense.
 
 
As with other content, the content is outlined with an ''index.txt'' file, but unlike other content, the included content is very complex and difficult to follow.
 
 
Each tile in a workshop has a PositionIndex, starting at 0 for the northwest corner as shown in the 3x3 examples below:
 
 
[[file:SimpleWorkshopExample.png]]
 
 
This workshop was generated from the simplest possible code, to serve as an example for basic workshop construction.  Far more advanced processing is possible, as can be seen from the content included with Stonesense.
 
 
<pre>
 
<?xml version="1.0" ?>
 
 
<building name="Example Building" game_type="Workshop" game_subtype="Custom" game_custom="TEST" file="TEST.png">
 
   
 
    <if>
 
        <PositionIndex value=0 />
 
        <sprite index=0 />
 
    </if>
 
    <if>
 
        <PositionIndex value=1 />
 
        <sprite index=1 />
 
    </if>
 
    <if>
 
        <PositionIndex value=2 />
 
        <sprite index=2 />
 
    </if>
 
    <if>
 
        <PositionIndex value=3 />
 
        <sprite index=3 />
 
    </if>
 
    <if>
 
        <PositionIndex value=4 />
 
        <sprite index=4 />
 
    </if>
 
    <if>
 
        <PositionIndex value=5 />
 
        <sprite index=5 />
 
    </if>
 
    <if>
 
        <PositionIndex value=6 />
 
        <sprite index=6 />
 
    </if>
 
    <if>
 
        <PositionIndex value=7 />
 
        <sprite index=7 />
 
    </if>
 
    <if>
 
        <PositionIndex value=8 />
 
        <sprite index=8 />
 
    </if>
 
   
 
</building>
 
</pre>
 
 
The above XML code and this graphic produced the example seen above.  Note that only the "floor" of each tile was defined in this spritesheet.  Actual workshops would likely include taller images.
 
 
[[File:SimpleSpritesheetExample.png]]
 
  
 
[[Category:Stonesense]]
 
[[Category:Stonesense]]

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: