Garry's Mod

Garry's Mod

Sandbox Weapon Shop and Money System
131 Comments
Famous5000  [author] 11 Jul @ 8:19pm 
Unfortunately Steam is likely to blame for the missing options. As it works just fine with my setup.

If I get another report of it I will start doing extra testing to see if the server I run with this still works or not. But nothing should have changed, so everything should still be functioning...
Uniresta 11 Jul @ 8:16pm 
I have the same problem with the WeShop options not appearing, I only have this addon installed (never touched the other one) and I attempted unsubbing and resubbing to the mod two times and it still didn't work. So I dunno what else could be happening.
Famous5000  [author] 11 Jul @ 7:01pm 
Only subscribe to *one* version of the addon. Do not subscribe to both at the same time. They will conflict. Also if the resub doesn't work, since the addon is working perfectly fine with my setup, I do not know how further to help you.
hes_madyes 11 Jul @ 4:43pm 
i have 1000+ hours on gmod and i have tired resubbing to both verisons of the mod
Famous5000  [author] 11 Jul @ 4:34pm 
You have it collapsed then because the category would not be there if there's nothing under it. Expand it, and the answers you seek lie there. If it still doesn't have anything under it, you probably have a corrupt download and need to unsub and resub to fix it.
hes_madyes 11 Jul @ 4:32pm 
i see weshop admin but under it there is no options
Famous5000  [author] 11 Jul @ 4:23pm 
OK, so...

You mean to tell me that, when you look at the "Options" part of the tool menu on the right side of the spawn list, you don't see "WeShop Admin"?
hes_madyes 11 Jul @ 4:19pm 
it ask me to set buy-able weapons in the spawnlist options
Famous5000  [author] 11 Jul @ 3:29pm 
What do you mean by "options in the spawnlist," @hes_madyes?
hes_madyes 11 Jul @ 12:07pm 
the options in the spawnlist dont show up
Notispadiko 31 May @ 2:20am 
ok thanks ! i'll try it out
Famous5000  [author] 30 May @ 6:48pm 
The MK1 runs off of kills; every 4 kills it spawns a money entity which can be picked up by anyone.
The MK2 uses the printer assets which I explained already.
Famous5000  [author] 30 May @ 6:47pm 
https://drive.google.com/drive/folders/12f4RBSw7EwpZPNOwZ1zYlYl0Lh1w6leI?usp=drive_link

Here's the public assets I have uploaded; this includes the two printers I made, one of which uses another printer's entities to upgrade it [and can overheat].
Famous5000  [author] 30 May @ 6:37pm 
Well there's no point in the printers if it is spawnable by everyone.

Plus, its hard to balance the printers to work with economy as it is different for every player.

So yeah, I'll try to export the blueprint and see if I can share it here.
Notispadiko 30 May @ 11:32am 
oh that nice, yes I am curious about it. do you want to know why I asked that in the first place ? I like the idea of people fighting over printers in sandbox, like something forcing the interaction. It would make sandbox way less boring
Famous5000  [author] 29 May @ 10:26pm 
@Notispadiko
Funny story about that, I did actually make a money printer entity using GMOD Blueprints.

And because of the changes I made to this addon to allow modifying the player's money via setting data (and pinging the player with changes), it actually works quite well.

If you are curious I could see about attaching the Blueprint.
Notispadiko 29 May @ 9:27am 
I love this mod 10/10, it would also be great to have a money printer entity btw
Famous5000  [author] 15 May @ 10:55pm 
Hi...
So sometimes Workshop doesn't download addons correctly. In that case, yeah, it can fix itself. That's not an issue I can fix. Sorry!
z6234eta 15 May @ 5:50pm 
and now it's fixed


wth
z6234eta 15 May @ 5:45pm 
hello hi, for some reason whenever i try saving a preset it doesn't show up in the presets just a heads up. i don't know if im the only person getting this
E-4 Sgt. Tom 14 May @ 12:30pm 
Alrighty thx for the answer
Famous5000  [author] 14 May @ 11:40am 
@E-4 Sgt. Tom

The place you can find this is under your install's Data (Steam/apps/common/GarrysMod/garrysmod/data/weshop). This provides all data stored by the addon. And thank you for adding a FAQ question for me.
E-4 Sgt. Tom 13 May @ 5:47am 
where can I find my saved shop txt?
Famous5000  [author] 4 May @ 7:42pm 
@w4defish

That's defined by the end user via the parameters set... If you're referring to multiple guns using the same ammo type however, well, unfortunately there's no real easy way around that.
w4defish 3 May @ 5:46pm 
would it be possible to have it so that the ammount of ammo given in a singular purchase is equivalent to that weapons clip size, and then the max is just like 10 clips or something?
ZendoVG 1 May @ 7:41am 
@Famous5000 Sure thing, if I got anything else about the mod issue, I take care of that, so yeah
Famous5000  [author] 1 May @ 7:36am 
Regardless I've created an issue on Github (#28); if you want to comment on that issue feel free to.
Famous5000  [author] 1 May @ 7:35am 
The weird thing is that it *shouldn't* be popping up at all... The network messages which the mod uses should have correct lengths taken care of, unless the latest patch caused some issues that I'd need to fix... Please check and make sure the addon's properly installed (Validate installed files) and if the issue still persists I'll check on the issue once I get a free moment, unless @w.black57 is willing to help test and confirm.
ZendoVG 1 May @ 7:32am 
@Famous5000 Before gmod releasing a patch theres no error like this when buying ammo, after gmod release this patch, it popped up somehow, I run only few mods that I use like, ARC9 and things like that.
Famous5000  [author] 1 May @ 7:21am 
@ZendoVG
That sounds like a mod conflict... What mods are you running? And please do testing to find out what mod is causing the conflict so I can figure out what's going on a bit better.
ZendoVG 30 Apr @ 8:04pm 
As soon I prompted to buy ammo for the current weapon, this pop up
[Sandbox Weapon Shop and Money System] Trying to read more data (32 bit) than the net message has left (6 bits)!
1. func - lua/entities/weshop/init.lua:2064
2. unknown - lua/includes/extensions/net.lua:34
It happened after gmod released a small patch just now
Luca1808 27 Apr @ 3:44am 
new information: works in singleplayer with wiremod
Famous5000  [author] 27 Apr @ 3:39am 
I've logged the issue on the Github issue tracker; that'll be one of the first things I tackle once I get a free moment. If you feel you can help with debugging the issue and getting exact specifics to happen feel free to comment on the latest issue (#27) on the Github.
Famous5000  [author] 27 Apr @ 3:36am 
Strangely enough I play *with* Wiremod and haven't had any issues before... Maybe something changed on their end which makes it incompatible... I'll investigate once I have time.
Luca1808 27 Apr @ 3:28am 
it IS a wiremod incompabillity, retrying the entity thing, there are NO errors, when wiremod is disabled (test done in singleplayer) presets work too
Luca1808 27 Apr @ 3:20am 
something that may be happening, is a wiremod incompabillity, because wiremod expression 2 has a file, in basically the same path, for wiremod e2 extentions.
Luca1808 27 Apr @ 3:17am 
what about being unable to add entities with some weaponbyclass thing?
Famous5000  [author] 26 Apr @ 4:48pm 
OK, please confirm if the issue persists when it's *just this addon* present. If it doesn't happen then retry with the full mod list you have and tell me the results, @Luca1808. Those tables should not be nil, and it's concerning that it is nil.
Luca1808 26 Apr @ 2:15pm 
i also have issues making presets: [Sandbox Weapon Shop and Money System] lua/entities/weshop/init.lua:1960: bad argument #1 to 'TableToJSON' (table expected, got nil)
1. TableToJSON - [C]:-1
2. CompressAndSendTable - lua/entities/weshop/init.lua:1960
3. func - lua/entities/weshop/init.lua:2813
4. unknown - lua/includes/extensions/net.lua:34
Luca1808 26 Apr @ 2:14pm 
i have a large amount of errors, first off i cannot add entities to the store, and after attempting to, the store breaks error: [Sandbox Weapon Shop and Money System] lua/entities/weshop/init.lua:1160: bad argument #1 to 'ipairs' (table expected, got nil)
1. ipairs - [C]:-1
2. FindWeaponByClass - lua/entities/weshop/init.lua:1160
3. unknown - lua/entities/weshop/init.lua:2432
Famous5000  [author] 26 Apr @ 9:15am 
That seems... Odd... What mods are you running @dinogutt? Can you reproduce the issue if you're just using this mod?
dinogutt 24 Apr @ 9:09am 
The money-counter doesnt show on the hud, and I get an error message when I try to open the shop.
[Sandbox Weapon Shop and Money System] lua/entities/weshop/init.lua:1960: bad argument #1 to 'TableToJSON' (table expected, got nil)
1. TableToJSON - [C]:-1
2. CompressAndSendTable - lua/entities/weshop/init.lua:1960
3. v - lua/autorun/weshop.lua:1809
4. unknown - lua/includes/modules/hook.lua:102Q

Are there any known causes or mod incompabilites that cause this?
Famous5000  [author] 16 Apr @ 10:59pm 
Past this point, complaints regarding NPCs being broken, unless it's sent to the Github with good information, will be deleted. Please read the description.
Famous5000  [author] 16 Apr @ 10:53pm 
OK guess I'm putting a caution on the addon's page which indicates that NPCs aren't supported at the moment.
RoyTheBoy 16 Apr @ 10:51pm 
i cant spawn custom npcs even if they have the default game classes (combine citizen)
Famous5000  [author] 15 Apr @ 4:00pm 
hmm... Thanks for the reports and the addon links. I'll investigate if I can, don't expect much luck though...
meierhans 14 Apr @ 12:49am 
HLW Rebel Special Units seem to work totally fine:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2571249023

ZBASE rebel NPCs spawn, but sadly without a weapon. (Beside Gordon, as he can switch weapons.)

You can make them pick up weapons with this addon:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3255679741
(But you will need to add all custom NPCs to the supported list in this addon manually.)

Finally you can use this addon to make them follow you, teleport close or run to position under your crosshair: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3309330691
Mr. Troll 13 Apr @ 2:08pm 
Yeah, I've had some success with buying any npc that's specifically not from the rebel faction. Rebels just don't spawn at all even though I can buy combine, zombies and all the like.

Thanks for lookin' into it. :)
Famous5000  [author] 12 Apr @ 4:38pm 
@Mr. Troll
So to clarify you're trying to buy NPCs, correct? Currently I don't think buying NPCs is supported by this addon, however, I did put it as an issue on the GitHub, which is basically acting as my TO-DO list for the future. Most likely it'll be a toggle when adding a price to regular entities; "is this an NPC?".
Famous5000  [author] 10 Apr @ 11:07am 
@Mr. Troll
I'll take a look when I get a free moment and see if I can figure out what's going on. If I can fix it I'll put out a hotfix, if not, I will put cautions up on the workshop itself.

@Ace Beta
Uh... Singleplayer or server?