Skip to content

Locations

Jose_Varela edited this page Oct 14, 2018 · 11 revisions

Locations in Stepping Revision since Sep. 3, 2018 are now automated, allowing for anyone to put their stages and instantly play them.

To add one, simply create a stage, or convert one into a MilkShape 3D ASCII format. After that's done, copy the contents of the stage into a new folder on ThemeFolder/Locations/. And also ensure to change the name of the .txt file it outputed to model.txt. It should look something like this:

Creating a new location

(Location of textures depends entirely on how the model works with them. They can be placed on the root or inside a folder of the location.)

After that, you need to separate the material. Doing this is simple, open the model.txt file and simply move all the contents of the "Materials" section and put them in a new file.

Copying the Materials section to another file

When saving, you need to keep in mind the following question: Does the model support lighting for a day/night cycle?

If not, then you must name the material name main_material.txt.

But if it's true, then name the day and night materials accordingly to day_material.txt and night_material.txt. When that's done it should look something like this:

Materials Example

To ensure the game knows when to load these materials, you should create a file called ModelConfig.cfg and create the following line:

# Set to true if the location is able to change the lighting from day to night.
# if not, material must be set to "main_material.txt"
# if yes, materials must be set to "day_material.txt" and "night_material.txt"
AbleToChangeLight=false

And as a last step, create another file called LocationName.cfg and type the name of the stage.

Showing how to type the name of the stage in LocationName.cfg

And with that, you're able to play the stage on Stepping Revision, you just need to select it from the Theme options.

Choosing the new location that has been created.

(Additional Note: Locations can have bones to animate stuff inside them.)

Cameras

Every Location can have it's own unique set of cameras, to make it more dynamic and it already is.

To add one, simply create a new file called Cameras.lua inside the same folder you created the stage, and start by adding the following:

local t = Def.ActorFrame{}

return t;

This is essencially a blank ActorFrame. It is always expecting a table, so we return it by return t;, t being the table in question. Now, this is actually connected to the Dedicated Character Display, so now, the only thing you need to do is add a camera, according to the number it will represent.

local t = Def.ActorFrame{}

-- Initial Tween will be the VERY FIRST camera tween
-- that begins before the song starts.
t.InitialTweenMessageCommand=function(self)
	Camera:addz(-40):decelerate(3):addz(40)
end

-- Here we add a camera tween, it will spin the camera by 10 on the Y axis
-- and also apply a rotation of 10 on the X axis.
t.Camera1MessageCommand=function(self)
    -- Here, we're using a function that resets the camera. IT resets the position, rotation and effect currently in place.
	CAMERA:ResetCamera()
	Camera:rotationx(30):spin()
	:effectmagnitude(0,10,0)
end

return t;

Usual formula is Camera[n]MessageCommand. You can give the ammount of cameras that will be loaded, by adding this to ModelConfig.cfg on your Location's folder:

# Sets the ammount of cameras available for the stage. Default is 5.
# Instances where only 1 camera is needed are also acceptable.
NumCameras=5

As you might have guessed, even 1 camera is accepted, in case you don't want to make more cameras, and just want a static one. The limit for cameras is unset, so you can make as many as you want.

Camera loading right now is on a random value of chance. There's also the option to make it sequential by going to the options menu or assigning it to the ModelConfig file.

Complete list of commands for ModelConfig

# Here you'll find all the settings currently available for the location.
# Any can be skipped. Can be in any order.

# Set to true if the location is able to change the lighting from day to night.
# if not, material must be set to "main_material.txt"
# if yes, materials must be set to "day_material.txt" and "night_material.txt"
AbleToChangeLight=false

# X Offset of the stage.
StageXOffset=0

# Y Offset of the stage.
StageYOffset=0

# Sets the zoom of the stage.
StageZoom=1

# Sets the ammount of cameras available for the stage. Default is 5.
# Instances where only 1 camera is needed are also acceptable.
NumCameras=5

# Set if the DCD will cycle the camera tweens randomly or sequentially.
IsCameraTweenSequential=false