Commit Graph

93 Commits

Author SHA1 Message Date
99fd8ce94f Add more API functions to wrapper 2022-08-07 22:31:09 +02:00
5884b49518 Prepare for 2.0 release
- Update README.md
- Add "Open stitch directory" button
- Add message box example
- Add example settings
2022-07-30 19:10:48 +02:00
403167b366 Fix compatibility stuff
- Make dofile more conform to standard lua
- Move dofile from live-reload.lua to compatibility.lua
- Let dofile and require throw errors on script errors
- Fix bug in recursion detection
- Remove Noita's dofile annotation
- Fix some EmmyLua annotations
- Improve print replacement
2022-07-30 00:32:11 +02:00
e863ba459b Split UI message text to fit on screen 2022-07-29 22:49:12 +02:00
eb552537c2 Improve capturing
- Center viewport to grid cells, not chunks
- Check window size when taking screenshot
2022-07-29 22:48:42 +02:00
3fa95de8e6 Add capture grid size check
- Check if capture grid size is smaller than the virtual resolution
- Automatically close resolved messages
2022-07-29 20:44:36 +02:00
a2cb806ffa Add progress bar
- Change process runner to return state table
- Add progress bar graphics
- Add progress bar UI
- Fill progress runner context state with more capturing info
2022-07-29 19:42:44 +02:00
014cba54af Add mod setting to hide UI 2022-07-29 17:37:58 +02:00
62142101fc Make fog black 2022-07-29 16:57:45 +02:00
6ab8903c9b Reset virtual offset when no custom resolution is set 2022-07-29 16:34:25 +02:00
9af974cb10 Add more game modifications
- Add more process memory based modifications
- Change virtual offset and border
- Set trailer mode with disable-shaders-gui-ai mod setting
2022-07-29 16:09:38 +02:00
b19c70c9d0 Disable screenshake by default 2022-07-29 15:29:15 +02:00
2f8a8b2718 Update coordinate transformation
- Get rid of hardcoded pixel perfect virtual offset
- Add virtual border parameter
- Update tests
2022-07-29 13:49:15 +02:00
bb6fb51ef9 Fix perk.lua override 2022-07-29 11:51:20 +02:00
b4a0b26dfd Add option to disable most post FX
- Add file patching logic
2022-07-29 11:29:14 +02:00
58803cad1d Add memory manipulation to set specific options
#14
2022-07-29 00:26:57 +02:00
b81fcd8417 Decrease timeout until wiggle 2022-07-28 23:05:25 +02:00
63dd11fd2d Add more checks & Other fixes
- Rename Check:Resolutions to Check:Regular
- Add check for virtual offset
- Add check if specific mod settings are changed
- Revert scope of resolution mod settings to "runtime"
- Add restart request message
- Set virtual and internal resolutions to default if no custom resolution is defined
2022-07-28 22:34:56 +02:00
98f663f200 Add more game modification options 2022-07-28 19:42:43 +02:00
cc7aa35627 Add capture mode to start capture button tooltip 2022-07-28 18:54:44 +02:00
fd7fb31338 Change when CameraBound component is removed
Remove CameraBound component when capturing entities, but not when modifying entities
2022-07-28 17:00:24 +02:00
25a28c8469 Change how DoesWorldExistAt is called
Use Noita's bounds, in the hope that Noita uses the same coordinates for chunk loading.
2022-07-28 14:18:01 +02:00
321208ba8a Query live capture settings while capturing
- Change default capture interval to 30 frames
- Add todo comments
2022-07-28 14:01:44 +02:00
c4e59156c8 Make more clear that force closing noita can corrupt saves 2022-07-28 13:29:10 +02:00
f79d48fdc0 Set camera free based on mod settings 2022-07-28 13:27:02 +02:00
2cd9f1fc76 Always modify Noita's virtual offset 2022-07-28 12:49:03 +02:00
6becf72420 Start entity capturing based on mod settings
- Rename disable-entity-components mod setting to modify-entities
- Add IsPlayer and IsInvisible methods to entity API
- Don't modify the player entity
2022-07-28 12:38:26 +02:00
640a241d38 Implement more capturing modes & Fix spiral 2022-07-28 12:06:47 +02:00
84dba8a9fa Fix ctx.progressCurrent not being set 2022-07-28 11:57:47 +02:00
78b2812593 Display stacktrace with Message:CatchException 2022-07-28 11:56:14 +02:00
6a016ed0b9 Handle newline characters in UI messages 2022-07-28 11:55:34 +02:00
5d7f258973 Show any live reload errors in the user interface 2022-07-28 10:32:23 +02:00
1eb6c10286 Move SuspendDrawing method up 2022-07-28 10:07:47 +02:00
38f83d19c9 Update description of EnableTrailerMode 2022-07-28 10:07:08 +02:00
31fc11ef1b Improve user experience
- Modernise UI, and simplify its logic
- Add UI graphics
- Add modification.lua which contains everything to modify Noita settings
- Add message.lua which handles messages for users
- Add check.lua which checks things, triggers messages and suggest user actions
- Remove ACTIONS category from settings
- Add more live capturing parameters to settings
- Restrict vector input fields in settings
- Rename pixel-size setting to pixel-scale
- Let GetRect return two vectors instead of RECT object
- Add VirtualOffsetPixelPerfect and FullscreenMode field to Coords
- Fix captureScreenshot when the outputPixelScale is 0
- Show runtime errors in UI via message.lua
- Other small fixes
2022-07-28 01:48:49 +02:00
a4314f3e91 Fix missing default interval in LiveReload 2022-07-27 18:19:18 +02:00
6ca93b54d7 Add mod live reload ability
Allow mod to reload script files while Noita is running.
2022-07-27 18:17:26 +02:00
a2f5efc9e6 Rewrite capturing process
- Add process runner library that handles any processes
- Add global namespaces for main files
- Add config.lua and move capture area definitions into there
- Remove CAPTURE_PIXEL_SIZE and CAPTURE_GRID_SIZE variables
- Rename topLeftWorld in screen-capture.lua to topLeftOutput
- Rewrite all capturing processes and let them use the process runner
- Put UI redrawing outside of coroutine
- Clean up not needed stuff and get rid of most global variables
- Change how the UI is suspended when taking screenshots
- Start rewriting UI stuff
- Reformat ui.lua
- Fix comments
2022-07-27 00:06:09 +02:00
635085f923 Fix missing WrapID to Wrap rename 2022-07-26 22:32:47 +02:00
96c2da8f78 Refactor and clean up stuff
- Rename WrapID method to Wrap
- Fix pack function in component.lua
- Change default pixelscale to 1
- Add and fix documentation
2022-07-26 16:33:29 +02:00
175d5ba969 Add virtual offset to coordinate transformation
- Add some general information on Noitas viewport transformation
- Update viewport transformation tests
2022-07-24 22:45:13 +02:00
0126e706cb Update capturing stuff
- Add ability to capture while normally playing
- Calculate capture area based on coordinate transformations
- Improve and simplify captureScreenshot function
- Move dynamic library wrappers into libraries folder
- Update capture.dll to support cropping and resizing
- Recompile capture.dll with newer PureBasic compiler that uses C backend
- Increase capture.dll worker threads to 6
- Increase capture.dll queue size by one
- Add Round and Rounded methods to Vec2
- Split magic number XML files for easier debugging
- Fix some EmmyLua annotations
- And and fix some comments
2022-07-24 22:05:34 +02:00
f2e582622e Add LuaNXML library
- Change VSCode lua addon to not ignore submodules
- Add function to read resolutions from Noita config file
2022-07-23 22:36:14 +02:00
afaedf9159 Add cyclic dependency detection 2022-07-23 21:15:34 +02:00
931c4df18a Refactoring, fixes and cleanup
- Move utils into Noita API wrapper
- Always overwrite require, with a fallback to the original
- Add library directory of mod to package.path, instead of the files directory
- Add Noita data/scripts/lib to package.path
- Fix dofile error handling
- Fix require not working right when module returns false
- Add init.lua to Noita API wrapper, that contains a table of all modules
- Fix Utils.GetSpecialDirectory
- Update README.md
2022-07-23 20:43:04 +02:00
0222350a7f Remove not needed class annotations 2022-07-23 17:57:44 +02:00
98370f6737 Fix some more stuff
- Rename CameraAPI.Pos to CameraAPI.GetPos
- Change some EmmyLua annotations that are supposedly wrong
- Remove debug printing
- Other small fixes
2022-07-23 17:45:06 +02:00
98dfb5fbb0 Cleanup, Refactoring and Fixes
- Remove unused util functions
- Put util stuff into its own namespace
- Move all initialization stuff into root init.lua
- Move progressBarString function into ui.lua
- Fix ffi.load error message
- Fix DebugAPI.BiomeMapGetFilename
- Move JSON lib into Noita API wrapper
- Move Vec2 lib into Noita API wrapper
- Move compatibility stuff into Noita API wrapper
- Emulate package tables if in restricted API mode
- Emulate require if in restricted API mode
- Use require instead of dofile_once everywhere
- Fix WrapID method to accept nil
- Add EmmyLua annotations for the default Noita API
- Add README.md to Noita API wrapper
2022-07-23 17:36:21 +02:00
994c44f1ba Move table.pack replacement into noita-api 2022-07-23 11:39:40 +02:00
2618558942 Remove left over dofile call 2022-07-23 10:59:24 +02:00