Skip to content

Instantly share code, notes, and snippets.

@kyzentun
kyzentun / r-mode.md
Created August 25, 2023 00:39
r-mode blue suit guide

R-mode blue suit

This trick is performed in pre-cathedral room, using 1 reserve tank, x-ray, speed booster, and CF ammo.

You must have at least 70 energy in the reserve tank, and it must be set to auto. 60 is near death, 100 gives more breathing room, more than 100 is a time loss.

Energy must be below 20, so that one hit from a sova will trigger reserves.

Entering R-mode

  1. Position Samus as deep in the doorway as possible without triggering the transition. Holding angle and tapping forward to move a pixel at a time is a good way to get into position.
@kyzentun
kyzentun / dorp.lua
Created August 27, 2022 22:49
List of doors that can have color changed in VARIA.
return {
{
name = 'crateria', sym = 'a',
x = 0, y = 0,
doors = {
{room = 0, name = 'land'},
{room = 0, name = 'crpb'},
{room = 0, name = 'moat'},
{room = 0, name = 'pmot'},
{room = 0, name = 'bomb'},
@kyzentun
kyzentun / sprite_splitter.lua
Created June 9, 2022 04:33
Takes a Super Metroid sprite sheet and quarters each frame to create a broken looking sprite
gamelicense = "Compatible"
-- replace subcritical with some library that can be used to read/write a png.
require "subcritical"
sc.no_strict_path = true
-- replace pngload and pngdump with png read and write functions.
local pngload = assert(SC.Construct("PNGLoader"))
local pngdump = assert(SC.Construct("PNGDumper"))
local passed_path= ...
@kyzentun
kyzentun / kyzgen.lua
Created December 5, 2021 20:29
Script I run to generate VARIA seeds
local command = 'python3.8 ./randomizer.py -r ~/smr/smh.smc --moonwalk --param standard_presets/kyzentun.json --randoPreset rando_presets/kyzentun.json'
local bad_sprites = {
'samus_upside_down_and_backwards.ips',
'samus_upside_down.ips',
'samus_backwards.ips',
'captain_novolin.ips',
}
local sprites = {
'alucard.ips',
'bailey.ips',
local missiles = {
{name= "meteor", str= 6},
{name= "sidewinder", str= 12},
{name= "javelin", str= 3},
{name= "torpedo", str= 30},
{name= "typhoon", str= 40},
{name= "heavy rocket", str= 16},
{name= "nuke", str= 200},
{name= "pug seeker", str= 40},
{name= "korath mine", str= 35},
@kyzentun
kyzentun / pilot_age.lua
Created November 30, 2019 17:01
Simple pilot age calculator for Endless Sky
local start = {year = 3013, month = 11, day = 16}
local pilots = {
{year= 3045, month= 9, day= 10},
{year= 3020, month= 4, day= 18},
{year= 3043, month= 5, day= 21},
{year= 3027, month= 12, day= 30},
{year= 3023, month= 11, day= 24},
{year= 3027, month= 2, day= 8},
{year= 3030, month= 6, day= 26},
-- adjust_luma belongs in 02 Colors.lua
function adjust_luma(from_color, adjustment)
local res_color= {}
for i= 1, 3 do
res_color[i]= (from_color[i]^2.2 * adjustment)^(1/2.2)
end
res_color[4]= from_color[4]
return res_color
end
local str_digit_to_frame= {}
for i= 0, 9 do
str_digit_to_frame[tostring(i)]= i
end
local function sprite_number(digits, commands)
local parts= {}
local spacing= 32
local midpoint= spacing * digits * .5
local frame= Def.ActorFrame(commands)
local function permanent(mod)
mod.start= -100
mod.length= 1000000
return mod
end
local infinity_radius= 192
local pos_input= {'*', .125, 'eval_beat'}
local x_input= pos_input
local y_input= {'*', pos_input, 2}
local columns= notefields[pn]:get_columns()
local num_columns= #columns
local radius= 192
for i, col in ipairs(columns) do
local angle= i * (math.pi * 2 / num_columns)
col:set_base_values{
y_offset_vec_x= math.cos(angle),
y_offset_vec_y= math.sin(angle),
reverse_offset= radius,
column_pos_x= 0,