From abf57e02557cb68399d3e774be326c6bc5dcbea2 Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 20 Apr 2022 09:08:55 -0600 Subject: [PATCH 01/10] Fix for a map bug (link not shown when eastern prize is) --- Rom.py | 2 +- data/base2current.bps | Bin 86436 -> 86438 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index 46231dd8..ca416cbb 100644 --- a/Rom.py +++ b/Rom.py @@ -32,7 +32,7 @@ from source.classes.SFX import randomize_sfx JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '02967596217f7cae048e4fbf727762d8' +RANDOMIZERBASEHASH = 'a2dddb51072556881537dadd7e461c3d' class JsonRom(object): diff --git a/data/base2current.bps b/data/base2current.bps index 139e9b03e655c8aaa67576c99f3084222e06094b..d8e7300e8b0b6587aa5a356b81554e9f96296217 100644 GIT binary patch delta 277 zcmV+w0qXvwqXnj;1+X~*1X_Kig0npVoC^j3!H@$?Xj~sxCWq^y9?uNDc+UOuI#roh3umemjz|v}pt=g#ok04Zk zAjFeg4I4MX!M~=y3eW>g!NDK`!jKA+9D;!YlY)y+fR*rk$pX+8n?`^sfCk_Luxx+` z;0my2-~*6izeAI*4Qwm|!jK(+9lw^o3h)=&zfi&os=s9OejgO{e)>OM!U~raJBpRB zJAg3oIhzubMh-y|P?d>qfG}_@fq_U&orQn~mszu!4zf5FE_j2zNUutOFwg~PNkD)B bXltb#mmz~;N4H@|0Xqr^CwJ#kp%H2x{Xutp delta 275 zcmV+u0qp*!qXnd+1+X~*1dM!hgR?yWoC^m3z>ot>;*;MDJ3>~!cd~+kMw$eHl|K5~ ziVCWe0)T-Sk1v3Y$pP>Xj~sxCWq^y9?uLQ-l0}}G;0&+>OfA6DB&x02sQ`~4RDU4D zlU@xQH^9NaroIZ$15CidAOXUV3X>XwfdZ3)i%o!)@O;Sv&=#9SfGL0m-~+I1fC%6U zux8)`kYc|=lduhJECIrh9e^Fbmc9z`7uvs1!V0RtWb=L>6!d=jKU~5JmlHdRm9IO1 zFz`8>5R*s_K@wDziEw~0a4dm=NKBoDfCiUWvzrdGI2J5;gS|+vN`NrX1!ze?fB|T0 Zr5l$YgJVaxV@Cly3J6zpuB85`1(FJXcbfnJ From 92e04f9e0bbe8419559a73cea0dc3cb9daebceba Mon Sep 17 00:00:00 2001 From: codemann8 Date: Wed, 20 Apr 2022 18:40:01 -0500 Subject: [PATCH 02/10] Implement new overworld map draw routine for Mixed OWR --- Rom.py | 2 +- data/base2current.bps | Bin 92018 -> 92182 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index 7c4b6041..79448c09 100644 --- a/Rom.py +++ b/Rom.py @@ -33,7 +33,7 @@ from source.classes.SFX import randomize_sfx JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '786c28c4735da56f0dbca879d02b22f6' +RANDOMIZERBASEHASH = '99ea4641f589d96a9bc41b25cf5c9821' class JsonRom(object): diff --git a/data/base2current.bps b/data/base2current.bps index 533f39c201e1adc3f063d304e037cad5485f229c..52042ecf168e84763c80dec5018bf1ae910bfb65 100644 GIT binary patch delta 417 zcmV;S0bc&{&IOjx1+YZ{1Xo?CqO(Z>@e3UwfQ~$XnHH}DfT}43mPK=erSJ%gORFMM ziK?prlRym>9s+xVnpJv;$p(M`a19^^umA%AfCr!qpbgLtuO2qDat#M)G>u$duLhq8 zMwF9MXw`u@mSq;(rSLGNipdzzD#9R^Gy{TxA&!E99F~HC6^?>|5VuJ};NK8#ssMVYx-!SCIZmuYa)Q^pj_?h zps5az0Vn{e1djnI0I3a+0Vn{QG(Om~0)EJg0x5u(%LxGoUr$CU!PS;v(ixm(ATBDs0Tl|Z?B$CX04na7o2xtqt8Vw?Jih=_=aDF*=12ADYM zU;wDf5T=%b5{+x{4G^<42i=MA2@qGWEOz^s?g;@K135#VmkbI4Ap;Iuhqo{a0Xkg> LF1u(coP=6$fx)gk delta 292 zcmV+<0o(qT&;|0&1+YZ{1mc|?VzWsB@e3UsfRhWCT$#l&56}n*0YDFe01*$+0RRD@ z44w{%lWz?g0Zy}u4F_mA#av#m2CoBvswo7}2CqthFz`5*Wft3&@Gzx{$rzJrKY)@p z1A>7ej)H+4mV$v5j)H*@w>T??v&D4?2uaNfugCI!2_TQh@_uVb+OJB0Fz^Y!Zh>Y%9(j{ztEsRWY%zJU#sf|r@I8Ggu% zLiO+prJyPP$?)(HfCiRuL6Lo4+DUz@CG6x qkg9+LA{mgXdMIn2FD#XpunGYo129>mx6}#&I$a1pGiN^IKS}83e|bCr From 86128c76ff72f996aaea085666dc3080b77b256c Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 8 Mar 2022 08:47:25 -0700 Subject: [PATCH 03/10] Add major_only algorithm to code --- BaseClasses.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index b79af29d..8df66c3f 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -2727,8 +2727,12 @@ e_dmg = {"default": 0, "shuffled": 1, "random": 2} # byte 8: RRAA A??? (restrict boss mode, algorithm, ? = unused) rb_mode = {"none": 0, "mapcompass": 1, "dungeon": 2} -# algorithm: todo with "biased shuffles" -algo_mode = {"balanced": 0, "equitable": 1, "vanilla_fill": 2, "dungeon_only": 3, "district": 4} +# algorithm: +algo_mode = {"balanced": 0, "equitable": 1, "vanilla_fill": 2, "dungeon_only": 3, "district": 4, 'major_only': 5} +boss_mode = {"none": 0, "simple": 1, "full": 2, "chaos": 3, 'random': 3, 'unique': 4} + + +# byte 10: settings_version # additions # psuedoboots does not effect code From e303476ea98dd6da34d16331f4277f62e2cb8d59 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Thu, 21 Apr 2022 13:27:00 -0500 Subject: [PATCH 04/10] Implement new overworld map draw routine for Mixed OWR --- asm/owrando.asm | 70 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/asm/owrando.asm b/asm/owrando.asm index c1415483..717890bd 100644 --- a/asm/owrando.asm +++ b/asm/owrando.asm @@ -56,6 +56,20 @@ jsl.l OWLightWorldOrCrossed org $0aba6c ; < ? - Bank0a.asm:474 () jsl.l OWMapWorldCheck16 : nop +; Mixed Overworld Map +org $0ABA99 +WorldMap_LoadDarkWorldMap: +LDA.b $10 : CMP.b #$14 ; attract module +BEQ .vanilla_light + LDA.l OWMode+1 : AND.b #$04 : BNE .mixed + LDA.b $8A : AND.b #$40 + BEQ .vanilla_light + .mixed + PHB : PHK : PLB + JSL LoadMapDarkOrMixed + PLB +.vanilla_light ; $0ABAB5 + ;(replacing -> LDA $8A : AND.b #$40) org $00d8c4 ; < ? - Bank00.asm:4068 () jsl.l OWWorldCheck @@ -81,8 +95,6 @@ org $07aa34 ; < ? - Bank07.asm:6718 () jsl.l OWWorldCheck org $08d408 ; < ? - ancilla_morph_poof.asm:48 () jsl.l OWWorldCheck -org $0aba99 ; < ? - Bank0a.asm:515 () -jsl.l OWWorldCheck org $0bfeab ; < ? - Bank0b.asm:36 () jsl.l OWWorldCheck16 : nop org $0cffb6 ; < ? - ?.asm ? () @@ -241,6 +253,60 @@ OWOldManSpeed: rtl } +LoadMapDarkOrMixed: +{ + CMP.b #$04 : REP #$30 : BEQ .mixed + LDX.w #$03FE ; draw vanilla Dark World (what we wrote over) + .copy_next + LDA.w $D739,X : STA.w $1000,X ; DB is $0A + DEX : DEX : BPL .copy_next + BRL .end + .mixed + LDX.b $8A + LDA.l OWTileWorldAssoc,X + STA.b $00 + LDY.w #$139C + LDX.w #$003F + .next_screen + PHX + LDA.l OWTileWorldAssoc,X + EOR.b $00 + AND.w #$0040 + BEQ .light + TYX : BRA .copy_screen + .light + TXA : AND.w #$0024 : LSR : TAX + TYA : SEC : SBC.l LWQuadrantOffsets,X + TYX : TAY + .copy_screen ; more efficient to have X on the right side + LDA.w $C739+$00,Y : STA.b $00,X + LDA.w $C739+$02,Y : STA.b $02,X + LDA.w $C739+$20,Y : STA.b $20,X + LDA.w $C739+$22,Y : STA.b $22,X + LDA.w $C739+$40,Y : STA.b $40,X + LDA.w $C739+$42,Y : STA.b $42,X + LDA.w $C739+$60,Y : STA.b $60,X + LDA.w $C739+$62,Y : STA.b $62,X + TXY : PLX + DEY : DEY : DEY : DEY ; move one screen left + TXA : AND.w #$0007 : BNE .same_row + TYA : SEC : SBC.w #$0060 : TAY ; move one screen row up + .same_row + DEX + BPL .next_screen + .end + SEP #$30 + LDA.b #$15 : STA.b $17 ; what we wrote over + RTL + + LWQuadrantOffsets: + dw $1000-$0210 ; top left + dw $0C00-$01F0 ; top right + dw 0,0,0,0,0,0 + dw $0800+$01F0 ; bottom left + dw $0400+$0210 ; bottom +} + org $aa9000 OWEdgeTransition: { From 5858f7c1da1a769ef82cc8f18f4bc47948fb3188 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Thu, 21 Apr 2022 13:27:57 -0500 Subject: [PATCH 05/10] Add major_only algorithm to code --- BaseClasses.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 7b07ded2..8a3da107 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -3309,8 +3309,8 @@ e_dmg = {"default": 0, "shuffled": 1, "random": 2} # byte 8: RRAA A??? (restrict boss mode, algorithm, ? = unused) rb_mode = {"none": 0, "mapcompass": 1, "dungeon": 2} -# algorithm: todo with "biased shuffles" -algo_mode = {"balanced": 0, "equitable": 1, "vanilla_fill": 2, "dungeon_only": 3, "district": 4} +# algorithm: +algo_mode = {"balanced": 0, "equitable": 1, "vanilla_fill": 2, "dungeon_only": 3, "district": 4, 'major_only': 5} # additions # psuedoboots does not effect code From 7821fac8c3033bdbd28f82faf7702779b538101f Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 2 May 2022 05:46:08 -0500 Subject: [PATCH 06/10] Adding proper versioning for differing branches --- OverworldShuffle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 410ee7f8..56b55b0c 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -5,7 +5,9 @@ from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSl from Regions import mark_dark_world_regions, mark_light_world_regions from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OWExitTypes, OpenStd, parallel_links, IsParallel -__version__ = '0.2.7.0-u' +version_number = '0.2.7.0' +version_branch = '-u' +__version__ = '%s%s' % (version_number, version_suffix) def link_overworld(world, player): # setup mandatory connections From b517c5305fab5f6a2981a1c19fa9afc029affed6 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 2 May 2022 05:48:17 -0500 Subject: [PATCH 07/10] Including mystery seed number in spoiler log so it is easier to match them with rom filename --- Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.py b/Main.py index 5064acc2..0489b8bd 100644 --- a/Main.py +++ b/Main.py @@ -119,7 +119,7 @@ def main(args, seed=None, fish=None): logger.info( world.fish.translate("cli","cli","app.title") + "\n", ORVersion, - world.seed, + "%s (%s)" % (world.seed, str(args.outputname)) if str(args.outputname).startswith('M') else world.seed, Settings.make_code(world, 1) if world.players == 1 else '' ) From 0704389cb3322b234c016754f747f1ac6034806e Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 2 May 2022 05:49:28 -0500 Subject: [PATCH 08/10] Infinite loop detection for connect_inaccessible_regions --- EntranceShuffle.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 900d0764..ed6653b4 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -4,6 +4,7 @@ import RaceRandom as random from BaseClasses import CollectionState, RegionType from OverworldShuffle import build_accessible_region_list from OWEdges import OWTileRegions +from Utils import stack_size3a entrance_pool = list() exit_pool = list() @@ -1481,6 +1482,10 @@ def junk_fill_inaccessible(world, player): def connect_inaccessible_regions(world, lw_entrances, dw_entrances, caves, player, ignore_list=[]): invFlag = world.mode[player] == 'inverted' + if stack_size3a() > 500: + from DungeonGenerator import GenerationException + raise GenerationException(f'Infinite loop detected at \'connect_inaccessible_regions\'') + random.shuffle(lw_entrances) random.shuffle(dw_entrances) From cd9252419304e98b866f1b3383135e8de44e4077 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 2 May 2022 05:50:27 -0500 Subject: [PATCH 09/10] Adding proper versioning for differing branches --- OverworldShuffle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 56b55b0c..265026be 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -7,7 +7,7 @@ from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OWExitTypes, Open version_number = '0.2.7.0' version_branch = '-u' -__version__ = '%s%s' % (version_number, version_suffix) +__version__ = '%s%s' % (version_number, version_branch) def link_overworld(world, player): # setup mandatory connections From b30a5b2652e547704a6d5523e056eb3c09ee95a7 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 2 May 2022 05:55:56 -0500 Subject: [PATCH 10/10] Version bump 0.2.7.1 --- CHANGELOG.md | 5 +++++ OverworldShuffle.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78de0226..4acbd0e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 0.2.7.1 +- Map checks in Mixed OWR now will show the proper tile images when screens are swapped (ie. Pyramid shows in the LW if that screen is swapped) +- Added mystery seed number to spoiler log, so it is easier to match a spoiler log to a rom filename +- Added proper branch-specific versioning (ie. Dev branch has '-u' suffixing the version number while Release/Main branch does not) + ### 0.2.7.0 - ~~Merged DR v1.0.0.3 - MANY changes, major things listed below~~ - New Item Fills (Districts/Vanilla/Major Location/Dungeon) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 265026be..bd855436 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -5,7 +5,7 @@ from BaseClasses import OWEdge, WorldType, RegionType, Direction, Terrain, PolSl from Regions import mark_dark_world_regions, mark_light_world_regions from OWEdges import OWTileRegions, OWTileGroups, OWEdgeGroups, OWExitTypes, OpenStd, parallel_links, IsParallel -version_number = '0.2.7.0' +version_number = '0.2.7.1' version_branch = '-u' __version__ = '%s%s' % (version_number, version_branch)