Author Topic: Add-on Forcer (Now transmits datablocks, please update!)  (Read 4935 times)


Not a bad idea, but this was made for the host only.
I'll see about super admins executing it in the dedicated server edition, however. I don't want lots of abuse occuring with it.

If your admins abuse their power, why the forget are they admins anyways? Why don't you people burn that into your heads?!

If your admins abuse their power, why the forget are they admins anyways? Why don't you people burn that into your heads?!
cant trust nobody

why do you even need to specify if its a zip
Code: [Select]
exec("Add-ons/Weapon_Gun/server.cs");works perfectly fine
also since you have limited it to only executing add-ons in the "add-ons" folder why would people even have folders in the Add-on directory? Don't people usually only put zips in there?

also this doesn't work on dedicated servers

also the reason why this kind of addon is usually sent to failbin is because executing datablocks on a server with players will crash everyone off the server since datablocks are sent at load time and loaded, and under normal circumstances datablocks shouldn't be added, thus executing addons with datablocks will disconnect everyone from your server

EDIT
also for future refrence your keybind function should have one argument which will specify if the keybind is pressed up or down so instead of
Code: [Select]
function openafgui()
{
canvas.pushdialog(addonforcer);
}
it should be
Code: [Select]
function openafgui(%pressed)
{
if(%pressed)
canvas.pushdialog(addonforcer);
}
it shouldn't cause any issue since I'm pretty sure you can't push two of the same guis but just keep that in mind if you make more keybinds
« Last Edit: August 09, 2015, 11:36:37 PM by Swollow »

why do you even need to specify if its a zip
Code: [Select]
exec("Add-ons/Weapon_Gun/server.cs");works perfectly fine
also since you have limited it to only executing add-ons in the "add-ons" folder why would people even have folders in the Add-on directory? Don't people usually only put zips in there?

also this doesn't work on dedicated servers

also the reason why this kind of addon is usually sent to failbin is because executing datablocks on a server with players will crash everyone off the server since datablocks are sent at load time and loaded, and under normal circumstances datablocks shouldn't be added, thus executing addons with datablocks will disconnect everyone from your server
I have a few folders in my add-ons directory, mostly just projects I've worked on.

I have a few folders in my add-ons directory, mostly just projects I've worked on.
if you are a coder I think it'd be easier to just use an exec command and pressing up arrow + enter to re-exec it rather than popping up an additional window and typing in your folder name everytime

Some constructive criticism:

  • Gui looks pretty bad
  • Code is needlessly complicated.
  • Code is needlessly complicated. (listed twice because I really wanted to emphasize on this.)


I don't like people using things that can be made better, and you decided to plaster your name all over it soo...


I made this 20 minutes after you posted this.
I think the total code of mine is like, 40 lines in total. Perhaps you should download it and take notes.

Download: https://dl.dropboxusercontent.com/s/jybuuyejetu5ewj/Script_QuickLoad.zip


gui tips:
soft button colors
only use as much space as you need
keep content flowing
use swatches to draw attention to important elements

There should be no need for a cancel button, the x should do just fine
over explanation, obviously a user is going to press load to load said addon when it's right in their face, if you need to use that much text use new lines to break it up
buttons are placed uncomfortably in relation to text edit, text edit should be stretched longer or buttons should be moved in shorter

flow is hour glass shaped

my gui can still use some work as the button doesn't fit well with the text edit, the text edit should be slimmed a little to compensate for the rounding of the button
« Last Edit: August 10, 2015, 12:12:45 AM by Swollow »

@Setro:
You could just check for a description.txt instead of... doing whatever it is you're doing.

@Darksaber:
Why is your gui, which is a client sided thing, calling a function found in server.cs, which is intended to be used on a server? This is a terrible thing to take notes from.

@Both:
There is so much more to loading add-ons mid-game than just executing them. You need to transmit all the new data like datablocks, ui name tables, events. And then there's the things that call functions and assign variables to the client when they join, good luck with those.

First off, I removed the names. My name doesn't show up even once in the add-on anymore.
I should update the screenshot, but I'm tired and I'm going to bed.
I will take notes, but it isn't fair to bash me just because I'm not as advanced with Torque as you are.

First off, I removed the names. My name doesn't show up even once in the add-on anymore.
I should update the screenshot, but I'm tired and I'm going to bed.
I will take notes, but it isn't fair to bash me just because I'm not as advanced with Torque as you are.

no one is bashing you
this is all constructive criticism

it can feel like you are being attacked when people are giving you suggestions to change things that you put a lot of effort into

I don't like people using things that can be made better, and you decided to plaster your name all over it soo...
i thought this was a bit bashful, but now it doesn't seem like it too much

i thought this was a bit bashful, but now it doesn't seem like it too much
there is some hostility in that statement, however you should disregard that as most of all suggestions given were presented in a constructive way, there will always be hostility on the internet and usually just ignore it since the person is more likely being angry than trying to help

there is some hostility in that statement, however you should disregard that as most of all suggestions given were presented in a constructive way, there will always be hostility on the internet
hm, you're right

also im working on a dedicated server version. might not get to it for a while because i'm a volunteer at a summer camp.

i thought this was a bit bashful, but now it doesn't seem like it too much
hey look man, i wouldnt sweat about it. its not bad to put your name on things, its just that the title bar isnt a place put it. usually its best in small text at the bottom corner, or in your case, id say keep it in the same spot but much smaller