Skip to content

Instantly share code, notes, and snippets.

@swablueme
Last active April 8, 2023 12:08
Show Gist options
  • Save swablueme/ab5726e482378ca7e930ab52a40abdf1 to your computer and use it in GitHub Desktop.
Save swablueme/ab5726e482378ca7e930ab52a40abdf1 to your computer and use it in GitHub Desktop.
Generate the event_raid_identifier for 7 star raids in Pokemon Scarlet and Violet
import binascii
import struct
#this is the VersionNo described in
#https://github.com/projectpokemon/EventsGallery/blob/master/Released/Gen%209/Raid%20Events/002%20Charizard%20the%20Unrivaled/Json/raid_enemy_array.json
VersionNo = 20221125
#< means little edian
#I unsigned int
hexValueForRaidIdentifier = struct.pack('<I', VersionNo)
print(binascii.hexlify(hexValueForRaidIdentifier))
#this writes the binary file for the KBCATEventRaidIdentifier
with open("event_raid_identifier", "wb") as file:
file.write(hexValueForRaidIdentifier)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment