Author Topic: City of Heroes Local Map and Sandbox Mode  (Read 60751 times)

Joshex

  • [citation needed]
  • Elite Boss
  • *****
  • Posts: 1,027
    • my talk page
Re: City of Heroes Local Map and Sandbox Mode
« Reply #80 on: May 06, 2013, 09:49:05 PM »
Sounds like you unintentionally left out a few details when you were talking to your programming buddies. With a sniffer you would want to listen to communication between a client and a server, but as we are all painfully aware there is no server anymore. With just the client and a sniffer the difficulty of the task sky rockets.

meh, I'm aware of that, bt it's still easier than trying to rebild the whole game in another GE

yes, if I had used a sniffer while the game was alive it would have given me everything i need, metaphorically I would have both the questions and the answers to the test, without the server I just have questions, most of the battle related answers can be ascertained from mids anyways as they will be calls for calculations of statistics and so on. of coarse there will be some questions like "what is the percent chance that when you pass a foe they will become aggroed?" and naturally I'll have to fill-in the blank(s) with some numbers/calculations and see if I can't get it close to the way it used to be.

it may not be perfect but it will be a quick way to get results, I will be using the output from the sniffer to create a new server file.

the first question on the test is already apparent "what is the IP number I will need my server file to mimic?"
There is always another way. But it might not work exactly like you may desire.

A wise old rabbit once told me "Never give-up!, Trust your instincts!" granted the advice at the time led me on a tripped-out voyage out of an asteroid belt, but hey it was more impressive than a bunch of rocks and space monkies.

Chance Jackson

  • Lieutenant
  • ***
  • Posts: 76
Re: City of Heroes Local Map and Sandbox Mode
« Reply #81 on: May 06, 2013, 11:13:40 PM »
Well any MMO Beyonce plays would have to be combat heavy, since she's a survivor and she's gonna make it.

It would be rated at least T for Teen, since she's a naughty girl with a bootylicious avatar.

There would be stealth elements, specifically disguises. For example she wouldn't be spotted by the enemy if she were a boy.

And it would have to be heavily gear oriented, since she really wants to put a ring on it.

Except, there must be a glitch in the aiming controls. All her shots keep pulling to the left, to the left.
Nice
Chance Jackson was my Global, I mostly played on Triumph Toons: LIEGE CHEETATRON X - Bots/Traps/Mu lvl 50 +3; DOWN RIGHT FIERCE - SJ/Fire/Soul Brute lvl 50 +3; FIGHT OF YOUR LIFE -KM/Nin/Fire Stalker lvl 50 +3; TIME MAY CHANGE ME - Time/Sonic/Dark; INFERNAL SAMURAI - DB/Fire/Fire lvl 50 +3 replaced by "NITORYU" - DB/WP probably a brute; THUNDEROUS BRUTE - Elec/Shield Scrapper; And Many More!

dwturducken

  • Elite Boss
  • *****
  • Posts: 2,152
  • Now available in stereo
Re: City of Heroes Local Map and Sandbox Mode
« Reply #82 on: May 07, 2013, 12:22:22 AM »
meh, I'm aware of that, bt it's still easier than trying to rebild the whole game in another GE

yes, if I had used a sniffer while the game was alive it would have given me everything i need, metaphorically I would have both the questions and the answers to the test, without the server I just have questions, most of the battle related answers can be ascertained from mids anyways as they will be calls for calculations of statistics and so on. of coarse there will be some questions like "what is the percent chance that when you pass a foe they will become aggroed?" and naturally I'll have to fill-in the blank(s) with some numbers/calculations and see if I can't get it close to the way it used to be.

it may not be perfect but it will be a quick way to get results, I will be using the output from the sniffer to create a new server file.

the first question on the test is already apparent "what is the IP number I will need my server file to mimic?"

I believe there were people doing this in the weeks leading up to the shutdown. Sifting back through the September posts should produce names of people who might have data to share.
I wouldn't use the word "replace," but there's no word for "take over for you and make everything better almost immediately," so we just say "replace."

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: City of Heroes Local Map and Sandbox Mode
« Reply #83 on: May 08, 2013, 04:56:04 AM »
the first question on the test is already apparent "what is the IP number I will need my server file to mimic?"
The authorization server's IP can be supplied through a command line argument when starting the client: -auth X.X.X.X
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: City of Heroes Local Map and Sandbox Mode
« Reply #84 on: May 08, 2013, 01:46:20 PM »
the goal of this project will be to force a player client to think it's the server client, that can probably be done easily in cheat engine, however if it doesn't have the ability to do the basic battle and record figuring due to a lack of serverside calculations, then;

I have no idea what you're trying to say here. "server client" is a contradiction in terms. The stuff that is missing exists only serverside, so there's no way to fool a client in order to do it -- you have to re-implement those things from scratch.

Off the top of my head, most of the powers execution and combat exists only serverside and needs to be rewritten. A few small pieces are on the client in order to display real numbers, but not the part that actually applies those attributes to characters.

Physics and collision also happen on the server and need to be reproduced exactly to match up with the client's prediction code to avoid rubber banding. That of course also means it needs to be able to read and parse map and geometry files.

The client does share some of that with the server (even though the server's calculations 'win') for motion prediction and some limited animation prediction, so it could possibly be gleaned from there as a last resort. It would take some serious reverse engineering with tools like OllyDbg and/or code analysis tools. Poking around with static memory in cheat engine isn't going to make it magically act as a network server.

Quote
so the idea here is to monitor the game's calls for serverside calculations and write scripts that fill those gaps, then repackage them into the original file.

Serverside calculations happen well... serverside. So you won't be able to monitor them.

Quote
we can probably use codewalker's Icon to begin the hacking to make it work.

Icon is a simple hack and is tangential to a real network server. If done properly no modifications to the client are necessary.

Quote
once kinks have been worked out load more maps onto your 'server' you might need 1 Computer for each map (atlas park ETC. not mission maps, mission maps can be on thier own computer all at once)

Not even the official servers used a dedicated machine for each map; the best way to do it is with a watchdog process that dynamically balances and decides which server to start up a new map on (so you might have a dozen or so per server depending on load).

Quote
once you have enough of the game on servers, now it's time to go back and set-up IP addresses instead of ethernet addresses, IP addresses will allow others to connect from any computer accessing the internet.

Simply using IP from the start would be approximately 73% less work than implementing a new layer 3 protocol just to replace it with UDP later.

Quote
if anyone is interested in going through with this, then post here, cause I wont be doing it allone lol.

I hear that the SEGS crew is working on reproducing a network server and has made some very good progress. Rumor has it there's also a second group that's being unnecessarily secretive about their work, but gathered a large number of packet captures before the game shut down. That's completely unsubstantiated though.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: City of Heroes Local Map and Sandbox Mode
« Reply #85 on: May 08, 2013, 02:03:24 PM »
yes, if I had used a sniffer while the game was alive it would have given me everything i need, metaphorically I would have both the questions and the answers to the test, without the server I just have questions, most of the battle related answers can be ascertained from mids anyways as they will be calls for calculations of statistics and so on. of coarse there will be some questions like "what is the percent chance that when you pass a foe they will become aggroed?" and naturally I'll have to fill-in the blank(s) with some numbers/calculations and see if I can't get it close to the way it used to be.

If you had used a packet sniffer while it was running, you would have gotten a file filled with unreadable semi-random garbage.

The game protocol is encrypted, and the encryption key is unique to each mapserver connection. The key is agreed on by means of a Diffie-Hellman Key Exchange and never sent in the clear.

In order to decrypt the COH protocol and begin analyzing it, you need one of the following pieces of information in addition to the packet capture:

  • The DH private key generated by the client.
  • The DH private key generated by the server.
  • The blowfish key that was mutually agreed upon and is used to encrypt the traffic.

(1) exists in client memory only briefly (less than a few microseconds) and is wiped and discarded once the DH exchange is over. (2) is the same, but exists only on the server and is impossible to get without having access to the server. (3) exists in client memory during the same small window as (1) and is discarded once the blowfish S-boxes are populated.

If you have detailed knowledge of how the client works, the approach that I would use is to use debugging tools to set breakpoints in the client and capture (1) and (3) during the connection setup phase, then save them in a file to go alongside the packet capture so that it can be decrypted later.

An alternative approach is to man-in-the-middle the connection so that you can be in control of (2) and (3), at least for half the connection. The MITM program would need to establish a separate connection to the real server and relay the traffic, but would have access to the unencrypted data as it passed through. The COH protocol does no endpoint verification so this is trivial *IF* you already know how the outer UDP protocol works.

Both of these of course require a server to connect to.

JWBullfrog

  • Elite Boss
  • *****
  • Posts: 605
  • I didn't leave Paragon City. They threw me out!
Re: City of Heroes Local Map and Sandbox Mode
« Reply #86 on: May 08, 2013, 04:50:26 PM »
If you had used a packet sniffer while it was running, you would have gotten a file filled with unreadable semi-random garbage.... <<snip, for lots of techy stuff>>



Codewalker showing me once again that, as far as programming is concerned, I'm still at the level of "Fire, Bad! ugh!"
As long as somebody keeps making up stories for it, the City isn't gone.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,293
Re: City of Heroes Local Map and Sandbox Mode
« Reply #87 on: May 08, 2013, 04:57:07 PM »

Codewalker showing me once again that, as far as programming is concerned, I'm the rest of us are still at the level of "Fire, Bad! ugh!"
Fixed.  :)
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

Kyriani

  • Elite Boss
  • *****
  • Posts: 299
Re: City of Heroes Local Map and Sandbox Mode
« Reply #88 on: May 08, 2013, 05:13:03 PM »
I just wish someone would show us some regular progress in making COH playable again =\

I mean I understand the need some feel to keep quiet but I miss the game so badly. I wish I had the financial resources to just pour into some team or another so they could devote all their time to get it functional again.

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: City of Heroes Local Map and Sandbox Mode
« Reply #89 on: May 08, 2013, 05:50:01 PM »
I just wish someone would show us some regular progress in making COH playable again =\

I mean I understand the need some feel to keep quiet but I miss the game so badly. I wish I had the financial resources to just pour into some team or another so they could devote all their time to get it functional again.

Well, back to the original topic, the game does have a debug mode that basically "decouples" the client from the server as far as position updates go, turns off sending input events to the server, and disables the checks that keep you from going too far on motion prediction alone, effectively running all the physics client side. Back on the live servers I used this to run around Khallisti Wharf by teleport glitching to daveland, copying the KW map and naming it data/geobin/maps/_daveland/daveland.bin, bypassing the game's checks that normally prevent it from loading stuff out of geobin that isn't in a pigg, then using a hacked client accesslevel (a static compiled-in blowfish key? Seriously guys, it's like you're not even trying...) to disable the sync. From the point of view of anyone else, my character would just be hovering stationary in a void while I was seeing the sights of KW.

So, theoretically, a "sandbox mode" is possible, though slightly trickier without an actual mapserver. It hasn't really been pursued because, like Icon, it isn't directly helpful in getting usable servers again, since it works by explicitly disabling client/server comms. So it would be a distraction from that goal rather than a help. That and I didn't think there would be much demand for just running around an empty map, especially with the F2 demo camera.

But if you guys are really just frothing at the mouth, I could probably get you running around Atlas Park with a few hours of solid code time... I mean really barebones -- no powers, no NPCs, no working doors, etc. Maybe a couple days instead to do something more flexibile to load different maps rather than hardcoding it.

Kyriani

  • Elite Boss
  • *****
  • Posts: 299
Re: City of Heroes Local Map and Sandbox Mode
« Reply #90 on: May 08, 2013, 06:04:33 PM »
Well, back to the original topic, the game does have a debug mode that basically "decouples" the client from the server as far as position updates go, turns off sending input events to the server, and disables the checks that keep you from going too far on motion prediction alone, effectively running all the physics client side. Back on the live servers I used this to run around Khallisti Wharf by teleport glitching to daveland, copying the KW map and naming it data/geobin/maps/_daveland/daveland.bin, bypassing the game's checks that normally prevent it from loading stuff out of geobin that isn't in a pigg, then using a hacked client accesslevel (a static compiled-in blowfish key? Seriously guys, it's like you're not even trying...) to disable the sync. From the point of view of anyone else, my character would just be hovering stationary in a void while I was seeing the sights of KW.

So, theoretically, a "sandbox mode" is possible, though slightly trickier without an actual mapserver. It hasn't really been pursued because, like Icon, it isn't directly helpful in getting usable servers again, since it works by explicitly disabling client/server comms. So it would be a distraction from that goal rather than a help. That and I didn't think there would be much demand for just running around an empty map, especially with the F2 demo camera.

But if you guys are really just frothing at the mouth, I could probably get you running around Atlas Park with a few hours of solid code time... I mean really barebones -- no powers, no NPCs, no working doors, etc. Maybe a couple days instead to do something more flexibile to load different maps rather than hardcoding it.

Even letting us run around the city zones without mobs or doors would be welcome... I could at the very least take some screenshots.

dwturducken

  • Elite Boss
  • *****
  • Posts: 2,152
  • Now available in stereo
Re: City of Heroes Local Map and Sandbox Mode
« Reply #91 on: May 08, 2013, 06:06:53 PM »
I believe CW said a lot of this a few months ago. That was why I was thinking more along the lines of just rebuilding "from scratch" in a different engine, using the graphical assets from the .pigg files. In no way do I think it would be less work, and I'm not even sure I could start it on my own, but it at least sounds more straight forward. Some things would have to be figured out, and that would likely entail something akin to reverse-engineering, but, big picture, it sounds like less of a headache.

But, I'm also not pretending to know a tenth of what CW knows about this, so a lot of my work would be figuring out juat what the hell I was doing. :)
I wouldn't use the word "replace," but there's no word for "take over for you and make everything better almost immediately," so we just say "replace."

Tiger

  • Underling
  • *
  • Posts: 15
Re: City of Heroes Local Map and Sandbox Mode
« Reply #92 on: May 08, 2013, 07:48:18 PM »
Well, back to the original topic, the game does have a debug mode that basically "decouples" the client from the server as far as position updates go, turns off sending input events to the server, and disables the checks that keep you from going too far on motion prediction alone, effectively running all the physics client side. Back on the live servers I used this to run around Khallisti Wharf by teleport glitching to daveland, copying the KW map and naming it data/geobin/maps/_daveland/daveland.bin, bypassing the game's checks that normally prevent it from loading stuff out of geobin that isn't in a pigg, then using a hacked client accesslevel (a static compiled-in blowfish key? Seriously guys, it's like you're not even trying...) to disable the sync. From the point of view of anyone else, my character would just be hovering stationary in a void while I was seeing the sights of KW.

So, theoretically, a "sandbox mode" is possible, though slightly trickier without an actual mapserver. It hasn't really been pursued because, like Icon, it isn't directly helpful in getting usable servers again, since it works by explicitly disabling client/server comms. So it would be a distraction from that goal rather than a help. That and I didn't think there would be much demand for just running around an empty map, especially with the F2 demo camera.

But if you guys are really just frothing at the mouth, I could probably get you running around Atlas Park with a few hours of solid code time... I mean really barebones -- no powers, no NPCs, no working doors, etc. Maybe a couple days instead to do something more flexibile to load different maps rather than hardcoding it.

Please do.  Because SEGS is so old the costume creator in it is "Jurassic".

damienray

  • Lieutenant
  • ***
  • Posts: 86
Re: City of Heroes Local Map and Sandbox Mode
« Reply #93 on: May 08, 2013, 09:12:52 PM »
Running around in a zone again ?? Really ?? SQUEEEEEEEEEEEEEEEEEEEEE !!! (Wipes drool....)

WolfSoul

  • Lieutenant
  • ***
  • Posts: 82
    • Writing portfolio
Re: City of Heroes Local Map and Sandbox Mode
« Reply #94 on: May 08, 2013, 09:41:44 PM »
Put me in the "Yes, I want to run around the zones!" column.  ;D

Lightslinger

  • Elite Boss
  • *****
  • Posts: 277
  • @Lightslinger, Virtue
Re: City of Heroes Local Map and Sandbox Mode
« Reply #95 on: May 08, 2013, 10:32:02 PM »
As with any reverse engineering effort, I'll support any and all of it, I just don't want the work to stop until we've got 100% of our game back. So yeah, running around zones would be amazing, but I'm going to be selfish and say I want it all :)

I hope you're right about that rumored i24 project Codewalker, I hope those last few months before the shutdown was time enough for a programmer to get all they needed from the servers.

CoyoteSeven

  • Boss
  • ****
  • Posts: 217
    • My Twitter
Re: City of Heroes Local Map and Sandbox Mode
« Reply #96 on: May 08, 2013, 11:39:37 PM »
I vaguely recall that one of the early early patches to the game (like maybe between launch and Issue 1?) accidentally included the source code to the client? Another patch was quickly sent out to delete it, but that doesn't mean someone somewhere didn't copy it.

I wish I could verify that story.

Tiger

  • Underling
  • *
  • Posts: 15
Re: City of Heroes Local Map and Sandbox Mode
« Reply #97 on: May 08, 2013, 11:48:18 PM »
I vaguely recall that one of the early early patches to the game (like maybe between launch and Issue 1?) accidentally included the source code to the client? Another patch was quickly sent out to delete it, but that doesn't mean someone somewhere didn't copy it.

I wish I could verify that story.
Thats funny because wouldn't the large number of new file types in the extracted patch include lots of extra .C .OBJ .DLL files that would tipoff the person releasing the patch? But then again I have seen Nintendo WII DLLs included on retail PS2 discs. See this post I made on the Xentax Forum:
http://forum.xentax.com/viewtopic.php?f=16&t=10167

CoyoteSeven

  • Boss
  • ****
  • Posts: 217
    • My Twitter
Re: City of Heroes Local Map and Sandbox Mode
« Reply #98 on: May 08, 2013, 11:55:53 PM »
Thats funny because wouldn't the large number of new file types in the extracted patch include lots of extra .C .OBJ .DLL files that would tipoff the person releasing the patch? But then again I have seen Nintendo WII DLLs included on retail PS2 discs. See this post I made on the Xentax Forum:
http://forum.xentax.com/viewtopic.php?f=16&t=10167

OMG now that's one heck of a blunder, LOL.

I guess everyone should dig out their old old CoH install discs on the off chance that the client source might have been put there by mistake?

EDIT: Or maybe it was the server source that got accidentally included? Curse my failing memory.
« Last Edit: May 09, 2013, 12:01:26 AM by CoyoteSeven »

DeepThought

  • Underling
  • *
  • Posts: 2
Re: City of Heroes Local Map and Sandbox Mode
« Reply #99 on: May 09, 2013, 01:38:35 AM »
I can't help thinking that one of the former workers for the now-closed Paragon Studios might 'annonymously' slip a source code.

It's not like NCsoft treated them particularly well with the closing, amiright?