About 10 years ago, Slob187 made a gamemode called GmodRP. It was simple, but oddly captivating. Unfortunately, due to significant drama in the Facepunch community at the time, he ended up dropping the gamemode and simultaneously dropping off the face of the earth. (No really, I tried contacting him.. none of my old contact points worked!)
So anyway, I found a copy of 1.4 and updated it to work on the latest gmod.
Andrew / SandBoxRP · GitLab
Full disclosure: It hasn't been completely updated to take advantage of (or prevent) all the latest stuff, like the context menu. I pretty much got it working, and made the status bar draw on the bottom of the screen instead of the top. Pretty sure item usage is broken, not sure what else is broken, and the permit system is a little weird.
Licensed under the MIT license, not completely sure what the old license was because Slob only included a link to his website in the license file, and unfortunately the email he provided in the gamemode no longer works.
Just sort of faffing about with the code to get it looking a tad bit more modern 🤔
http://fi.hypertext.ml/hl2_2018-12-20_20-04-57.png
http://fi.hypertext.ml/hl2_2018-12-20_20-04-00.png
With distance-based door opacity!
http://fi.hypertext.ml/firefox_2018-12-20_20-03-24.png
Not quite visible, but on the list of stuff in the big commit I'm pushing,
Door owner name reflects changes
Door owner is verified via steamid64 instead of nickname
Movable HUD info card (uses same panels as the rest of the ui)
Remixed the derma panel theme for SBRP panels
Fixed items
Tried my darndest not to incur a massive performance penalty on those 2d3d door texts.
I ran a completely non-scientific test on the performance hit of the 3d text for the doors. I performed this test in a relatively door-heavy area, where the only possible bottleneck would realistically be 3d text rendering speed.
http://fi.hypertext.ml/hl2_2018-12-22_10-34-56.jpg
http://fi.hypertext.ml/hl2_2018-12-22_10-36-21.jpg
From ~190 to ~130 is about a 30% performance hit.
It's not nearly as fast as I'd like it, but I feel this is acceptable, and if there are any concerns I could make it optional per-user.
Added a simple Job system, similar to how the Item system works (A base job is defined, and extra jobs can override various parts of the base job, specifically loadout but possibly more in the future)
http://fi.hypertext.ml/hl2_2018-12-23_09-58-40.png
http://fi.hypertext.ml/hl2_2018-12-23_09-59-46.png
The idea is not to replace the permit system, but to actually make it into a sort of 'upgrade' system. For example, instead of cops needing to buy battering rams every time they die, they can purchase a "Battering Ram License" from the permits page for a high price and get it when they spawn.
Hopefully this will be expanded to the item buying experience, too- You can be a merchant, but in order to buy black market goods, you need to get a Black Market Contact, or to sell liquor you need a Liquor License. It looks like it should be almost trivial to do this.
Nice, I hope to see this be big.
I should probably work on improving the item situation, but the vgui blurring was really bothering me.
I greatly improved the quality of blur
http://fi.hypertext.ml/hl2_2018-12-25_19-43-10.png
And made it work properly on HUD elements
http://fi.hypertext.ml/hl2_2018-12-25_19-41-54.png
And I fixed prop ghosting not happening
http://fi.hypertext.ml/hl2_2018-12-25_19-44-09.png
Neat, I still remember this being released.
Yeah, it's absolutely whack seeing things 10 years later that I was not only around for, but that I was directly a part of. Like I think I'm in the screenshot for slob's namechanger script
https://garrysmods.org/download/8797/randomnamezip
Which was released a month or two before GMRP iirc.
Crazy stuff.
you really shouldn't be using SendLua, you can achieve results in a much cleaner fashion with net messages.
Almost all of the sendlua'd stuff is originally from 10 years ago, not my own code. But now that I've looked and seen how often sendlua is used, I will stick that on the todo list.
less of a problem then, but that kind of thing should be among the first to go
Instead of working on removing sendlua, I've spent my time (wisely) developing a new chatbox for the gamemode.
http://fi.hypertext.ml/2018-12-28_19-11-45.mp4
By default it sits right next to the player's HUD info
http://fi.hypertext.ml/hl2_2018-12-28_19-13-23.png
But thanks to the fact that it also uses derma to draw itself, you can move it anywhere with no issues
http://fi.hypertext.ml/hl2_2018-12-28_19-15-34.png
http://fi.hypertext.ml/hl2_2018-12-28_19-16-13.png
It's not perfect, but it's certainly a chatbox.
http://fi.hypertext.ml/hl2_2018-12-29_12-31-23.png
Since we're working with a custom chatbox, I decided to write in custom chat handling via net packets. I took this opportunity to do the same to some of the things that are sendlua'd.
Abstracting the chat for this made it easier to add a /me command, so I did it!
Current chat is limited by the maximum length of a packet, 65535 bytes. I plan on limiting chat to some arbitrary number of characters, however, like 500. Way more than enough for even a big chat line.
I'm also not sure if I'm doing packets in a very decent way - currently I have one packet, the first string is an identifier, and then the rest is read based on the identifier (allowing for multiple packet types like chat, inventory item, etc). I'm not familiar enough with lua to write a super great networking system with it, and this doesn't really call for it, but I'm left feeling that there could be a better way that wouldn't be much more complicated.
I was notified that admin mods weren't able to take action based on chat anymore. This has been fixed. While I was at it, I added a dark background behind the RichText field, to improve legibility.
http://fi.hypertext.ml/hl2_2019-01-02_02-53-23.png
Additionally, I've gone through and redone how the shop works, logic-wise. You now only see what you are allowed to buy.
http://fi.hypertext.ml/hl2_2019-01-02_02-55-05.png
http://fi.hypertext.ml/hl2_2019-01-02_02-55-26.png
Items can define a "Merchant", which will restrict purchasing the item to classes that have IsMerchant = true. Then, items can further specify their scope by adding a required Permit/Upgrade. For example, to purchase a lockpick you need to be a Merchant with the blackmarket upgrade.
How do you plan on handling "Cop" roles? If you plan on adding them one of the best implementations I've seen is the Security Officer job on SS13. DarkRP's arrest baton is shit, getting teleported to a jailcell isn't fun, there are better ways of going about this interaction.
Stun Baton
Currently officers are given "handcuffs", which strip the target's weapons and slows them down. I thought it was supposed to bump them towards you if they strayed too far but it's either broken or wasn't implemented in the public version.
Officers can also purchase a stunstick license, giving them a stunstick whenever they spawn. The stunstick does reduced damage, just designed to put people in line really.
Having not developed anything for Gmod between 2011 and 2019, I didn't know that vgui docking was a thing - I was still used to having to calculate everything by hand.
But then I encountered the Dock functions, and threw together a new, easier-to-use inventory screen.
http://fi.hypertext.ml/hl2_2019-01-03_14-01-06.png
I use DModelPanels instead of SpawnIcons because they look better, no other reason.
Not the best code in the world, but it works and isn't too much spaghetti!
http://fi.hypertext.ml/2019-01-03_13-59-44.mp4
Redoing some of the other panels to use the dock system is on my to-do list, now. Great 🙄
I also added a couple of Money Printers. One prints less and is more likely to catch fire, but is much cheaper. The other is imported directly from Japan and therefore costs much more, can print more at a time, is less likely to catch on fire, and is green.
http://fi.hypertext.ml/hl2_2019-01-03_14-04-30.png
With my new docking and DModelPanel knowledge, developing a cool appearance editor was easy.
http://fi.hypertext.ml/hl2_2019-01-03_20-22-07.png
Here it is in motion
http://fi.hypertext.ml/2019-01-03_20-19-06.mp4
It's due for some tweaking yet, but the core UX loop is implemented. model/color options persist through rejoins/server restarts, though they use SetPData, which uses uniqueIDs which are known to be troublesome.
Looks cool, also glad to see someone on my map. Do you have a server running the gamemode as you develop it?
Love your map yeah, I've got a server running on my desktop that I run alongside the game. I've got my ports forwarded so I can get friends in and test stuff. Server name is just the default, though, and I don't have workshop settings set, so only people who have the map subscribed already can join.
Sorry, you need to Log In to post a reply to this thread.