Home » Renegade Discussions » Mod Forum » WIP movie of new plugin
WIP movie of new plugin [message #399228] |
Sun, 23 August 2009 11:14 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Most of this code has been ripped out from an old version of a DragonAde release, made by black-cell.
It's not very elegant either, it uses the filestream which I personally do not like because too much IO is the cause of most server lag. However, it does work, and it's a simple enough way to implement additional console commands (that are not really console commands at all) to the server.
Here is a movie showing the WIP of it.
http://spencerelliott.co.uk/video.html
Again, the site itself is still a work in progress, so please do not mind the errors and unfinished work.
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: WIP movie of new plugin [message #399392 is a reply to message #399378] |
Sun, 23 August 2009 22:41 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Ethenal wrote on Sun, 23 August 2009 14:33 | Wow Reborn, that's pretty awesome! Will you be releasing the source? (knowing it's you, I'm sure you will )
Only qualm with it is as you said, constantly polling the directory to see if that file exists could be quite slow... but hopefully that issue would be negligible.
Either way, very cool!
|
Yeah, source will be included.
Yeah, the polling is not quite so elegant, nor is the face that it's using disk files either.
YazooGang wrote on Sun, 23 August 2009 20:40 | I dont get it.. Whats so awesome?
|
It could allow for allot of potential extra scope for regulators, amongst other things...
Ethenal wrote on Sun, 23 August 2009 22:02 |
Sir Kane wrote on Sun, 23 August 2009 19:15 | Fucking std::.
|
It's always you lol
On a more serious note, why not use something a little more efficient... like named pipes, or maybe even a local socket connection?
|
Yes, SK is always super helpful. Never have a beer with him, his glass is always half empty.
The first release will be using the file stream and disk files.
The second release will have additional commands that people might mention they would like, but specifically it will include a bunch of commands to get_ information, making it more useful...
i.e
getmaxarmor can be used first, then another command used after like setmaxarmor (so they can set the max armor based on a value received from the server about the object).
Finally the third release will likely use sockets, probably a TCP connection rather than named pipes so it can be done remotely rather than on the server. Dropping the disk file stuff and making it asynchronous too, all round more efficient.
However, the 2nd and 3rd releases will largely depend on how receptive bot creators are to it...
[Updated on: Sun, 23 August 2009 22:41] Report message to a moderator
|
|
|
|
Re: WIP movie of new plugin [message #399410 is a reply to message #399228] |
Mon, 24 August 2009 00:32 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
It will add a whole host of new commands for the server that can be executed by dropping a text file into the server directory, meaning that server owners could execute commands such as enablephysics for example on a GameObject, based on it's objectID. Another good example is the ability to attach scripts to objects through the text file...
That one command in itself is quite nice and has allot more scope than you might at first think...
You could use the bot to authenticate moderators by attaching a script to authenticated in-game moderators. This script then might add there player ID to a Vector and then all those moderator chat commands people make could then use a boolean conditional on them first, making sure the player executing the chat command is in the authenticated Vector (much much safer than the simple name check based on a mods.txt file we saw float about a couple of years back).
There's a shit tonne that can be done with just that one additional command that's added. I will endevour to add as many commands as possible, and while it will not allow for the bot to be as useful as directly coding inside the server API itself, it will deffinately allow the bot to become allot more dynamic than it currently is.
A more detailed explanation will come with the release, explaining what commands have been added, and how to use them.
Clearly this is better suited for a regulator to automate the process, so that this can be executed remotely from IRC. Adding much more scope for the regulators and what they are capable of. However, it could also be done by hand too (FTP to the server directory perhaps?), but in reality this will be useful mainly for bots.
|
|
|
|
|
Re: WIP movie of new plugin [message #399524 is a reply to message #399228] |
Mon, 24 August 2009 13:18 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Quote: |
The following is a list of currently supported commands, and how to use them:
command kill number // consider number like this: Commands->Find_Object(number); Where number is the objectID
command setcredits ObjectID amount // Fairly self explanitory
command givecredits ObjectID amount // Fairly self explanitory
command givepoints ObjectID amount // Fairly self explanitory
command destroy number // consider number like this: Commands->Find_Object(number); Where number is the objectID
command forceoccupantexit ObjectID Seatnumber
command forceoccupantsexit number // Where number is the objectID number (obviously needs to be a vehicle)
command setpos ObjectID Xnumber Ynumber Znumber
command createobj ObjectID presetname amount//First ObjectID is the object that defines where you want it spawned, presetname is the name of the preset you want to spawn, and amount is how many of these you want to spawn.
command teamchange ObjectID newteamnumber
command sethealth ObjectID healthnumber
command setarmor ObjectID healthnumber
command distrans objectID // disables the transitions of the vehicle, ObjectID clearly needs to be a vehicle
command entrans objectID // enables the transitions of the vehicle, ObjectID clearly needs to be a vehicle
command setanim ObjectID animationname // doesn't loop anim
command setanim2 ObjectID animationname // loops anim
command movepos objectID Xnumber Ynumber Znumber
command attach ObjectID bonename modelname
command givepowerup ObjectID powerupname
command givepowerup2 playername powerupname
command attachscript ObjectID scriptname parameters // Commands->Attach_Script(Commands->Find_Object(ID),Text[3].c_str(),Text[4].c_str());
command sendmessage ObjectID message //Not a pm, youre sendning a custom... //Commands->Send_Custom_Event(0,Commands->Find_Object(ID),Message,0,0);
command setshield ObjectID shieldtypename //blamo etc etc
command cinematic ObjectID cinematicname // ObjectID is what you want the cinematic attached to.
command cinematic2 Xnumber Ynumber Znumber cinematicname //Creates an invis object at that location and attaches cinematic to it.
command freezeplayer ObjectID // player has no control
command unfreezeplayer ObjectID // Player is given control
command setmodel ObjectID modelname
command resetpoints ObjectID // sets a players points to zero
command resetcredits ObjectID
command disablephysics ObjectID //disable collisions
command enablephysics ObjectID // enable collisions
command makespy ObjectID // sets the object to be invisible to base defenses // Commands->Set_Is_Visible(Commands->Find_Object(ID),false);
command dropweapons ObjectID // clears a players weapons
command giveteampoints ObjectID pointsnumber // gives the player some points, but also gives all team mates the same amount of points too
command changecharacter ObjectID characterpreset
command teamnumber damageamount warheadname ObjectID // ObjectID is the gameobject of the damager
command repairbuildings teamnumber repairamount
command setmaxhealth ObjectID maxhealthnumber
command setmaxarmor ObjectID maxarmornumber
command setmaxhealthpercent ObjectID percentamount // sets the health of the object based on it's maxhealth
command setmaxarmorpercent ObjectID percentamount // sets the health of the object based on it's maxarmor
command grantrefill ObjectID
command grantpowerup powname
command flymode ObjectID // toggles fly mode for the player
command enablestealth ObjectID booleanflag // Commands->Enable_Stealth(Commands->Find_Object(ID),boolflag); //booleanflag should either be true or false. true for enabling stealth.
command damageobjectshalf // damages all buildings by 250.0f
command teleport ObjectID ObjectID //first ObjectID is the player to teleport, second ObjectID is the player to teleport too
command pt PlayerID //displayes the PT for the players team. Takes a player ID only, not an ObjectID
|
|
|
|
|
Goto Forum:
Current Time: Tue Jan 07 10:36:03 MST 2025
Total time taken to generate the page: 0.01065 seconds
|