06-03-2009, 01:51 AM
|
#1 | |||
|
REAL STEPPING ROOTS '09
|
Post rating: rate
With any luck, after the release of moonlight, I'm going to take things a bit slower and flesh out theming documentation in order to help more people understand the theming system of the SM4 alphas.
I've already written up two tutorials on porting 3.9 (ini) and 3.95 (XML) BGAnimations to Lua:
__________________
Event mode exists for a reason. Use it. ![]() We're doing it for fun, we're doing it because we can, we're doing it because we're SSC. Follow @kki_ssc on Twitter for KKI Labs/spinal shark collective news as it breaks! |
|||
|
|
06-03-2009, 02:20 AM
|
#2 |
|
Angry Old Lady
|
Post rating: rate
I propose we have a portal on the wiki that categorizes our information into more simple sections, such as "Just Starting", "Beginner Tutorials", "Intermediate Tutorials", and "Advanced Methods & Information".
so this way, people can learn things they want to at a simple pace, and when they get a feel for it, they can go into intermediate and advanced things to look at and learn from.
__________________
cool, I have a forum ( GO JOIN ALREADY )
http://midiman.darkskystudios.net/forum/ also join #midiman on irc.badnik.net. |
|
|
06-03-2009, 06:05 AM
|
#3 |
|
Member
|
Post rating: rate
I agree with Midiman. Great idea to go along with it, a sample theme used throughout such a set of tutorials with all materials and code provided as necessary to really convey how to create a theme from the ground up would make things a lot easier for beginners than just a bunch of information to expect them to read. Get people actually building a theme with example code so they can get a feel for actually theming. Similar to how programming courses and tutorials tend to include sample projects to teach concepts.
|
|
|
06-04-2009, 03:45 PM
|
#4 |
|
Member
|
Post rating: rate
Something like function commands tutorial would be useful for a lot of users...
Code:
OnCommand=function(self) end; Code:
-- Comparación entre default.lua y BGAnimation.ini
-- (viendo los equivalentes de ciertas partes de ambos)
-- * Comandos como linear, diffuse, etc se escriben tal cual
-- * Fíjate bien donde van los punto y coma ";" para evitar errores
--[[-------------------------------------------------------------------------
default.lua BGAnimation.ini
--]]-------------------------------------------------------------------------
-- usando variables (van fuera del actorframe)
local playcond = GAMESTATE:GetPlayMode() == 'PlayMode_Regular'
return Def.ActorFrame { -- [BGAnimation]
LoadActor("img.png")..{ -- [Layer1]
--> -- File=img.png
OnCommand=cmd(...); -- OnCommand=...
OffCommand=cmd(); -- OffCommand=
};
LoadActor("img.png")..{ -- [Layer2]
--> -- File=img.png
OnCommand=cmd(...); -- OnCommand=...
Condition=playcond; -- Condition=PlayModeName() == "Nonstop"
};
-- Fonts / Texts
LoadFont("bitmapfont")..{ -- [Layer3]
--> -- File=bitmapfont
Text="hello there"; -- Text=hello there
OnCommand=cmd(...); -- OnCommand=...
};
-- Sprites!
-- [Layer4]
-- File=filename.sprite
-- OnCommand=...
-- Equivalencias con sprites
-- (no necesitas un archivo externo para asignar frames)
--[[-------------------------------------------------------------------------
default.lua Filename.sprite
--]]-------------------------------------------------------------------------
Def.Sprite { -- [Sprite]
Texture="spr 4x4.png"; -- Texture=spr 4x4.png
BaseRotationZ=90; -- BaseRotationZ=90
Frame0000=0; -- Frame0000=0
Delay0000=0.1; -- Delay0000=0.1
Frame0001=1; -- Frame0001=1
Delay0001=0.1; -- Delay0001=0.1
-- (...); -- (...)
Frame0014=14; -- Frame0014=14
Delay0014=0.1; -- Delay0014=0.1
Frame0015=15; -- Frame0015=15
Delay0015=0.1; -- Delay0015=0.1
OnCommand=cmd(); -- ## OnCommand en la layer del sprite
};
-- O bien...
LoadActor("frames 2x2.png")..{
Frame0000=3;
Delay0000=0.5;
Frame0001=1;
Delay0001=0.33;
};
--Tambien:
Def.Sprite { -- O con LoadActor, como quieras :P
Texture="imagen con frames 2x3.png";
-- Es más confuso pero te evitas acomnodar todo numerado,
-- si pusiste algo fuera de lugar solamente lo cambias y listo :D
Frames = {
{Frame = 0; Delay = 0.1};
{Frame = 1; Delay = 0.1};
{Frame = 2; Delay = 0.1};
{Frame = 3; Delay = 0.1};
{Frame = 4; Delay = 0.1};
{Frame = 5; Delay = 0.1};
};
};
-- Equivalencias con actors
--[[-------------------------------------------------------------------------
default.lua Filename.actor
--]]-------------------------------------------------------------------------
LoadActor("ImageFile.png")..{ -- [Actor]
--> -- File=ImageFile.png
BaseRotationZ=0; -- BaseRotationZ=0
BaseZoomX=1.5; -- BaseZoomX=1.5
--todos los comandos de basezoom y baserotation
--y derivados / parecidos son acoplables a lua
};
--[[-------------------------------------------------------------------------
Avanzados: Usando funciones / messagecommands
--]]-------------------------------------------------------------------------
LoadActor("imagen")..{
InitCommand=cmd(comandos;playcommand,"Custom");
CustomCommand=function(self)
--las variables tambien pueden ir dentro de funciones
local timevar = 0.5
self:diffusealpha(0);
self:linear(timevar);
self:diffusealpha(1);
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Custom");
};
}
-- Agregale gráficos a las layers y verás que el file funciona a la perfección :P
-- Esto es una línea de comentario, señales para los humanos (por ej. para qué sirve eso o aquello)
__________________
![]() nor I do Last edited by Daisuke Master; 06-05-2009 at 03:40 AM.. |
|
|
06-05-2009, 02:39 AM
|
#5 |
|
Angry Old Lady
|
Post rating: rate
Daisuke Master, I kind of get the jist of it; Would it be bad if I just tried to take a crack at it and remaking it in english if thats ok with you?
__________________
cool, I have a forum ( GO JOIN ALREADY )
http://midiman.darkskystudios.net/forum/ also join #midiman on irc.badnik.net. Last edited by Midiman; 06-05-2009 at 04:49 AM.. |
|
|
06-05-2009, 03:31 AM
|
#6 |
|
Member
|
Post rating: rate
first, spell my nick name correctly :P
Code:
-- Comparisons between default.lua and BGAnimation.ini
-- (checking equivalences of certain sections of both)
-- * Stepmania actor comands such linear, diffuse, etc, are written as usual
-- * Check for semicolons ubications to avoid mistakes and lua debug errors
--[[-------------------------------------------------------------------------
default.lua BGAnimation.ini
--]]-------------------------------------------------------------------------
-- using variables (outside actorframe)
local playcond = GAMESTATE:GetPlayMode() == 'PlayMode_Regular'
return Def.ActorFrame { -- [BGAnimation]
LoadActor("img.png")..{ -- [Layer1]
--> -- File=img.png
OnCommand=cmd(...); -- OnCommand=...
OffCommand=cmd(); -- OffCommand=
};
LoadActor("img.png")..{ -- [Layer2]
--> -- File=img.png
OnCommand=cmd(...); -- OnCommand=...
Condition=playcond; -- Condition=PlayModeName() == "Nonstop"
};
-- Fonts / Texts
LoadFont("bitmapfont")..{ -- [Layer3]
--> -- File=bitmapfont
Text="hello there"; -- Text=hello there
OnCommand=cmd(...); -- OnCommand=...
};
-- Sprites!
-- [Layer4]
-- File=filename.sprite
-- OnCommand=...
-- Sprite files equivalences
-- (external files for actors not needed anymore)
--[[-------------------------------------------------------------------------
default.lua Filename.sprite
--]]-------------------------------------------------------------------------
Def.Sprite { -- [Sprite]
Texture="spr 4x4.png"; -- Texture=spr 4x4.png
BaseRotationZ=90; -- BaseRotationZ=90
Frame0000=0; -- Frame0000=0
Delay0000=0.1; -- Delay0000=0.1
Frame0001=1; -- Frame0001=1
Delay0001=0.1; -- Delay0001=0.1
-- (...); -- (...)
Frame0014=14; -- Frame0014=14
Delay0014=0.1; -- Delay0014=0.1
Frame0015=15; -- Frame0015=15
Delay0015=0.1; -- Delay0015=0.1
OnCommand=cmd(); -- ## OnCommand in sprite's layer
};
-- Or...
LoadActor("frames 2x2.png")..{
Frame0000=3;
Delay0000=0.5;
Frame0001=1;
Delay0001=0.33;
};
-- Can be too:
Def.Sprite { -- Or with a LoadActor, as you need :P
Texture="image with frames 2x3.png";
-- More confusing but helps ordering frames just by changing it's position
Frames = {
{Frame = 0; Delay = 0.1};
{Frame = 1; Delay = 0.1};
{Frame = 2; Delay = 0.1};
{Frame = 3; Delay = 0.1};
{Frame = 4; Delay = 0.1};
{Frame = 5; Delay = 0.1};
};
};
-- Actor files Equivalences
--[[-------------------------------------------------------------------------
default.lua Filename.actor
--]]-------------------------------------------------------------------------
LoadActor("ImageFile.png")..{ -- [Actor]
--> -- File=ImageFile.png
BaseRotationZ=0; -- BaseRotationZ=0
BaseZoomX=1.5; -- BaseZoomX=1.5
-- Any basezoom/baserotation type commands are
-- aplicable to lua layers
};
--[[-------------------------------------------------------------------------
Advanced: Using functions / messagecommands
--]]-------------------------------------------------------------------------
LoadActor("imagen")..{
InitCommand=cmd(comandos;playcommand,"Custom");
CustomCommand=function(self)
--variables can be inside functions too
local timevar = 0.5
self:diffusealpha(0);
self:linear(timevar);
self:diffusealpha(1);
end;
CurrentSongChangedMessageCommand=cmd(playcommand,"Custom");
};
}
-- Add graphics and commands to the layers and you'll see this lua file 100% working
-- This is a comment line, notes for human beings (i.e. for what is this or that etc...)
point me where you found engrish phrases plz, I did it fast
__________________
![]() nor I do Last edited by Daisuke Master; 06-05-2009 at 02:50 PM.. |
|
|
06-05-2009, 04:49 AM
|
#7 | |
|
Angry Old Lady
|
Post rating: rate
oops, sorry about that.
Quote:
Code:
-- Comparisons between default.lua and BGAnimation.ini -- (checking equivalences of certain sections of both) -- * Stepmania actor commands such linear, diffuse, etc, are written as usual comans -> commands Code:
Texture="image with frames 2x3.png";
-- More confusing but helps ordering frames just by changing it's position
everything else is a-ok
__________________
cool, I have a forum ( GO JOIN ALREADY )
http://midiman.darkskystudios.net/forum/ also join #midiman on irc.badnik.net. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Some questions regarding theming | DarkX9 | Theme/Noteskin Help/Questions/Requests | 4 | 01-15-2009 02:30 PM |
| Documentation on the code system | FSX | Theme/Noteskin Help/Questions/Requests | 2 | 11-23-2007 03:47 PM |
| 20070814|Lua documentation project | steve | News | 1 | 08-13-2007 08:42 PM |
| METRICS DOCUMENTATION | rifall | Theme/Noteskin Help/Questions/Requests | 8 | 02-12-2007 09:25 PM |
| 4.0 theming questions. | Surge | Theme/Noteskin Help/Questions/Requests | 2 | 11-06-2006 02:19 AM |
|
|
All times are GMT. The time now is 10:05 AM.
|