Skip to content

Instantly share code, notes, and snippets.

pre, xmp, plaintext, listing { white-space: pre; } .markdown-body pre > code { white-space: pre; } .markdown-body code { white-space: nowrap; }

@luckytyphlosion
luckytyphlosion / abstract_pokemon_sim.py
Created May 22, 2019 14:58
Abstract Pokemon Simulator
import collections
import copy
import string
import random
import math
# switch by inputting in the mon to switch to
# use moves by inputting 1, 2, 3, 4 for each move respectively
"""
@luckytyphlosion
luckytyphlosion / payoff_matrix_estimate.py
Created June 12, 2019 01:36
Estimates the Nash Equilibrium of a game. Currently only supports zero-sum games, can probably support nonzero-sum games.
import random
import operator
import timeit
import time
TOTAL_TRIALS = 100
p1_matrix = [
[6, 8, -8, 6],
[9, 10, 1, 9],
@luckytyphlosion
luckytyphlosion / MMBN4 Red Sun All Icons Route (Game 1)
Last active May 20, 2020 15:25
MMBN4 Red Sun All Icons Route
- TalkToMom
- Jack into stove, do the tutorial
- TalkToDad, he gives you 500Z
- Jack back into stove, get 500Z BMD (corner right), jack out
- Jack into Lan's PC
- Check GMDs for Zenny
- You can also get 2000Z from in-battle GMDs in ACDC
- Pick up MiniEnrg BMD
- Go to ACDC3, and pick up CopyDmg *
- Reg Guard1 A immediately once you have one
@luckytyphlosion
luckytyphlosion / sim_spawns.py
Created February 27, 2020 00:41
simulate spawns
import random
def get_num_endermen(simulating, chunks):
chunks = [{} for i in range(256)]
num_mobs = 0
MOB_CAP = 70
num_endermen = 0
MOB_CHOICES = ("spider", "zombie", "zombie_villager", "skeleton", "creeper", "slime", "enderman", "witch")
MOB_WEIGHTS = (100, 95, 5, 100, 100, 100, 10, 5)
@luckytyphlosion
luckytyphlosion / bn6f_map_data.txt
Last active November 20, 2023 04:08
Dump of map/cutscene/npc scripts for MMBN6 Falzar, EXE6 Gregar, and EXE6 Falzar (some standalone cutscene scripts missing)
This file has been truncated, but you can view the full file.
off_8005A78::
.incbin "baserom.gba", 0x5a78, 0x4
off_8005A7C::
.incbin "baserom.gba", 0x5a7c, 0x4
off_8005A80::
.incbin "baserom.gba", 0x5a80, 0x4
off_8005A84::
real_world_map_number_names = (
("ACDCTown", "Class6A"),
("CentralTown", "LansHouse", "LansRoom", "Bathroom", "AsterLand"),
("Class6_1", "Class6_2", "Class1_1", "Class1_2", "1FHallway", "2FHallway", "FoyerHall", "TeachersRoom", "PrincipalsOffice", "ResearchLab1", "ResearchLab2"),
("SeasideTown", "Aquarium1", "Aquarium2", "Auditorium", "ControlRoom"),
("GreenTown", "CourtFoyer", "Courtroom", "PunishmentRoom", "UndergroundRoom"),
("Admin", "SkyTown", "OperatorRoom", "ForceRoom"),
("ExpoSite", "CentralHall", "SeasideHall", "GreenHall", "SkyHall", "CopyBotControlRoom"),
)

If the Battle scene (in Porymap) is MAP_BATTLE_SCENE_NORMAL, then the game will use a default terrain based on various attributes. For example, being in tall grass sets the battle terrain to a tall grass background. Editing these requires adding new code at src/battle_setup.c#L637.

The default battle terrains are defined at src/battle_bg.c#L601 and the pointers to the graphics are defined at src/data/graphics/battle_terrrain.h#L60. You can replace the filepaths with the files of your choosing to replace the default battle terrains. Note that the pointers are scattered about the file so you'll need to track down all the pointers within [src/data/graphics/battle_terrrain.h#L60](https://github.com/rh-hideout/pokeemerald-expans

@luckytyphlosion
luckytyphlosion / Pokemon Clover Trainer Data (v1.2)
Last active March 30, 2025 20:46
Pokémon Clover Trainer Data (v1.2)
Anything without IVs means 0 IVs straight, not perfect IVs.
I don't actually know the internal trainer format. I dumped trainer sets using a Bizhawk Lua script which loaded
every single trainer and dumped the trainer party from RAM (link: https://github.com/luckytyphlosion/PokemonBizhawkLua ,
requires nightly Bizhawk build to run). Likewise, any level scaled trainer does not mention if it's level scaled.
I set my party to all L80s, so if a Trainer has around those levels, it's probably level scaled. Note that this means
some mook trainers with Pokémon that learn moves past L80 may have different moves depending on your party levels.
-------------------------------------------------------
@luckytyphlosion
luckytyphlosion / SF1 Potential jobs.
Created December 19, 2020 02:33
SF1 Potential jobs.
Echo Ridge
===
Person: Little Kid near the school entrance
Reward: SrchEye
Overview: This kid thinks he saw a ghost near the vending machines.
Talk to him and head over there. You see... nothing. Put on your
visualizer and you’ll see a program behind the card shop. Talk to it,
then return to the kid. You convince him he’ll never see it again and
he’ll reward you.