Jump to content

Kaphotics

Helpful Member
  • Posts

    7216
  • Joined

  • Last visited

  • Days Won

    357

Everything posted by Kaphotics

  1. Thanks, fixed in latest commit. https://github.com/kwsch/PKHeX/commit/3a3ffe0d00153b975f5447b2f5e67a48c44f0596 I'll probably post a new version in the next few days, as there's been a few changes in the past 24h (and a few other things still to come).
  2. no need to look 40 pages back when someone linked one 2 pages back google is not hard either can even filter by recent if searching videos
  3. PKHeX doesn't handle the 'mystery gift event' script injectables, the WC3 data is basically a PKM template like the formats in future generations. The way PKHeX's legality checking works is by finding matching encounters then verifying the PKM data against it. PKHeX needs an 'encounter' for these events; EncounterSlot/EncounterStatic/EncounterTrade don't really fit the bill, but the future games event templates do. By making fake templates with all the relevant details, the program can detect these gen3 events. WC3 data is not able to be saved, as it is not from a binary format (it's just code).
  4. Thanks https://github.com/kwsch/PKHeX/commit/eafc28422ef890feabec528c77212a5f53abe98d
  5. Nab one from the MGDB in PKHeX, then hold control when viewing the legality report. Should tell you what the PIDIV type should be.
  6. Cool, as I expected, it bumps LanguageID=0 to LanguageID=1 on the pk5->pk6 transfer Commit added: https://github.com/kwsch/PKHeX/commit/aa3393e5b2878d4a58b79c42e9e12f84596f1b96 Thanks everyone!
  7. What happens if one of these is brought up to Gen 6 (via transporter, not PKHeX)? Need to see if the language ID value gets fixed on transfer (pk5->pk6)... I've got a fix ready to go, just need to confirm my hypothesis! The ROM stores the encounter trade data with language IDs; I assume this value was undefined until it was noted prior to other language releases.
  8. Already been fixed since last release: https://github.com/kwsch/PKHeX/issues/1449
  9. Those functions are from the game's code, not PKHeX. You can open PKHeX with visual studio 2017 community by opening the .sln file.
  10. Thanks, fixed in latest commit https://github.com/kwsch/PKHeX/commit/5665481cabe74ad2331215118c482a98aac6d321
  11. From PKHeX's source code, the internal name of this Save Block is BattleInstSave: /* 32 */ BattleTree = 0x6B200; // [1FC] BattleInstSave 0x6B200 is the offset within the save file, 0x1FC is the total length of the save chunk. IsExistScoutTrainerData: signed int __fastcall Savedata::BattleInstSave::IsExistScoutTrainerData(int a1, int a2) { unsigned int v2; // r2@1 int v3; // r3@4 int v4; // r0@5 signed int result; // r0@9 v2 = a2 - 0xFFFF; if ( a2 != 0xFFFF ) v2 = 0; if ( a2 == 0xFFFF ) goto LABEL_12; while ( 1 ) { v3 = a1 + 2 * v2; if ( *(v3 + 40) == a2 ) { v4 = v2; goto LABEL_8; } if ( *(v3 + 42) == a2 ) break; v2 += 2; if ( v2 >= 0x32 ) goto LABEL_12; } v4 = (v2 + 1); LABEL_8: if ( v4 == 50 ) LABEL_12: result = 0; else result = 1; return result; } IsFullScoutTrainerData: _BOOL4 __fastcall Savedata::BattleInstSave::IsFullScoutTrainerData(int a1) { unsigned int v1; // r1@1 int v2; // r3@2 signed __int16 v3; // r0@3 v1 = 0; do { v2 = a1 + 2 * v1; if ( *(v2 + 0x28) == 0xFFFF ) { v3 = v1; return v3 == 0x32; } if ( *(v2 + 0x2A) == 0xFFFF ) { v3 = v1 + 1; return v3 == 0x32; } v1 += 2; } while ( v1 < 0x32 ); v3 = 0x32; return v3 == 0x32; } Looks like 50 entries (2 bytes per?). Hopefully this helps.
  12. Remember this? Have you tried editing it? In the exefs is a 38 count list of species IDs: .data.r:0059E870 word_59E870 DCW 150, 151, 249, 250, 251, 382, 383, 384, 385, 386, 483 .data.r:0059E870 DCW 484, 487, 489, 490, 491, 492, 493, 494, 643, 644, 646 .data.r:0059E870 DCW 647, 648, 649, 716, 717, 718, 719, 720, 721, 789, 790 .data.r:0059E870 DCW 791, 792, 800, 801, 802 It's called by PokeRegulation::CheckLegend, which looks like this: signed int __fastcall PokeRegulation::CheckLegend(PokeRegulation *this, int a2, unsigned __int8 a3) { signed int v3; // r1@2 __int16 *v4; // r2@5 PokeRegulation *v5; // r12@5 bool v6; // zf@5 if ( this != 670 ) // floette { v3 = 0; while ( 1 ) // iterate until list is finished { v4 = &word_59E870[v3]; // legend list v5 = *v4; v6 = v5 == this; if ( v5 != this ) v6 = v4[1] == this; if ( v6 ) // ???? dunno, possibly an external banlist having a bitflag set break; // returns true v3 += 2; // each species is 2 bytes (ushort) if ( v3 >= 38 ) // last entry exhausted return 0; // false } return 1; // true } if ( a2 == 5 ) // AZ Floette return 1; // true return 0; // false } That's probably the function it calls; simplest way for the game to check is to just check all species through a list rather than bitflags, which would be reserved for dynamic banlists (ie rulesets in the save file, in which the goal is to minimize the space used rather than speed).
  13. Opening and saving via the medals editor will clear the values Relevant commit / issue, and another where the above prevention was added. Keep in mind that the primary purpose of the legality checker is to check legality (ie flag detectable hacked pkm), not to give hints on how to fix it
  14. Probably used the 6->7 PKHeX transfer before it was known that the super training flags were cleared. PKHeX can detect its prior mistakes! > I used the German Debug Ruby to give it the unreleased ribbons. gee, wonder why it's being flagged
  15. JP farfetch'd: Level was edited, Leer and Sand Attack come from higher levels. Typical for others (someone dropped them back to a min-low level?) JP seedot: Ability does not match PID Plusle: there's no way to get a volbeat at level 4, only level 5 via breeding
  16. Unrelated, but all have static PIDs. Interesting tidbit, the Munchlax trade (when evolved) is flagged as illegal, as the incorrect ability flips back to Ability 1 on evolution.
  17. Language ID is 0, not sure if that is typical for Japanese Ingame trades.
  18. Not sure what all is different from the English Ingame trade specimen: new EncounterTrade { Species = 546, Level = 15, Ability = 1, TID = 39922, SID = 00000, OTGender = 1, Gender = 1, IVs = new[] {20,20,20,20,31,20}, Nature = Nature.Modest, Version = GameVersion.W, }, // Cottonee
  19. PID Type: None Since you modified the IVs, the PIDIV correlation is invalid for the encounter. Previous versions didn't check for correlation tampering As for the list, I'd just need to know a rough estimate of which languages and species are affected. If it's only a few the edge case handling will be simple, else something more intricate will be required.
  20. Hold control when you export the legality results, it'll tell you more intricate details. The first one relates to the PIDIV combo, which is probably hacked. The second is an interesting edge case, will need a list of all affected species and languages so that the program can handle it correctly.
  21. since the calls are successive, the IDs and PID/IV are tied together. if that searcher doesn't have a searcher for what you're looking for, you'll have to modify it / build a new one. PKHeX was updated to list the expected IDs for CXD starters, and I've just committed a fix for that double-flag message. https://github.com/kwsch/PKHeX/commit/ddf55ee75acc3e7352782457530f9b4cce284ae5 https://github.com/kwsch/PKHeX/commit/1769bcd30663bb2b88bd42d8154769dfd2f48d04 Thanks for bringing that to my attention
  22. files are usually +/- a few spots relative to the demo, look for similar files
×
×
  • Create New...