Renegade:

Discussion related to HLDJ, Steam, or gaming in general

Renegade:

Postby Relikie » Sat Mar 14, 2009 10:19 pm

I was wondering how you were able to get started on this project. I am interested in creating a program like yours to interface with the in-game console, and I am lost on where to get started.

Also, what language did you use to write this?
Relikie
Game DJ
 
Posts: 3
Joined: Sat Mar 14, 2009 9:54 pm

Re: Renegade:

Postby Renegade » Sat Mar 14, 2009 11:41 pm

Initially I was changing audio files by hand, then by script. I decided to write HLDJ to automate this without having to alt+tab out of game. Eventually this lead into what it is now. I wrote it almost entirely in C, for efficiency, plus it was the language I am/was most proficient in at the time; though I'd like to eventually port it over to C++.

If you're interested in developing an interface with the game, I'm hoping to eventually create a plug-in system so HLDJ can be modifiable (if you haven't already, check out this topic: viewtopic.php?f=3&t=9). I can also provide you with the source code if you want a peek (however it's not well documented as of yet). Just send me an e-mail or PM.
Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Renegade:

Postby Relikie » Sun Mar 15, 2009 7:42 am

I was just wondering how the concmds were created, and how you were to receive commands from the console. Is there documentation on the Valve wiki?

Also, that plug-in thing would be great! I think you should pursue that.
Relikie
Game DJ
 
Posts: 3
Joined: Sat Mar 14, 2009 9:54 pm

Re: Renegade:

Postby Renegade » Sun Mar 15, 2009 3:44 pm

Valve doesn't really support console interfacing per-se... it's more of a kludge. The basics are:
1) HLDJ generates scripts & aliases
2) every command (to be sent to HLDJ) is bound (as a string) to the Command Relay Key, and
3) is affixed with the "hldjsf" command dumps the current config (including the newly bound Command Relay Key) to a new file.
4) HLDJ detects this file, reads it, and parses the command contained inside.
5) New scripts/aliases are generated as needed.

That's the central concept between the game/HLDJ "interface". It was very unwieldy to create, but once all the necessary parse/generation code was in place, it's as simple as a few function calls to obtain the command passed in (which will eventually constitute the API).

The only useful command you might find in the Valve wiki is host_writeconfig (used to dump the config). The best way to figure out how it all works is taking a look in the hldj_ script files themselves. They're a lot less cryptic than the code that generates them :D
Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Renegade:

Postby Relikie » Mon Mar 16, 2009 2:35 pm

Oh, this is great! I had no idea that when you aliased a command, it showed in console.

Thanks! :D
Relikie
Game DJ
 
Posts: 3
Joined: Sat Mar 14, 2009 9:54 pm


Return to General Discussion



Who is online

Users browsing this forum: No registered users and 1 guest

cron