Code Monkey home page Code Monkey logo

noita-tools's Introduction

Noitool

A web app for many things Noita.

Helps you get a specific seed for your specific needs.

Current features include:

  • Holy mountain info
  • Shop type and contents
  • Pacifist chest contents
  • Perks and perk rerolls
  • Starting setup
  • Water Cave layout
  • Lively Concoction and Alchemic Precursor recipes
  • Fungal Shifts
  • Live seed checking during play using machine learning computer vision
  • Seed search with customizable complexity

Connecting as a compute node

Prerequisites

  • The machine should have node installed (ideally v18.6+) and npm.
  • Follow to https://www.noitool.com/?profile=true and link your patreon account. Under your patreon username, there will now be an id like 6456aff2478c4f8f91701018

Installing and connecting

Docker

You can use docker to simply spin up a compute node:

docker run -it -e NOITOOL_USER_ID=xxx ghcr.io/twoabove/noitool-console-search:latest

Or for dev

docker run -it -e NOITOOL_USER_ID=xxx -e NOITOOL_URL=https://dev.noitool.com/ ghcr.io/twoabove/noitool-console-search:latest-dev

CLI

To connect to noitool as a compute node, follow these steps:

git clone https://github.com/TwoAbove/noita-tools.git
cd noita-tools
git checkout master # for https://www.noitool.com
# git checkout develop # for https://dev.noitool.com
npm install --frozen-lockfile
npm run console-build
npm run console-search --userId <your id>

console-search args (or env vars):

  • --url NOITOOL_URL: default https://www.noitool.com/. Change to https://dev.noitool.com/ for the dev build
  • --cores NOITOOL_CORES: default os.cpus(). The amount of cores to use.
  • --userId NOITOOL_USER_ID: The user to connect as.
  • --exit NOITOOL_EXIT default false. Add if you want the worker to exit if there are no more jobs.
  • --minRunTime NOITOOL_MIN_RUN_TIME default 0. This minimum amount of time (in seconds) that the worker will run for. If there are no more jobs, it will exit after this time. A value of 0 means that this is disabled.

Automating deployment of Noitool to several machines

You can use the deploy_to_servers.sh script to deploy to several machines. You need to create .servers file with the following format:

user@server1,,main_user_id
user@server2,dev_user_id,

This way you can choose which user to connect as on which server and which Noitool instance to connect to. Note the missing entry for the dev user id on server1 and the missing entry for the main user id on server2. That means that server 1 will connect to the main instance and server 2 will connect to the dev instance without both searchers competing for CPU time.

Then run ./deploy_to_servers.sh to deploy to all servers.

Technical details and implementation details that I found interesting

WASM is shaping up to be a very interesting technology. In our use-case, the communication overhead of JS <-> WASM is usually worth it, but it's the main vector of performance improvements, since we're constantly bouncing between JS and WASM for noita_random calls.

Many parts of the critical core game functions that are needed to generate everything are written in C++. The c++ code is then compiled to wasm and is run in web workers (and partly in the main thread). The performance improvements are 20-fold by transferring seed functions (like randoms and lc & ap recipes) from a typescript implementation to c++, even with the call overhead from worker -> wasm code.

In Noita, for map generation, wang tiles are used. In lua/xml code, ARGB color formats are used for color targeting. In browsers, in general, RGBA is used. The transformed colors (in data json) use RGBA to homogenize color format.

Credits to the developers of similar tools: The code for finding LC and AP values was transferred from noita_unicorn's Program.cs from c# to c++. Also, I took inspiration from cr4xy for extra features. You rock! <3

Development

I use linux or mac for development, so I can't guarantee that everything works on windows. On windows, you can use WSL2 to run the dev environment.

Prerequisites:

  • Docker (for compose)
  • Node
  • chokidar (npm install -g chokidar-cli)
  • emscripten is installed if you want to work with the c++ code
  • Nota data if you want to modify the data files

Before running npm run dev, please copy the .env.example file to .env.local and fill in the values. For non-patreon and discord features, you can leave the file as-is.

Also, run docker compose up -d to easily spin up a local db instance.

Noita data

You will need to unpack Noita wak data (see here) and copy/link several things into the dataScripts/noita-data folder. Note that translations and fonts are in the main Noita folder, not in the Nolla_Games_Noita folder. Here is the list: data, translations, fonts.

To create a symlink, run ln -s <path to noita data> dataScripts/noita-data/data. For debian, that would be

ln -s ~/.steam/debian-installation/steamapps/compatdata/881100/pfx/drive_c/users/steamuser/AppData/LocalLow/Nolla_Games_Noita/data dataScripts/noita-data/data
ln -s ~/.steam/debian-installation/steamapps/common/Noita/data/translations dataScripts/noita-data/translations
ln -s ~/.steam/debian-installation/steamapps/common/Noita/data/fonts dataScripts/noita-data/fonts

Use the ./dataScripts/full_parse.sh script to clean and parse the data files.

For emscripten, some edits need to be done to enable the closure compiler:

emscripten installation and required changes

I recommend using the git repo to install emsdk. Install the latest version.

Installation (after emscripten): npm i

When running npm run dev a build script will listen to changes in .cpp files and rebuild the wasm files.

For vscode to work with the c++ files, install the c++ extension.

Then, go to C/C++: Edit configurations (UI) and add <emscripten installation path>/upstream/emscripten/cache/** to Include path so that vscode can find the emscripten headers.

noita-tools's People

Contributors

danielniccoli avatar dependabot[bot] avatar loonybtard avatar quiddity-wp avatar roxolasu avatar twoabove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

noita-tools's Issues

Incompatible spells in shop

Describe the bug

level 3 shop spells list includes some spells which aren't available in that shop.

To Reproduce

See photo. 'Touch of' spells aren't available in the level 3 shop.

Expected behavior

Only items in shop that are supposed to be available

Screenshots

image

Perk Deck Display

Similar to what c4xy's tool does, just displaying the 109 perks that loop and load up in the world.

Suggestion: Support for Gamble Perk

Hi, great tool, I've been using it a lot lately. Would it be possible to get support for recalculating the perks in holy mounts when you take the Gamble perk similar to how it does so for Extra Perk? To clarify, taking the Gamble perk gives you the first two perks from the next Holy Mountain, so if you intend to get this perk on a run, an end user has to mentally shift all future perks over two slots in your tool. It would be nice if clicking the Gamble perk in the interface would do this automatically.

Invisible spells in spell shop select menu

Describe the bug

Maybe not a bug but it definitely isn't right.
The white background on the spell select screen makes several spells invisible.

To Reproduce

See photo

Expected behavior

A darker background would make sense since otherwise you just can't tell what some of the spells are supposed to be

Screenshots

image

BUG - Alchemy Search Tool does not return expected result

Describe the bug
The seed searcher alchemy tool does not actually return valid search results. As an example, seed 1604384851 has Water+Blood+Toxic Sludge as the alchemical precursor recipe, but when searching for Blood and Water recipes, it does not come back as a result.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the "Search for Seed Tab" and enable an Alchemy search
  2. Click on 'Blood' and 'Water' as the two alchemy ingredients in the 4th column
  3. Enter a number less than 1604384851 as the search start seed. I used 1604384850
  4. Start search

Expected behavior
A clear and concise description of what you expected to happen.

I expected 1604384851 to be return as a result quickly.

Screenshots
If applicable, screenshots might really help show what/where the bug is.

image

Additional context
Add any other context about the problem here.

QoL change - Alchemy tweaks

Alchemy recipes don't specify if active or non active gunpowder is used, which is important as the active gunpowder can't be used in any alchemy due to not persisting in the world. Also, swamp comes in two flavours - one you get in flasks at the start of game and in pockets in the jungle, and one created along with peat when mixing toxic sludge and mud. I have seen this on seed 1927166435:

image

I don't know what swamp I'd need for the LC here.

Is it possible to specify what materials are the catalysts and what is consumed in the recipes? In alchemy one ingredient is needed in bulk and the other two only need to be sprinkled on.

Selected perks not removed from pool in Advanced mode

You can click perks to apply them but it's odd that certain perks aren't removed from the pool e.g. explosion immunity. Really only has a significant effect when collecting perks while going through multiple parallel worlds to break the reroll machine, but I'd expect the "advanced" mode to be that advanced.

Dark mode

I would really like to have a dark mode since I use this awesome tool with dual screen and it is too bright

BUG - Entire website crashing on certain input

Describe the bug

I'm not sure what exactly is causing the bug, but I can reproduce it on Chrome, Edge, and Tor.
The entire website goes white and then the tab closes after a certain input

To Reproduce

  1. Enter seed '975858680'
  2. Click 'advanced'
  3. get to second holy mountain, click the perk lottery
  4. click to roll the shop
  5. the whole site crashes

Additional context

After crashing the site wont load again.

Browser (Chrome) hanging after using Advanced Mode

I activated advanced mode in the Live Seed Data tab, then clicked [load] for the second HM. The page immediately went blank except for the background color. After reloading the page, I tried to capture the game and the browser stopped responding. I had to end the process and restart Chrome.

BUG - [Search by Alchemy not returning results]

Describe the bug

When attempting to search for seeds by parameters of alchemy ingredients, results will not return, regardless of seed start or end point (if included), Multithreading setting, or ingredient selection. The status of a search will display, but will not return results, even after search finishes.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Search For Seed, Alchemy'
  2. Click on 'Any combination of ingredients, Enter any seed range, click Find Next '
  3. Scroll down to 'Bottom of Page'
  4. See error: No results appear.

Expected behavior

A search will run from the start seed to (optional) end seed, and will display progress, but will not yield any results for the search, as are returned when searching by other, non-alchemy, parameters.

Screenshots

Additional context

I'm running on Kubuntu 20.04 Linux with a Ryzen 3700x 8-core cpu.
This behavior occurs on both Mozilla Firefox and Google Chrome.

Second Shift Incorrect?

So I'm playing 1167871042 and the first shift worked as expected Oil,Swamp,Peat to Poison/Flask (used a flask). But on the second shift weird fungus turned to blood (bummer). What the tool predicted was Freezing Liquid,Worm Blood to Fungus Blood. So it almost seems like this was reversed or something? I had a pouch of weird fungus but not in my hands, in case that's relevant.

browser hanging after using advanced mode

I activated advanced mode in the Live Seed Data tab, then clicked [load] for the second HM. The page immediately went blank except for the background color. After reloading the page, I tried to capture the game and the browser stopped responding

BUG - Live Game Helper doesn't load new seed

Describe the bug

Live Game Helper does not try to load new seed
it loads the first seed right after enabling screen capture just fine

To Reproduce

Start screen capture
wait for it to load first seed
load a new seed
nothing happens

Expected behavior

should try to read the new seed

I'm not sure if I'm doing it right or it's not yet implemented because of beta

maybe a shortcut/button to manually refresh it would be nice

Better names for materials?

If you don't know a ton about the game, names like water_ice and blood_worm might be a bit confusing. Although only specifically water_ice, is that just ice?

Multithreading broken

Multi threading broken lol

For example, it will take longer to find seeds, missing seeds that fit the requirements, and the seeds that it does find are often wrong.

Missing a seed that fits the requirements:
image

Cross checking the seed it gives in this example with what the checker says:
image

BUG - Perk availability doesn't update

Describe the bug

Perk availability in the following Holy Mountains does't update if you get "Extra Perk" with a "Gamble".

To Reproduce

You can observe this behaviour in the seed 933195064, both with and without the "Advanced" mode:

  1. Load the seed 933195064
  2. Reroll the first Holy Mountain to get the Gamble perk
  3. Select it

Expected behavior

Every following Holy Mountain should now have 4 perks each. Instead there have only 3.

Screenshots

image

UI Arrangement Suggestions

I think rearranging the Live Seed Data tab might make it easier to use. Having the capture button near the top with a refresh button next to it would be great. Also moving the Alchemy Recipes section below the perks and the biome modifiers below the Alchemy section would help reduce the length of the website by a large margin, since the Fungal Shifts take up nearly twice the space the other three sections do combined.

Incorrect spells in holy mountain

Describe the bug

Items in holy mountain spell shops do not match expected spells

To Reproduce

  1. Have all spells unlocked
  2. Enter a new seed, check expected spells, go to shop
  3. They are not the same (but they are similar)

Expected behavior

They should be the same

Screenshots

On Seed 1611006573
image
image
image

Additional context

running at noitool.com
latest version of noita

Save to accout/file

I would like to open the site and have the perk that I have selected saved as well as the rerolls. So if I close my PC and re-open noitool I don't have to insert manually everything. This might be done either by saving data on the server or even downloading a file that we can re-upload with the information needed to get back the state of noitool when we closed it.

Suggestion - Perk description

Problem:

Sometimes I either forgot what some perks do or either don't know how to differentiate the perks. For example, I always think that this perk will give me more money, but actually allow a extra item to spawn in the holy mountain:

image

P.S.: it's weird that hovering the perk icons in "Show perk deck" transforms the default cursor in a clickable cursor icon, but clicking does nothing. Also, I noticed that the alt property in the HTML img tag has the perk description, that would be very useful.

Ideas that I had / solution I'd like

I think that the clickable perks in this part are very nice, so I have nothing to do with it:

Screenshot from 2022-04-24 21-09-22


On other hand, the modal that appears in the "Show perk deck" button could be improved.

First I tought "Just hover the icon and the description shows up in some part of the screen instead of just the perk title".

Then I tought "Hey, it would be cool if the modal changed to some some text like description, if the perk is stackable, another perks that sinergize with it, etc". If this would be implemented, I fear that updating these texts could be easily forgot in future patchs or something.

The point above made me think that maybe just a link to a fragment in the noita wiki would be enough (wich has the extra info mentioned above and is updated fairly constantly).

This was just a 3 min brainstorm. Please, tell me what do you think :)

Support for other modes?

Nightmare mode is surprisingly more luck dependant and a tool like that would help a lot!

Would it be a lot of work to implement support for it?

Suggestion - search for seeds that have a potion, item or spell in a level

As in, being able to select a list of things that you want to find in a level (probably the mines), i.e. if you wanted to search for orbs you could search for a seed that has, in the mines, the ingredients for guiding powder and a wand with digging spells. Or search for a seed with a fire stone to evaporate the water in the dark cave, etc. After finding the seed it could show you a list of items per level so you know if there is some rare item in a level.

Also, thanks for making this tool!

Suggestion - always cast support

I have no idea what the dependencies are to determining what the spell given by always cast is, but if it could be reported from the world info already gathered that would be amazing.

Idea

I think it would help if you could see the wands and spells found in the holly mountains

QoL - Option to lock perk rolls to return to a previous mountain to roll.

I am on a run where going to the third mountain for perks is best to collect 'Perk Lottery' and return to a previous mountain and roll to the next.

The Main issue is if I roll on the Third machine, then return to roll the Second machine, the app will roll the third forward.

potential idea could be to have a button, or tick box to lock the mountain as is.
Screenshot 2022-01-13 170153
Screenshot 2022-01-13 170316

The issue lies in Gamble, where actual perks given would be Fungal Disease and Fire, Like this:
image

Thanks, for taking a look! Love the tool!

BUG - selecting a seed history results in a white page and a error in the console.

Description

The seed history function works for half a second but then it turns into a totally white page and a error in the console.

To Reproduce

5d77e448-3ec3-4a9c-9df7-3188b8161e30

  • I entered the website and inserted a seed.
  • Later on, I returned to the site and clicked "Seed History".
  • When I click in any seed, the background seems to load the seed info, but immediately the page goes blank and a error in the console appears:

Screenshot from 2022-04-23 22-49-59

Additional question

If the functionality works for y'all but not for me, there is a chance that only certain numbers throw an error? O.o

Can't reroll in west's worlds

Can't reroll in west's worlds more than 1
And another issues i can't understand what is it
image
It would be cool if we added a title

No update after new game

Whenever I start a new game after dying, the automatic seed detector will not update. I have to manually stop and restart the screen capture to have it rescan the new seed.

BUG - [description]

Describe the bug

Maybe not a bug but it definitely isn't right.
The white background on the spell select screen makes several spells invisible.

To Reproduce

See photo

Expected behavior

A darker background would make sense since otherwise you just can't tell what some of the spells are supposed to be

Screenshots

image

EPIC – Add biome info

Add handling of data/biome/_biomes_all.xml, the creation of rooms, and migrate lua functions for all biomes in that list, and figure out a good way to display this data without porting Noita's engine into the browser.

Notable notes:

  • RegisterSpawnFunction: (hex: number, functionToRun: function) => void; Uses the images in data/wang_tiles/${biome}.png to generate items on those cords (the coords look like they are a square of 10 pixels?, this needs testing)
  • The creation of the levels is somewhere in the exe, so much digging is needed.
  • Since the data jsons are getting large, I think splitting them all and deferring loading is needed now (this will likely at least triple the amount of data sent to the browser)

Suggestion - Ideas for ease of use on random seeds

I use the tool by loading a new game, typing in the seed and seeing if there are any interesting alchemy, perks, or shifts to be had early. For perks, this requires me to check the first 3-4 rerolls to see if perks I like show up, and sometimes to check parallel worlds.

Is it possible to pre select a perk or perks, and a UI element tells me where I can find it? e.g I choose perk lottery and tinker everywhere. I type in the seed I'm using, and the site highlights the tinker perk being in the fourth HM and lottery is just 2 rerolls away. Maybe a small icon next to the reroll up, or just highlighting it green, or a separate box noting where it is.

This could expanded to alchemy and shifts, by selecting materials. I like seeds where poly, lava and acid can be shifted, or where water is an alchemical ingredient (and not something like urine)

Additionally, when typing in a new seed, can the rerolls, perk lottery picks and extra perk picks be automatically reset? I can't see why a user would want to keep the fact they'd rerolled four times, or picked up extra perks in a previous run, when using a new seed.

Finally, the input box for the seed has the option for minus numbers which seems to break the site, and also has up and down arrows to increment the number which I'm not sure is needed!

nevermind im stupid

Screenshot (5)
Screenshot (3)
As you can see, the displayed perks were not what the game actually had. I was looking forward to a god run lol

Noita Tools not calculating the correct recipes in Noita Update 15 (December 2020 build)

Not much to write here, other than the recipe calculations must have changed since the last update to this utility (probably on 1.0 launch?), and the recipes generated by the tool on the https://noita-tools.herokuapp.com/ site are no longer accurate.

I figured I must have been doing something wrong after I managed to gather the ingredients to create Lively Concoction, and nothing was happening, but it had never occurred to me that the calculator was the issue, haha

Neffc's NARG is working with the latest version of the game, so if this tool doesn't get fixed, it's not that big a deal, it's just there are lots of links online to the site when searching for 'noita LC calculator', and it tends to be the first result, so others like myself might get confused as to why it's not working anymore.

Perk lottery feature

just noticed that the perk lottery feature break site in west worlds (select the lottery perk an then anything else and the site reloads itself).
in east ones it doesn't work, won't let you select anything

Not an issue but an idea

First of, the seed finder tool is amazing and I want to say thank you for posting it, you rock.

I just had an idea while I was searching for seeds, what if the program somehow put all the results into a database that people could search through instead of having to wait for the program to check each one sequentially? I understand there's like 4 billion possible seeds so maybe it's not even possible, but it would be amazing if we were able to get results instantly when we're looking for really specific seeds.

[BUG] Seed doen't update - Live game helper

When using the Live game helper I have noticed, that the seed doesn't update when starting a new run in Noita.

It happens all the time and nothing seems to fix it
I´m using it on the newest version of Opera GX (LVL 3 core: 85.0.4341.72)

Suggestion - Search for a number of perks in a deck

Seeing if you could list seeds that have three "extra health" perks in the perk deck, not in a specific holy mountain.

Additionally, highlighting those perks would be a bonus when seeing the perk deck.

BUG - Incorrect spells in holy mountain + webassembly not available

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
Thank you for the great app.

https://noita-tools.herokuapp.com/
Input seed submit button doesn't work on Edge Browser. It works on firefox and chrome.

plus, shop itmes appear on site are completely different from the game.
image

Submit button display below error report.

no native wasm support detected
noita_random.js:11

   Uncaught (in promise) ReferenceError: WebAssembly is not defined
at ee (noita_random.js:11:29531)
at noita_random.js:11:17345
at random.ts:78:38
at l (runtime.js:63:40)
at Generator._invoke (runtime.js:294:22)
at Generator.next (runtime.js:119:21)
at n (asyncToGenerator.js:3:20)
at c (asyncToGenerator.js:25:9)
at asyncToGenerator.js:32:7
at new Promise (<anonymous>)

익명 means "anonymous"
비동기 means "Asynchrony, asynchronous"

image
constant loading.

image
image
image

LCAP Recipes on the Live Helper

I'll preface this that I may just be really dense and missed something obvious, but is it possible to have the Lively Concoction/Alchemic Precursor recipes on the Live Helper? It's a really neat tool, but right now I find myself tabbing out to copy the seed and paste it into a separate tool to get the alchemy recipes, since I don't see them on the Live Helper automatically.

Suggestion - Get seed number by print

Typing the seed number sucks.

I'm a weak noita player, I click "new game" and enter the seed in the browser, if the desired perks or wands aren't there, I start a new world. I'm sure that I'm not the only one who does this. With that said, not typing the seed would be a good enhancement and a cool time saver. Besides the huge improvement in the UX.

For me, the ideal experience would be: I start a new game, push ESC and print entire the screen. In noitool website I have a field where I can load my image (or just CTRL + V it) and the system should be able to get the seed by its own.

I don't know how hard it would be to implement this but it would be great :D What do you guys think, am I dreaming too much or it's a good challenge?

BUG - Several Search Parameters Not Working

Describe the bug

Alchemy, Starting Flask, and the Fungal Shift "To" and "From" fields all stall on a blank, unresponsive page rendering the tools nonfunctional.

To Reproduce

Steps to reproduce the behavior:

  1. Go to "Search for Seed"
  2. Click on "Alchemy", "Starting Flask", or "Fungal Shifts".
  3. Scroll down to (you can't; page becomes unresponsive)
  4. See error

Expected behavior

The page will be blank and unresponsive

Seed Info API call?

Would be pretty cool if we could do a http request to get seedinfo for a specific seed and get a json with the raw data

Or a feature on the website to get a list of all seed numbers matching the criteria
I just want to generate a list of seed numbers to go through, without clicking Find Next all the time ;)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.