implement golden bugs

This commit is contained in:
gymnast86
2026-04-24 03:25:33 -07:00
parent fccce91ea5
commit 49e8058f4e
5 changed files with 608 additions and 32 deletions
+6
View File
@@ -562,7 +562,13 @@ void daItem_c::procWaitGetDemoEvent() {
return;
}
#if TARGET_PC
// Probably a better way to handle this, but will do for now
// We always want to play the textbox in rando if possible (except for rupees/ammo)
if ((cLib_calcTimer<u8>(&field_0x9c1) == 0 && !randomizer_IsActive()) || checkItemGet(m_itemNo, 1)) {
#else
if (cLib_calcTimer<u8>(&field_0x9c1) == 0 || checkItemGet(m_itemNo, 1)) {
#endif
if (fopAcM_delete(m_item_id)) {
// "Item: Get Item deleted because Get Demo was canceled\n"
OS_REPORT("アイテム:ゲットデモ中止されたので、ゲットアイテム削除しました\n");
+3 -3
View File
@@ -1595,9 +1595,6 @@ u8 dStage_roomControl_c::mNoArcBank;
#endif
static void dStage_actorCreate(stage_actor_data_class* i_actorData, fopAcM_prm_class* i_actorPrm) {
dStage_objectNameInf* actorInf = dStage_searchName(i_actorData->name);
#if TARGET_PC
// If randomizer is active, override the data for this actor if it's in the actorPatches
if (randomizer_IsActive()) {
@@ -1608,11 +1605,14 @@ static void dStage_actorCreate(stage_actor_data_class* i_actorData, fopAcM_prm_c
if (patches.contains(actorKey)) {
const auto& patchedActorData = patches.at(actorKey);
std::memcpy(i_actorPrm, patchedActorData.data() + 8, RandomizerContext::ACTOR_CRC_SIZE - 8);
std::memcpy(i_actorData, patchedActorData.data(), RandomizerContext::ACTOR_CRC_SIZE);
}
}
}
#endif
dStage_objectNameInf* actorInf = dStage_searchName(i_actorData->name);
if (actorInf == NULL) {
OS_REPORT("\x1B""[43;30mStage Actor Name Nothing !! <%s>\n\x1B[m", i_actorData->name);
JKRFree(i_actorPrm);
+7 -4
View File
@@ -63,8 +63,8 @@ namespace dusk {
randoData.mTreasureChestOverrides[stage][tboxId] = itemId;
}
// Rupee Overrides
if (location->HasCategories("Rupee - Freestanding")) {
// Freestanding Overrides
if (location->HasCategories("Rupee - Freestanding") || location->HasCategories("Golden Bug")) {
u8 stage = metaData[0]["Stage"].as<u8>();
u8 flag = metaData[0]["Flag"].as<u8>();
u8 itemId = location->GetCurrentItem()->GetID();
@@ -160,8 +160,7 @@ namespace dusk {
for (const auto& stageNode : actorPatches) {
const auto& stageName = stageNode.first.as<std::string>();
for (const auto& roomNode : stageNode.second) {
const auto& roomStr = roomNode.first.as<std::string>();
u8 roomNo = roomStr.back() - '0';
u8 roomNo = roomNode.first.as<u8>();
for (const auto& actorNode : roomNode.second) {
using namespace Utility::Endian;
// Get all the data for the actor (with endian shenanigans)
@@ -183,6 +182,10 @@ namespace dusk {
// Then override the actor with whatever parts are being patched
const auto& patchNode = actorNode["patch"];
if (patchNode["name"]) {
const auto& newName = patchNode["name"].as<std::string>();
strncpy(actor.name, newName.c_str(), 8);
}
if (patchNode["parameters"]) {
actor.base.parameters = toPlatform(target, patchNode["parameters"].as<u32>());
}
@@ -4,7 +4,8 @@
# Ordon Village
F_SP103:
Room 0: # Main Village
# Room 0 - Main Village
0:
# Bo's House left Door
- name: kdoor
parameters: 0x88000627
@@ -108,4 +109,544 @@ F_SP103:
# Give this item a unique flag
parameters: 0x13FF9101
layers:
- 0
- 0
# Kakariko Graveyard
F_SP111:
# Room 0 - Main graveyard
0:
# Male Ant
- name: I_Ari
parameters: 0x00000F00
position:
x: 16933.3046875
y: 500
z: -769.167724609375
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x91
name: item
parameters: 0xF1FF91D4
layers:
- 0
- 2
- 3
# Zora's Domain
F_SP113:
# Room 1 - Main Zora's Domain Area
1:
# Male Dragonfly
- name: I_Tom
parameters: 0x00000F00
position:
x: 3653.44995117188
y: -5167.66455078125
z: 15500.0009765625
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9F
name: item
parameters: 0xF1FF9FD2
position:
y: -5300
layers:
- 0
- 2
# Sacred Grove
F_SP117:
# Room 1 - Pedestal of Time
1:
# Male Snail
- name: I_Kat
parameters: 0x00000F00
position:
x: 1447.40808105469
y: 1533.73156738281
z: 7053.470703125
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x99
name: item
parameters: 0xF1FF99D0
position:
y: 1383
layers:
- 2
# Room 2 - Temple of Time
2:
# Female Snail
- name: I_Kat
parameters: 0x00000F10
position:
x: 405.664825439453
y: 1382.14660644531
z: 6069.1953125
angle:
x: 0x0000
y: 0x5D27
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x98
name: item
parameters: 0xF1FF98D1
layers:
- 2
# Hyrule Field
F_SP121:
# Room 0 - Eldin Field / Bridge of Eldin
0:
# Male Grasshopper
- name: I_Bat
parameters: 0x00000F00
position:
x: 19600
y: 648.359558105469
z: 13400
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x99
name: item
parameters: 0xF1FF99C2
layers:
- 0
- 6
- 8
# Female Grasshopper
- name: I_Bat
parameters: 0x00000F10
position:
x: -9950
y: 35.1765174865723
z: -8950
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x98
name: item
parameters: 0xF1FF98C3
layers:
- 0
- 6
- 8
# Male Phasmid
- name: I_Nan
parameters: 0x00001F00
position:
x: 35135
y: 254.385009765625
z: -15115.2587890625
angle:
x: 0xC000
y: 0x4000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x97
name: item
parameters: 0xF1FF97C8
layers:
- 0
- 6
- 8
# Female Phasmid
- name: I_Nan
parameters: 0x00001F10
position:
x: 39919.859375
y: 1415.41796875
z: -40367.38671875
angle:
x: 0xC000
y: 0x58E3
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x96
name: item
parameters: 0xF1FF96C9
layers:
- 0
- 6
- 8
# Room 3 - Kakariko Gorge
3:
# Male Pill Bug
- name: I_Dan
parameters: 0x00000F00
position:
x: -10000
y: -7200
z: 57450
angle:
x: 0x0000
y: 0x8000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x95
name: item
parameters: 0xF1FF95CA
layers:
- 0
- 6
# Female Pill Bug
- name: I_Dan
parameters: 0x00000F10
position:
x: 500
y: -6117.943359375
z: 61700
angle:
x: 0x0000
y: 0x8000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x94
name: item
parameters: 0xF1FF94CB
layers:
- 0
- 6
# Room 6 - Faron Field
6:
# Male Beetle
- name: kab_o
parameters: 0x00000F00
position:
x: -50200
y: -8810
z: 86400
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9F
name: item
parameters: 0xF1FF9FC0
position:
y: -8910 # Lower by 100 so Link can reach it
layers:
- 0
- 6
- 9
- 10
# Female Beetle
- name: kab_o
parameters: 0x00000F10
position:
x: -36490
y: -8100
z: 74330
angle:
x: 0x0000
y: 0x2000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9E
name: item
parameters: 0xF1FF9EC1
layers:
- 0
- 6
- 9
- 10
# Room 10 - Lanayru Field
10:
# Male Stag Beetle
- name: I_Kuw
parameters: 0x00000F00
position:
x: -62724.33203125
y: -882.901000976563
z: -33130.4140625
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9B
name: item
parameters: 0xF1FF9BC4
layers:
- 0
- 6
# Female Stag Beetle
- name: I_Kuw
parameters: 0x00000F10
position:
x: -48850
y: 59.1445922851562
z: -51350
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9A
name: item
parameters: 0xF1FF9AC5
layers:
- 0
- 6
# Room 13 - Great Bridge of Hylia
13:
# Male Mantis
- name: I_Kam
parameters: 0x00000F00
position:
x: -92900
y: -5441.38720703125
z: 30350
angle:
x: 0x0000
y: 0x4000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x93
name: item
parameters: 0xF1FF93CC
layers:
- 0
- 6
# Female Mantis
- name: I_Kam
parameters: 0x00000F10
position:
x: -88800
y: -6091.95068359375
z: 59050
angle:
x: 0x0000
y: 0xC000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x92
name: item
parameters: 0xF1FF92CD
layers:
- 0
- 6
# Outside Castle Town Maps
F_SP122:
# Room 8 - Outside West Castle Town
8:
# Male Butterfly
- name: I_Cho
parameters: 0x00000F00
position:
x: -75063.46875
y: -421.140930175781
z: 16017.3466796875
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9D
name: item
parameters: 0xF1FF9DC2
position:
y: -471
layers:
- 0
# Male Butterfly again (for some reason the one on layer 6 has a different x position)
- name: I_Cho
parameters: 0x00000F00
position:
x: -75063.0546875
y: -421.140930175781
z: 16017.3466796875
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9D
name: item
parameters: 0xF1FF9DC2
position:
y: -471
layers:
- 6
# Female Butterfly
- name: I_Cho
parameters: 0x00000F10
position:
x: -79687.9609375
y: -656.609985351562
z: 1544.75891113281
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9C
name: item
parameters: 0xF1FF9CCD
position:
y: -706
layers:
- 0
- 6
# Room 16 - Outside South Castle Town
16:
# Male Ladybug
- name: I_Ten
parameters: 0x00000F00
position:
x: -45085.2734375
y: -5971.20849609375
z: 29910.453125
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x91
name: item
parameters: 0xF1FF91CE
position:
y: -6081 # Lower the item so it isn't awkwardly floating
layers:
- 0
- 1
- 6
# Female Ladybug
- name: I_Ten
parameters: 0x00000F10
position:
x: -54382.18359375
y: -5481.6298828125
z: 27425.111328125
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x90
name: item
parameters: 0xF1FF90CF
layers:
- 0
- 1
- 6
# Gerudo Desert
F_SP124:
# Room 0 - Main Desert
0:
# Male Dayfly
- name: I_Kag
parameters: 0x00000F0F
position:
x: 29089.78125
y: 412.155059814453
z: 58985.57421875
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x99
name: item
parameters: 0xF1FF99D6
layers:
- 0
# Female Dayfly
- name: I_Kag
parameters: 0x00000F1F
position:
x: 11656.46484375
y: 141.179977416992
z: 55374.140625
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x98
name: item
parameters: 0xF1FF98D7
layers:
- 0
# Upper Zora's River
F_SP126:
# Room 0 - Main area
0:
# Female Dragonfly
- name: I_Tom
parameters: 0x00000F10
position:
x: 5849.5498046875
y: 80.7757110595703
z: -1121.2275390625
angle:
x: 0x0000
y: 0x0000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x9E
name: item
parameters: 0xF1FF9ED3
layers:
- 0
- 1
# Kakariko Village Interiors
R_SP109:
# Room 6 - Abandoned House
6:
# Female Ant
- name: I_Ari
parameters: 0x00000F10
position:
x: 225.092803955078
y: 16.1963920593262
z: -17.4444351196289
angle:
x: 0x0000
y: 0x8000
z: 0x0000
patch:
# Turn this bug into an item actor with collectible flag 0x90
name: item
parameters: 0xF1FF90D5
layers:
- 0
- 1
- 2
- 3
@@ -634,7 +634,8 @@
- Hyrule Field - Faron Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x9F
- Name: Faron Field Male Beetle
Original Item: Male Beetle
@@ -644,7 +645,8 @@
- Hyrule Field - Faron Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x9E
- Name: Faron Field Poe
Original Item: Poe Soul
@@ -755,7 +757,8 @@
- Sacred Grove
- DZX
Metadata:
- None
- Stage: 54
Flag: 0x98
- Name: Sacred Grove Male Snail
Original Item: Male Snail
@@ -765,7 +768,8 @@
- Sacred Grove
- DZX
Metadata:
- None
- Stage: 54
Flag: 0x99
- Name: Sacred Grove Past Owl Statue Chest
Original Item: Piece of Heart
@@ -942,7 +946,8 @@
- Hyrule Field - Eldin Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x94
- Name: Kakariko Gorge Male Pill Bug
Original Item: Male Pill Bug
@@ -952,7 +957,8 @@
- Hyrule Field - Eldin Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x95
- Name: Kakariko Gorge Owl Statue Chest
Original Item: Orange Rupee
@@ -1191,7 +1197,8 @@
- Kakariko Village
- DZX
Metadata:
- None
- Stage: 68
Flag: 0x90
- Name: Kakariko Village Ant House Ledge Box Rupee
Original Item: Red Rupee
@@ -1323,7 +1330,8 @@
- Kakariko Graveyard
- DZX
Metadata:
- None
- Stage: 48
Flag: 0x91
- Name: Kakariko Graveyard Underwater Boulder Rupee
Original Item: Red Rupee
@@ -1465,7 +1473,8 @@
- Hyrule Field - Eldin Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x98
- Name: Eldin Field Male Grasshopper
Original Item: Male Grasshopper
@@ -1475,7 +1484,8 @@
- Hyrule Field - Eldin Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x99
- Name: Goron Springwater Rush
Original Item: Piece of Heart
@@ -1507,7 +1517,8 @@
- Hyrule Field - Eldin Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x96
- Name: Bridge of Eldin Male Phasmid
Original Item: Male Phasmid
@@ -1517,7 +1528,8 @@
- Hyrule Field - Eldin Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x97
- Name: Bridge of Eldin Owl Statue Chest
Original Item: Piece of Heart
@@ -1858,7 +1870,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x9A
- Name: Lanayru Field Male Stag Beetle
Original Item: Male Stag Beetle
@@ -1867,6 +1880,9 @@
- Golden Bug
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- Stage: 56
Flag: 0x9B
# HD Only location
# - Name: Lanayru Field Chu Grotto Chest
@@ -1959,7 +1975,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 57
Flag: 0x9C
- Name: West Hyrule Field Male Butterfly
Original Item: Male Butterfly
@@ -1969,7 +1986,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 57
Flag: 0x9D
- Name: West Hyrule Field Northern Boulder Rupee
Original Item: Yellow Rupee
@@ -2452,7 +2470,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 57
Flag: 0x91
- Name: Outside South Castle Town Female Ladybug
Original Item: Female Ladybug
@@ -2462,7 +2481,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 57
Flag: 0x90
- Name: Outside South Castle Town Poe
Original Item: Poe Soul
@@ -2573,7 +2593,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x92
- Name: Lake Hylia Bridge Male Mantis
Original Item: Male Mantis
@@ -2583,7 +2604,8 @@
- Hyrule Field - Lanayru Province
- DZX
Metadata:
- None
- Stage: 56
Flag: 0x93
- Name: Lake Hylia Bridge Cliff Chest
Original Item: Purple Rupee
@@ -3148,7 +3170,8 @@
- Upper Zoras River
- DZX
Metadata:
- None
- Stage: 61
Flag: 0x9E
- Name: Upper Zoras River Central Underwater Boulder Rupee
Original Item: Blue Rupee
@@ -3244,7 +3267,8 @@
- Zoras Domain
- DZX
Metadata:
- None
- Stage: 50
Flag: 0x9F
- Name: Zoras Domain Mother and Child Isle Poe
Original Item: Poe Soul
@@ -3825,7 +3849,8 @@
- Gerudo Desert
- DZX
Metadata:
- None
- Stage: 59
Flag: 0x99
- Name: Gerudo Desert Female Dayfly
Original Item: Female Dayfly
@@ -3835,7 +3860,8 @@
- Gerudo Desert
- DZX
Metadata:
- None
- Stage: 59
Flag: 0x98
- Name: Gerudo Desert Owl Statue Chest
Original Item: Orange Rupee