Releases: STBrian/LunaCore
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
LunaCore 0.11.0
Changelog
- Changing from creative to survival while flying now will make the player fall instead of keep the flying
- Added network script loader (only for testing and need to use with
sendScript.pypython script) - Fixed crash when trying to set an invalid field of
GamesubmodulesLocalPlayer,LocalPlayer.CameraandWorld - Fix
Core.Filesystem.open - Added access to
extdata:/toCore.Filesystem.open - Added the following methods to files:
close,isOpen,isEOF - Removed
string.splitas it was only for testing, and because it's not recommended to add functions to the standard libraries, however if you want that functionality you can implement your own or checkstring_utils.luain examples - Added the following functions to
Core.Filesystem:fileExists,directoryExists,getDirectoryElements,createDirectory - Added module
Core.Memorywith read/write functions for U32, U16, U8, Float, Double, String (usagelocal val = readType(offset)orlocal success = writeType(offset, value)) seememory_read_write.luaexample
Known bugs
- When an Async task ends, it will throw an "attempt to call a nil value" error
Game.LocalPlayer.CurrentHungeroffset can switch, changing the world can fix it sometimes- Changing a block for an item (or vice versa) bugs the item render in hand
Game.LocalPlayer.Camera.FOVoffset can switch sometimes
LunaCore 0.10.1
Changelog
- Graphics now close when enter in sleep mode to avoid black screen
- Fix possibility of script exhaustion time for opening keyboard
- Keyboard functions returns nil if the player closes it or if there is an error
Known bugs
- When an Async task ends, it will throw an "attempt to call a nil value" error
- Game.LocalPlayer.CurrentHunger bugs sometimes, changing the world can fix it sometimes
- Changing a block for an item (or vice versa) bugs the item render in hand
- Camera FOV offset can switch sometimes
LunaCore 0.10.0
Changelog
- Moved modules System, Debug, Keyboard to global table Core
- Added work in progress Filesystem module to Core with open file function (open file function works the same as io.open, check Lua docs about io.open for usage)
- Added events OnPlayerJoinWorld and OnPlayerLeaveWorld
- Added options to block ZL and ZR or DPADLEFT and DPADRIGHT keys, to enable exclusive usage for scripts
- Added Game.LocalPlayer.Inventory.ArmorSlots (you can access to slots ["helmet"] [1], ["chestplate"] [2], ["leggings"] [3] and ["boots"] [4], you can either use the name or number to access the slot)
- Added experimental Core.Graphics module (refer to example script "graphics_test.lua" for usage)
Known bugs
- When an Async task ends, it will throw an "attempt to call a nil value" error
- Game.LocalPlayer.CurrentHunger bugs sometimes, changing the world can fix it sometimes
- Changing a block for an item (or vice versa) bugs the item render in hand
LunaCore 0.9.0
Changelog
- Added module Keyboard
- Added module Game.Items with functions findItemIDByName and findItemNameByID (you will need to wait until game is loaded for the functions to work correctly)
- Removed Event OnNewFrame as it isn't implemented yet (if you want a similar functionality use Async.create instead with a while Async.wait() loop)
- Fixed items IDs, now the real IDs will be used
- Fix LocalPlayer.Camera metatable, now Camera fields should be working
- Fix Player Camera FOV (It will change current camera FOV value instead of only the hand viewframe)
- Added experiment to Change Camera FOV in plugin menu (for testing only)
Known bugs
- When an Async task ends, it will throw an "attempt to call a nil value" error
- Game.LocalPlayer.CurrentHunger bugs sometimes, changing of world can fix it sometimes
LunaCore 0.8.0
Changelog
- Added field Game.World.Loaded to detect whether there is a World Level currently loaded or not
- Error messages now includes a prefix about where exactly the error happened internally
- Fixed "Unknown item" when trying to get an item name not registered, now all items should return their names correctly
- Added field
Game.LocalPlayer.Velocity.get()andGame.LocalPlayer.Velocity.set()(get returns 3 numbers that correspond to x, y and z; and set takes 3 arguments also x, y, z)
If your script shows an error message, you can check the full error in the log file at sdmc:/Minecraft 3DS/log.txt.
If the plugin crashes the game, you can check the log file too to know if the plugin was doing something before crashing, if nothing important showing, you can add log messages to your scripts with Game.Debug.log() which takes 1 required argument (the message) and 1 optional argument (whether show the message on screen or not. Default false)
You can import other lua scripts by doing require("modname"), modname being the name of the script that you want to import. It will search in the paths sdmc:/Minecraft 3DS/scripts/?.lua and sdmc:/Minecraft 3DS/scripts/?/init.lua, where ? is replaced by modname
LunaCore 0.7.2 - First alpha
The first public alpha of LunaCore. LunaCore is a work in progress script loader for Minecraft: New 3DS Edition. It's a plugin that allows to be executed alongside with the game thanks to Luma3DS plugin loader, and is developed with CTRPluginFramework, it also contains public discoveries of @Cracko298 which you can see in Minecraft-3DS-Community/GamePatches. It also uses Minecraft Class v1.1 made by Discord: @rairai6895
It has a script loader with an API to interact with the game. Scripts are loaded from sdmc:/Minecraft 3DS/scripts/
Currently you can use the following modules:
- System
- Async
- Bits
- Game.LocalPlayer
- Game.Gamepad
- Game.World
- Game.Event
- Game.Debug
You can check some scripts examples in templates/scripts/ or check api_docs.md, or even api_docs.lua if you want to know exactly all features availables (not so readable as is intended to be used as API docs library with a lua code extension). Also, you can check some stuff in main.lua but is used only for testing.
In the future more features will be added, but for now, it has the script loader and an extra feature
- Loading a custom menu layout from
sdmc:/Minecraft 3DS/layouts/menu_layout.json
The layout must follow the same format as the template that you can find in templates/layouts/menu_layout.json