Code Monkey home page Code Monkey logo

lunar-template's Introduction

Lunar Template


Wait...it's all Lua?

NotITG is a fork of OpenITG designed to make it easier for mod file creators to implement their ideas. The Mirin Template provides functions that allow creators to use NotITG express their mod ideas and bring them to life in the game. -XeroOl

Always has been.

The Mirin Template is an extremely powerful template that has an fast growing fanbase. With this power in mind, a Stepmania template has been created, but is not as greatly supported, and plugins for said template is not maintained in-house. Porting modfiles between NotITG and Stepmania has always been a great challenge, especially when dealing with Actors. What new syntax do I have to learn? Why is Quad not showing my texture? How do AFTs even work?

The Lunar Template tries its best to fix these issues.

Built off the Mirin Template, the Lunar Template is an ongoing effort to make porting modfiles between NotITG and its OutFox sister much less stressful and time-consuming. It uses the same syntax for modding, but uses a more OutFox friendly approach to Actors.

(Full documentation for mods can be found here)


Syntax

Mods

-- turn on invert
ease {0, 1, outExpo, 100, 'invert'}
-- turn off invert
ease {7, 1, outExpo, 0, 'invert'}

Actors

-- make a quad
Def.Quad {
    Name = 'Quad',
    OnCommand = function(self) self:zoom(64) end
},
-- make an actorframe with children
Def.ActorFrame {
    Name = 'myActorFrame',
    Def.ActorProxy {
        Name = 'myActorProxy',
        OnCommand = function(self)
            self:SetTarget(myActor)
        end
    },
    Def.Sprite { Name = 'mySprite', Texture = 'myTexture.png' }
}

Recursive Actors

xero() -- outside the main actorframe
-- make an empty actorframe called myQuads
local quads = Def.ActorFrame { Name = "myQuads" }
-- for-loop and add 10 quads
for i = 1, 10 do
    quads[#quads + 1] = Def.Quad { Name = "myQuad" .. i }
end
return Def.ActorFrame {
    LoadCommand = function(self)
    ... -- Mods
    end,
    -- add it as a child to main actorframe
    quads,
    -- other actors
    Def.ActorProxy { Name = 'PP[1]' },
    Def.ActorProxy { Name = 'PP[2]' },
    ... -- Actor
}

So, how do I port it?

You load the mirin-porting.lua script from Tiny-Foxes in your mods.lua, drag and drop your modfile into Stepmania, delete the default.xml in the template folder, and make minor edits until your file looks 1:1. That's really about it. If you need help with porting, feel free to send a message in the OutFox Discord and you'll be sure to get the help you need. Most of the porting is done for you, thanks to the modport.lua script. Some things, like AFTs and tween scaling, may need some additional polish, but the bulk of it all should be done from here. In fact, you could even make separate actor files for NotITG and OutFox, if you really want porting to be virtually seamless.


What about collabs?

You can supercharge them. Take the Mirin template's quick modwriting and powerful node system to the next level with Lunar's elegant actor syntax and extreme portability. Some recommended setups for different use cases:


Just Mods

-- in mods.lua
xero()
return Def.ActorFrame {
    LoadCommand = function(self)
    ... -- Mods
        loadfile('lua/sudo.lua')() -- Sudo
        loadfile('lua/xero.lua')() -- Xero
    end,
    ... -- Actors
}

-- in sudo.lua
xero()
ease {6, 4, spike, -200, 'tiny'}
... -- Mods

Mods and Actors

-- in mods.lua
xero()
return Def.ActorFrame {
    LoadCommand = function(self)
        ... -- Mods
    end,
    loadfile('lua/sudo.lua')(), -- Sudo
    loadfile('lua/xero.lua')(), -- Xero
    ... -- Actors
}

-- in sudo.lua
xero()
return Def.ActorFrame {
    Name = 'Sudo' -- optional but useful
    LoadCommand = function(self)
        ease {6, 4, spike, -200, 'tiny'}
        ... -- Mods
    end,
    Def.Quad { Name = 'TheBoy' }
    ... -- Actors
}

Mods, Actors, and Assets

-- in mods.lua
xero()
return Def.ActorFrame {
    LoadCommand = function(self)
        ... -- Mods
    end,
    loadfile('lua/sudo/mods.lua')(), -- Sudo
    loadfile('lua/xero/mods.lua')(), -- Xero
    ... -- Actors
}

-- in sudo.lua
xero()
return Def.ActorFrame {
    Name = 'Sudo'
    LoadCommand = function(self)
        ease {6, 4, spike, -200, 'tiny'}
        ... -- Mods
    end,
    Def.Sprite { Name = 'Beb', Texture = 'lua/sudo/warmfren.png' }
    ... -- Actors
}

The Lunar Template is designed to fit and streamline your style.


Known Issues

  • Extra players are not supported for SM5 (halted for OutFox) Supported in OutFox! Have fun <3
  • AFTs are not perfectly portable (needs significant effort to fix) Use Def.ActorScreenTexture!

To-Do

  1. Look into possible ways to port AFTs 1:1 Done!

Huge Warm Hugs to These People

XeroOl - Original Mirin Template
ArcticFqx - Recursive XML trick for NotITG
HeySora - Encouragement and direction
Mr.ThatKid - Motivation and support
Kinoseidon - Direct contributor!

lunar-template's People

Contributors

kinoseidon avatar sudospective avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kinoseidon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.