Releases: STBrian/LunaCore
LunaCore 0.19.0
Warning: Changes that may break compatibility
Changelog
- Added new core object type:
MCToolTiers. Fields: MiningLevel, Durability, MiningEfficiency, DamageBonus, Enchantability - Added table for game tool tiers
Game.Items.ToolTiers. Contains: WOOD, STONE, IRON, GOLD and DIAMOND - Added
Game.Items.newToolTier(). Returns an emptyMCToolTier - Added
Game.Items.registerSwordItem(nameid: string, itemid: integer, tier: MCToolTier) - Added
Game.Items.registerPickaxeItem(nameid: string, itemid: integer, tier: MCToolTier) - Added
Game.Items.registerAxeItem(nameid: string, itemid: integer, tier: MCToolTier) - Added
Game.Items.registerShovelItem(nameid: string, itemid: integer, tier: MCToolTier) - Added
Game.Items.registerHoeItem(nameid: string, itemid: integer, tier: MCToolTier) - Renamed core types names: GameItem -> MCItem, GameItemInstance -> MCItemInstance
- Improvements to hook system
Note: Tools registered with a non-game default tier will have a repair item tied to the mining level
How to install
- Download the
LunaCore.3gxfile and move the file to the folder"/luma/plugins/<TitleId>/"of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
- High: Trying to use
Game.Resources.reloadLocale()after game load will crash the game
LunaCore 0.18.1
Changelog
- Fixed an error related to some functions not working properly when trying to check if one argument's type was an Enum type
How to install
- Download the
LunaCore.3gxfile and move the file to the folder"/luma/plugins/<TitleId>/"of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
- High: Trying to use
Game.Resources.reloadLocale()after game loading will crash the game
LunaCore 0.18.0
Changelog
- Added
Game.LocalPlayer.getState(EntityState) - Added
Game.World.Weatherwith possible Enum values: Clear, Rain, Thunder - Added new global
Enumswhere all possible values of Enum fields will be stored. For Enum fields you can also use the name of the enum as a string to set a field - Added
Enums.WeatherTypetable with fieldsClear,Rain,ThunderandRainThunder. Use them to set the fieldGame.World.Weather - Added
Enums.EntityStatetable. The following states are available: Burning, Sneaking, Sprinting, Eating, Invisible, Tempted, InLove, HasSaddle, IsAdult, Named, Tamed, Leaded, Sheared, ElytraFly. Use them inGame.LocalPlayer.getState()
How to install
- Download the
LunaCore.3gxfile and move the file to the folder"/luma/plugins/<TitleId>/"of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
LunaCore 0.17.0
Changelog
- Fixed behavior of filesystem open modes
- Added
Game.Resources.getLocale()that returns the current locale selected in the game - Added
Core.getCurrentModname()that returns the name of the mod that is currently being loaded - Improved legacy Graphics API to avoid freezing in some scenarios
- Added
Object:isType(string)method to Core objects
How to install
- Download the
LunaCore.3gxfile and move the file to the folder"/luma/plugins/<TitleId>/"of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
LunaCore 0.16.0
Changelog
- Fixed freezing and other errors when trying to index Core object instances
- Fixed menu option
Toggle Block DPADLEFT and DPADRIGHT keys - Now changing the item of an
InventorySlotcan only be done by using the methodInventorySlot:setItem(item,value?) - Added method
FilesystemFile:getSize() - Script paths shown in error messages are now shorter for common directories (mods and scripts folders)
- Improvements to Core object system
- Improvements to Core module tables
- Other fixes and improvements
How to install
- Download the
LunaCore.3gxfile and move the file to the folder"/luma/plugins/<TitleId>/"of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
LunaCore 0.15.0
Warning: Changes that break compatibility
Changelog:
- Fixed items not being changed correctly when modifying an inventory slot's item
- Fixed deadlock/crash when failed to execute a script loaded from network
- Added new submodule
Game.Resources. Currently it only has one function:reloadLocale - Added
Core.System.get3DSliderState - Improvements in Async system
- Renamed
Async.createtoAsync.run Async.createnow is used to create a new async task that can be connected to events- Added the ability for scripts to add menu entries by using the submodule
Core.Menu:- getMenuFolder: Will return the root folder where scripts can add folders or entries
- The returned folder can use the following methods:
- newEntry: To create a new menu entry. When selected, it will execute the provided callback
- newFolder: To create a new subfolder that is returned and can use the same methods as its parent
- showMessageBox: Will show a message box in the menu
- showAskMessageBox: Similar to message box but with user input that is returned as boolean
- isOpen: May be useful in some cases to know if the menu is open
- getMenuFolder: Will return the root folder where scripts can add folders or entries
- Additions to the Graphics API:
- Added primitive objects that can be created with
Core.Graphics.newRect | newLabel; that are more optimized to be drawn on screen while the game is still running - These objects can be added/removed for being drawn on screen with the functions
Core.Graphics.add | remove - Both objects have the following methods:
- setVisible: To hide/show it
- setScreens: To choose on which screens to be drawn on
- setPosition: Where to draw it
- setColor: Set main color of the object
- destroy: Release/destroy reference. It also removes any other reference to the object if it was added to being drawn
- Check the API to know more about specific methods
- Added primitive objects that can be created with
- Game debug info, warnings and errors will be logged in the log file. This can be helpful in some game crashes
- Added back the strings for Exception type in the crash report; as well Game, Core and Plugin state strings
- Added more info about the plugin in the About section
- Removed crash screen. Now the luma display error function is used
- Improvements to the logging system
- Other fixes to improve stability and potential memory leaks
How to install
- Download the
LunaCore.3gxfile and move the file to the folder"/luma/plugins/<TitleId>/"of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
LunaCore 0.14.0
Changelog:
- Core will load mod names as lowercase to be more consistent with how the game manages ids. This shouldn't break any mods
- Added
Game.Recipesmodule - Added
Game.Recipes.registerShapedRecipefunction - Added
Game.Items.getItemInstancemainly for usage withregisterShapedRecipefor now - Added
Game.Recipes.OnRegisterRecipesevent that gives one value to the callback required forregisterShapedRecipefunction - Buttons from menu layout will now be added in the order as they appear in the json file
- Now the default menu layout for LunaCore will be loaded from
sdmc:/Minecraft 3DS/LunaCore/layouts/menu_layout.jsoninstead of being hardcoded - Developer option to reload Lua environment will now reload mods too
- Crash report format changed to only contain necessary info, to know more about the error, you'll need to parse the error code
How to install
- Download the
LunaCore.3gxfile and move the file to the folder "/luma/plugins/<TitleId>/" of your sdcard - If you want the default LunaCore's menu layout, download
LunaCoreAssets.zipand unzip it in the root folder of your sd card
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Low: Always present. Changing a block for an item (or vice versa) bugs the item render in hand
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
LunaCore 0.13.1
Changelog:
- Added fields
DimensionandLoadedtoGame.LocalPlayermodule - Fixed fields
CurrentHungerandMaxHungerofGame.LocalPlayernot working properly sometimes - Fixed field
FOVofGame.LocalPlayer.Camera.FOVnot working properly sometimes - Changed error code format of the crash report
- Other minor changes to the crash report
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior and be pretty annoying
Low: Doesn't break scripts logic but can have unwanted behavior
- Low: Always present. Changing a block for an item (or vice versa) bugs the item render in hand
- Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
- Mid: Sometimes present. Although it's less common, it is possible that when using this plugin the ZL and ZR buttons are not detected by the game and it may be necessary to restart the console or enable InputRedirection in Rosalina Menu
LunaCore 0.13.0
Warning: Breaking changes
Changelog
- Moved
Game.EventtoCore.Event - Events have been moved from the Event module, now events are grouped into submodules according to their functionality
- Moved event
OnKeyPressedtoGame.Gamepad.OnKeyPressed - Moved event
OnKeyDowntoGame.Gamepad.OnKeyDown - Moved event
OnKeyReleasedtoGame.Gamepad.OnKeyReleased - Moved event
OnKeyReleasedtoGame.Gamepad.OnKeyReleased - Moved event
OnGameRegisterItemstoGame.Items.OnRegisterItems - Moved event
OnGameRegisterItemsTexturestoGame.Items.OnRegisterItemsTextures - Moved event
OnGameRegisterCreativeItemstoGame.Items.OnRegisterCreativeItems - Added Memory signed variants functions
- Write memory functions for unsigned values now will write the raw data if a negative value is passed instead of rounding it to 0
- Added
Core.Memory.mallocandCore.Memory.freeto allocate raw memory for advanced use - Added
Core.Memory.callfunction that allows to define a C function and call it if its offset is known (check examples) - Added
Core._VERSIONthat tells the current version of the core in a formated stringMAJ.MIN.PAT - Added
Game.LocalPlayer.Position.add,Game.LocalPlayer.Velocity.addfunctions - Fixed
Game.LocalPlayer.Position.get,Game.LocalPlayer.Velocity.getfunctions, now they will return 3 values instead of just one - Globals
GameandCoreshould now be more protected from being overwritten - Added option to the plugin menu to toggle Lua memory usage display information, now memory usage will be hidden by default every time you start the game
Note: Working on the repo wiki
Known bugs
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: Sometimes present.
Game.LocalPlayer.CurrentHungeroffset can change breaking functionality, changing the world can fix it - Low: Always present. Changing a block for an item (or vice versa) bugs the item render in hand
- Mid: Sometimes present.
Game.LocalPlayer.Camera.FOVoffset can change breaking some functionality - Mid: On some consoles the plugin may not detect the buttons ZL and ZR. This does not affect the game, only the scripting system
LunaCore 0.12.0
Changelog
- Added mods system (check examples/mods)
- LunaCore is now splitted into LunaCoreRuntime and LunaCoreAPI. Runtime contains low level functionality and other essential things, API contains more complex and user-friendly functionality. API works as a mod so users can decide to not use it
- Added
Core.getTitleIdandCore.getModpath - Added custom crash handler
- Added
OnGameLoad,OnGameItemsRegister,OnGameItemsRegisterTexture,OnGameCreativeItemsRegisterevents toGame.Eventmodule - Functions for events
OnKeyPressed,OnKeyReleasedandOnKeyDownnow can take the keycode value as first argument - Added instance
GameItemthat allows to handle some items functions. Methods:setTexture. Fields:StackSize,ID,NameID,DescriptionID - Added
Game.Items.registerItem,Game.Items.getCreativePosition,Game.Items.registerCreativeItem,Game.Items.findItemByNameandGame.Items.findItemByID - Added traceback when a script fails to load
- Removed
Games.Items.findItemIDByNameandGames.Items.findItemNameByID(usefindItemByNameorfindItemByIDto get an item; to get ID or name use the fieldsIDorNameIDof the result of the functions) - Removed fields
ItemIDandItemNamefromInventorySlotinstance and added fieldItemwhich will be either aGameIteminstance or nil - Removed preloaded json module, moved to API
- Removed Bits module due to inaccuracy, same functionality can be found in the API
- Fix:
dofilefunction to use current script environment - Fix:
Async.waitfunction - Fix:
attempt to call a nil valuewhen an Async task ended successfully - Fix: Create scripts folder if it doesn't already exists when loading script from network
- Fix: File handler seek method
- Fix: File size truncating when writing mid-file
- Improved
Core.Filesystemfunctions - Improved
Game.LocalPlayer.Inventorymodule - Improved stability
Known bugs
If you want to report a bug and you are using an emulator, please check first if the bug also happens on a real console as LunaCore can have a different behavior on emulator
High: May break scripts or crash the game
Mid: Can break scripts logic or have unwanted behavior
Low: Doesn't break scripts logic but can have unwanted behavior
- Mid: Sometimes present.
Game.LocalPlayer.CurrentHungeroffset can change breaking functionality, changing the world can fix it - Low: Always present. Changing a block for an item (or vice versa) bugs the item render in hand
- Mid: Sometimes present.
Game.LocalPlayer.Camera.FOVoffset can change breaking some functionality