Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Witness: New hint type ("area hints") #2494

Merged
merged 121 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 113 commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
707289c
First efforts on area hints
NewSoupVi Nov 20, 2023
204eb9f
New hint system finished, doesn't work with Expert or Normal yet
NewSoupVi Nov 20, 2023
0da9c78
Improved wording
NewSoupVi Nov 20, 2023
f1f8bb4
Improvements to natural language, name change, remove print statement
NewSoupVi Nov 20, 2023
920ebf3
Do away with 'River' as a region name
NewSoupVi Nov 21, 2023
c54ec35
Probably just call it boat like the checks in the region
NewSoupVi Nov 21, 2023
ba541c8
LISTEN MEDIC OK YOU'RE RIGHT
NewSoupVi Nov 21, 2023
3e29dff
Docstring
NewSoupVi Nov 21, 2023
03bd616
Modify docstring
NewSoupVi Nov 21, 2023
59e324a
duplicate word
NewSoupVi Nov 21, 2023
922c808
Keep -> Outside Keep on the flowers checks
NewSoupVi Nov 21, 2023
5f3d2f0
Fix for not created regions
NewSoupVi Nov 24, 2023
805ff50
Move all Monastery EPs to Monastery area
NewSoupVi Nov 24, 2023
8c1fec3
Move Windmill Entry Panel to Windmill region
NewSoupVi Nov 24, 2023
4e5dce5
oops
NewSoupVi Nov 24, 2023
a017f04
Areas for Expert and Vanilla as well
NewSoupVi Nov 24, 2023
e068389
allow combining hint types & make areas less likely to be hinted if t…
NewSoupVi Nov 24, 2023
089ddfc
fix for 0 of a hint type
NewSoupVi Nov 24, 2023
182ae48
Merge branch 'main' into regional_hints
NewSoupVi Nov 24, 2023
81c0025
Bump data version
NewSoupVi Nov 24, 2023
ca41c88
Merge branch 'regional_hints' of https://github.com/NewSoupVi/Archipe…
NewSoupVi Nov 24, 2023
f0b2e72
Failsafes
NewSoupVi Nov 25, 2023
463bae4
Better caching
NewSoupVi Nov 25, 2023
3e0cf74
Another failsafe
NewSoupVi Nov 25, 2023
c638b8d
Better message
NewSoupVi Nov 25, 2023
4cde51d
Fixed name
NewSoupVi Nov 25, 2023
cfdedd7
fixed another name
NewSoupVi Nov 25, 2023
7902d7c
don't overgenerate location hints
NewSoupVi Nov 26, 2023
584f80a
I mean, technically outside swamp is by definition not in swamp
NewSoupVi Nov 26, 2023
b5c610c
We Lingoing now with all these 'Outside _' areas
NewSoupVi Nov 26, 2023
01b2706
Update hints.py
Exempt-Medic Nov 26, 2023
efd0e48
Merge pull request #13 from Exempt-Medic/patch-33
NewSoupVi Nov 26, 2023
15c912f
The other player vs other players
NewSoupVi Nov 26, 2023
dc71dbb
oops
NewSoupVi Nov 26, 2023
26ae9f4
Merge branch 'regional_hints' of https://github.com/NewSoupVi/Archipe…
NewSoupVi Nov 26, 2023
93df37f
Prevent 'All of them are for this world, all of them are lasers for t…
NewSoupVi Nov 28, 2023
1ac53af
that was not how to do that
NewSoupVi Nov 28, 2023
2d13938
Bruh
NewSoupVi Nov 28, 2023
6af4244
Also do it for this
NewSoupVi Nov 28, 2023
b003856
Refactor hints code
NewSoupVi Nov 29, 2023
d91d0da
oop
NewSoupVi Nov 29, 2023
809ef25
refactor refactor refactor
NewSoupVi Nov 29, 2023
28ea1ea
Some comments
NewSoupVi Nov 29, 2023
bac75dd
More refactoring
NewSoupVi Nov 29, 2023
9998fc8
Prevent hinting from already hinted areas
NewSoupVi Nov 29, 2023
8cbeefb
Make it try to reuse always hints
NewSoupVi Nov 29, 2023
5a1c3b6
oop
NewSoupVi Nov 29, 2023
e126b24
remove some unnecessary definitions
NewSoupVi Nov 29, 2023
bd00cc3
Actually check all cases lmfao
NewSoupVi Nov 30, 2023
ed3f8d2
location name groups
NewSoupVi Nov 30, 2023
28b6194
Rename some Rivers to Jungles
NewSoupVi Nov 30, 2023
63e0b34
Some area changes
NewSoupVi Nov 30, 2023
d238c34
oop
NewSoupVi Nov 30, 2023
afeec3f
Tutorial First Hallway
NewSoupVi Nov 30, 2023
27a2b13
oop
NewSoupVi Nov 30, 2023
9dc7577
actually don't be dumb
NewSoupVi Nov 30, 2023
7bb6523
dafuq did I do
NewSoupVi Nov 30, 2023
76bf01c
bruh
NewSoupVi Nov 30, 2023
a4f1dc3
Consider Tutorial locations in sphere 1 'hinted' from the start
NewSoupVi Nov 30, 2023
9009c75
This is better
NewSoupVi Nov 30, 2023
1ce320a
More consistency
NewSoupVi Nov 30, 2023
c782c43
Made patio floor and flowers priority hint locations
NewSoupVi Nov 30, 2023
0bb9537
More Tutorial renaming
NewSoupVi Nov 30, 2023
5be2153
Jungle Bamboo
NewSoupVi Nov 30, 2023
86f95ea
Move Windmill EPs to Windmill area
NewSoupVi Nov 30, 2023
64a8ed4
Merge remote-tracking branch 'upstream/main' into regional_hints
NewSoupVi Dec 31, 2023
d925dc7
oops
NewSoupVi Dec 31, 2023
7ffbc20
Wake up honey it's another regional hints revamp
NewSoupVi Jan 1, 2024
0fd0823
don't shadow variable name
NewSoupVi Jan 1, 2024
3627511
Treehouse Laser House Door is not a Laser
NewSoupVi Jan 5, 2024
a50a6cd
oops
NewSoupVi Jan 5, 2024
2ccaed5
Merge remote-tracking branch 'upstream/main' into regional_hints
NewSoupVi Jan 5, 2024
46f1f6a
The Dots got lost
NewSoupVi Jan 5, 2024
2dc7e7b
I just want the damn green checkmark back :(((
NewSoupVi Jan 6, 2024
fa6468c
Change some region names bc why not
NewSoupVi Jan 8, 2024
d0999c4
Merge remote-tracking branch 'upstream/main' into regional_hints
NewSoupVi Jan 16, 2024
8ea20a3
Some region renaming
NewSoupVi Jan 26, 2024
890aecb
Merge remote-tracking branch 'upstream/main' into regional_hints
NewSoupVi Jan 26, 2024
f512cb5
That's a great point
NewSoupVi Jan 26, 2024
5fedc91
oops
NewSoupVi Jan 26, 2024
4aa000e
Find & Replace go brr hopefully that didn't break anything lmfao
NewSoupVi Jan 26, 2024
69c2573
Town RGB House renaming
NewSoupVi Jan 26, 2024
5418bd0
Oops Sound Room
NewSoupVi Jan 26, 2024
6f30c1f
Lol
NewSoupVi Jan 26, 2024
eb661e1
Is that... right... now???
NewSoupVi Jan 26, 2024
5f948b4
This is probably a bit more clear
NewSoupVi Jan 26, 2024
59450f3
This code was so broken wtf
NewSoupVi Jan 27, 2024
26bab77
This is better I think
NewSoupVi Jan 27, 2024
824891d
Bring Jungle Vault region name in line with location name change
NewSoupVi Jan 27, 2024
f61e2da
Add Bunker Cyan Room
NewSoupVi Jan 27, 2024
9540158
region rename
NewSoupVi Feb 4, 2024
a280f29
What if we ****** on the Treehouse Drawbridge Platform jk unless
NewSoupVi Feb 4, 2024
02af938
I think this is fine???
NewSoupVi Feb 5, 2024
e53d30b
I deleted that what the heck
NewSoupVi Feb 5, 2024
21ce94b
Merge remote-tracking branch 'upstream/main' into regional_hints
NewSoupVi Feb 11, 2024
77c716b
Send more information about hinted locations to client
NewSoupVi Feb 11, 2024
6cab4af
Give me my checkmark back
NewSoupVi Feb 11, 2024
48edd23
Remove some unused imports
NewSoupVi Feb 11, 2024
a518065
Fix a renaming conflict
NewSoupVi Feb 11, 2024
f5cca7f
What was I cooking lmfao
NewSoupVi Feb 13, 2024
1a713e8
Update worlds/witness/hints.py
NewSoupVi Feb 13, 2024
40b6bbb
Merge remote-tracking branch 'upstream/main' into regional_hints
NewSoupVi Feb 14, 2024
95ff4e8
item.advancement
NewSoupVi Feb 14, 2024
6020853
comment
NewSoupVi Feb 14, 2024
3ed517b
Update worlds/witness/hints.py
NewSoupVi Feb 14, 2024
12fb5ee
ლ(ಠ_ಠლ)
NewSoupVi Feb 14, 2024
c089b8b
remove unused import
NewSoupVi Feb 14, 2024
886924c
Add area info to hints
NewSoupVi Feb 21, 2024
f45a59a
Disambiguate between message line and area hint
NewSoupVi Feb 21, 2024
3bac914
Add area progression amount info as well
NewSoupVi Feb 22, 2024
8c1ec83
Add area hint percentage to presets
NewSoupVi Feb 24, 2024
8a4e78c
Make default hints 8 location hints and 4 area hints
NewSoupVi Feb 24, 2024
e2068bb
Merge branch 'main' into regional_hints
NewSoupVi Feb 25, 2024
354dbae
Prevent crash in a game with few locations
NewSoupVi Feb 26, 2024
1f4e581
change comment slightly
NewSoupVi Feb 26, 2024
7c1f47f
formatting again
NewSoupVi Feb 26, 2024
2721fbf
this is no longer necessary
NewSoupVi Feb 26, 2024
ca9c698
Update worlds/witness/hints.py
NewSoupVi Feb 26, 2024
7fd5cbb
That EP only exists if disable non randomized is off
NewSoupVi Feb 26, 2024
3923fd9
That's also not where that's supposed to be lol
NewSoupVi Feb 26, 2024
b4f6cc0
Change Obelisk hint conditions to just directly check for the EP
NewSoupVi Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions worlds/witness/WitnessItems.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Jokes:

Doors:
1100 - Glass Factory Entry (Panel) - 0x01A54
1101 - Tutorial Outpost Entry (Panel) - 0x0A171
1102 - Tutorial Outpost Exit (Panel) - 0x04CA4
1101 - Outside Tutorial Outpost Entry (Panel) - 0x0A171
1102 - Outside Tutorial Outpost Exit (Panel) - 0x04CA4
1105 - Symmetry Island Lower (Panel) - 0x000B0
1107 - Symmetry Island Upper (Panel) - 0x1C349
1108 - Desert Surface 3 Control (Panel) - 0x09FA0
Expand Down Expand Up @@ -168,9 +168,9 @@ Doors:
1750 - Theater Entry (Door) - 0x17F88
1753 - Theater Exit Left (Door) - 0x0A16D
1756 - Theater Exit Right (Door) - 0x3CCDF
1759 - Jungle Bamboo Laser Shortcut (Door) - 0x3873B
1759 - Jungle Laser Shortcut (Door) - 0x3873B
1760 - Jungle Popup Wall (Door) - 0x1475B
1762 - River Monastery Garden Shortcut (Door) - 0x0CF2A
1762 - Jungle Monastery Garden Shortcut (Door) - 0x0CF2A
1765 - Bunker Entry (Door) - 0x0C2A4
1768 - Bunker Tinted Glass Door - 0x17C79
1771 - Bunker UV Room Entry (Door) - 0x0C2A3
Expand All @@ -195,7 +195,7 @@ Doors:
1828 - Mountain Floor 2 Exit (Door) - 0x09EDD
1831 - Mountain Floor 2 Staircase Far (Door) - 0x09E07
1834 - Mountain Bottom Floor Giant Puzzle Exit (Door) - 0x09F89
1840 - Mountain Bottom Floor Final Room Entry (Door) - 0x0C141
1840 - Mountain Bottom Floor Pillars Room Entry (Door) - 0x0C141
1843 - Mountain Bottom Floor Rock (Door) - 0x17F33
1846 - Caves Entry (Door) - 0x2D77D
1849 - Caves Pillar Door - 0x019A5
Expand Down Expand Up @@ -247,7 +247,7 @@ Doors:
2035 - Mountain & Caves Control Panels - 0x09ED8,0x09E86,0x09E39,0x09EEB,0x335AB,0x335AC,0x3369D

2100 - Symmetry Island Panels - 0x1C349,0x000B0
2101 - Tutorial Outpost Panels - 0x0A171,0x04CA4
2101 - Outside Tutorial Outpost Panels - 0x0A171,0x04CA4
2105 - Desert Panels - 0x09FAA,0x1C2DF,0x1831E,0x1C260,0x1831C,0x1C2F3,0x1831D,0x1C2B1,0x1831B,0x0C339,0x0A249,0x0A015,0x09FA0,0x09F86
2110 - Quarry Outside Panels - 0x17C09,0x09E57,0x17CC4
2115 - Quarry Stoneworks Panels - 0x01E5A,0x01E59,0x03678,0x03676,0x03679,0x03675
Expand Down
346 changes: 205 additions & 141 deletions worlds/witness/WitnessLogic.txt

Large diffs are not rendered by default.

346 changes: 205 additions & 141 deletions worlds/witness/WitnessLogicExpert.txt

Large diffs are not rendered by default.

346 changes: 205 additions & 141 deletions worlds/witness/WitnessLogicVanilla.txt

Large diffs are not rendered by default.

35 changes: 24 additions & 11 deletions worlds/witness/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
Archipelago init file for The Witness
"""
import dataclasses
from typing import Dict, Optional

from typing import Dict, Optional
from BaseClasses import Region, Location, MultiWorld, Item, Entrance, Tutorial, CollectionState
from Options import PerGameCommonOptions, Toggle
from .presets import witness_option_presets
from .hints import get_always_hint_locations, get_always_hint_items, get_priority_hint_locations, \
get_priority_hint_items, make_hints, generate_joke_hints
from worlds.AutoWorld import World, WebWorld
from .player_logic import WitnessPlayerLogic
from .static_logic import StaticWitnessLogic
from .hints import get_always_hint_locations, get_always_hint_items, get_priority_hint_locations, \
get_priority_hint_items, make_always_and_priority_hints, generate_joke_hints, make_area_hints, get_hintable_areas, \
make_extra_location_hints, create_all_hints
from .locations import WitnessPlayerLocations, StaticWitnessLocations
from .items import WitnessItem, StaticWitnessItems, WitnessPlayerItems, ItemData
from .regions import WitnessRegions
Expand Down Expand Up @@ -57,6 +58,7 @@ class WitnessWorld(World):
}
location_name_to_id = StaticWitnessLocations.ALL_LOCATIONS_TO_ID
item_name_groups = StaticWitnessItems.item_groups
location_name_groups = StaticWitnessLocations.AREA_LOCATION_GROUPS

required_client_version = (0, 4, 4)

Expand Down Expand Up @@ -191,8 +193,8 @@ def create_regions(self):
# Then, add checks in order until the required amount of sphere 1 checks is met.

extra_checks = [
("First Hallway Room", "First Hallway Bend"),
("First Hallway", "First Hallway Straight"),
("Tutorial First Hallway Room", "Tutorial First Hallway Bend"),
("Tutorial First Hallway", "Tutorial First Hallway Straight"),
("Desert Outside", "Desert Surface 1"),
("Desert Outside", "Desert Surface 2"),
]
Expand Down Expand Up @@ -277,26 +279,37 @@ def fill_slot_data(self) -> dict:
hint_amount = self.options.hint_amount.value

credits_hint = (
"This Randomizer is brought to you by",
"NewSoupVi, Jarno, blastron,",
"jbzdarkid, sigma144, IHNN, oddGarrett, Exempt-Medic.", -1
"This Randomizer is brought to you by\n"
"NewSoupVi, Jarno, blastron,\n",
"jbzdarkid, sigma144, IHNN, oddGarrett, Exempt-Medic.", -1, -1
)

audio_logs = get_audio_logs().copy()

if hint_amount:
generated_hints = make_hints(self, hint_amount, self.own_itempool)
area_hints = round(self.options.area_hint_percentage / 100 * hint_amount)

generated_hints = create_all_hints(self, hint_amount, area_hints)

self.random.shuffle(audio_logs)

duplicates = min(3, len(audio_logs) // hint_amount)

for _ in range(0, hint_amount):
for _ in range(0, len(generated_hints)):
hint = generated_hints.pop(0)

location = hint.location
area_amount = hint.area_amount

# None if junk hint, address if location hint, area string if area hint
arg_1 = location.address if location else (hint.area if hint.area else None)

# self.player if junk hint, player if location hint, progression amount if area hint
arg_2 = area_amount if area_amount is not None else (location.player if location else self.player)

for _ in range(0, duplicates):
audio_log = audio_logs.pop()
self.log_ids_to_hints[int(audio_log, 16)] = hint
self.log_ids_to_hints[int(audio_log, 16)] = (hint.wording, arg_1, arg_2)

if audio_logs:
audio_log = audio_logs.pop()
Expand Down
Loading
Loading