Doolittle 0 Posted October 19, 2007 Please use DooACS instead. Thanks! GSC is discontinued. This addon will give the server owners more power. It will run a script found in C:\Program Files\Atari\ArmA once for each mission that is loaded. You can use this to send a command to all clients to turn grass off, or to set the view distance to something, or whatever! Set rain or give everyone night vision... this will happen for any mission that is on Sahrani. No more need to edit 100 missions to set up something in init.sqf! Global Server Config sample_globalserver.sqf Key for signed addon Here's the included example globalserver.sqf file: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">" setViewDistance 1300; setTerrainGrid 50; sleep 3; titleText [format [""Welcome to the game, %1"", name player], ""PLAIN""]; " call CreateLogicCode; The CreateLogicCode is a special command that basically means "have all clients run this code". Perhaps have the globalserver.sqf create a trigger to clean up dead bodies or something too. It's up to you! NOTE this does not add extra CPU or network traffic to your server!! Doolittle Share this post Link to post Share on other sites
The_Captain 0 Posted October 19, 2007 Clever. At first I assumed this was an addon that clients needed as well until I looked at the readme. This is a really handy way to get code running on your server, and easily update it where the client needs to do nothing! I'm not sure if I completely understand setvehicleinit, but doesn't it send out a string to all clients in roughly the same way that publicvariable does, and then invoke the commands when preprocesscommands is run? Is there a chance a client could receive the "preprocesscommands" command before it fully receives the vehicle init code? Is this vehicleinit transferred during the client mission loading phase for a client who is connecting in progress? Also, does bandwidth spike the longer the init string is, or does a string take up roughly the same amount of network traffic no matter the size? I'm wondering how this addon would perform with an obscenely long init string. Of course, it seems most useful for a real basic set of four or five commands like removing grass or sending custom messages like you've outlined... Very nice work with this one. Share this post Link to post Share on other sites
Doolittle 0 Posted October 19, 2007 The object and it's init string are sent once to the client when they start the map. You could call CreateLogicCode several times I guess, in which case more than one logic is created. I am guessing there is a limit to the length of an object's init line. Of course, like you just said, this addon was made so server operators could turn off grass for all maps, or set everything in the dark, simple stuff. Also this is run for ALL MISSIONS, so maybe a mission that was originally designed for daytime or for full grass will play differently. Doolittle Share this post Link to post Share on other sites
celery 8 Posted October 19, 2007 This is excellent news. Goodbye grassy missions and horrible fps. The terrain level should still be independent of grass levels because of low polygon terrain glitches, but that's not something this addon is responsible for. Share this post Link to post Share on other sites
Guest Posted October 19, 2007 Excellent work Doolittle, installed and running on the armaholic server. Just curious. We could even use this to create an ammo crate at a position to make sure we can always use our custom weapons in any mission by just adding the necessary scripting for this in the globalserver.sqf right? [edit]Typo [edit] Fixed an even worse typo Share this post Link to post Share on other sites
mattxr 9 Posted October 19, 2007 Excellent work Doolittle, installed and running on the armaholic server.Just curious. We could even use this to create an ammo crate at a position to make sure we can always use our cutom weapons in any mission by just adding the necassary scripting for this in the globalserver.sqf right? [edit]Typo Yep. Create the Creat at the players start pos, then have it add the weapons to that create. Share this post Link to post Share on other sites
Guest Posted October 19, 2007 Thanks for clearing that up, this will come in handy in the future Share this post Link to post Share on other sites
celery 8 Posted October 19, 2007 It would be best if the config is used only for basic settings because custom ammo crates and other things can really break missions that are not prepared for such things. Intros can also be messed up with custom titletext messages. Share this post Link to post Share on other sites
tomcat_ 0 Posted October 19, 2007 what would be the code in order to remove dead bodies from all the missions and what would be the gains for the server? could you also do a FIFO system for the removals of the bodies? Share this post Link to post Share on other sites
Doolittle 0 Posted October 19, 2007 Celery's right.. remember what you do would happen for ALL missions. Spawn a crate at the user's start position.. what if a mission starts the player in the air or in a boat or as a POW who shouldn't have weapons? There's lots of cool stuff you could do... like add an artillery option via radio for all maps, etc. Doolittle Share this post Link to post Share on other sites
ANG3L 0 Posted October 19, 2007 Tis all active on server now, btw Doolittle I mailed you some questions regarding it thanks. Share this post Link to post Share on other sites
Guest Posted October 19, 2007 Celery's right.. remember what you do would happen for ALL missions. Spawn a crate at the user's start position.. what if a mission starts the player in the air or in a boat or as a POW who shouldn't have weapons?There's lots of cool stuff you could do... like add an artillery option via radio for all maps, etc. Doolittle Indeed, never thought of that (POW, boat stuff). Thanks for the warning, we are already trying to find out in our "participants section" what they would like us to set by default. Share this post Link to post Share on other sites
Mabes 0 Posted October 19, 2007 So we could use this to call on the AI disabled Revive script on all missions? And then just take it out when we don't want to use it on certain missions. Share this post Link to post Share on other sites
The_Captain 0 Posted October 19, 2007 As an aside... could missions add a line to specifically disable the global server settings, so certain mission could be independent, on a case by case basis? This would allow the few missions that get broken to opt-out while leaving the rest hunky dory... Share this post Link to post Share on other sites
celery 8 Posted October 20, 2007 As an aside... could missions add a line to specifically disable the global server settings, so certain mission could be independent, on a case by case basis? This would allow the few missions that get broken to opt-out while leaving the rest hunky dory... Such a variable and a poll for it is easy to make, but making it a standard and converting old missions would be a serious pain which I don't recommend. I'd rather advise you to just use the config addon for simple things, especially removing grass which will be its primary mission on the Gay Bar. Share this post Link to post Share on other sites
Doolittle 0 Posted October 20, 2007 You wouldn't be able to change a respawn type as that is defined in each mission's description.ext. Share this post Link to post Share on other sites
Guest Posted October 20, 2007 @Doolittle, I have sent you an email. Make sure to read it. For specific reasons I didnt want to put the info here. Share this post Link to post Share on other sites
Heatseeker 0 Posted October 20, 2007 This removes mission makers control over their own creations and might even break the missions, no? I mean someone might bother to make realistic weapon loadouts for an infantry squad and the players just cheat their way by spawning a crate full of SF kit. Changing things like visibility, weather conditions, time of day, etc can and will "break" missions (both functionality and design) . Share this post Link to post Share on other sites
DaSquade 0 Posted October 20, 2007 Although this 'tool' is very nicly made and has a lot of options, imho i think as Heatseeker mentioned is maybe not as good as it looks. Don't get me wrong, it is nice to see people like you keep making this kind of stuff... But imho it should be editable in the flow as there isn't a general setting that can win for all. It would be nice to play a certain mission at nighttime (if mission doesn't contain timeselector) or add fog or whatever setting is availible, but it would be better if you can modify it at all times. Haven't tested it or checked with others that tested it, but afaik you will proberbly restart the server to take new settings active. Just my opinion. Share this post Link to post Share on other sites
.kju 3244 Posted October 20, 2007 You can NOT control what is done with your mission anyway. So all power to the server admin! Nice one Doolittle! We had such feature back in WGL5.1 too, however your implementation sounds more complete and powerful. Share this post Link to post Share on other sites
Doolittle 0 Posted October 20, 2007 Earlier, someone had asked how they could stop XAM from being used on their server... now you can do it easy with this addon. Like so (in globalserver.sqf): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">" setViewDistance 1300; setTerrainGrid 50; sleep 3; titleText [format [""Welcome to the game, %1"", name player], ""PLAIN""]; " call CreateLogicCode; " if (isClass (configFile / ""CfgPatches"" / ""XAM_classes"")) then { player sideChat ""You are running XAM. Please leave now or you will be locked up in 30 seconds.""; [] spawn { sleep 20; player sideChat ""10 seconds left!""; sleep 10; player sideChat ""Sorry! Now you must ALT-F4""; while {true} do {disableUserInput true}; }; }; " call CreateLogicCode; Note I show two CreateLogicCode used here just to show you it's fine to use more than one. Doolittle P.S. Thanks Q! Share this post Link to post Share on other sites
rundll.exe 12 Posted October 20, 2007 This is an excelent way of having more control over what is played and how, on the server Just curious, did you get on this idea by my anti cheat loader? Share this post Link to post Share on other sites
Commando84 0 Posted October 20, 2007 sweet! Stopping Xam stuff this way seems much better than blocking all custom content.. but isnt this the server admin that can only create ammo crates and whatever? Or gives this the option to any player? Share this post Link to post Share on other sites
Doolittle 0 Posted October 20, 2007 rundll.exe, yes, you got the ball rolling.. this doesn't use Extended Init EventHandlers though. Share this post Link to post Share on other sites
ANG3L 0 Posted October 22, 2007 thanks Doolittle very good more burden lifted. Share this post Link to post Share on other sites