Author Topic: Technical discussion of bases  (Read 49615 times)

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,859
Re: Technical discussion of bases
« Reply #40 on: June 01, 2016, 03:38:28 AM »
Codewalker, your efforts are most appreciated.  If your efforts bring relief to even one person, then it was worth it.

This.  Just this.
"Work is love made visible." -- Khalil Gibran

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #41 on: June 15, 2016, 04:48:39 PM »
Quick, and hopefully not to stupid if a question. What is this powers database being spoken of? Is this a thing, or a concept? If it's real where can. I find it? Would love to start digging through it...

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical discussion of bases
« Reply #42 on: June 15, 2016, 06:14:11 PM »
Quick, and hopefully not to stupid if a question. What is this powers database being spoken of? Is this a thing, or a concept? If it's real where can. I find it? Would love to start digging through it...

Short version.  City of Heroes (the game) like most MMOs didn't hard code game behaviors.  Fundamentally the game was a generic engine that just processed data.  One part of that data set was a database that included a definition for every power in the game used by every player, NPC, and mission.  That data was included in the game servers and told them how the game should process game powers.  For technical reasons it was also included in the game client in the pigg files.  Although the game client itself had no ability to process most of that information (because it did not include any code for processing game powers) the data was/is still there.  Enterprising players managed to decode that data and determine the precise definition of every power and how they worked and deliver that data to the players.

Paragon Chat has no ability to perform combat, but it could one day enable players to display the visual effects (and other things) of various powers.  The powers database would tell Paragon Chat precisely what visual effects each power was supposed to display.

Two ways to peruse it.  The hard way: learn to pigg dive the game client.  Easy way: read City of Data.  City of Data translates a subset of that data into human readable form.

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #43 on: June 18, 2016, 02:28:04 AM »
Thanks Arcana!

I'll look into City Of Data. I take it looking into the piggs file is not an easy thing to decipher? If it not in the realm of insane are there resources that discuss how to read the powers data?

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #44 on: June 18, 2016, 02:37:46 AM »
Hey, I tried to get into city of data @ https://tomax.cohtitan.com/ but it says site is under maintanance. Any one have access to data that was stored there or no how to get the site back online?


Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical discussion of bases
« Reply #45 on: June 18, 2016, 02:49:56 AM »
Hey, I tried to get into city of data @ https://tomax.cohtitan.com/ but it says site is under maintanance. Any one have access to data that was stored there or no how to get the site back online?

Hmm, first I've seen that.  Not sure what happened.  I'll look into it.


Just looked into it.  Apparently its Tony's fault: https://www.cohtitan.com/forum/index.php?topic=12011.0 .  I'm sure they'll have the data back up in a perusable manner eventually. 


Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #46 on: June 18, 2016, 04:38:36 AM »
Thanks for checking!

If anyone else access to the data and can share Please let me know thanks!

Lycantropus

  • Elite Boss
  • *****
  • Posts: 255
Re: Technical discussion of bases
« Reply #47 on: June 21, 2016, 01:13:30 AM »
This.  Just this.
Tossing in my thanks as well for all you program savvy folks do to keep the City going!

I pop into Paragon from time to time when I'm feeling down and missing my CoH, but I have a hard time getting anyone else from my little group to come visit, so inevitably we do other things.

Without getting into all the hopeful powers talk, if the functionality of bases returns somehow, I may be able to guilt them into it, if just to see what I made  ;D

Now to remember how to stack the desks just... so.

Lyc~

Stitchified

  • Boss
  • ****
  • Posts: 133
  • Errors are not in the art but in the artificers.
    • datebest.net - visit website and win smartphone!
Re: Technical discussion of bases
« Reply #48 on: July 01, 2016, 05:30:03 AM »
Hey, I tried to get into city of data @ https://tomax.cohtitan.com/ but it says site is under maintanance. Any one have access to data that was stored there or no how to get the site back online?
What exactly is the City of Data? I thought there wasn't any code from CoH/CoV that anyone had after it shut down, is it the Paragon Chat code?

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,291
Re: Technical discussion of bases
« Reply #49 on: July 01, 2016, 06:37:55 PM »
What exactly is the City of Data?
City of Data was the Red Tomax site that most people would go to for information about the real numbers behind the powers in the game.  There was also contact/story arc information, but most of the time you saw people referencing City of Data, it was to discuss powers.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #50 on: July 10, 2016, 12:42:35 AM »
Arcana / or anyone else, it doesn't look like city of data is coming up anytime soon, and would love to be able to get at the powers information for an application I am writing on top of icon that turns COH into an RPG desktop.

I'm making awesome progress, getting into the pigg files to see the relationship of MOVS, FX, and sound files for a specific power would be huge, as right now I am creating powers configurations for my application by guessing. If anyone can point me to how to dig into these files to look at powers data that would be great. I know how to open them up with pigg viewer, but half time what to do with the content is completely meaningless to me.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical discussion of bases
« Reply #51 on: July 10, 2016, 04:11:01 AM »
Unfortunately, the data in the pigg files is a) variable length record, b) encoded in often unusual ways, and c) often meaningless outside the context of other data (i.e. pointers, indexes, and the like).

There's an easy way to figure out what's in there and a hard way.  The hard way is the way I did it starting back in I9, which is to stare at the data in binary form and decode it like a science project.  The easy way requires some knowledge of debugging the game client: it of course knows how to read the pigg files and if you can figure out where in the game client's code the data file templates are, then you can use them yourself to read the pigg files.  This would be the way the smart people at City of Data (eventually) did it.

I can answer specific questions about specific pieces of data, maybe, if I still remember or can find some notes (its been years since I've looked at them, of course).  But I can't really answer the general question of "how do I dump all that data" because that's a non-trivial question to answer completely.

One of these days I might try to do something there, but right now I don't have the time to pick up that project again.

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #52 on: July 10, 2016, 06:05:06 PM »
Thanks Arcana that is super helpful. I am looking for pretty specific information.

I am trying to find the relationship between specific powers and the FX, sounds, and MOVS that they run, and what order they run. Timing and duration would be helpful, but not absolutely essential.

I have been looking at powerset.bin and powers.bin to see if I can understand and trace
-> powers to powers sets
-> FX , MOVS and sounds that run when a power is invoked, and when a target is hit with those powers.

I *think* I am seeing a relationship between powers, power sets, and fx, but don't seem to see MOVS anywhere.

If you have any knowledge of the existing code  or the file structure to help me in my analysis that would be awesome !

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical discussion of bases
« Reply #53 on: July 11, 2016, 02:51:22 AM »
In the power structure there are a set of sequencer bits that define the animations the power plays on the caster.  There's a set of them corresponding to the animation sequence that is played if you aren't yet in combat mode, if you already are in combat mode, if there is an interruptible preamble, among other things.  City of Heroes players would recognize these as weapon draw, interrruptible animation, and power animation.

The power doesn't specifiy what animation is played directly.  Instead it specifies a set of animation "bits".  The way CoH animation works, entities "play bits" and something called an animation sequencer translates those bits into a specific animation.  There are technical reasons both good and (imo) incomprehensible for why this indirection happens.  Bottom line is a power plays a set of bits, that set of bits is translated by the animation sequencer into an actual animation, and that's where the MOV comes from.

Somewhere on these forums are threads that dealt with customizing Icon with a way to hack the player to play certain animations, and one of those ways was to set the specific bits the animation required.  Those threads will contain more information on the basics of how this works.  I believe they also contained a link to a decoded version of the sequence tables.  They are also in the pigg files in a sequencer.pigg or something like that.

Edit: I should add that anyone interested in understanding how the game worked to provide context to what kinds of information are contained in the game client pigg files should really be reading as much as possible all of the threads concerning Icon customization and Paragon Chat development.  Here and there is a lot of useful information about how very technical things worked, necessary to have any chance at figuring out what any of the data in the game client files means and how it is used.

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #54 on: July 13, 2016, 01:08:01 AM »
Ok, so I did some digging, I managed to find a cool thread on how to call seqbits instead of MOVS by codewalker. Which I tried out. this also had a thread call playerseq.txt which maps movs to text. But nothing in there was obvious to me concerning how to relate back to powers.bin.

I also looked through Powers.bin and sequencer.bin and was at a loss as when it comes to relating the two together, mappping to FX looks pretty straightforward, and the relationship between MOVS and Seqbits also was apparent, but between powers are seqbits not so much. If you have an idea what the original post concerning how to reverse engineer some of that mapping was named Id be super grateful. Ill keep digging in the mean time


Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical discussion of bases
« Reply #55 on: July 13, 2016, 01:19:55 AM »
Unfortunately, the bits have names in the sequence files but are identified by id number in the powers database.  So (just making up off the top of my head) a power might call COMBAT RIGHT SHOOT but in the power's definition that might be in the binary data as "10 30 42".  It was challenging to figure out the correspondence.  For myself, the rosetta stone was actually knowing what animations a power actually played, by reading demorecord files.  Then I worked backward figuring out how the sequencer worked to call that animation, and continued backward until I found the bits corresponding to the bit names.  It was ... tedious.  For extra giggles, the devs added bits all the time during development, and that sometimes caused the bits to get renumbered.  Because just appending to the end would be too easy.

Honestly, if you're going to do the "the hard way" I should point out it took me about six month of concerted effort to get most of it figured out, and I was continuing to put effort into it from I9 to practically shutdown.  There were still a couple of fields here and there I wasn't sure about at the end.  It is not for the timid. I don't want to discourage you, but I do want to prepare you for the task of trying to figure out all that data.

I'm curious, why would you need all of this data for the particular project you were describing? 

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #56 on: July 13, 2016, 02:35:12 AM »
owch, that does sound like a ton of work  :o

The reason I wanted to know the relationship between a power and its dependant resources (including MOVs) is that I have a pretty ambitous project where I am extending Icon to turn into a virtual RPG tabletop, (see https://www.cohtitan.com/forum/index.php?action=profile;area=showposts;u=24847)

Features include
- persistent collections of characters and crowd
- associate character with abilities(ie sequence of MOVS, FX, sound) that can be played at the push of a button
- attack sequences and knockback
- move external characters and crowds
- full integration with Pen and Paper Champions ruleset with character creator and turn based combat

Right now I can fully associate characters with abilities, but the process of creating good abilities is tedious, as I am combing through 1000s of Movs, FX, and sound files and connecting them together from scratch. If i knew the relationships between a power and its dependent resources it would be a lot quicker for me to assemble a good repository of abilities that I could associate from scratch. Still that sounds easier than what you are describing :)

Guess I can always hope city of data comes up.

Either way Arcana really appreciate all the help you have given so far. The app I am building should be pretty cool for COH and Champions fans alike and ill be sure to share it here once I have my first MVP coded up.

Arcana

  • Sultaness of Stats
  • Elite Boss
  • *****
  • Posts: 3,672
Re: Technical discussion of bases
« Reply #57 on: July 13, 2016, 03:10:04 AM »
I know that at one time a while ago people were discussing making Icon popmenus that allowed you to trigger the animations for various powers, and I think I contributed a fair number of seqbits to that, but I can't remember now where any of that was posted.  Also, I don't recall Icon being able to spawn non-player FX, so a lot of power animations are kind of boring like say energy blast just looks like a mime playing patty-cake with an invisible friend.  Those popmenus would be a good place to start, insofar as they represent what Icon can actually do.  Maybe combinations of sequence bits don't do anything in Icon or don't do what you expect because of technical issues.  Since a lot of that work has already been done by other players, it might be easier to fill in the gaps than starting from scratch.  If you have like a specific question about a specific thing, I can try to answer that.

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #58 on: July 13, 2016, 01:26:58 PM »
I'll try taking a look for any mappings done.

So far I have had pretty good results inserting FX Into costume files and loading the costumes over the toon. It doesn't work on NPCs but ok with that.

I was even able to get someone to extend icon so you can fire powers at any direction as opposed to 0,0,0 https://www.cohtitan.com/forum/index.php?topic=12106.msg209005#msg209005

I'll look for those threads you mentioned, if remember where they are please do share :)

Jeff Anderson

  • Boss
  • ****
  • Posts: 121
Re: Technical discussion of bases
« Reply #59 on: July 18, 2016, 10:25:15 PM »
I think I figured it out!

1)Launch Icon in NPC mode, choose the powersets you want to learn mapping of (eg: Ice Blast, Ice Control)
2)type /accesslevel 9 and ~ to activate the console, and type debugPowerCustAnim 1, this puts the power customization screen in debug mode
3) type/ tailor to get at the costume editor with your character, click next to get to the power customization screen
4) all powers you chose at launch will be available in the customizer, launch  a power and seqbits will display on the screen
5) download seqbits.ods, I found this on the forums here -> https://docs.google.com/file/d/0B5FhLhcBjWhvMEhXeDh6RUhiNFU/edit
6)search the ods for the seqbits displayed in the customizer, and you should find the matching mov!