SMBX Fields
Jump to navigation
Jump to search
Since LunaLua v0.6.1 you can use these powerful defines to modify SMBX values. They are safe to use and will reset on every level.
Defines can be simply assigned like a variable.
Here is a example of changing the gravity:
function onStart()
Defines.gravity = 6 -- Half of the default gravity.
end
Movement | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.gravity | WORD | 12 | Min. Value: 0 | The maximum falling speed of the player. Note that gravity is a bit of a misnomer. |
Defines.earthquake | WORD | 0 | Min. Value: 0 | The earthquake factor of the Level. It resets to 0 after time. |
Defines.jumpheight | WORD | 20 | Min. Value: 0 | The upward force for a jumping player. Counts down each tick during the jump. |
Defines.jumpheight_bounce | WORD | 20 | Min. Value: 0 | The upward force for a player when bouncing of a enemy. Counts down each tick during the jump. |
Defines.player_runspeed | FLOAT | 6 | Min. Value: 0 | The normal top running speed for a player. |
Defines.player_walkspeed | FLOAT | 3 | Min. Value: 0 | The normal top walking speed for a player. |
Defines.player_grav | FLOAT | 0.4 | Min. Value: 0 | The gravitational force for players. |
Defines.npc_grav | FLOAT | 0.26 | Min. Value: 0 | The gravitational force for NPCs. |
Effect Modification | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.effect_NpcToCoin | BYTE | 11 | Min. Value: 0 | The effect ID of the npc-to-coins function (default is the coinflip effect). The npc-to-coins function is executed when the player hits an exit, which transforms the npcs into coins. |
Defines.effect_Zoomer_killEffectEnabled | BOOLEAN | true | --- | If the explosion effect is enabled for the zoomer (NPC-ID: 205) |
Sound Modification | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.sound_NpcToCoin | BYTE | 14 | Min. Value: 0 | The sound ID of the npc-to-coins function (default is the coin sound). The npc-to-coins function is executed when the player hits an exit, which transforms the npcs into coins. |
Game Exit | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.npcToCoinValue | BYTE | 1 | Min. Value: 0 Max. Value: 99 |
The coin-value for every destroyed npc in the npc-to-coins function. The npc-to-coins function is executed when the player hits an exit, which transforms the npcs into coins. |
Defines.npcToCoinValueReset | BYTE | 100 | Min. Value: 1 Max. Value: 100 |
How many coins get subtracted from the coin-value when the coin value hits 100 coins. The npc-to-coins function is executed when the player hits an exit, which transforms the npcs into coins. |
Defines.smb3RouletteScoreValueStar | DWORD | 10 | Min. Value: 1 Max. Value: 12 |
The score value of smb3 roulette star |
Defines.smb3RouletteScoreValueMushroom | DWORD | 6 | Min. Value: 1 Max. Value: 12 |
The score value of smb3 roulette mushroom |
Defines.smb3RouletteScoreValueFlower | DWORD | 8 | Min. Value: 1 Max. Value: 12 |
The score value of smb3 roulette flower |
Coin Value | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.coinValue | BYTE | 1 | Min. Value: 0 Max. Value: 99 |
How much a coin npc is worth as coins. It will affect every coin-npc which has a 1-coin value as default (except the npc-to-coins function). |
Defines.coin5Value | BYTE | 5 | Min. Value: 0 Max. Value: 99 |
How much a 5-coin npc is worth as coins. |
Defines.coin20Value | BYTE | 20 | Min. Value: 0 Max. Value: 99 |
How much a 20-coin npc is worth as coins. |
Level | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.levelFreeze | BOOLEAN | false | --- | If the level is frozen. (Only you can move!) |
Cheats | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.cheat_shadowmario | BOOLEAN | None | --- | If the cheat shadowmario/ghostytime is active. If this cheat is active, then the player can go through blocks. |
Defines.cheat_ahippinandahoppin | BOOLEAN | None | --- | If the cheat ahippinandahoppin/jumplikesomething is active. This cheat grants infinite double jumps. |
Defines.cheat_sonictooslow | BOOLEAN | None | --- | If the cheat sonictooslow/chipmunktimes is active. This cheat makes the player run very fast. |
Defines.cheat_illparkwhereiwant | BOOLEAN | None | --- | If the cheat illparkwhereiwant is active. If this cheat is active, then you can move freely on the world map. |
Defines.cheat_wingman | BOOLEAN | None | --- | If the cheat wingman/peawing is active. This cheat makes the player/yoshi fly infinitly. |
Defines.cheat_captainn | BOOLEAN | None | --- | If the cheat captainn/juststop is active. If this cheat is active, then you can freeze time with the PAUSE-Button. |
Defines.cheat_flamerthrower | BOOLEAN | None | --- | If the cheat flamerthrower/mchammerdude is active. If this cheat is active, then you can spam projectiles very fast (i.e Fireball, Iceball, Hammer). |
Defines.cheat_moneytree | BOOLEAN | None | --- | If the cheat moneytree/havemoney is active. If this cheat is active, then you can spam projectiles very fast (i.e Fireball, Iceball, Hammer). |
Defines.cheat_speeddemon | BOOLEAN | None | --- | If the cheat speeddemon/maytoofast is active. This values is the same as the "Max FPS" setting. If this is active, then there is no frame limit. |
Defines.cheat_donthurtme | BOOLEAN | None | --- | If the cheat donthurtme/strategyyo is active. This values is the same as the "God Mode" setting. If this is active, then the player has god mode active and cannot be killed. |
Defines.cheat_stickyfingers | BOOLEAN | None | --- | If the cheat stickyfingers/tenacioustoes is active. This values is the same as the "Grab All" setting. If this is active, then player can grab every npc. |
Defines.player_hasCheated | BOOLEAN | None | --- | This is the indicator if the player has cheated (used on of the cheat codes). If this is the case then saving is deactivated. However with the cheat redigitiscool/raocowisswell you can activate cheating again. How lucky that you can deactivate it again :) |
Player Settings General | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.player_grabSideEnabled | BOOLEAN | true | --- | If grabbing from the side is enabled! |
Defines.player_grabTopEnabled | BOOLEAN | true | --- | If grabbing from top is enabled! |
Defines.player_grabShellEnabled | BOOLEAN | true | --- | If grabbing shells is enabled! |
Player Settings: Link | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.player_link_shieldEnabled | BOOLEAN | true | --- | If the shield of link is enabled. |
Defines.player_link_fairyVineEnabled | BOOLEAN | true | --- | If the vine fairy is enabled |
Block Modification | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.block_hit_link_rupeeID1 | WORD | 251 | Min. Value: 0 Max. Value: 300 |
The npc id for Link's main coin when hitting the block. (Default would be the green rupee.) |
Defines.block_hit_link_rupeeID2 | WORD | 252 | Min. Value: 0 Max. Value: 300 |
The npc id for Link's secondary coin when hitting the block (chance 20:3). (Default would be the blue rupee.) |
Defines.block_hit_link_rupeeID3 | WORD | 253 | Min. Value: 0 Max. Value: 300 |
The npc id for Link's tertiary coin when hitting the block (chance 60:3). (Default would be the red rupee.) |
Kill Modification | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.kill_drop_link_rupeeID1 | WORD | 251 | Min. Value: 0 Max. Value: 300 |
The npc id for Link's main coin when killing an enemy. (Default would be the green rupee.) |
Defines.kill_drop_link_rupeeID2 | WORD | 252 | Min. Value: 0 Max. Value: 300 |
The npc id for Link's secondary coin when killing an enemy. (chance 15:3). (Default would be the blue rupee.) |
Defines.kill_drop_link_rupeeID3 | WORD | 253 | Min. Value: 0 Max. Value: 300 |
The npc id for Link's tertiary coin when killing an enemy. (chance 40:3). (Default would be the red rupee.) |
P-Switch Settings | ||||
---|---|---|---|---|
Name of Define | Type | Default value | Min/Max Size | Description |
Defines.pswitch_music | BOOLEAN | true | --- | If P-Switch music is enabled. |