Talk:Save data structure (Generation IV)

Latest comment: 23 June 2025 by Nescientist in topic Revamping the page / HGSS distinction

Ah, thanks Sabresite... probably better this way. -Codemonkey85

TO DO

This page needs to be overhauled completely. Sabresite 09:42, 26 February 2009 (UTC)Reply

Revamping the page / HGSS distinction

hello! i've been reworking the article slowly as i am in the process of writing a library & tool to edit pkmn save files. one thing i've noticed as i'm writing more and more is that this page will (eventually) become a monolith. part of what i am struggling with is the distinction between DP, Pt and HGSS.

platinum is mostly the same as diamond/pearl but with some extra bits and thus some offsets shifted slightly. HGSS, unfortunately, is a bit more of a mess with both offsets and data structures, making it a bit more difficult to keep everything inline.

based on the wiki's guidelines, i'm unsure of the format needed for this page to support both DPPt and HGSS. at the moment i'm fine to just keep trundling on as i am, but i would appreciate some guidance on this (eg: split into a DPPt page & an HGSS page; keep both in the same page but different headings; use the table format that Save data structure (Generation III) uses [i think this is horrible to read and parse]). TIA! Boots7238 (talk) 13:28, 22 June 2025 (UTC)Reply

First of all, thanks for the work you did so far. Definitely improved the page quite a bit.
I believe the objective of wiki pages is to be as helpful to its readers (and the community) as possible; in this case, that would mean someone trying to find out about how save data is structured - that's the use case.
Right now this page would probably be found via the template (which probably isn't really ideal, but that's another problem), which could obviously be updated if the page was split. Anyway, if two pages contained a lot of repeated information (such as notes about what bytes encode), that would obviously inefficient for someone trying to find out about all of Generation IV. Two main headings in one article would probably have similar drawbacks. (And if you mean the tables with different columns for different offsets by game on the save data in Gen III page, I don't really find them too unreadable tbh.)
All of this isn't really codified in any rules (and I think noone should expect that it was), so my advice would be to just propose (or well, do) what you think would work best. Most often, I think it seems sensible to keep it in one place; however, if you think the best overall experience would be two different pages (both linked to from the template), we can certainly discuss that here as well.
In a similar vein, if you happen to have yet another idea for this page that other pages would also benefit from, that is certainly worth evaluating (or trying out) too!
I hope this helps. (And please don't hesitate if there's anything else.) Nescientist (talk) 18:05, 22 June 2025 (UTC)Reply
there's still a lot to go unfortunately :D
i agree that there'd be a lot of data duplication, my main issue with the tables on the gen3 page is, at least for me, it's just really difficult to figure out at a glance what an offset / length is for something for a given game. i think part of it is that the games themselves are coloured/stylised (really hard to see LG / E on light backgrounds), but also i think the tables themselves need a bit of a style pass to make them a bit more readable.
i don't have a good answer for it, and tbh it's a bit of a pipe dream atm as i'm still working through DPPt before even considering HGSS. i just know in the future there may be a problem in maintaining the 2 and want to get ahead if possible so i don't keep kicking it down the road.
one other thing that's bugging me is the styling of the tables - the small block table for instance is still quite malleable (i will likely break this down into multiple smaller tables soon-ish), and every time i'm adding fields i need to manually set the bg/align. in an ideal world i'd just shove a bit of css saying "tr:nth-child(2n) { background: #ddd; } tr:nth-child(2n+1) { background: #eee; }" but i don't seem to see any option for this?
lastly - this may actually be out of scope for this page, but one thing that would be nice would be to have some example saves. i wouldn't mind creating some, but of course i'm unsure of the legality (and don't want to be submitting unusable junk). i'll also backport that in to some of the other pages like the character encoding page, but since those are all just words that can be inlined without issue
sorry for the wall of text, and thanks for your feedback! Boots7238 (talk) 18:35, 22 June 2025 (UTC)Reply
As for tables, you can certainly get some inspiration from Help:Tables, and/or other pages which might do a better job.
I think example saves shouldn't really be here, they're really different than even fingerprints such as for move data. If anything, we could give an illustrating example (much as how we do at Hidden Power (move)/Calculation or personality value, for example), but I'm not sure that's actually necessary here. Nescientist (talk) 14:57, 23 June 2025 (UTC)Reply