GMod - What are you working on? January 2015 (#41)
781 replies, posted
thought it was real until I read the box
People have trouble customising DarkRP, specifically, they have problems creating jobs, shipments, vehicles, custom entities and quite a few more things. Here's an example of how jobs are made:
[lua]
TEAM_ELITETHIEF = DarkRP.createJob("Elite Thief", {
color = Color(128, 128, 128, 255),
model = "models/player/arctic.mdl",
description = [[An Elite thief with more equipment. VIP.]],
weapons = {"lockpick", "pickpocket","keypad_cracker"},
command = "thief2",
max = 2,
salary = 75
admin = 0,
vote = false,
hasLicense = false,
})
[/lua]
This is placed in a Lua file in an addon specifically made for customising DarkRP. The problem here lies in the fact that these people make mistakes (syntax errors) in these jobs and don't have a clue about the error! When they look at the job they can't see what's wrong because they don't know what they're looking it.
This happens [B]a lot[/B]. Half the threads on the DarkRP forums are about "[I]OMG HELP JOBS DON'T WORK[/I]". The same happens on my GitHub issues page. I'm fucking sick of it.
Whose responsibility is this? Are these people too stupid to host a server? It's very tempting to say yes, but when [I]so many[/I] people get stuck you [U]have to look further[/U].
- [U]I[/U] advertise DarkRP as something that is really easy to customise.
- Mistakes are easily made, even by experienced scripters
- The feedback on mistakes (i.e. Lua errors) can [I]only [/I]be understood with basic programming knowledge
- One should not require programming knowledge to modify DarkRP
[B]The solution:[/B]
I've had several ideas, ranging from a custom syntax for these custom items to an "[I]error message translator[/I]". The latter is what I'm working on right now.
The job above contains an error. This is what the server console says about it:
[img]http://i.imgur.com/b2hhoAK.png[/img]
It clearly states which file contains the error, on which line and who is responsible for causing it. On the forums most people didn't know that [I]cock.lua:9[/I] actually mean "[I]Line 9 in cock.lua[/I]". Hints are very important in solving the problem because Lua errors on their own can be ambiguous.
Some side notes:
- Only the most common syntax errors are translated. Others are just pasted as-is above the hints.
- Runtime errors are not caught.
- I can't get over the fact that the error message starts with "lua/simplerr.lua", the library that translates these errors.
--------
What do you guys think? Am I wrong for taking responsibility for this? Are the error messages clear? Do you think laymen can understand it?
You can only do so much beyond the point that there will be someone who cannot even understand that level of advice, that being said, it will certainly help them out.
[QUOTE=FPtje;47039807]
What do you guys think? Am I wrong for taking responsibility for this? Are the error messages clear? Do you think laymen can understand it?[/QUOTE]
I don't think it's much more understandable, would be easier to simply add a gui for adding jobs
[QUOTE=FPtje;47039807]What do you guys think? Am I wrong for taking responsibility for this? Are the error messages clear? Do you think laymen can understand it?[/QUOTE]
I'm not convinced that all server owners will notice or read the error messages. Some of the server owners I've dealt with seem to think that the server console is the ULX !rcon command and aren't aware of or don't know how to retrieve server console errors. Telling them to run lua_log_sv 1, do a mapchange and retrieve lua_errors_server.txt is way too complicated as well. Even if the errors are clientside, you'd need to spam them at intervals to get noticed. You also need to make it absolutely clear that the jobs/shipments/whatever not working and the errors are related.
[I]hi, i tried to create a job and i got errors...help[/I]
[QUOTE=gonzalolog;47040289][I]hi, i tried to create a job and i got errors...help[/I][/QUOTE]
At least post some code.
:v::v::v:
Please don't ever feel bad about this sort of thing
There's only so much you can do for a large portion of people who won't even attempt to think for themselves
[QUOTE=FPtje;47039807]People have trouble customising DarkRP, specifically, they have problems creating jobs, shipments, vehicles, custom entities and quite a few more things. Here's an example of how jobs are made:
-snip-
What do you guys think? Am I wrong for taking responsibility for this? Are the error messages clear? Do you think laymen can understand it?[/QUOTE]
My suggestion? Don't make average server owners write Lua. There's gotta be a million job creators available. Pick one or make your own and integrate it directly into DarkRP.
And instead of making players paste stuff into the file, have it save the file to a .txt in the data folder and load it with RunString.
And don't just do this with jobs, do it with other stuff.
That way you can focus on errors like [I]that's not a model, try something like models/weapons/shotgun.mdl[/I] instead of [I]there's an error in syntax, which is a word you might not know, and you gotta kinda just do some guesswork.[/I]
You could keep the original file too, for advanced or returning users who prefer that way or who already have jobs set up in a file.
Yeah like make a job creator online that exports Lua or a Lua file and have them do it that way.
[QUOTE=FPtje;47039807]People have trouble customising DarkRP, specifically, they have problems creating jobs, shipments, vehicles, custom entities and quite a few more things. Here's an example of how jobs are made:
[lua]
TEAM_ELITETHIEF = DarkRP.createJob("Elite Thief", {
color = Color(128, 128, 128, 255),
model = "models/player/arctic.mdl",
description = [[An Elite thief with more equipment. VIP.]],
weapons = {"lockpick", "pickpocket","keypad_cracker"},
command = "thief2",
max = 2,
salary = 75
admin = 0,
vote = false,
hasLicense = false,
})
[/lua]
This is placed in a Lua file in an addon specifically made for customising DarkRP. The problem here lies in the fact that these people make mistakes (syntax errors) in these jobs and don't have a clue about the error! When they look at the job they can't see what's wrong because they don't know what they're looking it.
This happens [B]a lot[/B]. Half the threads on the DarkRP forums are about "[I]OMG HELP JOBS DON'T WORK[/I]". The same happens on my GitHub issues page. I'm fucking sick of it.
Whose responsibility is this? Are these people too stupid to host a server? It's very tempting to say yes, but when [I]so many[/I] people get stuck you [U]have to look further[/U].
- [U]I[/U] advertise DarkRP as something that is really easy to customise.
- Mistakes are easily made, even by experienced scripters
- The feedback on mistakes (i.e. Lua errors) can [I]only [/I]be understood with basic programming knowledge
- One should not require programming knowledge to modify DarkRP
[B]The solution:[/B]
I've had several ideas, ranging from a custom syntax for these custom items to an "[I]error message translator[/I]". The latter is what I'm working on right now.
The job above contains an error. This is what the server console says about it:
[img]http://i.imgur.com/b2hhoAK.png[/img]
It clearly states which file contains the error, on which line and who is responsible for causing it. On the forums most people didn't know that [I]cock.lua:9[/I] actually mean "[I]Line 9 in cock.lua[/I]". Hints are very important in solving the problem because Lua errors on their own can be ambiguous.
Some side notes:
- Only the most common syntax errors are translated. Others are just pasted as-is above the hints.
- Runtime errors are not caught.
- I can't get over the fact that the error message starts with "lua/simplerr.lua", the library that translates these errors.
--------
What do you guys think? Am I wrong for taking responsibility for this? Are the error messages clear? Do you think laymen can understand it?[/QUOTE]
Honestly I think it is fine. You should hire more people for free who can reply to these if you guys have a small team. I am up for that =P
It's expected for DarkRP to be like this if there are over 700+ servers with that gamemode. You are basically considered the god of the kings and ye kind of just have to deal with it
I created a Lua socket server for interacting with game servers from a remote chat. In this case, we're using Slack through [URL="https://hubot.github.com/"]Hubot[/URL] (our bot is named Bro).
Here's the gist of how it's connected:
game server <-> lua socket server <-> hubot <-> slack
The first three are all living on one server.
[thumb]http://samuelmaddock.com/up/2015-01-30_16-51-33.png[/thumb]
The socket server features an implementation of the net library to communicate between game servers. [URL="https://gist.github.com/samuelmaddock/d453d0fe9acca02f2673"]Here's an example[/URL] with the "serverinfo" command as seen in the screenshot. I'm considering releasing this on GitHub sometime in the future, I need to clean up a lot of the code though.
Shout out to [URL="http://facepunch.com/member.php?u=437541"]BlackAwps[/URL] for [URL="https://bitbucket.org/blackops7799/breakpoint/src/bb3393586a30b99e399feca8e0d6d9e5a6fda2fc/echoserver/?at=default"]his echo server[/URL] he released as it's what I based most of my server off of.
[QUOTE=Kamshak;47040068]I don't think it's much more understandable, would be easier to simply add a gui for adding jobs[/QUOTE]
I believe every server owner should have at least some understanding of Lua scripting and how it works. I think FPtje's solution is pretty good.
[QUOTE=zeaga;47042815]I believe every server owner should have at least some understanding of Lua scripting and how it works. I think FPtje's solution is pretty good.[/QUOTE]
Don't forget this is DarkRP. Some of these server owners are still learning times tables.
[QUOTE=bobbleheadbob;47042859]Don't forget this is DarkRP. Some of these server owners are still learning times tables.[/QUOTE]
Then let them learn it instead of enabling complete incompetence.
It doesn't matter how much you idiot-proof. Someone will always screw it up!
Wow guys, thanks for the feedback! Bobble: A job creator is something I've thought about, but the problem is the advanced stuff. Custom jobs can have custom spawn functions, advanced logic about when you can get a job (e.g. Only if there is a mayor who is still alive) and more things. I cannot put these in the job creator because there will always be server owners who want logic that the UI wouldn't be able to handle. Having advanced users write their functions in a text box is not user friendly.
I've also thought about having a custom syntax somewhere in the data folder, but it would be hard to support the advanced stuff. Many people start by making a simple job and later they decide that they want advanced stuff. They ask on the forums and often get a reply. It would be a disappointment for them if they had to rewrite their jobs in Lua when they want to have advanced stuff. Also, copying stuff from existing jobs becomes harder when there are two different formats. Inevitably I will also get the question which format is better.
But you're right about server owners writing Lua. They have trouble with it. I stand behind my choice because of Lua's expressive power, but I'll try to help them along. Also, I will shove the errors in their faces more. Thanks for that tip, cake.
[QUOTE=FPtje;47043013]Wow guys, thanks for the feedback! Bobble: A job creator is something I've thought about, but the problem is the advanced stuff. Custom jobs can have custom spawn functions, advanced logic about when you can get a job (e.g. Only if there is a mayor who is still alive) and more things. I cannot put these in the job creator because there will always be server owners who want logic that the UI wouldn't be able to handle. Having advanced users write their functions in a text box is not user friendly.
I've also thought about having a custom syntax somewhere in the data folder, but it would be hard to support the advanced stuff. Many people start by making a simple job and later they decide that they want advanced stuff. They ask on the forums and often get a reply. It would be a disappointment for them if they had to rewrite their jobs in Lua when they want to have advanced stuff. Also, copying stuff from existing jobs becomes harder when there are two different formats. Inevitably I will also get the question which format is better. [/QUOTE]
Advanced users will use advanced features, such as Lua. They can always hardcode it if you keep the original file there.
[QUOTE=FPtje;47043013] - everything being discussed right now -[/QUOTE]
The screenshot of the helpful error message you posted is [i]lovely[/i], most people who are new to lua would probably see it as godsend (not just for DarkRP of course!); but I have doubts that it would make a big difference.
There's three types of people:
1. Those who are excellent at programming
2. Those who are smart and logical and willing to give a problem some time and thought, even if it's hard for them
3. Everyone else
The problem is that almost everyone falls into the third category. Your simplerr is amazing for the second group, useful in a pinch for the first group, but would, sadly, be chinese to anyone in the third group (or, if they happen to be from china - japanese. :v:) and there is [i]nothing[/i] you can do to help those people. So yeah, I say by all means release that error translator (which by the way is above and beyond what you should be taking responsibility for, but it's amazing that you are), just don't expect the error count to be cut in half afterwards.
Now, I wonder if we could get these errors to show for [i]all[/i] lua errors... >:)
[QUOTE=FPtje;47043013]Wow guys, thanks for the feedback! Bobble: A job creator is something I've thought about, but the problem is the advanced stuff. Custom jobs can have custom spawn functions, advanced logic about when you can get a job (e.g. Only if there is a mayor who is still alive) and more things. I cannot put these in the job creator because there will always be server owners who want logic that the UI wouldn't be able to handle. Having advanced users write their functions in a text box is not user friendly. [/QUOTE]
Why not have both? Then the retards can use the UI, and those that want more advanced shit can go edit a file. Win-win.
[QUOTE=Phoenixf129;47044016]Why not have both? Then the retards can use the UI, and those that want more advanced shit can go edit a file. Win-win.[/QUOTE]
Just one paragraph down...
[QUOTE=FPtje;47043013]... It would be a disappointment for them if they had to rewrite their jobs in Lua when they want to have advanced stuff. Also, copying stuff from existing jobs becomes harder when there are two different formats. Inevitably I will also get the question which format is better.[/QUOTE]
[QUOTE=Neat-Nit;47044032]Just one paragraph down...[/QUOTE]
Then by default the UI is enabled, if they want to carry on using the old way of doing it, once they do so, it gets disabled? A UI would (and lets face it, most of the darkrp servers don't "HAVE" advanced features, or any kind of effort into them) be easier for the idiot(majority) side.
If the UI spit out actual Lua, you wouldn't have to "Transfer" and there would be no "format". Just save the Lua as a .txt and RunString(), that way if you decide to change to being an advanced user you can just copy and paste into a Lua file or even just edit the file like it were a Lua file because it's ran like one.
In order here: Color mixer to customize your phone, online version checking, and app badges ( red dot ) plus notifications! I've got these sweet looking folders since Netheous gave me his blur code but for whatever reason making a folder crashes my game, so I'll somehow have to figure that out.
[t]http://i.gyazo.com/74bd7032fee4e52cba02b37c51605167.png[/t][t]http://i.gyazo.com/6bdfe811ae43eff23fde6295d9160e51.png[/t][t]http://i.gyazo.com/2174d7f0e1bf94a0c31c7f51f635bc6d.png[/t]
[QUOTE=Exho;47044265]In order here: Color mixer to customize your phone, online version checking, and app badges ( red dot ) plus notifications! I've got these sweet looking folders since Netheous gave me his blur code but for whatever reason making a folder crashes my game, so I'll somehow have to figure that out.
[/QUOTE]
I am so jealous of your derma skills :(
[QUOTE=bobbleheadbob;47044150]If the UI spit out actual Lua, you wouldn't have to "Transfer" and there would be no "format". Just save the Lua as a .txt and RunString(), that way if you decide to change to being an advanced user you can just copy and paste into a Lua file or even just edit the file like it were a Lua file because it's ran like one.[/QUOTE]
I would have to make a lua parser to be able to edit jobs in hindsight, especially if they've been edited with advanced features. That or I make a simple parser that is only able to parse jobs that the ui has written to the file. That simple parser would have to give a "fuck you, can't read this" error if jobs are edited, even if the edits are correct.
Also, this job editor wouldn't be able to edit jobs made in the original lua format. Not only does this discourage people from using the ui, it actively angers them when they find out in hindsight that they can't put advanced logic in their jobs because the ui won't be able to handle it anymore. The ui would only useful for the initial job, putting advanced things in them would become a tradeoff: advanced features but no more ui OR no advanced features but keep the ui.
In that sense these online php job creators are the perfect solution. You get the ease of creating an initial job, and editing them in hindsight is not even considered to be a feature. The created jobs are immediately put in the Lua file after which advanced features can be added. I can't recreate that in Lua without people asking me for it to be able to edit jobs.
Advanced features are very important to me because I see it being used a lot.
Thanks again for the feedback, I love seeing this discussion about how to deal with end user stupidity. I'm going to turn simplerr into a bit of an experiment. I'll just throw it in and keep an eye on the DarkRP forums. Eventually people might start popping up asking questions about these errors. When they do I can ask them how they interpret the message. Quite possibly I can improve it more.
I'm optimistic in that it will genuinely help people. The message "The author of X.lua made a mistake..." is likely to trigger an [i] "Oh cock that's me" [/i] thought, haha!
[img]http://i.imgur.com/CdDOXPs.png[/img]
oh yeah, i found out about this thing a while ago
makes it able to search inside lua files with the windows search
probably late but whatever
[t]https://dl.dropboxusercontent.com/u/17839069/C_269.png[/t]
The low FPS is because I was stress testing Imesh. I couldn't use util.Decal so I used the next best thing.
[QUOTE=EthanTheGreat;47046173][t]https://dl.dropboxusercontent.com/u/17839069/C_269.png[/t]
The low FPS is because I was stress testing Imesh. I couldn't use util.Decal so I used the next best thing.[/QUOTE]
You should use MATERIAL_TRIANGLE_STRIP instead of individual quads. Also due to the nature of those marks, you
could use immediate mode instead of static meshes. It is not that big of a performance bottleneck at this level.
Sorry, you need to Log In to post a reply to this thread.