Jump to content

Where is Power and Powerset data in the released source code?


oedipus_tex

Recommended Posts

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 by oedipus_tex
Link to comment
Share on other sites

/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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

when folks refer to it as spaghetti.. it's no joke.

 

I think some viewers are listed

Spoiler

 

Spoiler

 

 

  • Like 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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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).

 

Link to comment
Share on other sites

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.

  • Like 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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...