Page 1 of 2

Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 8:05 pm
by PixelPest
These are some direct links to important and/or frequently used pages in the LunaLua documentation, to help avoid searching through the surprisingly large PGE Wiki:

Global functions:
http://wohlsoft.ru/pgewiki/LunaLua_global_functions
All of your general, graphics, static item, text, and miscellaneous functions. Not to be confused with events.

Global sound and music functions:
http://wohlsoft.ru/pgewiki/LunaLua_glob ... _functions
All of your functions to do with music and sound effects. Not to be confused with events.

Events:
http://wohlsoft.ru/pgewiki/LunaLua_events
Both your overworld and level events. Always preceeded by "function". They trigger code written inside them whenever a certain time or other criteria is met.

API functions and events:
http://wohlsoft.ru/pgewiki/LunaLua_global_API_functions
An API, which is placed in Lua Scripts Lib, has certain characteristics and events that make it an API. These items are required for it to function. Refer to barebones.lua for more help info on API format.

Hardcoded image list:
http://wohlsoft.ru/pgewiki/Hardcoded_Im ... MBX_Engine
Certain SMBX graphics require Lua to be used, since they are built in farther than the normal graphics folder. Replacements of hardcoded images can be added to the custom graphics folder of a level or an episode to be used, but they must have the exact same name and dimensions (size).

Sound effects list:
http://wohlsoft.ru/pgewiki/SFX_list_(SMBX64)
The sound effects in the SMBX sounds folder are not in order. Use this list to find their IDs, which is needed for changing sounds in .ini's and for multiple sound effect functions.

Player offsets:
http://wohlsoft.ru/pgewiki/SMBX_Player_Offsets
The values held in memory to do with the player's state, actions, etc.

NPC offsets:
http://wohlsoft.ru/pgewiki/SMBX_NPC_Offsets
The values held in memory to do with the state of NPCs, their actions, etc.

NPC AIs:
http://wohlsoft.ru/pgewiki/SMBX_NPC_AI
Descriptors of the default AI of all NPCs.

NPC functions:
http://wohlsoft.ru/pgewiki/NPC_(class)
Mainly functions and field values to do with NPCs. Not to be confused with events.

Player functions:
http://wohlsoft.ru/pgewiki/Player_(class)
Mainly functions and field values to do with the player(s). Not to be confused with events.

Section functions:
http://wohlsoft.ru/pgewiki/Section_(class)
Mainly functions and field values to do with the section(s). Not to be confused with events.

Block functions:
http://wohlsoft.ru/pgewiki/Block_(class)
Mainly functions and field values to do with blocks. Not to be confused with events.

Animation functions:
http://wohlsoft.ru/pgewiki/Animation_(class)
Mainly functions and field values to do with graphical animations. Not to be confused with events.

Layer functions:
http://wohlsoft.ru/pgewiki/Layer_(class)
Mainly functions and field values to do with layers. Not to be confused with events.

Data functions:
http://wohlsoft.ru/pgewiki/Data_(class)
The functions, constructors, field values, and enums to do with saving data. Not to be confused with events.

Event functions:
http://wohlsoft.ru/pgewiki/Event_(class)
Mainly functions and field values to do with level events. Not to be confused with events.

Warp functions:
http://wohlsoft.ru/pgewiki/Warp_(class)
Mainly functions and field values to do with warps. Not to be confused with events.

BGO functions:
http://wohlsoft.ru/pgewiki/BGO_(class)
Mainly functions and field values to do with BGOs. Not to be confused with events.

List of LunaLua examples:
http://wohlsoft.ru/pgewiki/LunaLua_Examples
Links to a handful of quality exemplars, featured on the PGE wiki.

List of LunaLua APIs:
http://wohlsoft.ru/pgewiki/Category:Lun ... _libraries

Re: Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 8:45 pm
by HenryRichard
I feel this could pretty much be summed up by posting this: http://wohlsoft.ru/pgewiki/Category:LunaLua_API

Re: Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 8:48 pm
by Emral
I literally summed this up in one line here http://www.smbxgame.com/forums/v ... 87&t=13541 and this thread gets sticky? Bias.

Re: Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 8:50 pm
by Alagirez
STICKY THIS OR RIOT
Now i can improve my Lunalua skill thank you ^3^i love you

Re: Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 10:21 pm
by PixelPest
HenryRichard wrote:I feel this could pretty much be summed up by posting this: http://wohlsoft.ru/pgewiki/Category:LunaLua_API
Yes. I realize that, but not everything is directly linked to that page, and you need to know what to search for to find what you need. This helps pinpoint certain useful pages from one, clear thread
Enjl wrote:I literally summed this up in one line here http://www.smbxgame.com/forums/viewtopic.php?
f=87&t=13541 and this thread gets sticky? Bias.
Your thread is more of an open, Q&A topic. Not saying that it isn't helpful and doesn't have some very useful content, but this is an organized central index, if that makes sense

Re: Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 10:24 pm
by Emral
PixelPest wrote:
HenryRichard wrote:I feel this could pretty much be summed up by posting this: http://wohlsoft.ru/pgewiki/Category:LunaLua_API
Yes. I realize that, but not everything is directly linked to that page, and you need to know what to search for to find what you need. This helps pinpoint certain useful pages from one, clear thread
Enjl wrote:I literally summed this up in one line here http://www.smbxgame.com/forums/viewtopic.php?
f=87&t=13541 and this thread gets sticky? Bias.
Your thread is more of an open, Q&A topic. Not saying that it isn't helpful and doesn't have some very useful content, but this is an organized central index, if that makes sense
It does not, I'm actually salty rn

Re: Useful LunaLua Documentation Quick Links

Posted: Mon Mar 14, 2016 11:45 pm
by PixelPest
The main post looks a lot nicer now and now has some info included with each link

Re: Useful LunaLua Documentation Quick Links

Posted: Tue Mar 15, 2016 12:11 am
by Shadow Yoshi
Enjl wrote:I literally summed this up in one line here http://www.smbxgame.com/forums/v ... 87&t=13541 and this thread gets sticky? Bias.
Image

Re: Useful LunaLua Documentation Quick Links

Posted: Tue Mar 15, 2016 5:05 am
by Quill
Joey wrote:
Enjl wrote:I literally summed this up in one line here http://www.smbxgame.com/forums/v ... 87&t=13541 and this thread gets sticky? Bias.
Image
i'm done omg

Re: Useful LunaLua Documentation Quick Links

Posted: Tue Mar 15, 2016 10:53 am
by h2643
Maybe you should add a link to the storage of all LunaLua APIs that were released, so that people will have a bigger choice of usage:
http://wohlsoft.ru/pgewiki/Category:Lun ... _libraries

Re: Useful LunaLua Documentation Quick Links

Posted: Tue Mar 15, 2016 2:32 pm
by Emral
Joey wrote:
Enjl wrote:I literally summed this up in one line here http://www.smbxgame.com/forums/v ... 87&t=13541 and this thread gets sticky? Bias.
Image
Image

Re: Useful LunaLua Documentation Quick Links

Posted: Mon May 09, 2016 10:46 am
by fireflower30
Going to try one of these.

Me: Okay... going to try out the Music Lua for my boss rush.

(Gets Error)

Me: ...Why... how do I do this... I'm using this Lua:
Spoiler: show
// Play the music from section 1 right now
PlayMusic,0,1,0,0,1,0

Re: Useful LunaLua Documentation Quick Links

Posted: Mon May 09, 2016 11:16 am
by underFlo
That's not Lua though.

Re: Useful LunaLua Documentation Quick Links

Posted: Mon May 09, 2016 3:29 pm
by h2643
fireflower30 wrote:Going to try one of these.
That's super outdated LunaDLL, not LunaLua.

Re: Useful LunaLua Documentation Quick Links

Posted: Tue May 10, 2016 12:11 pm
by fireflower30
h2643 wrote:
fireflower30 wrote:Going to try one of these.
That's super outdated LunaDLL, not LunaLua.
Then what's the Music Lua. I need to finish by boss rush episode, and I just need to run the custom music properly

Re: Useful LunaLua Documentation Quick Links

Posted: Tue May 10, 2016 12:23 pm
by Mable
Just download the current lunalua and you good to go.

Also yay another boss rush, i hope bossedit will make a video of it.

Re: Useful LunaLua Documentation Quick Links

Posted: Tue May 10, 2016 12:24 pm
by Emral
fireflower30 wrote:
h2643 wrote:
fireflower30 wrote:Going to try one of these.
That's super outdated LunaDLL, not LunaLua.
Then what's the Music Lua. I need to finish by boss rush episode, and I just need to run the custom music properly
http://wohlsoft.ru/pgewiki/LunaLua_glob ... _functions
It's literally the 2nd link in this topic.

Re: Useful LunaLua Documentation Quick Links

Posted: Tue May 10, 2016 12:51 pm
by fireflower30
Enjl wrote:
fireflower30 wrote:
h2643 wrote: That's super outdated LunaDLL, not LunaLua.
Then what's the Music Lua. I need to finish by boss rush episode, and I just need to run the custom music properly
http://wohlsoft.ru/pgewiki/LunaLua_glob ... _functions
It's literally the 2nd link in this topic.
Most of the Links in it are Red, so I had to search up a lua on the wiki, I found one, but now I keep on getting this error:

Image

Re: Useful LunaLua Documentation Quick Links

Posted: Tue May 10, 2016 12:58 pm
by Emral
fireflower30 wrote:Most of the Links in it are Red, so I had to search up a lua on the wiki, I found one, but now I keep on getting this error:
The lines are described to the right of the red links. They don't need their own individual page.
The error you're getting means that lua is unable to find your specified custom music file. Can I see your code?

Re: Useful LunaLua Documentation Quick Links

Posted: Tue May 10, 2016 1:10 pm
by fireflower30
Enjl wrote:
fireflower30 wrote:Most of the Links in it are Red, so I had to search up a lua on the wiki, I found one, but now I keep on getting this error:
The lines are described to the right of the red links. They don't need their own individual page.
The error you're getting means that lua is unable to find your specified custom music file. Can I see your code?
Here:

Code: Select all

-- Loads a music file into music stream
Audio.MusicOpen("level.mp3")
-- Starts playback of current music in stream
Audio.MusicPlay()

Audio.SeizeStream(0)