oedipus_tex Posted February 16, 2020 Posted February 16, 2020 (edited) I've been looking through the game's source code to assist me with understanding the underlying architecture and make better and more informed suggestions. I've found a lot of files, but havent yet located power and powerset data. Anyone familiar with where/how this data is stored able to tip me off? EDIT: And just like that, I found it--in the PIGG files. Now to find a suitable viewer. Anyone familiar with the most current PIGG viewer option? Edited February 16, 2020 by oedipus_tex
Sif Posted February 16, 2020 Posted February 16, 2020 /Assets/BinDumps and under there is, afaik, the closest there is to a source for the powers (I don't think anyone has the original xls files those were generated from). Or search for "powers.def" to find the directories.
RubyRed Posted February 16, 2020 Posted February 16, 2020 It's not in the code itself but a bunch of external .def files that are compiled into .bin files for release bundles. Check Common/entity/powers_load.c for the starting point of where that happens... or if you just want the data itself check the dumps as @Sifpointed out. "We're out of options, I'll have to use the jetpack," I said, strapping on the jetpack and ignoring the many non-jetpack options still left. Having trouble deciding your next alt? Just need a cool name? Try out City Suggests Looking for powers data? Try the Powers API
Sif Posted February 16, 2020 Posted February 16, 2020 13 minutes ago, oedipus_tex said: EDIT: And just like that, I found it--in the PIGG files. Now to find a suitable viewer. Anyone familiar with the most current PIGG viewer option? Piglet is one. But, the power related files have been compiled down to being basically binary dumps, and are very much not friendly for reading. Other than the coh code itself, I'm not sure if there's anything for processing them that's been released by anyone (HC's format is also different than the ouro/live formats as well)
Troo Posted February 16, 2020 Posted February 16, 2020 when folks refer to it as spaghetti.. it's no joke. I think some viewers are listed Spoiler Spoiler 1 "Homecoming is not perfect but it is still better than the alternative.. at least so far" - Unknown (Wise words Unknown!) Si vis pacem, para bellum
oedipus_tex Posted February 17, 2020 Author Posted February 17, 2020 Thanks for the replies guys. I have a really basic question. When developers are refining existing powers, where are they accessing the data to do that? I'm pretty familiar with C, but not with server code. I assume there are files on the server that define each power, and from what you've said so far those files sound like they are either compiled or compressed in some way, so that reading them is not easy. Are we updating powers mainly using a "hunt and test" method or is there more structure to it than that? I've been impressed by the number of tweaks we've seen so far.
Sif Posted February 17, 2020 Posted February 17, 2020 Not sure what the HC devs do, but back on live, the devs had a bunch of spreadsheets they'd modify numbers in, which they used scripts to convert to DEF files (text based). The server would optionally read in those def files and spit out the bins for the client/server to use (presumably, just using the bins when running in prod rather than dev mode).
RubyRed Posted February 17, 2020 Posted February 17, 2020 So the game is capable of reading two formats - .def and .bin. The .def files are plain text and can be edited by hand (I'm guessing Paragon probably had tools for doing this but we don't have those). So you can go in and adjust stats there, and if the server/client are running in development mode, it can read those directly so that a developer can make on-the-fly changes and test them. For release builds, the .def files are read into memory and then dumped out as .bin -- these aren't really compressed per se, but they are a pain to use directly as they're basically a memory dump of the structures as the game sees them. There's also two possible formats -- i24 uses Parse6 which looked a bit more like the original .def files in structure, but i25+ uses Parse7 which is arranged in a way that's quicker to load into memory and cuts down on repetition. You could probably reverse engineer Parse6 pretty easy but for Parse7 I've had to refer to the code a lot. 1 "We're out of options, I'll have to use the jetpack," I said, strapping on the jetpack and ignoring the many non-jetpack options still left. Having trouble deciding your next alt? Just need a cool name? Try out City Suggests Looking for powers data? Try the Powers API
oedipus_tex Posted February 17, 2020 Author Posted February 17, 2020 I see. It's going to take me some time to get all this set up because my laptop needs an overhaul. Can someone post an example of a power structure from a .def file?
_NOPE_ Posted February 19, 2020 Posted February 19, 2020 On 2/16/2020 at 7:12 PM, oedipus_tex said: I see. It's going to take me some time to get all this set up because my laptop needs an overhaul. Can someone post an example of a power structure from a .def file? I actually already did this exact thing over on Ourodev: https://ourowiki.ouro-comdev.com/index.php?title=.def_Files 1 I'm out.
oedipus_tex Posted February 19, 2020 Author Posted February 19, 2020 38 minutes ago, The Philotic Knight said: I actually already did this exact thing over on Ourodev: https://ourowiki.ouro-comdev.com/index.php?title=.def_Files Thanks Philotic. That's very easy to follow. It looks like they created a Power class (or struct? it's been a while since I fooled with C) and each Power is just an object. I really don't know if this is typical of MMOs or just how the original developers happened to do it. Reminds me a bit of Neverwinter Nights or Baldur's Gate, where each power was its own C routine (tho obviously different than that since this is just a structure). Hoping I can get a server set up and do some testing. Is there a good place to get some coaching on how to set up the Microsoft Studio compiler?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now