Easy LunaLua (NPC Code-style System; 1.1--1/1/2018)
Posted: Sun Aug 20, 2017 8:49 pm
If you can use NPC codes, you can use this!
Make sure to use SMBX2-Beta3. It requires various versions of specific APIs that are packaged with it.
This is a useful asset that allows use of various LunaLua elements without the need for any coding whatsoever. It allows for easy autoscroll, filters, timers, general level settings, visual effects, physics effects, pipecannons, and more. It's highly intuitive and will have many more features added to it.
How it Works
When placed in your level's custom graphics/assets folder a pref.txt file along with the provided assets does all of the work for you. Write each command on a separate line with no spaces or capital letters anywhere. Decimal numbers are supported. To use any command, first write the name, an equal sign, and the value, such as:
When entering fields with names, many values are accepted. For example, the following three lines do the same thing and are all accepted:
You'll be notified in the engine if you enter a value that is not recognized though most variants with correct spelling will work. (Example: boot, greenboot, kuriboboot, kuribosboot, shoe, greenshoe, kuriboshoe, and kuribosshoe all are recognized for NPC 35). Fields that require a yes or no answer (known as boolean) accept 1 or true for "yes" and 0 or false for "no". If a command is has no real specification, such as clearmount, any value will suffice besides nil if it is typed in your pref.txt file. (Example: clearmount=1, clearmount=true, and clearmount=banana would all be recognized, you just need to have some value).
Installation
Download the .zip file here: https://www.dropbox.com/s/lzky8pjhscq1z ... a.zip?dl=0


This small section is also included in the download package.
Features
Filters: Force certain player settings for a level
Autoscrolls: Makes the screen scroll automatically in a certain direction at the specified speed
Make sure to use SMBX2-Beta3. It requires various versions of specific APIs that are packaged with it.
This is a useful asset that allows use of various LunaLua elements without the need for any coding whatsoever. It allows for easy autoscroll, filters, timers, general level settings, visual effects, physics effects, pipecannons, and more. It's highly intuitive and will have many more features added to it.
How it Works
When placed in your level's custom graphics/assets folder a pref.txt file along with the provided assets does all of the work for you. Write each command on a separate line with no spaces or capital letters anywhere. Decimal numbers are supported. To use any command, first write the name, an equal sign, and the value, such as:
Code: Select all
startpowerup=2
Code: Select all
character=ninjabomberman
character=bomberman
character=nb
Installation
Download the .zip file here: https://www.dropbox.com/s/lzky8pjhscq1z ... a.zip?dl=0
- After downloading the file unzip it using 7zip, WinZip, etc.
- For a level, create a custom graphics (assets) folder for your files unless one already exists; create a new folder with the same name as your level in the same directory as your .lvl file
- For a level copy the files from inside the "Level Files" folder into your custom graphics (assets) folder, which contains all of the needed files including an empty pref.txt file
- For an episode copy the files from inside the "World Files" folder into the same directory as your .wld file, which contains all of the needed files including an empty pref.txt file


This small section is also included in the download package.
Features
Filters: Force certain player settings for a level
- startcharacter: who the player starts the level as; character name (such as mario or peach) or id (1 to 18)
- startpowerup: what powerup the player starts the level with; powerup name (such as fire, fireflower, or leaf) or state ID (1 to 7)
- character: who the player must play as for the whole level; character name or ID
- powerup: what powerup the player must have for the whole level; powerup name or state ID
- reserveitem: what item the player starts with in the (reserve) item box; item name (such as mushroom) or NPC ID (such as 1 or 9)
- clearreserve: clear the player's reserve powerup at the start of the level
- mount: the name of the mount the player starts the level with (such as greenyoshi or redboot)
- clearmount: removes the player's mount
- costume: the name of a costume folder containing the alternate graphics of a certain character (find them in SMBX2/data/graphics/costumes/character name)
- time: the time the leveltimer starts at
- galaxytime: the time the SMG-style leveltimer starts at
- timeroutevent: the name of a level event to be triggered when the timer hits zero
- timeroutkill: whether or not to kill the player when the timer runs out
- timetrialtimer: starts a time trial (speedrun) timer for the level
- fallspeed: max. speed at which the player falls
- walkspeed: max. speed at which the player walks
- runspeed: max. speed at which the player runs
- gravity/gravitymodifier: general gravity modifications for players and NPCs (use a number greater than zero)
- playergravity: direct modification of the gravitational forces acting on the player (use a number greater than zero)
- npcgravity: direct modification of the gravitational forces acting on the player (use a number greater than zero)
- jumpheight: upward force for the player when jumping
- bounceheight/jumpheightbounce: upward force for the player when jumping off of a squashed enemy
- lowgravity: creates general low-gravity settings for a level
- pswitchmusicoff: turns off the p-switch music
- onelife: kills the player when hurt (works well in conjunction with the powerup tweak)
- snowstorm: set to true, or a number which will act as the max. number of particles (lower number reduces lag but also density)
- snowflakes: set to true, or a number which will act as the max. number of particles (lower number reduces lag but also density)
- sandstorm: set to true, or a number which will act as the max. number of particles (lower number reduces lag but also density)
- fog: set to true, or a number which will act as the max. number of particles (lower number reduces lag but also density)
- fogcolor/fogcolour: the hex number of the fog's color/colour (example: 996699); http://www.cloford.com/resources/colours/500col.htm
- winddirection: the direction of the wind (-1 or left for blowing left, 1 or right for blowing right); set the wind tweak too
- wind: the power of the wind which changes the player's max. speeds based on the direction they are moving (0 to 2.2 or so is best)
- trackdeaths: shows icons where the player has died in a level (set true, or the name of an icon: standard, standard2x, arrow, arrow2x, player1, player2, player3, player4, player5, trump, sweat, cat)
- nsmbdshitsystem: makes the player powerdown like in NSMB (example: Fire to big then to small Mario)
- nsmbwiihitsystem: makes the player powerdown like in NSMB plus disables the reserve power-up system
- smwhitsystem: makes the player powerdown like in SMW (and NSMB) and force-drops the reserve item
- hidedeathanim: does not show player death animations
- breathmeter: some breath meter shenanigans from SM64
- smwcamera: modifcations to background scrolling to simulate SMW
Autoscrolls: Makes the screen scroll automatically in a certain direction at the specified speed
- To set a scrolling section in a pref.txt file (remember that the first section is number zero!):
Code: Select all
scroll<section #><direction>=<speed>
- Example:
Code: Select all
scroll2right=0.75
- To set a pipecannon in a pref.txt file:
Code: Select all
pipe<warp #><speed>=<speed> pipe<warp #><angle>=<angle>
- Example:
Code: Select all
pipe2speed=16 pipe3angle=45