Commit Graph

121 Commits

Author SHA1 Message Date
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
508771c347 Clean up 2022-07-23 10:57:25 +02:00
2acc4e7e93 Move hilbert curve lib into library directory 2022-07-23 10:55:44 +02:00
8841a57185 Remove unused entity 2022-07-23 10:12:23 +02:00
3d25084536 Add debug functions to Noita API wrapper 2022-07-23 01:13:51 +02:00
aa99e101b4 Split Noita API wrapper into several files 2022-07-22 21:31:40 +02:00
a30c3b0cbe Add camera functions to Noita API wrapper 2022-07-22 19:10:15 +02:00
43e265dc92 Add pixel perfect coordinates transformations 2022-07-22 19:08:59 +02:00
f7813c0da6 Add 2D vector library 2022-07-22 19:06:18 +02:00
4b869c0944 Move libraries into their own folder 2022-07-21 01:16:23 +02:00
6cf06d42d9 Remove CameraBoundComponent from entites 2022-07-19 18:27:31 +02:00
9f4aa9b038 Fix and update LoadToEntity API wrapper 2022-07-19 18:26:34 +02:00
926aa5bca8 Remove debug message 2022-07-19 13:55:08 +02:00
77bf19acf3 Improve entity capturing
- Set velocity of VelocityComponent to zero
- Prevent some random explosions
- Make entity capture independent of screen capture
2022-07-19 13:50:30 +02:00
98f9c23064 Remove artifical slowdown in capture.lua 2022-07-18 22:54:57 +02:00
8f3ecefa8b Reduce more animations for a cleaner image
- Add override misc\custom_cards\energy_shield.xml
- Add override misc\custom_cards\action.xml
- Add override entities\base_custom_card.xml
- Add override to data/scripts/perks/perk.lua that disables SpriteOffsetAnimatorComponent
- Add WrapID functions to Noita API
- Remove unecessary entity modifications in capture.lua
2022-07-18 22:53:34 +02:00
f58b005155 Several fixes and improvements
- Change vscode Lua runtime to LuaJIT
- Remove worm entity overrides
- Remove preparePlayer() that sets HP and other stuff
- Change how entites are captured
- Increase entity capture radius
- Capture entities as soon as possible
- Modify entites immediately after they are captured
- Make stringArgs in print local
- Fix JSON marshaling of Noita vectors
- Fix NoitaEntity:GetComponents() and NoitaEntity:GetFirstComponent()
- Add varArg support to NoitaComponent:SetValue() and NoitaComponent:ObjectSetValue()
- Update some EmmyLua annotations
- Fix custom GamePrint
- Add table.pack function that is missing in LuaJIT
2022-07-18 22:07:53 +02:00
40f31011e8 Get component values with correct type
#9
2022-07-18 12:55:51 +02:00
e8c6c8bb8f Rename entities file suffix to json 2022-07-18 11:48:49 +02:00
cfe4193974 Move Noita specific stuff out of JSON library
- Add JSON marshal "interface" that objects can implement
- Fix EmmyLua annotation
- Move JSON marshaler into noita-api.lua

#9
2022-07-18 11:47:59 +02:00
833ab41eeb Serialize entities to JSON
- Add JSON library that can marshal Noita entities and components
- Add Noita API wrapper that exposes entities and components as objects
- Change how the entities file is written, to support lightweight and crash proof appending of JSON data

#9
2022-07-18 01:32:44 +02:00
861272187a Change from entityID to tag for deduplication
The entityID is not unique per entity. Entites may get a new ID on reload. Or the same ID will be reused by another entity.

Attach "MapCaptured" tag to visited entities.
2022-07-17 17:26:08 +02:00
303f1a9c90 Capture entities and write into CSV file
Related issue: #9
2022-07-17 16:54:59 +02:00
4551948460 Fix coordinate systems & Prepare for entity output
- More clearly describe which coordinate system is used
- Fix screen coordinates for CAPTURE_PIXEL_SIZE != 1
- Prepare entity output file
- Fix format of comments
2022-07-17 14:39:18 +02:00
6a9c32cd99 Add different capture areas
- "Full" map capture is now "extended" map capture
- Made coordinates align with in-game chunks
- Add images for different capture modes
- Update README.md
- Add AREAS.md
2020-10-20 15:29:28 +02:00
478a6262e8 Fix chunk/pixel alignment
- Adjust coordinates, so that chunks are always in the center of the window
- Modify VIRTUAL_RESOLUTION_OFFSET_X/Y to match window output with expected coordinates
- Fix black line at the bottom of window
- Remove tile bleed/inset while stitching, as it is not needed anymore
2020-10-17 17:27:26 +02:00
151d1d88bd Use DoesWorldExistAt() to speed up capturing
- Remove any delays
- Move UI rendering into capture coroutine, so wait(...) can be reduced
- Use wait(0) instead of wait(1) in coroutines
- Use default value of STREAMING_CHUNK_TARGET
- Don't suggest to change framerate to 600 Hz
- Don't suggest to disable mTrailerMode
- Add "Done!" screen
- Update README.md

fixes #1
fixes #5
2020-06-01 22:40:47 +02:00
8cf480dc37 Optimized parameters
- Reduce CAPTURE_DELAY
- Increase STREAMING_CHUNK_TARGET
2020-05-31 18:00:24 +02:00
24fa53be27 Add countdown to UI 2020-05-31 17:59:36 +02:00
a6ff7f4bf9 Update copyright year 2020-05-30 18:16:50 +02:00
6703074900 Make compatible with nightmare mode
- Remove perks as they are not needed, and not all are available in nightmare mode
2019-11-28 21:05:50 +01:00
6065c26266 Prevent monitor standby & Update README.md 2019-11-03 23:13:55 +01:00
12ea3f83ae Optimizations
- Update README.md
- GameSetCameraPos(x, y) several time while waiting to get all chunks loaded
- Fix tile output coordinates (Top left corner coordinates instead of center)
- Hide some ui parts by default
2019-11-03 00:58:03 +01:00
8cf46232de Several updates
- Add full map capture mode
- Show error on screen if screencapturing failed
- Add additional frame delay for jumps larger than the grid size
- Show progress for map capture mode
- Tweak streaming chunk target
- Update README.md
2019-11-02 21:37:10 +01:00
c87a4d05d0 Several updates
- Change virtual resolution to 1280x720
- Change virtual to screen pixel ratio to 1:1
- Increase grid size to 420
- Make the mod capture only the window (and only the client area)
- Increase STREAMING_CHUNK_TARGET, so that chunks don't unload after some frames
- Add ingame warnings for wrong settings, and information how to fix these
- Update README.md
2019-11-01 02:40:21 +01:00
b923ee6f51 Update capture script
- Make it possible to free roam before capturing
- Show coordinates (Also while capturing)
- Disable grid updates and some other magic number adjustments
2019-10-25 17:29:52 +02:00
1a4700eba3 Make it possible to resume the capture process 2019-10-23 20:03:03 +02:00
117054bdf5 Reduce UI clutter
- Don't create perk icons
- Reduce health
- Adjust capture grid size
2019-10-23 03:25:38 +02:00
607b16e5d2 Update for newest noita
- Disable sandbox limitations
- Refactor some code, clean it up
- Make coroutines work inside the mod
2019-10-22 22:48:43 +02:00
dbcab2ffc6 Start work on tile stitcher 2019-10-21 02:07:39 +02:00
f4db31f7e1 Cleanup 2019-10-20 16:32:48 +02:00
99ad91e67c Several changes
- Don't change effects, as it's not needed anymore
- Add capture library to be loaded by lua (go and PureBasic)
- Modify pixel size, to nicely fit into FullHD
- Move camera instead of player
- Add capturing routine
- Round position to fit into grid, and also render the world pixel perfect
- Add util/helper functions
2019-10-20 16:28:17 +02:00
9b52f9e410 Implement spiral movement
Also:
- Disable polymorphing, teleportation
- Decrease camera smoothing
- Disable infuence of the mouse on the camera
- Disable parallax effect
- Add some useful effects to player
- Increase player HP
2019-10-18 22:35:51 +02:00
5af54b9289 Initial commit 2019-10-18 16:14:06 +02:00