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

KH2: Version 3 #2733

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
162c284
puzzle piece location names
JaredWeakStrike Jan 12, 2024
1cd0a5c
upload changes
JaredWeakStrike Jan 13, 2024
dbedf8b
some addresses
JaredWeakStrike Jan 13, 2024
bb0503e
mapping of all puzzle pieces
JaredWeakStrike Jan 13, 2024
9c07bed
add puzzle pieces to regions
JaredWeakStrike Jan 14, 2024
800cb79
some things
JaredWeakStrike Jan 14, 2024
fa08de6
update to stuff I guess
JaredWeakStrike Jan 15, 2024
140ab7d
puzzle rules
JaredWeakStrike Jan 15, 2024
9a0e9d3
add proper option report
JaredWeakStrike Jan 15, 2024
e38ae14
add puzzle rules
JaredWeakStrike Jan 15, 2024
837729f
remove puzzles
JaredWeakStrike Jan 15, 2024
1115674
fixed it
JaredWeakStrike Jan 15, 2024
6b0606a
check puzzle
JaredWeakStrike Jan 15, 2024
31e092e
actually fix it
JaredWeakStrike Jan 15, 2024
8065cb2
moved puzzles to be in the worlds
JaredWeakStrike Jan 16, 2024
c850363
clean up names and merge conflicst
JaredWeakStrike Jan 16, 2024
c5fe752
Merge remote-tracking branch 'upstream/main' into kh2-puzzle-pieces
JaredWeakStrike Jan 16, 2024
d0315d7
let it run
JaredWeakStrike Jan 16, 2024
3a7490b
force deathlink
JaredWeakStrike Jan 17, 2024
5804ab3
fixes
JaredWeakStrike Jan 17, 2024
9c0c183
no pause death
JaredWeakStrike Jan 17, 2024
eabb45a
lets try this again
JaredWeakStrike Jan 17, 2024
88c5212
at toggle puzzles and fixed deathlink
JaredWeakStrike Jan 18, 2024
908dcfe
reformat
JaredWeakStrike Jan 18, 2024
6cf551d
source
JaredWeakStrike Jan 18, 2024
a42c5fa
fix atlantica puzzles and deathlink toggle
JaredWeakStrike Jan 18, 2024
cf0d142
in game show items start
JaredWeakStrike Jan 19, 2024
402feda
tells game what is sent out
JaredWeakStrike Jan 21, 2024
eb886fb
clean some stuff up
JaredWeakStrike Jan 21, 2024
997103c
clean up imports and fixed atlantica toggle when puzzles are on
JaredWeakStrike Jan 21, 2024
5120672
forgot a bounty
JaredWeakStrike Jan 22, 2024
4a9861c
fix reports and connected typo
JaredWeakStrike Feb 1, 2024
1480d57
final leveling fix
JaredWeakStrike Feb 10, 2024
cec54e0
Update ItemName.py
JaredWeakStrike Feb 11, 2024
429891b
namine sketches
JaredWeakStrike Feb 15, 2024
59c8467
fix yamls
JaredWeakStrike Feb 15, 2024
5caf5b9
shows logic in game
JaredWeakStrike Feb 18, 2024
c081cdf
this for sure works and is for sure tested
JaredWeakStrike Feb 18, 2024
2151bd6
this hopefully works :)
JaredWeakStrike Feb 20, 2024
3302738
moved region to locations to new file
JaredWeakStrike Feb 24, 2024
4a18b4f
fix regions
JaredWeakStrike Feb 24, 2024
400ebc6
:)
JaredWeakStrike Feb 24, 2024
3a0cab4
widepeepohappy
JaredWeakStrike Feb 25, 2024
d1d2fa7
update form fight rules and sys.yml
JaredWeakStrike Feb 25, 2024
c520c86
blame shananananananananas
JaredWeakStrike Feb 28, 2024
947be86
barbosa puzzle pieces
JaredWeakStrike Mar 2, 2024
2cd325b
Rename puzzle pieces to be more consistent with other checks.
gjgfuj Mar 2, 2024
c70fa72
Merge pull request #3 from gjgfuj/kh2-puzzle-pieces
JaredWeakStrike Mar 2, 2024
01726b1
less ugly 100acre puzzle
JaredWeakStrike Mar 2, 2024
755c696
async protection
JaredWeakStrike Mar 11, 2024
6634310
I hate everything
JaredWeakStrike Mar 17, 2024
f24a4f9
part 1 of better logic
JaredWeakStrike Mar 22, 2024
82f720c
some more migration
JaredWeakStrike Mar 26, 2024
3c433c2
Merge branch 'main' into kh2-puzzle-pieces
JaredWeakStrike Apr 16, 2024
af17150
porting more regions over to the proper rule stuff
JaredWeakStrike May 6, 2024
9bffdd9
some more
JaredWeakStrike May 7, 2024
db7dd52
Merge branch 'ArchipelagoMW:main' into kh2-puzzle-pieces
JaredWeakStrike Jun 1, 2024
f5f6f3f
just a little bit more
JaredWeakStrike Jun 1, 2024
db2ade1
one more world copium
JaredWeakStrike Jun 3, 2024
76b97a1
yessir only 4 left
JaredWeakStrike Jun 11, 2024
29d0fbe
Merge remote-tracking branch 'upstream/main' into kh2-puzzle-pieces
JaredWeakStrike Aug 6, 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
252 changes: 228 additions & 24 deletions worlds/kh2/Client.py

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions worlds/kh2/Items.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import typing

from BaseClasses import Item
from .Names import ItemName
from .Subclasses import ItemData

Expand All @@ -27,6 +26,7 @@
ItemName.ProofofPeace: ItemData(1, 595, 0x36B4),
ItemName.PromiseCharm: ItemData(1, 524, 0x3694),
ItemName.NamineSketches: ItemData(1, 368, 0x3642),
"Namine Sketches": ItemData(0, 368, 0x3642), # remove after 4.6
ItemName.CastleKey: ItemData(2, 460, 0x365D), # dummy 13
ItemName.BattlefieldsofWar: ItemData(2, 54, 0x35AE),
ItemName.SwordoftheAncestor: ItemData(2, 55, 0x35AF),
Expand Down Expand Up @@ -349,6 +349,14 @@
ItemName.DriveRecovery: ItemData(1, 252, 0x36BE), # 274,0x3664, pride rock map
ItemName.HighDriveRecovery: ItemData(1, 511, 0x36BF), # 275,0x3665, oasis map
}
# Puzzle_Table = {
# ItemName.AwakeningPuzzlePiece: ItemData(12, 90), # Castle Map
# ItemName.HeartPuzzlePiece: ItemData(12, 90), # Castle Map
# ItemName.FrontierPuzzlePiece: ItemData(12, 90), # Castle Map
# ItemName.DualityPuzzlePiece: ItemData(12, 90), # Castle Map
# ItemName.DaylightPuzzlePiece: ItemData(48, 90), # Castle Map
# ItemName.SunsetPuzzlePiece: ItemData(48, 90), # Castle Map
# }

Events_Table = {
ItemName.HostileProgramEvent,
Expand Down Expand Up @@ -529,6 +537,7 @@
ItemName.Teamwork,
ItemName.TornadoFusion,
ItemName.HadesCupTrophy],
# Puzzle_Table.keys(),
Events_Table]
for item_name in keys
}
Expand Down Expand Up @@ -613,7 +622,7 @@
}

default_itempool_option = {
item_name: ItemData.quantity for dic in [Magic_Table, Progression_Table, Summon_Table, Movement_Table, Forms_Table] for item_name, ItemData in dic.items()
item_name: ItemData.quantity for dic in [Magic_Table, Progression_Table, Summon_Table, Movement_Table, Forms_Table] for item_name, ItemData in dic.items() if ItemData.quantity > 0
}
item_dictionary_table = {
**Reports_Table,
Expand All @@ -635,7 +644,7 @@
**Boosts_Table,
**DonaldAbility_Table,
**GoofyAbility_Table,
**Consumable_Table
**Consumable_Table,
}
filler_items = [ItemName.PowerBoost, ItemName.MagicBoost, ItemName.DefenseBoost, ItemName.APBoost,
ItemName.Potion, ItemName.HiPotion, ItemName.Ether, ItemName.Elixir, ItemName.Megalixir,
Expand Down
266 changes: 228 additions & 38 deletions worlds/kh2/Locations.py

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions worlds/kh2/Names/ItemName.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
IceCream = "Ice Cream"
WaytotheDawn = "Way to the Dawn"
IdentityDisk = "Identity Disk"
NamineSketches = "Namine Sketches"
NamineSketches = "Namine's Sketches"
CastleKey = "Disney Castle Key"
TornPages = "Torn Page"
ValorForm = "Valor Form"
Expand All @@ -38,12 +38,12 @@
FinalForm = "Final Form"
AntiForm = "Anti Form"
# magic and summons
FireElement = "Fire Element"
BlizzardElement = "Blizzard Element"
ThunderElement = "Thunder Element"
CureElement = "Cure Element"
MagnetElement = "Magnet Element"
ReflectElement = "Reflect Element"
FireElement = "Fire Element"
BlizzardElement = "Blizzard Element"
ThunderElement = "Thunder Element"
CureElement = "Cure Element"
MagnetElement = "Magnet Element"
ReflectElement = "Reflect Element"

Genie = "Genie"
PeterPan = "Peter Pan"
Expand Down Expand Up @@ -431,3 +431,10 @@
Axel1Event = "Axel 1 Event"
Axel2Event = "Axel 2 Event"
DataRoxasEvent = "Data Roxas Event"

#AwakeningPuzzlePiece = "Awakening Puzzle Piece"
#HeartPuzzlePiece = "Heart Puzzle Piece"
#FrontierPuzzlePiece = "Frontier Puzzle Piece"
#DualityPuzzlePiece = "Duality Puzzle Piece"
#DaylightPuzzlePiece = "Daylight Puzzle Piece"
#SunsetPuzzlePiece = "Sunset Puzzle Piece"
1,732 changes: 946 additions & 786 deletions worlds/kh2/Names/LocationName.py

Large diffs are not rendered by default.

65 changes: 53 additions & 12 deletions worlds/kh2/Names/RegionName.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
Final = "Final Form"
Summon = "Summons"
# sp
Sp = "Space Paranoids"
Sp = "Space Paranoids 1"
HostileProgram = "Hostile Program"
Sp2 = "Space Paranoids 2"
Mcp = "Master Control Program"
ASLarxene = "AS Larxene"
DataLarxene = "Data Larxene"

# pr
Pr = "Port Royal"
Pr = "Port Royal 1"
Barbosa = "Barbosa"
Pr2 = "Port Royal 2"
GrimReaper1 = "Grim Reaper 1"
GrimReaper2 = "Grim Reaper 2"
DataLuxord = "Data Luxord"

# tt
Tt = "Twilight Town"
Tt = "Twilight Town 1"
Tt2 = "Twilight Town 2"
Tt3 = "Twilight Town 3"
DataAxel = "Data Axel"

# oc
Oc = "Olympus Coliseum"
Oc = "Olympus Coliseum 1"
Cerberus = "Cerberus"
OlympusPete = "Olympus Pete"
Hydra = "Hydra"
Expand All @@ -54,16 +54,16 @@
HadesCups = "Olympus Coliseum Hade's Paradox"

# ht
Ht = "Holloween Town"
Ht = "Halloween Town 1"
PrisonKeeper = "Prison Keeper"
OogieBoogie = "Oogie Boogie"
Ht2 = "Holloween Town 2"
Ht2 = "Halloween Town 2"
Experiment = "The Experiment"
ASVexen = "AS Vexen"
DataVexen = "Data Vexen"

# lod
LoD = "Land of Dragons"
LoD = "Land of Dragons 1"
ShanYu = "Shan Yu"
LoD2 = "Land of Dragons 2"
AnsemRiku = "Ansem Riku"
Expand All @@ -84,7 +84,7 @@
DataXemnas = "Data Xemnas"

# bc
Bc = "Beast's Castle"
Bc = "Beast's Castle 1"
Thresholder = "Thresholder"
Beast = "Beast"
DarkThorn = "Dark Thorn"
Expand All @@ -93,22 +93,22 @@
DataXaldin = "Data Xaldin"

# ag
Ag = "Agrabah"
Ag = "Agrabah 1"
TwinLords = "Twin Lords"
Ag2 = "Agrabah 2"
GenieJafar = "Genie Jafar"
ASLexaeus = "AS Lexaeus"
DataLexaeus = "Data Lexaeus"

# pl
Pl = "Pride Lands"
Pl = "Pride Lands 1"
Scar = "Scar"
Pl2 = "Pride Lands 2"
GroundShaker = "Groundshaker"
DataSaix = "Data Saix"

# hb
Hb = "Hollow Bastion"
Hb = "Hollow Bastion 1"
Hb2 = "Hollow Bastion 2"
HBDemyx = "Hollow Bastion Demyx"
ThousandHeartless = "Thousand Heartless"
Expand Down Expand Up @@ -143,7 +143,6 @@
AtlanticaSongThree = "Atlantica Third Song"
AtlanticaSongFour = "Atlantica Fourth Song"


LevelsVS1 = "Levels Region (1 Visit Locking Item)"
LevelsVS3 = "Levels Region (3 Visit Locking Items)"
LevelsVS6 = "Levels Region (6 Visit Locking Items)"
Expand All @@ -154,3 +153,45 @@
LevelsVS21 = "Levels Region (21 Visit Locking Items)"
LevelsVS24 = "Levels Region (24 Visit Locking Items)"
LevelsVS26 = "Levels Region (26 Visit Locking Items)"

PuzzlePieces = "Puzzle Pieces"

Tt1PuzzlePieces = "Twilight Town 1 Puzzle Pieces"
Tt2PuzzlePieces = "Twilight Town 2 Puzzle Pieces"
Tt3PuzzlePieces = "Twilight Town 3 Puzzle Pieces"
Hb1PuzzlePieces = "Hollow Bastion 1 Puzzle Pieces"
Hb2PuzzlePieces = "Hollow Bastion 2 PuzzlePieces"
PostThousandHeartless = "Hollow Bastion Post Thousand Hearts"
CoRFirstFightPuzzlePieces = "Cavern of Rememberance 1 Puzzle Pieces"
CorSecondFightPuzzlePieces = "Cavern of Rememberance 2 Puzzle Pieces"
LoD1PuzzlePieces = "Land of Dragons 1 Puzzle Pieces"
LoD2PuzzlePieces = "Land of Dragons 2 Puzzle Pieces"
PostStormRiderPuzzlePieces = "Land of Dragons 2 Post Storm Rider Puzzle Pieces"
Bc1PuzzlePieces = "Beast's Castle 1 Puzzle Pieces"
Bc2PuzzlePieces = "Beast's Castle 2 Puzzle Pieces" # post xaldin is the only one
Oc1PuzzlePieces = "Olympus 1 Puzzle Pieces"
DcPuzzlePieces = "Disney Castle Puzzle Pieces"
TrPuzzlePieces = "Timeless River Puzzle Pieces"
Pr1PuzzlePieces = "Port Royal 1 Puzzle Pieces"
BarbosaPuzzlePieces = "Barbosa Puzzle Pieces"
Pr2PuzzlePieces = "Port Royal 2 Puzzle Pieces"
Ag1PuzzlePieces = "Agrabah 1 Puzzle Pieces"
Ag2PuzzlePieces = "Agrabah 2 Puzzle Pieces" # dont need magic for these
Ht1PuzzlePieces = "Halloween Town 1 Puzzle Pieces"
PrisonKeeperPuzzlePieces = "Prison Keeper Puzzle Pieces"
OogieBoogiePuzzlePieces = "Oogie Boogie Puzzle Pieces"
Pl1PuzzlePieces = "Pride Lands 1 Puzzle Pieces"
Sp1PuzzlePieces = "Space Paranoids 1 Puzzle Pieces"
Sp2PuzzlePieces = "Space Paranoids 2 Puzzle Pieces"
TwtnwPuzzlePostRoxas = "The World that Never Was Post Roxas"
TwtnwPuzzlePostXigbar = "The World that Never Was Post Xigbar"
Twtnw3PuzzlePieces = "The World that Never Was 3 Puzzle Pieces"
PoohsPuzzlePieces = "Poohs house Puzzle Piece"
PigletsPuzzlePieces = "Piglets House Puzzle Piece"
RabbitsPuzzlePieces = "Rabbits House Puzzle Piece"
KangasPuzzlePieces = "Kangas House Puzzle Piece"
SpookyCavePuzzlePieces = "Spooky Cave Puzzle Piece"
StarryHillPuzzlePieces = "Starry Hill Puzzle Piece"
At1PuzzlePieces = "Atlantica Puzzle Pieces"

PuzzleRegion = "Puzzles: Jiminy Journal"
107 changes: 85 additions & 22 deletions worlds/kh2/OpenKH.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from .Items import item_dictionary_table
from .Locations import all_locations, SoraLevels, exclusion_table
from .Names import ItemName, LocationName
from .XPValues import lvlStats, formExp, soraExp
from worlds.Files import APContainer

Expand Down Expand Up @@ -54,7 +55,28 @@ def increaseStat(i):
formName = None
levelsetting = list()

# formDict = {1: "Valor", 2: "Wisdom", 3: "Limit", 4: "Master", 5: "Final"}
formDictExp = {
"Valor": self.multiworld.Valor_Form_EXP[self.player].value,
"Wisdom": self.multiworld.Wisdom_Form_EXP[self.player].value,
"Limit": self.multiworld.Limit_Form_EXP[self.player].value,
"Master": self.multiworld.Master_Form_EXP[self.player].value,
"Final": self.multiworld.Final_Form_EXP[self.player].value
}
for form_name, form_exp in formDictExp.items():
data = all_locations[LocationName.Valorlvl2]
self.formattedFmlv[form_name] = []
self.formattedFmlv[form_name].append({
"Ability": 1,
"Experience": int(formExp[form_name][1] / form_exp),
"FormId": data.charName,
"FormLevel": 1,
"GrowthAbilityLevel": 0,
})


if self.options.Keyblade_Minimum.value > self.options.Keyblade_Maximum.value:

logging.info(
f"{self.multiworld.get_file_safe_player_name(self.player)} has Keyblade Minimum greater than Keyblade Maximum")
keyblademin = self.options.Keyblade_Maximum.value
Expand Down Expand Up @@ -140,29 +162,10 @@ def increaseStat(i):
elif data.yml == "Forms":
# loc id is form lvl
# char name is the form name number :)
if data.locid == 2:
formDict = {1: "Valor", 2: "Wisdom", 3: "Limit", 4: "Master", 5: "Final"}
formDictExp = {
1: self.options.Valor_Form_EXP.value,
2: self.options.Wisdom_Form_EXP.value,
3: self.options.Limit_Form_EXP.value,
4: self.options.Master_Form_EXP.value,
5: self.options.Final_Form_EXP.value
}
formexp = formDictExp[data.charName]
formName = formDict[data.charName]
self.formattedFmlv[formName] = []
self.formattedFmlv[formName].append({
"Ability": 1,
"Experience": int(formExp[data.charName][data.locid] / formexp),
"FormId": data.charName,
"FormLevel": 1,
"GrowthAbilityLevel": 0,
})
# row is form column is lvl
self.formattedFmlv[formName].append({
self.formattedFmlv[data.charName].append({
"Ability": itemcode,
"Experience": int(formExp[data.charName][data.locid] / formexp),
"Experience": int(formExp[data.charName][data.locid] / formDictExp[data.charName]),
"FormId": data.charName,
"FormLevel": data.locid,
"GrowthAbilityLevel": 0,
Expand Down Expand Up @@ -368,6 +371,37 @@ def increaseStat(i):
}
]
},
{
'name': 'msg/us/he.bar',
'multi': [
{
'name': 'msg/fr/he.bar'
},
{
'name': 'msg/gr/he.bar'
},
{
'name': 'msg/it/he.bar'
},
{
'name': 'msg/sp/he.bar'
}
],
'method': 'binarc',
'source': [
{
'name': 'he',
'type': 'list',
'method': 'kh2msg',
'source': [
{
'name': 'he.yml',
'language': 'en'
}
]
}
]
},
],
'title': 'Randomizer Seed'
}
Expand Down Expand Up @@ -411,6 +445,34 @@ def increaseStat(i):
'en': f"Your Level Depth is {self.options.LevelDepth.current_option_name}"
}
]
self.fight_and_form_text = [
{
'id': 15121, # poster name
'en': f"Game Options"
},
{
'id': 15122,
'en': f"Fight Logic is {self.options.FightLogic.current_option_name}\n"
f"Auto Form Logic is {self.options.AutoFormLogic.current_option_name}\n"
f"Final Form Logic is {self.options.FinalFormLogic.current_option_name}"
}

]
self.cups_text = [
{
'id': 4043,
'en': f"CupsToggle: {self.options.Cups.current_option_name}"
},
{
'id': 4044,
'en': f"CupsToggle: {self.options.Cups.current_option_name}"
},
{
'id': 4045,
'en': f"CupsToggle: {self.options.Cups.current_option_name}"
},
]

mod_dir = os.path.join(output_directory, mod_name + "_" + Utils.__version__)

self.mod_yml["title"] = f"Randomizer Seed {mod_name}"
Expand All @@ -423,7 +485,8 @@ def increaseStat(i):
"FmlvList.yml": yaml.dump(self.formattedFmlv, line_break="\n"),
"mod.yml": yaml.dump(self.mod_yml, line_break="\n"),
"po.yml": yaml.dump(self.pooh_text, line_break="\n"),
"sys.yml": yaml.dump(self.level_depth_text, line_break="\n"),
"sys.yml": yaml.dump(self.level_depth_text + self.fight_and_form_text, line_break="\n"),
"he.yml": yaml.dump(self.cups_text, line_break="\n")
}

mod = KH2Container(openkhmod, mod_dir, output_directory, self.player,
Expand Down
Loading
Loading