• Welcome to Valhalla Legends Archive.
 

SnpBind(), SnpQuery()?

Started by Brolly, June 29, 2003, 04:12 PM

Previous topic - Next topic

Brolly

I was looking at battle.SNP when I noticed it was a DLL. I disassembled it, found those functions were exported. However, I couldn't figure out what they did. Does anyone know what they do?

EvilCheese

#1
SnpQuery is called when building the list of network plugins for you to choose from. I believe it's called once per snp to get basic information from it. The call takes a series of pointers to receive the information as parameters.

SnpBind is called when the Snp is loaded into the SC process.

Snps are basically plugins dealing with network and game arrangement control.

SnpBind receives a pointer as one of its parameters, and passes back in that pointer the address of the snp's internal function table.

It's through calling functions in this table that Starcraft is able to co-ordinate itself with battle.net (join games, report results etc), as the battle.net interface itself is handled wholely from the snp, not the main exe.

Hope that helps :)

Camel

so in theory one could rewrite battle.snp (or write an entirely seperate snp) to connect to other services such as IRC, no?

EvilCheese

That would make an interesting project.

Firstly you'd need to design a standard for game broadcasting and joining over chat.

Then you'd need to implement a system for stat tracking and reporting which would tie in with SC or any other game using your new interface.

Then to stop people from blindly abusing your system, you would need a few sanity checks in place, to make sure the users are who they claim and to regulate game results for accuracy.

Of course, you dont need ALL of the IRC functionality there... not much more than the chat elements and support for your new game-specific features......

....and what do you know? You've just re-written BNCS :P

Skywing

Quote from: Camel on June 29, 2003, 10:50 PM
so in theory one could rewrite battle.snp (or write an entirely seperate snp) to connect to other services such as IRC, no?
Possibly.  Actually, a partially functional battle.snp-replacement already exists, my EmuBot.snp.

Camel

#5
Quote from: EvilCheese on June 30, 2003, 07:58 AM
That would make an interesting project.

Firstly you'd need to design a standard for game broadcasting and joining over chat.

Then you'd need to implement a system for stat tracking and reporting which would tie in with SC or any other game using your new interface.

Then to stop people from blindly abusing your system, you would need a few sanity checks in place, to make sure the users are who they claim and to regulate game results for accuracy.

Of course, you dont need ALL of the IRC functionality there... not much more than the chat elements and support for your new game-specific features......

....and what do you know? You've just re-written BNCS :P


One could just make it send /nickserv [username] [password] to login and use /nickserv register ... to create an account. :)
I really wish Blizzard would take more of a sierra-esque additude towards their games and actually welcome/support third party extentions to their games (that is mods, not hacks :P).