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

[Mod] Spicy Dampé #9

Open
wants to merge 39 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
9eb190e
Fix particle regression (#2228)
aMannus Dec 21, 2022
565775a
Fix ice trap particles (#2229)
aMannus Dec 21, 2022
6eaf51c
version bump (#2232)
briaguya-ai Dec 21, 2022
1a8967b
Spicy dampe
aMannus Dec 21, 2022
07bae6b
Fix common enemy rando crashes (#2242)
aMannus Dec 24, 2022
d215c76
fix shopsanity spawning objects for actors (#2247)
Archez Dec 24, 2022
99367eb
Fix silver rupee room in GtG (#2252)
aMannus Dec 24, 2022
f6a7f3d
Fix enemy rando flags (#2253)
aMannus Dec 24, 2022
0017bf1
fix: correct item ordering in kak potion shop (#2256)
briaguya-ai Dec 24, 2022
9529cc1
SFX: Support replaying the current BGM when changed (#2150)
Archez Dec 24, 2022
0132445
hi mom (#2261)
briaguya-ai Dec 24, 2022
7768869
bump version
briaguya-ai Dec 24, 2022
76ffdac
Merge branch 'develop-bradley' into spicy-dampe
aMannus Dec 24, 2022
85bccab
bump lus version (#2269)
briaguya-ai Dec 24, 2022
f42f86e
fix: make fisherman rumble text work (#2279)
briaguya-ai Dec 26, 2022
ecb10e6
chore: bump sdl version in appimage (#2288)
briaguya-ai Dec 28, 2022
87b9a1b
Merge branch 'develop-bradley' into spicy-dampe
aMannus Dec 31, 2022
156de81
FIX: Equip now message (#2286)
PurpleHato Jan 17, 2023
1e25831
fix: properly randomize mirror shield and silver gaunts chests when u…
briaguya-ai Jan 17, 2023
5b2a50c
Remove repeated preset entries (#2294)
xoascf Jan 17, 2023
6ae2827
Fix Ganon Boss Key for MQ only otrs (#2295)
garrettjoecox Jan 17, 2023
7f06087
Altered save flag docs concerning events in Mido's house (#2311)
andrewwvc Jan 17, 2023
fda198d
Fix: Reset waterbox collisions in Lake Hylia and Morphas room (#2346)
Archez Jan 17, 2023
ff3548a
Rando: Adjust locked door logic for temples and give starting keys fo…
Archez Jan 17, 2023
4b10a88
Fix: Remove MQ Spirit Temple silver block for child to guarantee acce…
Archez Jan 17, 2023
1e7cf88
fix one-way entrances making some entrances disappear from the overri…
Archez Jan 17, 2023
170b9c1
Disable BEL char by default when terminal attached (#2306)
xoascf Jan 17, 2023
048207e
Fix exiting courtyard at night not taking link to castle grounds in d…
Archez Jan 17, 2023
76c9895
add missing medigoron hint text (#2339)
Archez Jan 17, 2023
6eef813
fix wrong entrances in epona check handler (#2352)
Archez Jan 17, 2023
1fe8625
fix top left dungeon entrance icon in graveyard (#2303)
briaguya-ai Jan 17, 2023
ba5d5c2
changes to the asset extraction script (#2068)
Alto1772 Jan 17, 2023
13b8f26
Set LSApplicationCategoryType to games
UltraHDR Jan 10, 2023
418d0f8
fix: default cvar values before applying presets (#2357)
briaguya-ai Jan 17, 2023
f665326
workaround for vanilla save check tracker crash (#2359)
briaguya-ai Jan 18, 2023
750ae90
sdl windowed fullscreen (#2351)
briaguya-ai Jan 18, 2023
a5f7478
Fix CC connection bugs (#2367)
aMannus Jan 18, 2023
32ad0ab
Bump version
dcvz Jan 18, 2023
2ab1e4f
Merge branch 'develop-bradley' into spicy-dampe
aMannus Jan 21, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/generate-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ jobs:
- name: Install latest SDL
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz
tar -xzf SDL2-2.24.1.tar.gz
cd SDL2-2.24.1
wget https://www.libsdl.org/release/SDL2-2.26.1.tar.gz
tar -xzf SDL2-2.26.1.tar.gz
cd SDL2-2.26.1
./configure
make -j 10
sudo make install
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)

project(Ship LANGUAGES C CXX
VERSION 5.1.1)
set(PROJECT_BUILD_NAME "BRADLEY BRAVO" CACHE STRING "")
VERSION 5.1.4)
set(PROJECT_BUILD_NAME "BRADLEY ECHO" CACHE STRING "")
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")

set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)
Expand Down
9 changes: 4 additions & 5 deletions OTRExporter/extract_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ def main():
parser.add_argument("-z", "--zapd", help="Path to ZAPD executable", dest="zapd_exe", type=str)
parser.add_argument("rom", help="Path to the rom", type=str, nargs="?")
parser.add_argument("--non-interactive", help="Runs the script non-interactively for use in build scripts.", dest="non_interactive", action="store_true")
parser.add_argument("-v", "--verbose", help="Display rom's header checksums and their corresponding xml folder", dest="verbose", action="store_true")

args = parser.parse_args()

rom_paths = [ args.rom ] if args.rom else rom_chooser.chooseROM(args.non_interactive)
for rom_path in rom_paths:
rom = Z64Rom(rom_path)

roms = [ Z64Rom(args.rom) ] if args.rom else rom_chooser.chooseROM(args.verbose, args.non_interactive)
for rom in roms:
if (os.path.exists("Extract")):
shutil.rmtree("Extract")

BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom_path, zapd_exe=args.zapd_exe)
BuildOTR("../soh/assets/xml/" + rom.version.xml_ver + "/", rom.file_path, zapd_exe=args.zapd_exe)

if __name__ == "__main__":
main()
22 changes: 14 additions & 8 deletions OTRExporter/rom_chooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

from rom_info import Z64Rom

def chooseROM(non_interactive=False):
def chooseROM(verbose=False, non_interactive=False):
roms = []

for file in glob.glob("*.z64"):
if Z64Rom.isValidRom(file):
roms.append(file)
rom = Z64Rom(file)
if rom.is_valid:
roms.append(rom)

if not (roms):
print("Error: No roms located, place one in the OTRExporter directory", file=os.sys.stderr)
Expand All @@ -21,23 +22,28 @@ def chooseROM(non_interactive=False):
foundMq = False
foundOot = False
for rom in roms:
isMq = Z64Rom.isMqRom(rom)
if isMq and not foundMq:
if rom.isMq and not foundMq:
romsToExtract.append(rom)
foundMq = True
elif not isMq and not foundOot:
elif not rom.isMq and not foundOot:
romsToExtract.append(rom)
foundOot = True
return romsToExtract

print(str(len(roms))+ " roms found, please select one by pressing 1-"+str(len(roms)))
print(f"{len(roms)} roms found, please select one by pressing 1-{len(roms)}")
print()

for i in range(len(roms)):
print(str(i+1)+ ". " + roms[i])
print(f"[{i+1:>2d}] {roms[i].file_path}")
if verbose:
print(f" Checksum: {roms[i].checksum.value}, Version XML: {roms[i].version.xml_ver}")
print()

while(1):
try:
selection = int(input())
except KeyboardInterrupt:
sys.exit(1)
except:
print("Bad input. Try again with the number keys.")
continue
Expand Down
6 changes: 3 additions & 3 deletions ZAPDTR/ZAPD/ZFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename)
// Check for repeated attributes.
if (offsetXml != nullptr)
{
rawDataIndex = strtol(StringHelper::Split(offsetXml, "0x")[1].c_str(), NULL, 16);
rawDataIndex = strtol(StringHelper::Split(std::string(offsetXml), "0x")[1].c_str(), NULL, 16);

if (offsetSet.find(offsetXml) != offsetSet.end())
{
Expand Down Expand Up @@ -831,7 +831,7 @@ void ZFile::GenerateSourceHeaderFiles()
xmlPath = StringHelper::Replace(xmlPath, "\\", "/");
auto pathList = StringHelper::Split(xmlPath, "/");
std::string outPath = "";

for (int i = 0; i < 3; i++)
outPath += pathList[i] + "/";

Expand Down Expand Up @@ -1192,7 +1192,7 @@ std::string ZFile::ProcessTextureIntersections([[maybe_unused]] const std::strin

if (declarations.find(currentOffset) != declarations.end())
declarations.at(currentOffset)->size = currentTex->GetRawDataSize();

currentTex->DeclareVar(GetName(), "");
}
else
Expand Down
7 changes: 7 additions & 0 deletions soh/include/vt.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,11 @@
#define VT_RST VT_SGR("")
#define VT_CLS VT_ED(2)

#ifdef USE_BELL
// ASCII BEL character, plays an alert tone
#define BEL '\a'
#else
#define BEL '\0'
#endif

#endif
2 changes: 2 additions & 0 deletions soh/macosx/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<string>@CMAKE_PROJECT_VERSION@</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2022 HarbourMasters.</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
</dict>
Expand Down
8 changes: 5 additions & 3 deletions soh/soh/Enhancements/crowd-control/CrowdControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void CrowdControl::Disable() {

void CrowdControl::ListenToServer() {
while (isEnabled) {
while (!connected) {
while (!connected && isEnabled) {
SPDLOG_TRACE("[CrowdControl] Attempting to make connection to server...");
tcpsock = SDLNet_TCP_Open(&ip);

Expand All @@ -112,8 +112,10 @@ void CrowdControl::ListenToServer() {
}
}

auto socketSet = SDLNet_AllocSocketSet(1);
SDLNet_TCP_AddSocket(socketSet, tcpsock);
SDLNet_SocketSet socketSet = SDLNet_AllocSocketSet(1);
if (tcpsock) {
SDLNet_TCP_AddSocket(socketSet, tcpsock);
}

// Listen to socket messages
while (connected && tcpsock && isEnabled) {
Expand Down
3 changes: 2 additions & 1 deletion soh/soh/Enhancements/debugger/debugSaveEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const std::vector<FlagTable> flagTables = {
{ 0x09, "Used Deku Tree Blue Warp" },
{ 0x0A, "Played Saria's Song for Mido as Adult" },
{ 0x0C, "Met Deku Tree" },
{ 0x0F, "Spoke to Mido about Saria's whereabouts" },
{ 0x10, "Spoke to Child Malon at Castle or Market" },
{ 0x11, "Spoke to Ingo at Ranch before Talon returns" },
{ 0x12, "Obtained Pocket Egg" },
Expand Down Expand Up @@ -219,7 +220,7 @@ const std::vector<FlagTable> flagTables = {
{ 0x24, "Spoke to Kokiri Boy Cutting Grass" },
{ 0x26, "Spoke to Kokiri Girl on Shop Awning" },
{ 0x28, "Spoke to Kokiri Girl About Training Center" },
{ 0x31, "Spoke to Kokiri Boy on Bed in Mido's House" },
{ 0x41, "Spoke to Kokiri Boy on Bed in Mido's House" },
{ 0x51, "Spoke to Kokiri Girl in Saria's House" },
{ 0x59, "Spoke to Know-It-All Bro. About Temple" },
{ 0x61, "Spoke to Know-It-All Bro. About Saria" },
Expand Down
4 changes: 4 additions & 0 deletions soh/soh/Enhancements/enemyrandomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ bool IsEnemyFoundToRandomize(int16_t sceneNum, int8_t roomNum, int16_t actorId,
// Only randomize the initial deku scrub actor (single and triple attack), not the flower they spawn.
case ACTOR_EN_DEKUNUTS:
return (params == -256 || params == 768);
// Don't randomize the OoB wallmaster in the silver rupee room because it's only there to
// not trigger unlocking the door after killing the other wallmaster in authentic gameplay.
case ACTOR_EN_WALLMAS:
return (!(!isMQ && sceneNum == SCENE_MEN && roomNum == 2 && posX == -2345));
// Only randomize initial floormaster actor (it can split and does some spawning on init).
case ACTOR_EN_FLOORMAS:
return (params == 0 || params == -32768);
Expand Down
5 changes: 4 additions & 1 deletion soh/soh/Enhancements/item-tables/ItemTableManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ bool ItemTableManager::AddItemEntry(uint16_t tableID, uint16_t getItemID, GetIte
GetItemEntry ItemTableManager::RetrieveItemEntry(uint16_t tableID, uint16_t itemID) {
try {
ItemTable* itemTable = RetrieveItemTable(tableID);
return itemTable->at(itemID);
GetItemEntry getItemEntry = itemTable->at(itemID);
getItemEntry.drawItemId = getItemEntry.itemId;
getItemEntry.drawModIndex = getItemEntry.modIndex;
return getItemEntry;
} catch (std::out_of_range& oor) { return GET_ITEM_NONE; }
}

Expand Down
4 changes: 3 additions & 1 deletion soh/soh/Enhancements/item-tables/ItemTableTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ typedef struct GetItemEntry {
/* 0x0C */ uint16_t collectable; // determines whether the item can be collected on the overworld. Will be true in most cases.
/* 0x0E */ GetItemFrom getItemFrom;
/* 0x0F */ GetItemCategory getItemCategory; // Primarily made and used for chest size/texture matches contents
/* 0x10 */ uint16_t drawItemId; // Will be a copy of itemId unless the item is an ice trap. Needed for particles to function on ice traps.
/* 0x11 */ uint16_t drawModIndex; // Will be a copy of modIndex unless the item is an ice trap. Needed for particles to function on ice traps.
CustomDrawFunc drawFunc;
}; // size = 0x0F
}; // size = 0x11
5 changes: 2 additions & 3 deletions soh/soh/Enhancements/presets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ void DrawPresetSelector(PresetType presetTypeId) {

ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(6.0f, 4.0f));
if (ImGui::Button(("Apply Preset##" + presetTypeCvar).c_str())) {
if (selectedPresetId == 0) {
clearCvars(presetTypeDef.cvarsToClear);
} else {
clearCvars(presetTypeDef.cvarsToClear);
if (selectedPresetId != 0) {
applyPreset(selectedPresetDef.entries);
}
SohImGui::RequestCvarSaveOnNextTick();
Expand Down
11 changes: 2 additions & 9 deletions soh/soh/Enhancements/presets.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
// Text Speed (1 to 5)
PRESET_ENTRY_S32("gTextSpeed", 5),
// King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 2),
PRESET_ENTRY_S32("gMweepSpeed", 5),
// Faster Block Push (+0 to +5)
PRESET_ENTRY_S32("gFasterBlockPush", 5),
// Better Owl
Expand Down Expand Up @@ -394,8 +394,6 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
PRESET_ENTRY_S32("gBombchusOOB", 1),
// Skip save confirmation
PRESET_ENTRY_S32("gSkipSaveConfirmation", 1),
// King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 5),
// Biggoron Forge Time (0 to 3)
PRESET_ENTRY_S32("gForgeTime", 0),
// Vine/Ladder Climb speed (+0 to +12)
Expand Down Expand Up @@ -467,7 +465,7 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
// Text Speed (1 to 5)
PRESET_ENTRY_S32("gTextSpeed", 5),
// King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 2),
PRESET_ENTRY_S32("gMweepSpeed", 5),
// Faster Block Push (+0 to +5)
PRESET_ENTRY_S32("gFasterBlockPush", 5),
// Better Owl
Expand All @@ -480,9 +478,6 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
// Inject Item Counts in messages
PRESET_ENTRY_S32("gInjectItemCounts", 1),

// Pause link animation (0 to 16)
PRESET_ENTRY_S32("gPauseLiveLink", 1),

// Dynamic Wallet Icon
PRESET_ENTRY_S32("gDynamicWalletIcon", 1),
// Always show dungeon entrances
Expand Down Expand Up @@ -511,8 +506,6 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
PRESET_ENTRY_S32("gBombchusOOB", 1),
// Skip save confirmation
PRESET_ENTRY_S32("gSkipSaveConfirmation", 1),
// King Zora Speed (1 to 5)
PRESET_ENTRY_S32("gMweepSpeed", 5),
// Biggoron Forge Time (0 to 3)
PRESET_ENTRY_S32("gForgeTime", 0),
// Vine/Ladder Climb speed (+0 to +12)
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/Enhancements/randomizer/3drando/fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ std::vector<uint32_t> GetAccessibleLocations(const std::vector<uint32_t>& allowe
if (mode == SearchMode::GeneratePlaythrough && exit.IsShuffled() && !exit.IsAddedToPool() && !noRandomEntrances) {
entranceSphere.push_back(&exit);
exit.AddToPool();
// Don't list a coupled entrance from both directions
if (exit.GetReplacement()->GetReverse() != nullptr && !Settings::DecoupleEntrances) {
// Don't list a two-way coupled entrance from both directions
if (exit.GetReverse() != nullptr && exit.GetReplacement()->GetReverse() != nullptr && !Settings::DecoupleEntrances) {
exit.GetReplacement()->GetReverse()->AddToPool();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ void HintTable_Init_Exclude_Overworld() {
Text{"a #carpet guru# sells", /*french*/"#un marchand du désert# vend", /*spanish*/"el #genio de una alfombra# vende"},
});

hintTable[GC_MEDIGORON] = HintText::Exclude({
//obscure text
Text{"#Medigoron# sells", /*french*/"#Medigoron# vend", /*spanish*/"#Medigoron# vende"},
});

hintTable[KAK_IMPAS_HOUSE_FREESTANDING_POH] = HintText::Exclude({
//obscure text
Expand Down
5 changes: 5 additions & 0 deletions soh/soh/Enhancements/randomizer/3drando/item_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ Item& ItemFromGIID(const int giid) {
}
index++;
}

// there are vanilla items that don't exist in the item table we're reading from here
// if we made it this far, it means we didn't find an item in the table
// if we don't return anything, the game will crash, so, as a workaround, return greg
return itemTable[GREEN_RUPEE];
}

//This function should only be used to place items containing hint text
Expand Down
Loading