Jump to content

How does the raids editor work?


xyzman

Recommended Posts

Got some questions that might be related to both SV raid mechanics AND the way PkHeX handles the raid data. I am using 20230130 release of PkHeX.

1. How does the game determine which raid Pokemon is in the given den? There is "Raid" structure at 0xCAAC8800 which, based on what I see in hex editor fully matches to entries in "Raid Parameter Editor" available when I click Raid button at the SAV tab. Also, in RaidSpawnList9.cs the seed is commented as "RNG Seed (32bit) for fetching the Raid data table and generating the raid." So is changing the seed enough to determine raid Pokemon and drops? Is there some kind of lookup table, so I can manipulate a given raid outcome (e.g. 6 star Brave Amoonguss with 5 Herba Mystica drops)? 

2. How does the game handle online events? As far as I understand, going online updates five KBCAT*** records (that could be injected and that's how event gallery has all the existing raid distributions). Does setting "Content" value to "Distribution"/"Might7" force the game to use KBCATRaidEnemyArray to determine which Pokemon are being battled?
 

3. As far as I see from RaidSpawnList9.cs, both AreaID and SpawnPointID determine where the raid is on map. Is there a list of Area IDs and SpawnPoint IDs along with their x,y,z map coordinates somewhere?

4. What are the conditions for re-rolling the raids? Just the current date being different than the last saved date (*Int64 KLastSaved)? 

5. Are there any known side effects from having multiple active 7/6 star raids on map?

5a. I personally think that "Set All 6-Star" button should be renamed as it's really confusing what it does after the 20230126 release ( - Changed: Gen9 S/V raid parameter editor "Set All 6 Star" changed to "Copy current values to Other Raids".
). I didn't notice this line in release notes first, so after "Set All 6-Star" seemingly did nothing for me post update, I had to go through the commit history to see the change and what does the button do. 

Edited by xyzman
Link to comment
Share on other sites

1 hour ago, xyzman said:

So is changing the seed enough to determine raid Pokemon and drops?

Yes.

1 hour ago, xyzman said:

Is there some kind of lookup table, so I can manipulate a given raid outcome (e.g. 6 star Brave Amoonguss with 5 Herba Mystica drops)? 

You may want to check Tera Finder and RaidCalc for this purpose :)

1 hour ago, xyzman said:

How does the game handle online events?

When connecting online, 4 blocks are synced with BCAT: fixed_reward_item_array, lottery_reward_item_array, raid_enemy_array, raid_priority_array. Then, the game generates an uint Identifier block based on those files identifier. The event raids are stored in Flatbuffers structures, as the ROM Raids are.

1 hour ago, xyzman said:

Does setting "Content" value to "Distribution"/"Might7" force the game to use KBCATRaidEnemyArray to determine which Pokemon are being battled?

This, I don't know for sure. I tried forcing a Distribution and a Might7 whith Null event files. The Raids ended up being from the standard ROM pool, but that could be because the Null event is filled with standard Raids afaik.

1 hour ago, xyzman said:

3. As far as I see from RaidSpawnList9.cs, both AreaID and SpawnPointID determine where the raid is on map. Is there a list of Area IDs and SpawnPoint IDs along with their x,y,z map coordinates somewhere?

Yes: https://github.com/Lincoln-LM/sv-live-map/blob/master/resources/den_locations.json

1 hour ago, xyzman said:

4. What are the conditions for re-rolling the raids? Just the current date being different than the last saved date (*Int64 KLastSaved)? 

That, or connecting online if the local event raids does not match BCAT events.

1 hour ago, xyzman said:

5. Are there any known side effects from having multiple active 7/6 star raids on map?

Not that I know of.

 

Link to comment
Share on other sites

  • 6 months later...
On 2/1/2023 at 9:08 PM, SkyLink98 said:

When connecting online, 4 blocks are synced with BCAT: fixed_reward_item_array, lottery_reward_item_array, raid_enemy_array, raid_priority_array. Then, the game generates an uint Identifier block based on those files identifier. The event raids are stored in Flatbuffers structures, as the ROM Raids are.

I want to make a custom 7 star raid. for example, Mewtwo
what files do I needs to edit and what tool do I need for it?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...