Extending the Life of Halo Modding

Everything about HD, MD, and their mods.

Moderator: Halo Moderators

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Extending the Life of Halo Modding

Post by Modzy » Sat Dec 24, 2011 2:42 pm

nil wrote:If we skip over the function that sends the key information... I don't know. But we have to find it first :P, although it would sound like gamespy just wouldn't register us.
From my network research, all the info to register in the lobby is sent, it would be just a matter of keeping the server up to complete the register. Problem is key info is sent in its own packet, then gamespy responds, and the game itself sends the "state changed" info telling gamespy the server has closed.

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Extending the Life of Halo Modding

Post by nil » Sun Dec 25, 2011 10:56 am

Sparky wrote:Here's a promising one that I uploaded to HDM for testing:
http://www.halodemomods.com/wiki/File:H ... racked.zip

EDIT: Starts up without requiring the CD. Multiplayer I didn't try yet since it says there's an update... and after I add the update, obviously it will stop working, right?
Probably. It shouldn't force you to update, there should be a way to get around that. (if not, how else do people play in the earlier versions?)

I also need to know what *version* of Halo PC that crack is for, and the non-modified executable file corresponding to that cracked version.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Extending the Life of Halo Modding

Post by nil » Sun Dec 25, 2011 6:29 pm

Just re-read modzy's post. So Modzy, you're saying that the server actually registers on gamespy lobby before the key is verified, and Halo is actually the one that tells gamespy to 'close' the server instead of gamespy figuring that out on its own (because the key is invalid)? If so, that sounds quite nifty. The C functions Halo uses for network transmission are likely sendto and recvfrom by the way.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Extending the Life of Halo Modding

Post by Modzy » Sun Dec 25, 2011 7:27 pm

Yes, the server is registered. Halo itself sends the command to close the server, in the same manner as hitting the End Game button.

Smythe
Commando
Posts: 2429
Joined: Tue Dec 25, 2007 12:52 am
Location: 'Straya Mate

Re: Extending the Life of Halo Modding

Post by Smythe » Mon Dec 26, 2011 4:38 am

ITT: Brains.


Seriously guys you look like you're getting somewhere with all this talking. looking forward to what comes out of it!
Image

nil
Halo Moderator
Halo Moderator
Posts: 1090
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: Extending the Life of Halo Modding

Post by nil » Mon Dec 26, 2011 9:53 pm

Modzy wrote:Yes, the server is registered. Halo itself sends the command to close the server, in the same manner as hitting the End Game button.
This means we also have to prevent Halo from closing the server.

I figured out what that boolean you found actually does, by the way, and why it exists in the first place.

When you create an internet server (not a LAN one), Halo fills up a buffer with the C string "halor.master.gamespy.com". Upon subsequent games, Halo does not have to fill this buffer up anymore so it caches it - this is why I think the boolean exists. It's initially 0 indicating the string hasn't been created yet, then becomes 1 after it creates it. If you close the server, the boolean will probably be set back to 0.

If you store an empty string instead of "halor.master.gamespy.com", you severe Halo's connection to that server which will allow us to create the game but it won't show up in the lobby.

[EDIT]: If I were to guess, the 'r' stands for retail. What do you know, if I ping halod.master.gamespy.com and halot.master.gamespy.com, I get responses back.
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the discord room for general chatting. It's been fun!

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Extending the Life of Halo Modding

Post by Modzy » Mon Dec 26, 2011 10:56 pm

nil wrote:
Modzy wrote:When you create an internet server (not a LAN one), Halo fills up a buffer with the C string "halor.master.gamespy.com". Upon subsequent games, Halo does not have to fill this buffer up anymore so it caches it - this is why I think the boolean exists. It's initially 0 indicating the string hasn't been created yet, then becomes 1 after it creates it. If you close the server, the boolean will probably be set back to 0.

If you store an empty string instead of "halor.master.gamespy.com", you severe Halo's connection to that server which will allow us to create the game but it won't show up in the lobby.

[EDIT]: If I were to guess, the 'r' stands for retail. What do you know, if I ping halod.master.gamespy.com and halot.master.gamespy.com, I get responses back.
"halor" is the identifier of the Halo Retail game lobby. Anything before the ".master..." is an identifier used by gamespy to set up lobbies. Note: gamespy does not have previously set identifiers; rather, any identifier it's given will become its own lobby, and any one that requests the list using the specific identifier will receive a list of all servers started with said ID. Every version of Halo has its own ID: "halor" for Halo Mac/PC, "halomacd" for Halo Demo, etc. I've used these before to make Halo Full load the Demo lobby or the inverse. When I used it to make Demo load the trial lobby, I learned trial had different netcode.

We could also use this to create our own lobby, if desired.

Mgalekgolo
Commando
Posts: 2589
Joined: Thu Jun 24, 2010 6:36 am

Re: Extending the Life of Halo Modding

Post by Mgalekgolo » Tue Dec 27, 2011 12:05 am

Own lobby sounds great.
Yarok wrote:There may be a giant dildo protruding from your forehead.
Image

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Extending the Life of Halo Modding

Post by Modzy » Tue Dec 27, 2011 1:02 am

Mgalekgolo wrote:Own lobby sounds great.
I

I wanted to keep the demo lobby as a way to advertise and get more users for the final release. But if more people want their own lobby, that works too.

kiddten
Commando
Posts: 2469
Joined: Wed Sep 30, 2009 1:42 am
Location: Nova Zeelandia.

Re: Extending the Life of Halo Modding

Post by kiddten » Tue Dec 27, 2011 1:12 am

Well, what if were to make our own lobby, and then make a trial counterpart out of halo full on pc? then we could have inter-platform compatibility with trial users willing to use this version. It would have benefits for them too, using the newest full build removes issues they have had, like hackers and all that jazz.
kiddten, on most things nowadays wrote:no
TaxiService wrote:HERE IS THE GODDAMN WALDO YOU CHEATING DICK
๖ۣۜĐeяP wrote:U MOTHER FUCKER AND U FUCKING PARENTS AND FUCKED OFF ASS HOLES

Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: Extending the Life of Halo Modding

Post by Sparky » Tue Dec 27, 2011 6:26 am

THIS CHANGES EVERYTHING.
[/color]

OK LOL so to sum this all up, all you have to do is make a script to run at the new URI that the game links to. With mac os x's web sharing ability, you can even set the script location to your computer's localhost web sharing directory. So we can distribute a .php script to run on the person's computer when they host a game. And to figure out if they're host or client, just make an if-else function in the script. What you will see here is that we can even use existing gamespy lobbies by having the php script connect to those lobbies. But the game executable would connect to the gamespy lobby through this script, so we could basically do whatever the heck we wanted over the internet connection. We could have inter-platform games like arachnid said, synchronize AI, scen, mach, whatever else, have games with 256 players in it, etc.

Here's a breakdown of it:

The problem is that the information sent over the netcode would require the hosting player to run a side program to interpret the information sent from different game versions. If it were a dedicated server, though, then the server could more easily run this program... not to mention it would be a dedicated server for halo demo, trial, full mac and pc and maybe even halo custom edition so you'd need lots of those servers available. If the player would run the program, then you could make a separate application with package contents including the halo demo UB files, the nethack application and a script to run both at the same time.

But first it needs to be determined what the differences are in the net code and if this type of thing could be handled by a server script.

I'd like to suggest that we consider changing that URI to a remote server script which can take care of this situation for us. It would probably be a .php script hosted on halodemomods.com (not the wiki) or macgamingmods.com, where it works just like the gamespy lobby but has some if-else clauses like:

Code: Select all

if (net_string = "halor")
{
interpret game net code for halo retail
}
elseif (net_string = "halomacd")
{
interpret game net code for halo demo
}
But would it be possible to change the net code so that when players connect to the hosted game, their information is managed by the server rather than the hosting player? If we can do this by making a script out of the functionality we observe from the game's taking on the role of server host, then all our options will be open to us: everything from synchronizing machines and AI to PC users connecting with xbox users online would be possible. If we can actually make a server script that can handle the role of net data management, then that's just like halo 2 where you have no real aiming lag (but the lag inhibits the functioning of the game, which is why you get pauses in gameplay when there are high pings). To be clever about synchronizing information that is not accepted by the client, we would just have the server script pass the information to the game considering each machine and each AI to be an actual separate player. But we would no longer be limited to having up to 16 players in a game. We would be able to have game rooms as large as we wanted, and through modding could allow any number of AI, vehicles, scenery... and whatever else we wanted synchronized. You could even include samuco's map synchronization tool in there and have people's computers automatically download a map from HDM to their harddrive when they join a server where they don't have the map.

EDIT: In fact, you won't even need to download maps anymore, since we could just have the players download map changes on-the-fly from the hosting player's map through the .php script. That means you could even have synchronized modding, where a player changes something in the game -- like adds a new vehicle -- and every connected game has their map modified in the same way at the same time. This is all possible through making the game connect to gamespy's master lists through a .php script. Oh and when you do this, connect to every gamespy lobby at once so that anyone running halo full pc or mac, halo demo or halo trial or custom edition will be able to see the room and connect to it.

The point is that if we can connect to a different server than gamespy, then this opens a new realm of network modding through the creation of different scripts to run on the hosting server.

You can make the server into:
- a dedicated host
- a synchronization tool to synchronize anything (it would 'host' the game and send anything synchronized as an "anonymous connected player" to the people joining)
- a platform-unifying tool (include functions to interpret netcode from different game versions, even from an xbox)
- a lagless host (the player clients' games would send and receive info from the same server)

And if we do remote web sharing from a mac or pc, then everything besides "a lagless host" would be made possible through running a .php script on your own computer. Just make the location localhost.

And just to clarify, there is no catch. The host is the script, not the game. Therefore, the host is like a mod filter that takes what the game already sends over the net and returns back to the game what it wants to return, disguised as netcode info. So the script is actually the host and people's games connect to the script rather than to another player's game.


What we have now:

Player opens game app -> Game tells Gamespy to list the player's IP as the server -> other clients see the listed server -> other clients connect to that player's IP through the lobby (or through Direct IP or LAN lobby)

What we will have:

Player opens game app -> Game tells remote script (through its URI and port, like the one used for localhost web sharing) to list the player's IP as the server -> remote script forwards IP with its web sharing port number to Gamespy -> other clients connect to that player's IP and port -> server script acts as a firewall on that port and interprets game data to send to port 2302/2303 which is what the Halo game sees and uses.

Therefore, the Halo games on both ends get their network information after it has been passed through the script which does whatever we tell it to do to the net data.

This is server-side modding (CSS modding) at its finest.

Oh LOL and forget CD keys, this will just randomize it or ignore it so any number of same copies of the game can run on the same server at once.
Either you are groping for answers, or you are asking God and listening to Jesus.

Modzy
Green Beret
Posts: 3058
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: Extending the Life of Halo Modding

Post by Modzy » Tue Dec 27, 2011 7:46 am

The above requires major netcode reverse engineering and would most likely cause a constant lag due to coordinates being passed around several times before being enacted.

Mgalekgolo
Commando
Posts: 2589
Joined: Thu Jun 24, 2010 6:36 am

Re: Extending the Life of Halo Modding

Post by Mgalekgolo » Tue Dec 27, 2011 11:13 am

Sounds awesome sparky. I remade the halo demo UB as a DMG, didn't touch the actual file though. Looks like this (its not gonna get any prettier so don't complain).
Image

edit: I just noticed I wrote HDM for monoman instead of MGM -_-. FIxing now...
Yarok wrote:There may be a giant dildo protruding from your forehead.
Image

kiddten
Commando
Posts: 2469
Joined: Wed Sep 30, 2009 1:42 am
Location: Nova Zeelandia.

Re: Extending the Life of Halo Modding

Post by kiddten » Tue Dec 27, 2011 11:41 am

hahah ewwwwwwwlllllll
Really?
What did you use? Paint?
kiddten, on most things nowadays wrote:no
TaxiService wrote:HERE IS THE GODDAMN WALDO YOU CHEATING DICK
๖ۣۜĐeяP wrote:U MOTHER FUCKER AND U FUCKING PARENTS AND FUCKED OFF ASS HOLES

Mgalekgolo
Commando
Posts: 2589
Joined: Thu Jun 24, 2010 6:36 am

Re: Extending the Life of Halo Modding

Post by Mgalekgolo » Tue Dec 27, 2011 12:03 pm

CS5 lol.
Yarok wrote:There may be a giant dildo protruding from your forehead.
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests