Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

NoodleExtensionsMainClassPage

megamaz edited this page Mar 16, 2021 · 4 revisions

This is the Main Class page for the Noodle Extensions library.
This is the heart of this entire library - what allows you to make all your animations. Without it... Well, without it you wouldn't be able to do much really.

This page is still a WIP! If anything is missing that's normal.

Instance

To create an instance you need to feed it a single str value: The level.dat path.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat" # this is assuming the .py is in the same folder as your level folder

editor = NE.NoodleExtensions(lvl)

# You can name it anything you want. But because in older versions it was called editor, I thought it'd be funny if I named the variable editor too

Once an instance is created, you can now use the rest of the functions by doing editor.[function]\

Functions

pushChanges

This... This you must have. It's not something hard to understand. Seriously, it's a single line usage. Without it, any changes made will not be pushed to the level.dat, which essentially makes your code useless.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat"
editor = NE.NoodleExtensions(lvl)

# all your animation stuff goes here

editor.pushChanges() # ok you're done animating

updateDependencies

This will add a _requirement to your choosen level.dat. Since Noodle Extensions is added automatically, you should only really need it to add Chroma.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat"
editor = NE.NoodleExtensions(lvl)

editor.updateDependencies("Chroma")

This function does not require editor.pushChanges()

Parameters

  • str dependency
    • The dependency you want to add

getNote

To be fair with you, even when using the script to make an actual NE map I haven't found a use for this. But, in the case you're smart than me, here you go
This will return a list of all the notes found with matching data. Keep in mind you'll have to feed in a Note object.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat"
editor = NE.NoodleExtensions(lvl)

note = NE.Note(beat=10, index=1, layer=1, type=1, cutDirection=0)

editor.getNote(note, False)

Parameters

  • Note note
    • The note you want to find
  • bool excludeCustomData
    • If true, when searching for a note the function will ignore the note's customData.

getWall

Literally the same as getNote but... getWall.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat"
editor = NE.NoodleExtensions(lvl)

wall = NE.Obstacle(10, 0, 1, 5, 1)

editor.getWall(wall, False)

Parameters

  • Obstacle wall
    • The wall you want to find
  • bool excludeCustomData
    • If true, when searching for a wall the function will ignore the wall's customData.

editNote

This will edit a note inside of your level. You can use this to give a note a track, or other pieces of customData.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat"
editor = NE.NoodleExtensions(lvl)

note = NE.Note(_time=10, _lineIndex=1, _lineLayer=1, _type=1, _cutDirection=0) # the old note
newNote = NE.Note(**note.note, _track="ExampleTrack") # the new note. The start allows for you to quickly copy the older note's data onto the new note.
# when using editNote you DO NOT WANT TO EVER change any of the note's default data. (_time, _lineIndex etc) as this will cause unwanted results

editor.editNote(note, newNote, False)

Parameters

  • Note oldNote
    • The current note's data.
  • Note newNote
    • The data that will replace the older note's data.
  • bool checkForCustomData
    • Recommended to keep to False. If set to True, you will only be able to edit the note once. (You can keep editing the note once you set it back to false)

editWall

The same thing as editNote but as editWall.

import noodleExtensions as NE

lvl = "ExpertPlusStandard.dat"
editor = NE.NoodleExtensions(lvl)

oldWall = NE.Obstacle(_time=10, _lineIndex=0, _type=1, _duration=10, _width=1)
newWall = NE.Obstacle(**oldWall, _track="WallTrack")

editor.editWall(oldWall, newWall, False)

Parameters

  • Obstacle wall
    • The wall you want to edit
  • Obstacle newWall
    • The new wall data
  • bool checkForCustomData
    • Either to check or not for custom data. Recommended to keep to False.

Animations

To animate, simply use editor.[animation] where animation is either animateTrack, assignPathAnimation etc...
As always, you'll need to feed in an object. These will be accordingly, the type that you're animating.
So, NE.AnimateTrack object for editor.animateTrack.

If it doesn't link, it's a WIP. If you want to read it anywyas, Check the pages above.

Objects

Events

Clone this wiki locally