Ulysses
Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: RynO-SauruS on January 29, 2010, 07:42:13 PM
-
This is an addon for ULX that adds a command that clears all the decals in the map. (Bullet holes, blood, etc.)
I've attached versions for both non-SVN and SVN versions of ULX/ULib.
Usage:
Type "ulx cleardecals" in the console, or type "!cleardecals" in the chat.
Installation:
Extract to addons.
-
Call me old fashioned, but I don't really see the point in replacing one concommand with another.. even more so a longer one..
"r_cleardecals" ---> "ulx cleardecals"
The chat command addition is nifty though.. ;D
-
It's also for running it on all clients quickly, and looks nice. ;D I think most people don't even know about r_cleardecals.
-
ahh, so you have it set up to run concurrently on all clients connected. That is a bit different then. I remember I used to have to do something along the lines of...
"ulx rcon * r_cleardecals" which was a little annoying. :D
Simple.. yet useful. Good Job!
-
Thanks. ;D
-
Short but sweet, I like it. :)
-
Nice.
One concern... name of the function... "ulx.respawn"; Though not used currently by ULX or any modules other than yours (that I know of), seems the name might be better named. ulx.cleardecals perhaps? :)
Respawn just seems to close to something that might be used in another module to, uh, something to do with spawning? :D
Wonder what other utilitarian console commands (that don't require sv_cheats and aren't blocked) might be put into a pack along with this.
* gears squeal
-
Well, this is embarrassing. I used the "ULX Respawn" addon as a reference to make this, because I was unsure of how the command system worked. :-\
I forgot to rename the function.. I changed the name of it in the non-SVN version, but not the SVN version.
I'll re-upload it with the function name changed. Anyway, thanks for pointing that out.
Edit: Done.
Edit 2: I noticed my command doesn't show up in the autocomplete for the 'ulx' command.
I've compared, and it seems I have mine formatted exactly like the commands in fun.lua.
I can't seem to find what's adding those commands to the autocomplete. How do I add mine?
-
I started to dig in and thought it would be simple.
According to ulx base.lua (where ulx.concommand is set up), The ulx concommand function seems to be where it adds.
However, it wasn't as simple (for me) to dig up as I had thought.
Megiddo, what adds the autocomplete? It's not "ulx.addToMenu" is it? He's not using it for the non-SVN version, but, seems it shouldn't have to be added to the gui menu.
Ryno, may try ulx.ID_HELP too. I noticed that in the autocomplete table set up an if/then/else statement depending on ID_HELP or ID_PLAYER_HELP
-
Man, I just noticed the variable is still called respawn.. D: I'll fix that..
Edit: Done.. Finally... I wish I hadn't messed up like that, this is embarrassing :-[ ...
Edit 2: About the autocomplete, what do you mean by ulx.ID_HELP? Where should I put it? :-\
-
In your ulx.concommand, you have ulx.ID_PLAYER_HELP ... might try ulx.ID_HELP
Like I said, not sure that will do it... just noticed that the ULX autocomplete function does an if/else depending on that setting versus ulx.ID_PLAYER_HELP
-
Oohh I see. I'm using the SVN version, you're referring to the non-SVN version.
The SVN version actually uses a different function, "ulx.command", and the non-SVN version uses "ulx.concommand".
I don't know what the argument does, the one that takes 'ulx.ID_PLAYER_HELP' or 'ulx.ID_HELP'.. I'll look in the SVN base.lua.
I actually don't know if the auto-complete works or not on the non-SVN version, but I know it doesn't on the SVN version.
Edit: Yeah, I see now the 'ulx.ID_PLAYER_HELP' etc. argument has to do with autocomplete..
I don't see anything in the 'ulx.command' function (not 'ulx.concommand') in the SVN that does anything about autocomplete.
So how do the fun commands get their autocomplete in the SVN? They use the same function in the exact same way from what I see and understand.
-
Oh. I thought you meant it wasn't showing in non-SVN because, I'm running SVN and it appears in my autocomplete fine.
Do you maybe have both of your versions in your addons/cleardecals/ulx/modules/<whatever> folder? That could be causing the issue.
I think our SVN still has traces of some of the old ulx commands. At least, when I search my ulx folder for ulx.concommand (the "release" ULX method), it finds base.lua.
-
Are you just starting a listen server with it?
I'm putting the SVN version on a SRCDS on my PC, and joining it with the same PC, and the command isn't in the auto-complete.
So, the new 'ulx.command' function will eventually replace the 'ulx.concommand' function? You refer to it as 'old'. :D
-
Single player, not even server.
I'll test ded/srcds at a later time. (Sorry, it's late, I'm tired)
-
This is actually very nice. It's horrible having all the blood and scortch marks everywhere, thank you :D
-
Ryno, See attached picture. Latest SVN, cleardecals hosted on a dedicated server, and just to make sure, removed from my local addons/ client directory.
Autocomplete seems to work.
-
Ok everyone... what other additions, whether it be to cleardecals, or just general console commands, could be useful?
I'd love to see other ideas for RynO-SauruS to do. There's probably commands that are good but rarely known (or used).
-
OK, first I'd like to thank you JamminR for your time and interest in this.
Before I noticed you posted your second-from-last post, I checked the auto-complete again, and it showed up. :D
I don't know why it didn't work that time. Sorry for the 'false alarm'..
-
If you want it to autocomplete, the code to setup the command needs to be run on both the client and server. In the release version all that information was forwarded on to clients for you, but in svn it's too much information to try to shove down the pipe to the client during spawn. :P
-
What are you saying? If you aren't sending the files to clients in the SVN, then how is the auto-complete working? :-\
Anyway, I don't have ULX installed on my client, only on the server, and the auto-complete is working now.
I noticed when I joined my server, it downloaded cleardecals_svn.lua.
I guess ULX automatically adds all files in ulx/modules/sh/ to the client download list..
Edit: Nevermind that first line, I think I understand what you're saying now. ;)
-
I guess ULX automatically adds all files in ulx/modules/sh/ to the client download list..
/sh/ -That's what I was thinking.