Hidden Encounters
FUN_7100dc8590
is called every step
from math import log2 | |
from time import perf_counter_ns | |
import numpy as np | |
import pyopencl as cl | |
BASE_ADVANCE = 45 | |
class TinyMT: | |
def __init__(self, seed): | |
self.state = [seed, 0x8F7011EE, 0xFC78FF1F, 0x3793FDFF] |
{ | |
"areas/a_0201.json": [ | |
{ | |
"pos": [ | |
16737.070312, | |
2100.0, | |
8907.0 | |
], | |
"max_spawns": 1 | |
}, |
from io import BytesIO | |
import struct | |
from dataclasses import dataclass | |
import lz4.block | |
import os | |
def fnv1a(s: str): | |
"""FNV1a hash""" | |
h = 0xCBF29CE484222645 |
from hashlib import sha1 | |
with open("savedata.bin", "rb") as savedata: | |
data = bytearray(savedata.read()) | |
for chunk in range(0x33ff, -1, -1): | |
chunk_pos = chunk << 4 | |
for i in range(16): | |
data[chunk_pos + i] = ( | |
data[chunk_pos + i] - data[chunk_pos + ((chunk + i) & 0xF) - 16] |
Name: Randomized Spawns | |
Author: Lincoln-LM | |
c2159ad0 00000008 | |
809e0020 28041752 | |
4182002c 38600000 | |
3880022c 3d80801a | |
398cdef0 7d8803a6 | |
4e800021 3c808036 | |
3884df88 1c63001c |
GRADIENT = [ | |
[1, 1], | |
[-1, 1], | |
[1, -1], | |
[-1, -1], | |
[1, 0], | |
[-1, 0], | |
[1, 0], | |
[-1, 0], | |
[0, 1], |
# Heavily based on LattiCG | |
using JuMP, CDDLib, Nemo | |
const MULT::BigInt = 0x5D588B656C078965 | |
const ADD::BigInt = 0x269EC3 | |
const MOD::BigInt = BigInt(1) << 64 | |
"Bound the RNG state based on a given rand(maximum) value" | |
function bounds(value, maximum = 1 << 32) |
3 shiny roll chance: | |
fraction: 50319361/68719476736 | |
decimal: 0.000732243075617589056491851806640625 | |
repeats from digit None onward | |
alternate fraction: 1/1365.66672092676216615707818706203363750982449876499822801803862334420343692361276209369987826355744064397002179737536810135565910703834255764893357846893167025710044290904250552784245412019441184875141796812562862235074884993074534471930198000725804129348939864319819164635258384938552776932123601490090464384076737381462375883509331527481042535496426514637179116801582595613644616830487970624269254929529013693158782362121013420659296528030234724165118074531987796903859729061344797283892376932211042982044227469422753599752588273130097975608235565630493598676660460771749466373390552395925695479320574043060681951028750146489340355494577922005011152665472043653336535811732585395907551369740168202851383585733531075643031317508185368252192232727279664779526910129085303766079223462317019486793562422225512760386603478529864479002426123813456216186847046805701686076657 |