[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
hldj.org • View topic - Creating your own HLDJ commands

Creating your own HLDJ commands

Discussion related to HLDJ, Steam, or gaming in general

Creating your own HLDJ commands

Postby Renegade » Wed Nov 24, 2010 9:12 pm

Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Creating your own HLDJ commands

Postby jxl180 » Sun Nov 28, 2010 5:19 pm

So, our commands must be hard-coded into the hldj files? We cannot just call upon the functions in our own programs?
jxl180
HLDJ Tester
HLDJ Tester
 
Posts: 84
Joined: Sun Mar 30, 2008 10:19 pm

Re: Creating your own HLDJ commands

Postby Renegade » Mon Nov 29, 2010 7:56 pm

At this point it's the easiest way, but I can add hooks to call custom handlers that you pass in. Let me know if this would be easier for you.
Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Creating your own HLDJ commands

Postby jxl180 » Mon Nov 29, 2010 9:02 pm

Don't go by me because I won't be attempting to make any modifications anytime soon (busy with uni. work); however, I think hooks will make it a lot easier because mods can be distributed without having to redistribute hldj files. Also, what if a user wants to apply multiple mods to hldj that they did not create? Also, if hooks are used in this fashion, HLDJ can be used as an engine, as well.
jxl180
HLDJ Tester
HLDJ Tester
 
Posts: 84
Joined: Sun Mar 30, 2008 10:19 pm

Re: Creating your own HLDJ commands

Postby Renegade » Tue Nov 30, 2010 9:06 am

Yep, it's been in the for a while; a full engine (probably a rewrite too) would be ideal, in the meantime I can make smaller modifications, but I'm trying to gauge the time spent based on interest/use.
Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Creating your own HLDJ commands

Postby jxl180 » Tue Dec 21, 2010 9:21 pm

How do I ensure the message (assuming HLDJM is HLDJ message) has a unique id? I mean I guess I can increment it (the next would be 0x08), but how can I ensure uniqueness? For example, if many people start adding 3rd party commands, how do we make sure there will be no conflicts? Just use a really random hex number (sort of like randomly assigning a port number and hoping for the best)?
jxl180
HLDJ Tester
HLDJ Tester
 
Posts: 84
Joined: Sun Mar 30, 2008 10:19 pm

Re: Creating your own HLDJ commands

Postby Renegade » Wed Dec 22, 2010 2:03 am

For now incrementing is ok (but give some room for HLDJ commands to grow). Ideally with a plugin system, it will query each plugin for a list of commands and handlers/callbacks. Let me know if you're actually starting to add your commands to HLDJ now, I'll bump the plugin system to the head of the TODO list.
Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Creating your own HLDJ commands

Postby jxl180 » Wed Dec 22, 2010 2:11 am

Yeah, I've been playing around with the api for a few hours and learning c from your code as I progress lol. I'm writing a command hldj_local <0/1>. If players in the server are annoyed by the sounds being broadcast, enabling this will turn HLDJ into a personal music player. Only the hldj user can hear the sound. hldj_local 0 (default) will enable broadcasting (now that I think of it, hldj_broadcast seems more appropriate).

I am having trouble finding out how to get the arguments (again, I'm very new to c). Would it be cmd, cmd[1], *p, or am I completely off?

Should I just do two seperate aliases: hldj_broadcast_on and hldj_broadcast_off to toggle it?
jxl180
HLDJ Tester
HLDJ Tester
 
Posts: 84
Joined: Sun Mar 30, 2008 10:19 pm

Re: Creating your own HLDJ commands

Postby Renegade » Wed Dec 22, 2010 2:56 am

Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm

Re: Creating your own HLDJ commands

Postby jxl180 » Wed Dec 22, 2010 3:05 am

My plan was to use the play command; however it will play what ever is currently loaded (by executing "play '..\..\voice_input.wav" I intend to do this in HLDJ for practice and so that the same bind key can be used to play songs.

EDIT: Also, It will allow the user to still use the microphone (unless maybe hldj_muteall/hldj_unmuteall is called, or something similar).
jxl180
HLDJ Tester
HLDJ Tester
 
Posts: 84
Joined: Sun Mar 30, 2008 10:19 pm

Re: Creating your own HLDJ commands

Postby Renegade » Wed Dec 22, 2010 11:26 pm

Renegade
HLDJ Developer
HLDJ Developer
 
Posts: 1500
Joined: Sat Mar 01, 2008 2:02 pm


Return to General Discussion



Who is online

Users browsing this forum: No registered users and 1 guest

cron