Skip to content

Commit 901201f

Browse files
authored
Noita: Don't allow impossible slot names (#2608)
* Noita: Add note about allowable slot names * Update character list * Update init to raise an exception if a yaml has bad characters * Slightly adjust exception message
1 parent c7617f9 commit 901201f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

worlds/noita/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ class NoitaWorld(World):
3535

3636
web = NoitaWeb()
3737

38+
def generate_early(self):
39+
if not self.multiworld.get_player_name(self.player).isascii():
40+
raise Exception("Noita yaml's slot name has invalid character(s).")
41+
3842
# Returned items will be sent over to the client
3943
def fill_slot_data(self):
4044
return {name: getattr(self.multiworld, name)[self.player].value for name in self.option_definitions}

worlds/noita/docs/setup_en.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ or try restarting your game.
4040
### What is a YAML and why do I need one?
4141
You can see the [basic multiworld setup guide](/tutorial/Archipelago/setup/en) here on the Archipelago website to learn
4242
about why Archipelago uses YAML files and what they're for.
43+
Please note that Noita only allows you to type certain characters for your slot name.
44+
These characters are: `` !#$%&'()+,-.0123456789;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{}~<>|\/``
4345

4446
### Where do I get a YAML?
4547
You can use the [game settings page for Noita](/games/Noita/player-settings) here on the Archipelago website to
@@ -54,4 +56,4 @@ Place the unzipped pack in the `packs` folder. Then, open Poptracker and open th
5456
Click on the "AP" symbol at the top, then enter the desired address, slot name, and password.
5557

5658
That's all you need for it. It will provide you with a quick reference to see which checks you've done and
57-
which checks you still have left.
59+
which checks you still have left.

0 commit comments

Comments
 (0)