Skip to content

Commit 74ac66b

Browse files
Hollow Knight: 0.4.5 doc revamp and default options tweaks (#2982)
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
1 parent 80d7ac4 commit 74ac66b

File tree

3 files changed

+58
-37
lines changed

3 files changed

+58
-37
lines changed

worlds/hk/Options.py

+33-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import typing
2+
import re
23
from .ExtractedData import logic_options, starts, pool_options
34
from .Rules import cost_terms
45

@@ -11,12 +12,16 @@
1112
else:
1213
Random = typing.Any
1314

14-
1515
locations = {"option_" + start: i for i, start in enumerate(starts)}
1616
# This way the dynamic start names are picked up by the MetaClass Choice belongs to
17-
StartLocation = type("StartLocation", (Choice,), {"__module__": __name__, "auto_display_name": False, **locations,
18-
"__doc__": "Choose your start location. "
19-
"This is currently only locked to King's Pass."})
17+
StartLocation = type("StartLocation", (Choice,), {
18+
"__module__": __name__,
19+
"auto_display_name": False,
20+
"display_name": "Start Location",
21+
"__doc__": "Choose your start location. "
22+
"This is currently only locked to King's Pass.",
23+
**locations,
24+
})
2025
del (locations)
2126

2227
option_docstrings = {
@@ -49,8 +54,7 @@
4954
"RandomizeBossEssence": "Randomize boss essence drops, such as those for defeating Warrior Dreams, into the item "
5055
"pool and open their locations\n for randomization.",
5156
"RandomizeGrubs": "Randomize Grubs into the item pool and open their locations for randomization.",
52-
"RandomizeMimics": "Randomize Mimic Grubs into the item pool and open their locations for randomization."
53-
"Mimic Grubs are always placed\n in your own game.",
57+
"RandomizeMimics": "Randomize Mimic Grubs into the item pool and open their locations for randomization.",
5458
"RandomizeMaps": "Randomize Maps into the item pool. This causes Cornifer to give you a message allowing you to see"
5559
" and buy an item\n that is randomized into that location as well.",
5660
"RandomizeStags": "Randomize Stag Stations unlocks into the item pool as well as placing randomized items "
@@ -99,8 +103,12 @@
99103
"RandomizeKeys",
100104
"RandomizeMaskShards",
101105
"RandomizeVesselFragments",
106+
"RandomizeCharmNotches",
102107
"RandomizePaleOre",
103-
"RandomizeRelics"
108+
"RandomizeRancidEggs"
109+
"RandomizeRelics",
110+
"RandomizeStags",
111+
"RandomizeLifebloodCocoons"
104112
}
105113

106114
shop_to_option = {
@@ -117,6 +125,7 @@
117125

118126
hollow_knight_randomize_options: typing.Dict[str, type(Option)] = {}
119127

128+
splitter_pattern = re.compile(r'(?<!^)(?=[A-Z])')
120129
for option_name, option_data in pool_options.items():
121130
extra_data = {"__module__": __name__, "items": option_data[0], "locations": option_data[1]}
122131
if option_name in option_docstrings:
@@ -125,6 +134,7 @@
125134
option = type(option_name, (DefaultOnToggle,), extra_data)
126135
else:
127136
option = type(option_name, (Toggle,), extra_data)
137+
option.display_name = splitter_pattern.sub(" ", option_name)
128138
globals()[option.__name__] = option
129139
hollow_knight_randomize_options[option.__name__] = option
130140

@@ -133,11 +143,14 @@
133143
if option_name in hollow_knight_randomize_options:
134144
continue
135145
extra_data = {"__module__": __name__}
146+
# some options, such as elevator pass, appear in logic_options despite explicitly being
147+
# handled below as classes.
136148
if option_name in option_docstrings:
137149
extra_data["__doc__"] = option_docstrings[option_name]
138150
option = type(option_name, (Toggle,), extra_data)
139-
globals()[option.__name__] = option
140-
hollow_knight_logic_options[option.__name__] = option
151+
option.display_name = splitter_pattern.sub(" ", option_name)
152+
globals()[option.__name__] = option
153+
hollow_knight_logic_options[option.__name__] = option
141154

142155

143156
class RandomizeElevatorPass(Toggle):
@@ -269,11 +282,11 @@ def get_costs(self, random_source: Random) -> typing.List[int]:
269282
random_source.shuffle(charms)
270283
return charms
271284
else:
272-
charms = [0]*self.charm_count
285+
charms = [0] * self.charm_count
273286
for x in range(self.value):
274-
index = random_source.randint(0, self.charm_count-1)
287+
index = random_source.randint(0, self.charm_count - 1)
275288
while charms[index] > 5:
276-
index = random_source.randint(0, self.charm_count-1)
289+
index = random_source.randint(0, self.charm_count - 1)
277290
charms[index] += 1
278291
return charms
279292

@@ -404,6 +417,7 @@ class WhitePalace(Choice):
404417

405418
class ExtraPlatforms(DefaultOnToggle):
406419
"""Places additional platforms to make traveling throughout Hallownest more convenient."""
420+
display_name = "Extra Platforms"
407421

408422

409423
class AddUnshuffledLocations(Toggle):
@@ -413,6 +427,7 @@ class AddUnshuffledLocations(Toggle):
413427
Note: This will increase the number of location checks required to purchase
414428
hints to the total maximum.
415429
"""
430+
display_name = "Add Unshuffled Locations"
416431

417432

418433
class DeathLinkShade(Choice):
@@ -430,6 +445,7 @@ class DeathLinkShade(Choice):
430445
option_shadeless = 1
431446
option_shade = 2
432447
default = 2
448+
display_name = "Deathlink Shade Handling"
433449

434450

435451
class DeathLinkBreaksFragileCharms(Toggle):
@@ -439,6 +455,7 @@ class DeathLinkBreaksFragileCharms(Toggle):
439455
** Self-death fragile charm behavior is not changed; if a self-death normally breaks fragile charms in vanilla, it
440456
will continue to do so.
441457
"""
458+
display_name = "Deathlink Breaks Fragile Charms"
442459

443460

444461
class StartingGeo(Range):
@@ -462,18 +479,20 @@ class CostSanity(Choice):
462479
alias_yes = 1
463480
option_shopsonly = 2
464481
option_notshops = 3
465-
display_name = "Cost Sanity"
482+
display_name = "Costsanity"
466483

467484

468485
class CostSanityHybridChance(Range):
469486
"""The chance that a CostSanity cost will include two components instead of one, e.g. Grubs + Essence"""
470487
range_end = 100
471488
default = 10
489+
display_name = "Costsanity Hybrid Chance"
472490

473491

474492
cost_sanity_weights: typing.Dict[str, type(Option)] = {}
475493
for term, cost in cost_terms.items():
476494
option_name = f"CostSanity{cost.option}Weight"
495+
display_name = f"Costsanity {cost.option} Weight"
477496
extra_data = {
478497
"__module__": __name__, "range_end": 1000,
479498
"__doc__": (
@@ -486,10 +505,10 @@ class CostSanityHybridChance(Range):
486505
extra_data["__doc__"] += " Geo costs will never be chosen for Grubfather, Seer, or Egg Shop."
487506

488507
option = type(option_name, (Range,), extra_data)
508+
option.display_name = display_name
489509
globals()[option.__name__] = option
490510
cost_sanity_weights[option.__name__] = option
491511

492-
493512
hollow_knight_options: typing.Dict[str, type(Option)] = {
494513
**hollow_knight_randomize_options,
495514
RandomizeElevatorPass.__name__: RandomizeElevatorPass,

worlds/hk/docs/en_Hollow Knight.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ config file.
88
## What does randomization do to this game?
99

1010
Randomization swaps around the locations of items. The items being swapped around are chosen within your YAML.
11-
Shop costs are presently always randomized.
11+
Shop costs are presently always randomized. Items which could be randomized, but are not, will remain unmodified in
12+
their usual locations. In particular, when the items at Grubfather and Seer are partially randomized, randomized items
13+
will be obtained from a chest in the room, while unrandomized items will be given by the NPC as normal.
1214

1315
## What Hollow Knight items can appear in other players' worlds?
1416

worlds/hk/docs/setup_en.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,34 @@
33
## Required Software
44
* Download and unzip the Lumafly Mod Manager from the [Lumafly website](https://themulhima.github.io/Lumafly/).
55
* A legal copy of Hollow Knight.
6+
* Steam, Gog, and Xbox Game Pass versions of the game are supported.
7+
* Windows, Mac, and Linux (including Steam Deck) are supported.
68

79
## Installing the Archipelago Mod using Lumafly
810
1. Launch Lumafly and ensure it locates your Hollow Knight installation directory.
911
2. Click the "Install" button near the "Archipelago" mod entry.
1012
* If desired, also install "Archipelago Map Mod" to use as an in-game tracker.
1113
3. Launch the game, you're all set!
1214

13-
### What to do if Lumafly fails to find your XBox Game Pass installation directory
14-
1. Enter the XBox app and move your mouse over "Hollow Knight" on the left sidebar.
15-
2. Click the three points then click "Manage".
16-
3. Go to the "Files" tab and select "Browse...".
17-
4. Click "Hollow Knight", then "Content", then click the path bar and copy it.
18-
5. Run Lumafly as an administrator and, when it asks you for the path, paste what you copied in step 4.
19-
20-
#### Alternative Method:
21-
1. Click on your profile then "Settings".
22-
2. Go to the "General" tab and select "CHANGE FOLDER".
23-
3. Look for a folder where you want to install the game (preferably inside a folder on your desktop) and copy the path.
24-
4. Run Lumafly as an administrator and, when it asks you for the path, paste what you copied in step 3.
25-
26-
Note: The path folder needs to have the "Hollow Knight_Data" folder inside.
15+
### What to do if Lumafly fails to find your installation directory
16+
1. Find the directory manually.
17+
* Xbox Game Pass:
18+
1. Enter the XBox app and move your mouse over "Hollow Knight" on the left sidebar.
19+
2. Click the three points then click "Manage".
20+
3. Go to the "Files" tab and select "Browse...".
21+
4. Click "Hollow Knight", then "Content", then click the path bar and copy it.
22+
* Steam:
23+
1. You likely put your Steam library in a non-standard place. If this is the case, you probably know where
24+
it is. Find your steam library and then find the Hollow Knight folder and copy the path.
25+
* Windows - `C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight`
26+
* Linux/Steam Deck - ~/.local/share/Steam/steamapps/common/Hollow Knight
27+
* Mac - ~/Library/Application Support/Steam/steamapps/common/Hollow Knight/hollow_knight.app
28+
2. Run Lumafly as an administrator and, when it asks you for the path, paste the path you copied.
2729

2830
## Configuring your YAML File
2931
### What is a YAML and why do I need one?
30-
You can see the [basic multiworld setup guide](/tutorial/Archipelago/setup/en) here on the Archipelago website to learn
31-
about why Archipelago uses YAML files and what they're for.
32+
An YAML file is the way that you provide your player options to Archipelago.
33+
See the [basic multiworld setup guide](/tutorial/Archipelago/setup/en) here on the Archipelago website to learn more.
3234

3335
### Where do I get a YAML?
3436
You can use the [game options page for Hollow Knight](/games/Hollow%20Knight/player-options) here on the Archipelago
@@ -44,9 +46,7 @@ website to generate a YAML using a graphical interface.
4446
* If you are waiting for a countdown then wait for it to lapse before hitting Start.
4547
* Or hit Start then pause the game once you're in it.
4648

47-
## Commands
48-
While playing the multiworld you can interact with the server using various commands listed in the
49-
[commands guide](/tutorial/Archipelago/commands/en). As this game does not have an in-game text client at the moment,
50-
You can optionally connect to the multiworld using the text client, which can be found in the
51-
[main Archipelago installation](https://github.com/ArchipelagoMW/Archipelago/releases) as Archipelago Text Client to
52-
enter these commands.
49+
## Hints and other commands
50+
While playing in a multiworld, you can interact with the server using various commands listed in the
51+
[commands guide](/tutorial/Archipelago/commands/en). You can use the Archipelago Text Client to do this,
52+
which is included in the latest release of the [Archipelago software](https://github.com/ArchipelagoMW/Archipelago/releases/latest).

0 commit comments

Comments
 (0)