Giter VIP home page Giter VIP logo

notitg-mirin's Introduction

Mirin Template

busted luacov

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.

  • Simple to learn: Designed with a goal of avoiding unintuitive edge cases in NotITG.
  • Excellent performance: Optimized code runs quickly compareed to other templates.
  • Theme independent: Mirin Template creates a separate environment for mod code that is kept separate from themes.
  • Powerful abstractions: Includes a powerful system that allows users to create custom modifiers.
-- turn on invert
ease {0, 1, outExpo, 100, 'invert'}
-- turn off invert
ease {7, 1, outExpo, 0, 'invert'}

Read the documentation at https://xerool.github.io/notitg-mirin

notitg-mirin's People

Contributors

chocobogamer avatar heysora avatar oatmealine avatar xerool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

notitg-mirin's Issues

List of all Xero Globals

I want a complete list of globals that are in the xero namespace, as well as a description of what they do, or a link to relevant documentation. This could be in an appendix or something.

Use ScreenReadyCommand

ScreenReadyCommand was added in NotITG 4.2.0 and the Mirin Template doesn't currently take advantage of it.

Limit Number of Player a node/definemod can use

I think the current way to make node/definemod player specific/limit is odd,
this is a proposed change that may make it better.

-- current syntax
definemod{'mod',function(mod,pn)
    if on <= 4 then
        -- code
    end
end}

-- suggested syntax
definemod{'mod',function(mod)
    -- code
end,
plr = {1,2,3,4}}

Disallow Leading/Trailing Spaces in Names

In most cases, if you make a typo in the name of a mod, NotITG will inform you that something is wrong, because it will attempt to apply an invalid mod. However, since ApplyModifiers gets parsed through strings, the spaces are silently ignored, and it gets very difficult to debug what went wrong. I would like the game to throw an error if there are spaces leading / trailing the provided mod names.

`reset` function to reset all mods

a reset(beat) function which sets mods to their default values, and a corresponding exclude global to control which mods are exempt from the reset

Document How to construct a table of actors

A way to add to the end of a table instead of specifying a specific number?
For people who don't want to make actorpool tables using :GetChildren, but want to copy paste actors directly instead of them all needing a different number in their name.

I'm not sure whar the syntax should be, but the options are probably these:

  1. Name="in mytable"
  2. Name="mytable[next]"
  3. Name="mytable[#]"
  4. Name="mytable[#mytable + 1]"
  5. Other
  6. None, but a doc page pointing to calling :GetChildren on an actorframe containing your pool

Activation Rates

rrwoods:

i realize this isn't possible with the way mirin works, but it would be nice if, whenever mirin was headed into an ease that was linear, it used an activation rate instead of frame-spamming

Optimize ease params slightly

Change with1param and with2params so that a metatable isn't created each call. create the metatables ahead of time.

Negative value in func?

While creating a song for the upcoming tournament, I encountered a situation where I was receiving a negative p in a func ease. I don't have time to debug this now.

luaeffect to tween?

Apparently this has the potential of allowing things to run a frame earlier? I need to test and also ask @HeySora about this

Rewrite Error Messages

I didn't put a bunch of effort into the error messages, so I think they should all be looked at and potentially rewritten to add more context and guidance. Maybe some should link to the docs. Maybe some should include docs. Maybe some should suggest asking for help in the Discord. I'm not sure what would work best, but I'm sure that what's in the template now has room for improvement.

Flipped eases

A common use case is to have a mod instantly jump up to value, and then ease back down to its initial value. In Exchwasion's template, you could put the percentages as 100, 0, but in the Mirin template, you can only put in one mod percentage. Because of that, it takes more lines of code in the Mirin template than in the Exschwasion template.

The plan is to add a flip function that can modify an ease, creating a transient ease.
Here's how it would look like in use

ease {0, 1, flip(outExpo), 100, 'invert'}

Thanks to tari for pointing this out.

definemod that's not player specific

I wanr to make a way to create non-player-specific definemods, and change the way definemods work to be more intuitive (potentially a different aux system).

Making this change would require rewriting the whole node system, whicj I want to do anyway.

Split func into separate functions for each purpose

The function func is getting extremely overloaded.

	local valid_func_signatures = {
		['number, function'] = true,
		['number, number, function'] = true,
		['number, number, ease, function'] = true,
		['number, number, ease, string'] = true,
		['number, number, ease, number, function'] = true,
		['number, number, ease, number, string'] = true,
		['number, number, ease, number, number, function'] = true,
		['number, number, ease, number, number, string'] = true,
		['number, string, ?'] = true,
	}

It would be a good idea to give each of these separate names

Soft Assert

There should be a function that makes it easy to kick users back to the song wheel with a system message.
Suitable for messages like "This song needs to be played in 2 Player Mode", or other situations where a crash isn't warranted, but an error has occurred.

DefineMod alternate shorthand syntax

definemod {'videogames', 25, 'flip', -75, 'invert'}

as shorthand for

definemod {'videogames', function(p) return 0.25 * p, -0.75 * p end, 'flip', 'invert'}

Back to .lua

I think .lua is nicer because of editor support and user sanity. I want to switch as many files from .xml to .lua as possible if it doesn't make heysora mad.

Renaming Functions

During a breaking change, some functions can be renamed. I'm not completely sure which ones should be renamed, but, for example, node is an uninformative function name.

Licence

I want to put this out under some permissive license, but haven't gotten to it yet

Square ease replacement

So, the square ease from my old template isn't in this template. There's a good reason: it is less efficient than just emulating the behavior with two instant eases. However, typing two instant eases is kind of a pain, so it would be nice if there was a helper function that could add both the entries at once. Maybe this would be better suited for a plugin than the official template. I haven't decided yet.

Bad error message

By passing in a number where a string is expected, it's possible to reach this error message, which doesn't tell the user what they're doing wring:

/template.xml:74
attempt to get length of local `name' (a number value)

Found by Daikyi! Thank you very much!

Yeahs and NG's

Reportedby mirin:
Starting proxy code needs

P1:hidden(1)
P2:hidden(1)

or else the Yeah's and NG's from the original players will still appear.

Persist optional argument in `func`

persist=true, persist=false, persist=7, etc.

A persist value provides the template with a hint as to when to skip executing the function.

Function Eases don't work with transient eases

using funcs with eases like pop, bell etc. will not reset their values after finishing the ease
example I used: func {0, 4, pop, 10, 'bg:rotationz'}
this goes from 0 to 10 and again 0 after a short while but once at beat 4 this will snap back to 10, despite that this was not the previous rotationz given (it was 0, so it was never changed before this)
this also applies with normal funcs (the one that you pass a function() to instead of a string)

read "current" mod values

This is suggested by TaroNuke.

Have a way to read the "current" value of a mod during the LoadCommand, instead of just having mod values being accessible in perframes/nodes.

Document the graphs for elastic

Some eases aren't listed and don't have graphs. Those are the ones with the cache functions. I'd like to have a js implementation of those eases with scroll bars so that you can play with the curve in browser in the documentation.

Potentially delete time based mods?

Time based mods are affected by visualoffset and globaloffset and stuff, and are a pain to use. Mirin Template relies on a consistent timeline for all its timings, and currently does that by converting all beats to times before playing.

It's probsblu not going to happen, but I should at least consider the tradeoff between keeping and dropping time mod support

Complete Documentation

There's some parts of the documentation that's just labeled TODO. This should be replaced with more complete documentation.

Fully Remove Get

Remove the function get and all of the garbage that was involved in making it exist, including the previous table and all of that stuff.

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.