-
Notifications
You must be signed in to change notification settings - Fork 0
NoodleExtensionsMainClassPage
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.
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 tooOnce an instance is created, you can now use the rest of the functions by doing editor.[function]\
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 animatingThis 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()
-
strdependency- The dependency you want to add
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)-
Notenote- The note you want to find
-
boolexcludeCustomData- If true, when searching for a note the function will ignore the note's customData.
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)-
Obstaclewall- The wall you want to find
-
boolexcludeCustomData- If true, when searching for a wall the function will ignore the wall's customData.
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)-
NoteoldNote- The current note's data.
-
NotenewNote- The data that will replace the older note's data.
-
boolcheckForCustomData- 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)
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)-
Obstaclewall- The wall you want to edit
-
ObstaclenewWall- The new wall data
-
boolcheckForCustomData- Either to check or not for custom data. Recommended to keep to False.
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.
There is no more support for this.
If it doesn't link, it's a WIP. If you want to read it anywyas, Check the pages above.