freddyJarva / lttp-autotimer

Times all transitions for link to the past
MIT License
3 stars 1 forks source link

Feature: Get permalink from rom header and pull mode metadata from the web #18

Closed StructuralMike closed 2 years ago

StructuralMike commented 2 years ago

The permalink can be constructed from the header (if there is one) as in the js code from http://alttp.mymm1.com/game/checkcrc/?game=z3r

relevant part:

// get burn-in title

if(app.format.indexOf("LoROM") > -1) { // LoROM is here index = 0x7FC0; } else if(app.format.indexOf("HiROM") > -1 || app.format.indexOf("SA-1") > -1) { // HiROM & SA-1 is here index = 0xFFC0; } // if headered, adjust as necessary if(app.headered) { index = parseInt(index) + 0x200; } for(let i = 0; i < 21; i++) { let val = arr[index + i]; val = String.fromCharCode(val); burn.push(val); } burn = burn.join("");

freddyJarva commented 2 years ago

Pushed a variant of the metadata fetching to the branch fetch-metadata. This is what the csv would look like with this solution:

# rom_build 2021-09-18
# permalink https://alttpr.com/en/h/ObGbk32nMP
# goal ganon
# mode open
# rom_mode NoGlitches
# entry_crystals_ganon 7
# entry_crystals_tower 7
# item_functionality normal
# item_placement advanced
# item_pool normal
# logic NoGlitches
# accessibility items
# dungeon_items standard
# enemizer_boss_shuffle none
# enemizer_enemy_damage default
# enemizer_enemy_health default
# enemizer_enemy_shuffle none
# enemizer_pot_shuffle off
timestamp,tile_id,location_id,item_id,event_id
1639619907255,,,,0
1639619907391,,,,1
1639619907391,20,,,
1639619907458,,,,4
freddyJarva commented 2 years ago

solved by pull request #32