Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: New Guide for adding art/sprites to Stonesense #5207

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1739fe4
Begin making the new guide for adding art to Stonesense
realSquidCoder Jan 20, 2025
55cf566
Add yellow cubes text but make it link to the new doc
realSquidCoder Jan 20, 2025
0abb501
fix wording
realSquidCoder Jan 20, 2025
7a0e157
Update the Stonesense docs.
realSquidCoder Jan 20, 2025
3d3e118
Write the basic guide and add the needed images
realSquidCoder Jan 20, 2025
79f217d
missed a whitespace
realSquidCoder Jan 20, 2025
7d6fe7d
Fix my broken RST fromatting
realSquidCoder Jan 20, 2025
95b2536
fix the text around the images
realSquidCoder Jan 20, 2025
7a00d9d
RST is finicky
realSquidCoder Jan 20, 2025
37281df
Fix the list in stonesense docs i hope
realSquidCoder Jan 20, 2025
ebc6b3c
I really dislike making this list in RST
realSquidCoder Jan 20, 2025
8910edb
Add missing link to Stonesense subreddit
realSquidCoder Jan 20, 2025
a347792
Update things based on code review
realSquidCoder Jan 20, 2025
ed75a6b
Merge branch 'develop' into squid-stonesense-docs
realSquidCoder Jan 20, 2025
e25c7ba
Apply suggestions from code review
realSquidCoder Jan 21, 2025
336289d
Update stonesense-art-guide.rst
realSquidCoder Jan 21, 2025
50cfe2b
Merge branch 'squid-stonesense-docs' of https://github.com/SquidCoder…
realSquidCoder Jan 21, 2025
68faca8
merged wrong
realSquidCoder Jan 21, 2025
508b4ee
Clean up based on feedback
realSquidCoder Jan 21, 2025
6c61637
clean up
realSquidCoder Jan 21, 2025
2d0458a
Update stonesense-art-guide.rst
realSquidCoder Jan 21, 2025
bc8d4c6
Merge branch 'develop' into squid-stonesense-docs
realSquidCoder Jan 21, 2025
da38969
Merge branch 'develop' into squid-stonesense-docs
realSquidCoder Jan 24, 2025
f43bc3a
Merge branch 'DFHack:develop' into squid-stonesense-docs
realSquidCoder Jan 27, 2025
44702b5
Update stonesense-art-guide.rst
realSquidCoder Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ These pages are detailed guides covering DFHack tools.
/docs/guides/modding-guide
/docs/guides/quickfort-library-guide
/docs/guides/quickfort-user-guide
/docs/guides/stonesense-art-guide
63 changes: 63 additions & 0 deletions docs/guides/stonesense-art-guide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.. _stonesense-art-guide:
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved

Stonesense art creation guide
=============================

Understanding Sprites
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
---------------------
Understanding how Stonesense deals with sprites is central to anyone who wishes to modify the content.
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
The scheme is not very complicated, and this guide will give a short introduction to how they work.
The way sprites are loaded is fairly generalized. With the exception of floors, which we will discuss later,
all sprites are 32x32 pixels big and come in groups known as Sprite Sheets. All sprites are loaded and
rendered in 32-bit full-color PNGs.
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved


.. image:: ../images/Stonesene_sprite_sample.png
:align: left

Here's an example of a typical Stonesense sprite.
myk002 marked this conversation as resolved.
Show resolved Hide resolved

Note that, in order not to conflict with neighboring sprites, a sprite must actually be within a smaller
area than its 32x32 block.
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
A template for the area used by most sprites is:
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved

.. image:: ../images/Stonesene_sprite_template.png
:align: left

The solid area is the floor space taken up by a sprite, while the dotted box indicates the volume above this
area corresponding to one z-level.

Sprite Sheets
-------------
There can be an arbitrary number of sprite sheets configured for Stonesense, yet some are always present as
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
they contain default sprites (see further down). Most of the content XML files allow users to specify sprite
sheets, and this is done by adding a file attribute to the content nodes. By convention sprite sheets should
be placed in their appropriate folder, with creature sprite sheets in the creatures folder etc.

Sprite Index
------------
Sprite Index (sometimes referred to as Sheet Index) is a concept for referring to a specific sprite on a sheet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Sprite Index (sometimes referred to as Sheet Index) is a concept for referring to a specific sprite on a sheet.
The sprite index, or sheet index, is the zero-indexed offset of a sprite on its sprite sheet.

The index starts with the upper left sprite which has index zero. It then increments to the right. Stonesense
is hardcoded to 20 sprites wide sheets, this means that the last sprite to the right in the first row has Sprite
Index 19. The first sprite on the second row has index 20. This boundary is hardcoded and changing the size of
the sheet will not affect it.
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved

This image shows how sprites are indexed. Note: Grid added for readability.

.. figure:: ../images/Stonesense_indexed_sprites.png
:align: left


Specific Sprite Sheets
----------------------
**objects.png** is the default sheet for buildings and vegetation. Also used for all hard-coded content, like default
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
plants, the cursor, default walls and liquid.

**creatures.png** is the default sprite sheet for creatures. If no file is specified in a creature node, this is the
sheet it will use.

**floors.png** holds all the Stonesense floors. Unlike the other sprite sheet, this sheet is hard-coded with sprite
dimensions of 32x20 pixels.

Stonesense is fully configurable in the way it renders creatures. No information is hardcoded, but rather loaded
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
from the creature databases found in the creatures directory.
Binary file added docs/images/Stonesene_sprite_sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Stonesene_sprite_template.png
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Stonesense_indexed_sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/stonesense-yellowcubes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/plugins/stonesense.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,25 @@ line containing that folder, or :dffd:`use these smaller sprites <6096>`.
Stonesense requires working graphics acceleration, and we recommend
at least a dual core CPU to avoid slowing down your game of DF.

Yellow Cubes and Missing Sprites
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
--------------------------------
If you are seeing yellow cubes in Stonesense, that is simply things we don't have sprites for.
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved

.. figure:: ../images/stonesense-yellowcubes.png
:align: center

An example of the yellow cubes.

If you would like to help us in fixing this, there are 2 things you can do:
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved

* Make an issue on Github with what item is missing and pictures of what it looks like in DF
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved
* Create the art yourself. For help with this, please see the `stonesense-art-guide`
realSquidCoder marked this conversation as resolved.
Show resolved Hide resolved

Useful links
------------
- Report issues on `Github <https://github.com/DFHack/stonesense/issues>`_
- `support`
- `Stonesense Subreddit <https://www.reddit.com/r/stonesense/>`_
- :forums:`Official Stonesense thread <106497>`
- :forums:`Screenshots thread <48172>`
- :wiki:`Main wiki page <Utility:Stonesense>`
Expand Down
Loading