Commit graph

544 commits

Author SHA1 Message Date
Kurt
bc054c09ed PK5: Clear party stats on import
Add property get/set for the undocumented fields
2022-05-08 18:36:18 -07:00
Kurt
69794e7328 PK4: Add Seals & Ball Capsule index
0xD4 + 0x18 = 0xEC = 236 bytes -- end of data!
2022-05-08 13:16:41 -07:00
Kurt
be9c947dd6 Use tuples and ComboItem, not anonymous class
Little more explicit
2022-05-06 15:43:51 -07:00
Kurt
fa76da56c9 Inline some Rand32 calls
No functional change
2022-04-26 20:21:26 -07:00
Kurt
1f49574be1 Fix g6 hof len 2022-04-23 22:05:51 -07:00
Kurt
f5358e0e37 Update HoF6 entity editing
Reusable entity struct, no more overlapping fields
Adds OT Gender, fixes some flags.

Thanks L1nk2futr3 !
https://projectpokemon.org/home/forums/topic/60977-hall-of-fame-tid-resetting-gen-6/?do=findComment&comment=275575
2022-04-23 10:42:56 -07:00
Kurt
ff2e890e69 Revise Overworld8a application of PIDIV
Instantiating from template now follows group seed -> spawn 1 correlation, including alpha move.
Differentiates static encounters that don't follow the ow8a correlation, scrambles EC to disassociate.
Adds rand64 to get initial seeds
Set correct level range to match slotSeed; not respecting the slot roll being valid, but whatever.
2022-04-22 21:11:11 -07:00
Kurt
e90f19c962 Add setters for spawner objects
UnknownSeed->CountSeed
Seed_01 -> AlphaSeed
yay, no more unknown seed functionality, all documented.
2022-04-18 22:25:34 -07:00
Kurt
515a503ee4 Update spawner models, import from permutemmo 2022-04-17 14:54:54 -07:00
Kurt
a61d8d1efc Extract IMultiplayerSprite from SaveFile
only used by gen6 saves
2022-04-15 14:58:40 -07:00
Kurt
a681783f1a Extract interface for SaveBlock, allow strict
External users shouldn't be using SaveBlock
2022-04-15 11:45:04 -07:00
Kurt
ac7947fd66 Misc tweaks - static namespace using 2022-04-15 09:54:12 -07:00
hp3721
f740e1dd72
Fixed rebattling BDSP trainers (#3481) 2022-04-14 18:36:01 -07:00
Kurt
a5ee845c3b Decouple event flag/work from SaveFile 2022-04-09 18:12:57 -07:00
Kurt
274b613487 Change signature to set stackalloc ivs 2022-04-08 20:43:31 -07:00
Kurt
d40bfa63c7 Refactor gen2 mail data structure
Now reads/writes correctly in the GUI.
Closes #3470

Not going to handle slot swaps not matching the data, as this becomes problematic when cloning slots. Previous commit added the ability to manually move mail slots.
2022-04-02 23:36:56 -07:00
Kurt
55083ee02c Fill(0) -> Clear() 2022-03-26 13:33:58 -07:00
Kurt
8bf618008a Remove structconverter
Won't work on bigendian architecture for non-byte fields, so just do it manually.
2022-03-25 19:47:23 -07:00
Kurt
2cbdd5dbe6 Add gen4 pokedex extdata reader 2022-03-22 10:25:53 -07:00
Kurt
46c83faa0e Refactor hall extradata to read as a separate block 2022-03-21 18:53:24 -07:00
Kurt
fadcf92dc8 Faster pokecrypto
net6 was 4x faster than 461 with the old implementation; now it is faster for both but not as disparate.

New implementation performance is always at least 30% better than the old implementation; even better for smaller chunks of data (40% less time).

Pretty much mimics bare metal value writes
2022-03-20 02:44:36 -07:00
Kurt
54f1e341f9 Spanify spawner object get 2022-03-20 01:46:24 -07:00
Jonathan Herbert
9222bfa919
Fix BDSP V1.3.0 Suffix (#3465) 2022-03-16 08:01:25 -07:00
Kurt
9aa5bbea2d BDSP v1.3 2022-03-15 19:24:17 -07:00
Kurt
70ea1f7048 Move some files around 2022-03-15 19:23:03 -07:00
Kurt
b45ce123da Show rainbow bean index
14 -> 15
Clean up some API functions
2022-03-08 21:02:06 -08:00
Kurt
4e1276a954 -8 bytes from each encounter template
saves about ~1MB RAM savings (>=179,142 objects)
2022-03-06 23:25:47 -08:00
Kurt
ba9d3c95af Fix bean get/set 2022-03-06 15:33:33 -08:00
Kurt
9049ef99fd Minor allocation reduction 2022-03-06 13:03:39 -08:00
Kurt
7911cd6d5c Seal some classes 2022-03-06 12:16:36 -08:00
Kurt
e17483fe46 some linq reduction 2022-03-05 20:03:52 -08:00
Kurt
1c0f842173 Remove unnecessary Clone method for Items
Remove linq using by doing things slightly more efficiently
2022-03-05 19:51:16 -08:00
Kurt
1370d9ab0f Merge SAV8 into SAV8SWSH
Was originally expected that gen8 was going to be a pair+revision generation, but with BDSP and PLA being totally different games, there's no need to have inheritance complicating a single SWSH class.
2022-03-05 17:34:09 -08:00
Kurt
1f07685921 Update MyStatus8b.cs 2022-03-05 15:17:13 -08:00
Kurt
d1e62fb6d1 Add dex solitude complete mark checkbox 2022-02-28 00:03:38 -08:00
Kurt
b3cd4dea25 Initial support for PLA-v1.1 2022-02-27 07:56:47 -08:00
Kurt
0404b94f86 Add support for BDSP 1.2.0 save files 2022-02-21 18:11:35 -08:00
Kurt
f1264a1a97 Handle struct default ctor 17.1 handling
Closes #3445
2022-02-21 16:11:58 -08:00
Kurt
d5be6254f3
Add logic for PLA wild RNG correlation (#3443)
Adds structures to read/write saved spawner data such as seeds, counts.
Adds generator and validator to emulate the FixInitSpec builder used by the game logic

Similar to SW/SH raids, validating these in-process is not feasible due to the number crunching required.

This does not handle the encounter slot call or the follow-up level range call. Just the inner FixInitSpec ctor & fill.

level is calc'd:
randFloat(sum) -> slot float
rand.Next() -> gen_seed (for all the details)
rand.NextInt(delta) +min -> level

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-02-20 17:59:48 -08:00
Kurt
dc3d8e7cec Minor clean 2022-02-14 21:32:52 -08:00
Kurt
574a7f43a0 BDSP: Handle uninitialized box names
span refactoring didn't catch this
also apply same change for gen4 battle revolution string reads
2022-02-11 10:43:27 -08:00
Kurt
a5d1bf7900 Fix cxd pouch write, bk4 pid reads
Closes #3429
2022-02-10 10:57:59 -08:00
Kurt
16da1deadc Revise battle subway flag handling
Retain all flag bits; expose the other 5 flag bits as some saves do have them.

Undocumented.

Closes #3422
2022-02-09 15:41:00 -08:00
Kurt
f5344452cf Fix last funfest mission record r/w
Closes #3423
2022-02-09 10:36:46 -08:00
Kurt
5cdfe18b8e Add 7b Starter choice
Closes #3420

Co-Authored-By: GiftedK <99304781+GiftedK@users.noreply.github.com>
2022-02-08 18:49:44 -08:00
Kurt
5c33245221 Update MyItem8a.cs 2022-02-04 22:28:07 -08:00
Kurt
e2bafab3c2 Clamp pouch inventory per satchel size
Closes #3384
2022-02-04 22:18:57 -08:00
Kurt
0b32cbf132 Update PKHeX.Core abstractions with latest logic
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-02-04 17:35:15 -08:00
Kurt
691f941bb6 Add savedata models
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-02-04 17:31:20 -08:00
Kurt
752ddc1a88 Move SWSH save abstractions to subfolder 2022-02-04 17:22:33 -08:00