Skip to content

Commit

Permalink
v1.10: Changed requirement for grindboots to swingshot OR HELI on Neb…
Browse files Browse the repository at this point in the history
…ula. Added Hydropack if ILJs selected and Heli on Hoven. Renamed Magnewalk trick. Added extra checks upon loading a save, with a new screen if data is invalid.
  • Loading branch information
Alados5 committed Mar 31, 2022
1 parent 6dc3289 commit 04ba309
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Download the latest release, it will be a zip file containing:
## First screen: Choose Strats
Once you launch the randomizer, the first page will look like this:

![Screen1_v1.9](https://i.imgur.com/qhm8cK8.png)
![Screen1_v1.9](https://i.imgur.com/JPW84Z0.png)

This is here to let you choose if you want some scenarios (which require hard strats) to be in the randomizer pool. You can get more info on a tooltip by hovering on each box. They are:
- **Packless**: the randomizer might ban the use of all packs in any level (and ensure you get other gadgets required for a packless route). Some planets are easy to complete packless, so if set to "No", this option stops this from happening on Kerwan, Eudora, Rilgar, Umbris, Orxon 2 and Quartu.
- **ILJs and Sinaflips**: these tricks are available only on some specific planets with special surfaces, and can be hard to perform for a long time. They are usually not required, but for example, if the Heli-Pack is the only gadget allowed on Umbris, you have to Infinite Long Jump (ILJ) from ship to boss. This lets you choose if this situation enters the randomizer pool.
- **Batalia SIs**: without the Grindboots, getting the Gaspar infobot on Batalia requires a hard chain of Slope Intercepts on one of the mountains, and then you must glide along the rail without falling. You can make sure this scenario never happens or have it as a possibility with this option.
- **Tree Skip**: on Orxon 1, you can skip both Clank sections with a very precise jump on a tree, to then punch a pipe and proxy to the Pokitaru infobot. If you want to make sure this is never the only way to beat Orxon 1, you can leave this strat disabled.
- **Oltanis Wall Magneboots**: you can get to the Quartu infobot without PDA or Grindboots and only the Magneboots by continuing to walk on a wall as if it was a magnetic surface. I'm not sure how hard this is but you can choose not to know either disabling this scenario!
- **Oltanis Magnewalk**: you can get to the Quartu infobot without PDA or Grindboots and only the Magneboots by continuing to walk on a wall as if it was a magnetic surface. I'm not sure how hard this is but you can choose not to know either disabling this scenario!

If you're a speedrunner, and have run any%, AGB or especially packless, none of these should be a problem, but this is meant for all kinds of players who just want to discover new tricks and routes, and get started with some speed tech too!

Expand Down
Binary file modified RaC1 Vanilla Randomizer.exe
Binary file not shown.
90 changes: 67 additions & 23 deletions rac1_vanilla_rand.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def choose_strats():
CreateToolTip(btnS4, 'On Orxon 1 (Clank level), you might have to perform\n'
"the Tree Skip to then proxy to the end of the level.")

btnS5 = Button(root, text="Oltanis Wall Magneboots", image=imgStratN,
btnS5 = Button(root, text="Oltanis Magnewalk", image=imgStratN,
compound='c', borderwidth=5, relief=RIDGE, command=toggleS5,
font=tkFont.Font(family=usefont, size=fontSz, weight='normal'),
bg='#66684B', fg='#586aa5')
Expand All @@ -262,9 +262,67 @@ def choose_strats():

choose_strats()

#----------
# PAGE 2
#----------


#------------
# SAVELOAD
#------------

global RNGsol
# return PW, PG, PC, PGC, RSW, RSG, RSC, RSGC

try:
PW = RNGsol[0]
PG = RNGsol[1]
PC = RNGsol[2]
PGC = RNGsol[3]
RSW = RNGsol[4]
RSG = RNGsol[5]
RSC = RNGsol[6]
RSGC = RNGsol[7]
KIII = RNGsol[8]

mem_card = open("save_data.txt", "w")
mem_card.write(str(RNGsol))
mem_card.close()
except:
imgCRT = Image.open('images/crtFrame.png')
imgCRTf = Image.open('images/crtFrameFlat.png')
imgTitle = ImageTk.PhotoImage(Image.open('images/crtTitle.png'))
imgInfo = ImageTk.PhotoImage(imgCRT.crop([3,0,350,120]).resize((350,120),Image.ANTIALIAS))
imgInit = ImageTk.PhotoImage(imgCRTf.resize((350,60),Image.ANTIALIAS))

fontSz = 26-2*fontFree


btnTitle = Label(root, image=imgTitle, borderwidth=5, relief=RIDGE,
bg='#66684B', fg='#c4c4c4')
btnTitle.place(width=350,height=120, x=45,y=45)

btnInfo1 = Label(root, text="Tried to load\nINVALID DATA",
image=imgInfo, compound='c', borderwidth=5, relief=RIDGE,
font=tkFont.Font(family=usefont, size=fontSz, weight='bold'),
bg='#66684B', fg='#ba1005')
btnInfo1.place(width=350,height=120, x=45,y=195)

btnInfo2 = Label(root, text="Please close and make sure\nsave_data.txt contains valid data,\nor reopen and 'RANDOMIZE!'\n to create a new save file.",
image=imgInfo, compound='c', borderwidth=5, relief=RIDGE,
font=tkFont.Font(family=usefont, size=fontSz-8, weight='normal'),
bg='#66684B', fg='#586aa5')
btnInfo2.place(width=350,height=120, x=45,y=325)

btnClose = Button(root, text="CLOSE", image=imgInit, command=root.destroy,
compound='c', borderwidth=5, relief=RIDGE,
font=tkFont.Font(family=usefont, size=24, weight='bold'),
bg='#66684B', fg='#586aa5')
btnClose.place(width=350,height=60, x=45,y=605)
YellowHighlight(btnClose)

root.mainloop()

#------------
# PAGE 2
#------------

# PREVIOUS AND NEXT
def prevP():
Expand Down Expand Up @@ -530,18 +588,12 @@ def leave(event):
CreateToolTip(banGC[btnGCi], ('Giant Clank cannot use '+nameGC[btnGCi]))


global RNGsol
# return PW, PG, PC, PGC, RSW, RSG, RSC, RSGC
# Initial State (Veldin 1)
for w in PW[idxP+1]:
btnW[w]['state'] = NORMAL
if w not in RSW[idxP+1]:
banW[w].place(height=50,width=50)

PW = RNGsol[0]
PG = RNGsol[1]
PC = RNGsol[2]
PGC = RNGsol[3]
RSW = RNGsol[4]
RSG = RNGsol[5]
RSC = RNGsol[6]
RSGC = RNGsol[7]
KIII = RNGsol[8]

# DEBUGGING!
#print("Weapon pools: ", PW, "\nSelected Weapons: ", RSW)
Expand All @@ -550,14 +602,6 @@ def leave(event):
#print("Gadget pools: ", PG, "\nSelected Gadgets: ", RSG)
#print("Kalebo III: ", KIII)

for w in PW[idxP+1]:
btnW[w]['state'] = NORMAL
if w not in RSW[idxP+1]:
banW[w].place(height=50,width=50)

mem_card = open("save_data.txt", "w")
mem_card.write(str(RNGsol))
mem_card.close()

root.mainloop()

Expand Down
11 changes: 6 additions & 5 deletions randomize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import math
import random

import math
def getSelection(pool, Kmin=0, Kmax=1e6):
Kmax = min(Kmax, len(pool)) + 1
K = random.randrange(Kmin, Kmax)
Expand Down Expand Up @@ -96,8 +96,9 @@ def randomize(packless,ilj_snflip,batalia_si,tree_skip,oltanis_mb):
if(1 not in Sc):
Sc = []
Sg = getSelection(pool_g)
if(not batalia_si and 3 not in Sg):
Sg.append(3)
if(not batalia_si and 3 not in Sg and 7 not in Sg):
Sg_aux = getSelection([3,7],1,2)
Sg += Sg_aux

PW[6] = [w for w in pool_w]
PC[6] = [c for c in pool_c]
Expand All @@ -106,7 +107,7 @@ def randomize(packless,ilj_snflip,batalia_si,tree_skip,oltanis_mb):
RSC[6] = Sc
RSG[6] = Sg

if(3 in Sg):
if(3 in Sg or 7 in Sg):
pool_g.append(13)
if(7 in Sg or (1 in Sg and 1 in Sc and 2 in Sc)):
pool_g.append(2)
Expand Down Expand Up @@ -264,7 +265,7 @@ def randomize(packless,ilj_snflip,batalia_si,tree_skip,oltanis_mb):
RSW[14] = Sw
RSG[14] = Sg

if(8 in Sg or 2 in Sg):
if(2 in Sg or 8 in Sg or (7 in Sg and ilj_snflip)):
pool_g.append(9)


Expand Down

0 comments on commit 04ba309

Please sign in to comment.