update themerdocs

This commit is contained in:
AJ Kelly
2010-04-26 11:19:13 -05:00
parent b488d85302
commit 9408cdea45
6 changed files with 28 additions and 8 deletions
@@ -95,4 +95,4 @@ Fret3
Fret4
Fret5
--lights (rofl)--
--lights-- (rofl)
+1 -1
View File
@@ -55,7 +55,7 @@ local songs = {
"firesong", -- November
"holidays", -- December
};
-- MonthOfYear starts at 0. Lua arrays are 1-indexed, so correct
-- MonthOfYear starts at 0. Lua arrays are 1-indexed, so fix the value
local curMonth = MonthOfYear()+1;
return THEME:GetPathS("",songs[curMonth]);
[/code]
+1 -1
View File
@@ -39,7 +39,7 @@ all the known gamecommands (pre-sm-ssc)
}
}
"weight" ){m_iWeightPounds = atoi( sValue );}
"weight" {m_iWeightPounds = atoi( sValue );}
"goalcalories" {m_iGoalCalories = atoi( sValue );}
+7
View File
@@ -1,5 +1,9 @@
Scripts included with sm-ssc's fallback theme
---------------------------------------------
(as of sm-ssc v1.0 beta 2, this document is out of date.
Please see hierarchy.txt referenced below for an up-to-date look at the script
execution order/prefixes. This document will be updated again soon)
As a StepMania fork focused on themers, sm-ssc is going to be a bit different
than a normal StepMania 4 setup. The fallback theme includes a number of scripts
you won't find in the SM4 default theme. This file is meant to be an overview of
@@ -7,6 +11,9 @@ what happens in the scripts; it does not go in depth with any of them. Please
see the documentation included in the scripts as comments, as well as any text
files for the more sufficiently advanced scripts.
For an explanation of why the scripts are named with numbers at the beginning,
see hierarchy.txt in Themes/_fallback/Scripts/ for more information.
==00 init.lua== (StepMania 4)
Always executed first, this file does the following:
* replaces Lua's Uppercase function with StepMania's (which is always UTF8)
+16 -3
View File
@@ -20,8 +20,8 @@ BGAnimations from SM4's default theme will be loaded instead of sm-ssc's _fallba
2b) sm-ssc's _fallback theme defines a variable, SSC, like so:
[code]SSC = (ProductID() == "sm-ssc");[/code]
This will return true if it's sm-ssc, or false if it's SM4.
You should define this in a file in your theme, so that SM4 will be able to
recognize it.
You should define this in a script (00 themeInfo.lua is a good place), so that
SM4 will be able to recognize it.
With this "SSC guard" in place, you can now wrap things in "if SSC then"
statements if they won't work on SM4. You can also provide alternatives if the
@@ -34,4 +34,17 @@ releasing the theme and saying "oh, just play it in fullscreen mode".
If you have hidden the error dialogs, you'll need to modify Preferences.ini.
Find the IgnoredDialogs= line and remove everything after the = sign. You will
now recieve the error messages in windowed mode again.
now recieve the error messages in windowed mode again.
4) While this is a SSC-specific practice, having a themeInfo file set up in
your theme's Scripts directory is a good way to store information about the
theme (e.g. version number, date, product code, etc.)
An example of a themeInfo script:
[code]
themeInfo = {
Name = "your theme's name",
Version = "v1.0", -- typically a float or string. floats are easier to compare.
Date = "20100426 1115",
};
[/code]
+2 -2
View File
@@ -56,7 +56,7 @@ More in-depth descriptions will come with each chapter.
1.1.1 Metrics
The metrics (metrics.ini) contain the core elements of a theme. Most everything
that has to do with StepMania's built-in types will be found here.
that has to do with StepMania's built-in types and elements will be found here.
1.1.2 BGAnimations
BGAnimations are used to decorate screens. In SM4, they use Lua for BGAnims,
@@ -102,7 +102,7 @@ technical). If you've come from theming an earlier version where they didn't
exist (3.9), this folder might take some getting used to. This directory holds
Lua scripts that are loaded on startup. Some scripts lay down the theming
foundation, meaning that if you're crazy enough, you can rewrite everything.
If you do that though, this guide will start to make a lot less sense.
If you're capable of that, though, you probably don't need to read this guide. :)
1.1.8 Other
The Other folder contains miscellaneous things. You generally won't need to