Skip to content

Releases: STBrian/LunaCore

LunaCore 0.13.1

23 Oct 01:32
526b3bc

Choose a tag to compare

Changelog:

  • Added fields Dimension and Loaded to Game.LocalPlayer module
  • Fixed fields CurrentHunger and MaxHunger of Game.LocalPlayer not working properly sometimes
  • Fixed field FOV of Game.LocalPlayer.Camera.FOV not 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

13 Oct 04:07

Choose a tag to compare

Warning: Breaking changes

Changelog

  • Moved Game.Event to Core.Event
  • Events have been moved from the Event module, now events are grouped into submodules according to their functionality
  • Moved event OnKeyPressed to Game.Gamepad.OnKeyPressed
  • Moved event OnKeyDown to Game.Gamepad.OnKeyDown
  • Moved event OnKeyReleased to Game.Gamepad.OnKeyReleased
  • Moved event OnKeyReleased to Game.Gamepad.OnKeyReleased
  • Moved event OnGameRegisterItems to Game.Items.OnRegisterItems
  • Moved event OnGameRegisterItemsTextures to Game.Items.OnRegisterItemsTextures
  • Moved event OnGameRegisterCreativeItems to Game.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.malloc and Core.Memory.free to allocate raw memory for advanced use
  • Added Core.Memory.call function that allows to define a C function and call it if its offset is known (check examples)
  • Added Core._VERSION that tells the current version of the core in a formated string MAJ.MIN.PAT
  • Added Game.LocalPlayer.Position.add, Game.LocalPlayer.Velocity.add functions
  • Fixed Game.LocalPlayer.Position.get, Game.LocalPlayer.Velocity.get functions, now they will return 3 values instead of just one
  • Globals Game and Core should 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.CurrentHunger offset 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.FOV offset 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

10 Aug 03:22

Choose a tag to compare

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.getTitleId and Core.getModpath
  • Added custom crash handler
  • Added OnGameLoad, OnGameItemsRegister, OnGameItemsRegisterTexture, OnGameCreativeItemsRegister events to Game.Event module
  • Functions for events OnKeyPressed, OnKeyReleased and OnKeyDown now can take the keycode value as first argument
  • Added instance GameItem that 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.findItemByName and Game.Items.findItemByID
  • Added traceback when a script fails to load
  • Removed Games.Items.findItemIDByName and Games.Items.findItemNameByID (use findItemByName or findItemByID to get an item; to get ID or name use the fields ID or NameID of the result of the functions)
  • Removed fields ItemID and ItemName from InventorySlot instance and added field Item which will be either a GameIteminstance or nil
  • Removed preloaded json module, moved to API
  • Removed Bits module due to inaccuracy, same functionality can be found in the API
  • Fix: dofile function to use current script environment
  • Fix: Async.wait function
  • Fix: attempt to call a nil value when 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.Filesystem functions
  • Improved Game.LocalPlayer.Inventory module
  • 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.CurrentHunger offset 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.FOV offset can change breaking some functionality

LunaCore 0.11.0

16 Jun 04:52

Choose a tag to compare

LunaCore 0.11.0 Pre-release
Pre-release

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.py python script)
  • Fixed crash when trying to set an invalid field of Game submodules LocalPlayer, LocalPlayer.Camera and World
  • Fix Core.Filesystem.open
  • Added access to extdata:/ to Core.Filesystem.open
  • Added the following methods to files: close, isOpen, isEOF
  • Removed string.split as 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 check string_utils.lua in examples
  • Added the following functions to Core.Filesystem: fileExists, directoryExists, getDirectoryElements, createDirectory
  • Added module Core.Memory with read/write functions for U32, U16, U8, Float, Double, String (usage local val = readType(offset) or local success = writeType(offset, value)) see memory_read_write.lua example

Known bugs

  • When an Async task ends, it will throw an "attempt to call a nil value" error
  • Game.LocalPlayer.CurrentHunger offset 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.FOV offset can switch sometimes

LunaCore 0.10.1

12 Jun 22:20

Choose a tag to compare

LunaCore 0.10.1 Pre-release
Pre-release

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

12 Jun 06:10

Choose a tag to compare

LunaCore 0.10.0 Pre-release
Pre-release

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

05 Jun 22:40

Choose a tag to compare

LunaCore 0.9.0 Pre-release
Pre-release

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

04 Jun 03:00

Choose a tag to compare

LunaCore 0.8.0 Pre-release
Pre-release

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() and Game.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

02 Jun 01:57

Choose a tag to compare

Pre-release

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