Commit graph

10245 commits

Author SHA1 Message Date
Kurt
3811f8d114 Misc tweaks 2024-05-18 00:40:29 -05:00
Kurt
899ee63434 Update dependencies 2024-05-17 22:55:11 -05:00
Kurt
0674d72fae Add ITrashIntrospection, impl on PKM classes
new api allows for checking for trash byte metadata, makes it much easier to write a verifier now
2024-05-17 15:58:49 -05:00
Kurt
f5c6510b82 7->8 Handle garbage string trash
no terminator? no problem
2024-05-17 13:18:48 -05:00
Kurt
da51291364 PK1/2 edit: Use save language when detecting lang
GBPKM allow spa/ita lang as fallback (so that nicknamed species just use fallback)
SK2 GetNonNickname reuse the passed language ID instead of recomputing
2024-05-17 13:18:25 -05:00
abcboy101
417231a67c
Update how symbols are handled for Bank -> HOME transfers (#4276)
This maps the remaining (legal) symbols in the private use area that are modified on transfer from Bank -> HOME. If any of these replacements are made, any leading or trailing halfwidth spaces are trimmed. This can result in nicknames/OT names that are the empty string or consist entirely of fullwidth spaces, even though these can't normally entered.
2024-05-17 11:56:55 -05:00
Kurt
4d6ce53bce Don't bother cloning sav for Gen1-3 dex edits
No need to clone the save file and allocate 2 bool arrays. Yay old code, why not do it better now? :)
2024-05-15 23:50:25 -05:00
Kurt
99857540ae Add version hints to filter name checks
Extract result valid check to less-wide style, add extra sanity checks for Gen3 typed saves.
2024-05-15 23:29:27 -05:00
Kurt
a4a0337162 SAV1/2: Force zeroed slots to be FF
Deleting a slot shouldn't leave a level 0 nameless speciesless mon
2024-05-13 19:47:23 -05:00
Kurt
ca85fba061 Force writeback on addition to uninitialized data
Adding an entity to an uninitialized save's box data will force all data to be flushed unless the final destination was (initially zeroed and has no slots to set).
2024-05-13 19:40:55 -05:00
Kurt
0836d3c670 Mirror handler check to bulk checks 2024-05-13 18:16:26 -05:00
Kurt
bbfec1fb29 GB: Don't read ghost slots
Read count from list, instead of using the full capacity.
Malformed lists (truncated via count) with ghost slots should have those ghost slots ignored.
2024-05-13 18:14:40 -05:00
Kurt
215f892f11 SAV1: Don't reference prior-save boxdata
If the boxes are not initialized, skip reading of box data
If the boxes are empty when saving, don't write if {dest 0} or {boxes uninitialized} to retain old data.
If the boxes have any slots when saving, set the flag that boxdata is good.

Remove flag from SAV2, game is different from SAV1. Only use the boxdata, just mirror to CurrentBox data as Stadium only looks at boxdata.
2024-05-13 17:41:23 -05:00
Kurt
3dc84d6a39 Revise ActiveTrainer checks if unset (unit tests)
No longer need to disable correct-handler-state check for unit tests
Adds indication for HT not matching gender (if active trainer is set)
2024-05-13 17:38:16 -05:00
Kurt
0f7d6e1b6a Handler check for WC7 ash pika reimplemented
The handler state checks to check against current trainer are new, forgot about this edge case.
Reduce allocation of temp strings on wc7->pk7, replicate the HT miss for ash pika wc7->pk7
2024-05-13 12:35:47 -05:00
间辞
89e22337a4
Add Sophia's Gyarados Date (#4272)
* Update EncounterServerDate.cs

* Add files via upload
2024-05-13 09:01:02 -05:00
Eelen
f74efceec3
Update lang_zh.txt (#4271) 2024-05-13 09:00:38 -05:00
Kurt
8b68a07dbd SAV1: Use current box span for source of boxdata
Maybe only a GSC thing where Stadium 2 doesn't know better?
2024-05-13 00:16:29 -05:00
Kurt
5af96eab95 Extract switch-entity HT update logic, fix
Closes #4227
SlotWrite no longer revises the data incorrectly

if ot&gender mismatch, clear memories and set new values
can retain wrong values by having ot&gender shared between games
2024-05-12 23:40:50 -05:00
902PM
28add13282
Fix some typos in Japanese localization (#4264)
* Update LegalityCheckStrings_ja.txt

* Update lang_ja.txt

* Update lang_ja.txt

* Update MessageStrings_ja.txt

* Update const_hgss_ja.txt

* Update const_rs_ja.txt

* Update const_e_ja.txt

* Update text_ItemsG3_ja.txt

* Update text_ItemsG2_ja.txt

* Update text_ItemsG1_ja.txt

* Update text_Character_ja.txt

* Update lang_ja.txt

* Update lang_ja.txt

* Update lang_ja.txt

* Update MessageStrings_ja.txt

* Update LegalityCheckStrings_ja.txt

* Update flags_dp_ja.txt

* Update flags_pt_ja.txt
2024-05-12 16:02:59 -05:00
Kurt
ed8d583c08 Add hover tooltip for special char insert preview 2024-05-12 14:51:25 -05:00
Kurt
7b6abc0520 Reduce alloc for ot/nick by raw trash reads
Legality check now catches buffer overflow mons.
Now that I have each type exposing a trash length & charcount, should be easy to have some reusable trash byte measuring methods (see the old branch)
2024-05-12 14:46:58 -05:00
Kurt
08ed482555 Revise gender symbol remapping
Handles Nidoran's shenanigans as well as more clear method names
- Add normalization for PK7->PK8 (no more 0xE... usage for the gender symbols... maybe more chars?)
- Not sure if Gen3 gamecube encoding needs sanitizing. Who is transferring Nidoran to CXD? :)

Requires some silly usage of Language passing as arguments. Future improvements can be made to revise the half/full encoding determination when setting a string. Probably has issues since we're just doing a naive check without considering nicknames w/ special chars.

Closes #4174
2024-05-12 10:47:55 -05:00
Kurt
a33884895f Remove IsNative property
Not something worth retaining if we can check directly.
2024-05-11 16:20:12 -05:00
Kurt
326e790e4b Handle and ' behaviors for 4->5->6
Gen5 does not use the slanted apostrophe for anything. 4->5 converts to ' for both strings.
Gen6 fixes all to be slanted. Even nicknames.
Importing to HOME (PK7, GO) resets nicknames, and the default name is not slanted. Nicknames/OTs are unaltered; again, only the "default" species name is wrong.

Closes #4066
2024-05-11 11:35:55 -05:00
Kurt
d2e8d722e7 Add setting for pkmeditor selected tab colors 2024-05-10 23:17:22 -05:00
Kurt
410be93358 Add opt-in boxdata dragdrop toggle
Can drag from the Box tab into another window or folder to copy the entire box's contents.
Closes #3933
2024-05-10 22:36:46 -05:00
Kurt
dcb23c7981 Allow adding/hiding extra properties in Report grid
#3933 3.
top level settings for Report

1. was already implemented with the file namer settings on dump

not sure how I want to do dragdrop-multi, but I did recently add a record type for `ConcatenatedEntitySet`...
2024-05-10 19:32:28 -05:00
Kurt
e0172b601c Allow randomizing IV32
Really shouldn't use it.
2024-05-10 19:30:01 -05:00
Kurt
969f733c2c Fix pkmeditor auto-set Nickname flag
Event was stolen via impossible-chars change, so just revert & call that method so only 1 method is hooked to the event.
2024-05-10 19:26:48 -05:00
Kurt
bd4ea9656d Misc tweaks
Fix block editor GUI not showing named blocks (`Equals` is easily repointed...)
No functional change for the others, just reusing/cleaning irks.
2024-05-10 01:22:26 -05:00
sora10pls
58a6d453b8 Add latest distribution raid data 🦭 2024-05-09 20:04:38 -04:00
sora10pls
bcb7135940 Add handling for Wonder Ticket Poipole
See 1ec0f91e08
2024-05-06 13:20:51 -04:00
Easy World
e9b7ccac17
Update Chinese Translation (#4262)
* Update Chinese Translation

* Translation tweak
2024-05-06 06:05:01 -05:00
Kurt
5af6678784 Update 24.05.05
Fix devutil text update
swap tox & poison icons, move picturebox to the right
add some Legality settings util functions
2024-05-05 23:24:32 -05:00
9Bitdo
19951f10e1
Add 신여명's Flutter Mane distribution date (#4261)
* Add 신여명's Flutter Mane distribution date
2024-05-05 23:15:32 -05:00
Kurt
e72ff1a899 Misc tweaks
No noticeable change besides correctly indicating N's Pokemon in hover text (instead of Dream Radar)
2024-05-05 15:33:30 -05:00
902PM
004795b329
Changes (#4257)
* Create const_sm_ja.txt

* Update const_pt_ja.txt

* Create const_oras_ja

* Update flags_oras_ja.txt

* Update const_rs_ja.txt

* Update flags_rs_ja.txt

* Update flags_e_ja.txt

* Create const_b2w2_ja.txt

* Create const_bw_ja.txt

* Update flags_bw_ja.txt

* Update flags_b2w2_ja.txt

* Update lang_ja.txt
2024-05-04 15:10:43 -05:00
Kurt
2d61c833bc MysteryGift drop: use extension-less method if w/o
New Korean WC9 is restrict:0 so just make it behave like restrict:3 -- verifies all possible versions that way.
2024-05-04 14:48:19 -05:00
sora10pls
6855c842ca Permit Ranked Ribbon on Legendaries for Regulation G 2024-05-02 20:28:57 -04:00
Kurt
ad0c9b147d SAV6AO: Fix dexnav get/set
Was looking in the wrong segment of save data. Now points to the correct span (pokedex).

Extract a few more save blocks and interactions.
Basically try to get rid of any remaining `SAV.Data` references. Still a few left, but aren't broken.

Closes #4259
2024-05-01 22:58:47 -05:00
Kurt
0f4024952e Minor clean
indexof -> contains
trailing space
some variable reuse
pcdata/boxdata less janky handling
2024-05-01 00:49:43 -05:00
Eelen
40353c7922
Update CHS Translations (#4256)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2024-04-28 22:47:32 -06:00
Kurt
78fde1367d Add more per-context settings 2024-04-28 18:19:55 -05:00
Kurt
9231f37be4 Move outbreak iteration after slots
essentially wild slots... can have wild marks like slots
need to check before static encounters (cannot have marks)
2024-04-28 16:44:28 -05:00
902PM
eb273d05a4
Japanese language translation updates (#4255)
Revises gen3/4 japanese strings as well as some program messages.
2024-04-28 10:27:11 -06:00
Kurt
e9de611735 Fix sav2 clone
Regression from the version-detect enhancement where we weren't expecting specific versions to be passed, only the lumped ones.
2024-04-28 11:25:46 -05:00
Kurt
e7f79be41d Minor clean 2024-04-28 00:35:26 -05:00
Kurt
bb6e45db60 Refactor out legality settings, add more settings
Extract PP verifier
Add disabling of wordfilter for formats < 6
Add context-specific bypasses for nickname/handler checks
2024-04-26 14:33:03 -05:00
Kurt
94f93d41c5 Update EvolutionGroup4.cs
Handles arceus-9 in future generations (reads as "not present in current game" via personal info if not stripped).
2024-04-26 08:35:54 -05:00