Posts: 501
Threads: 42
Joined: Oct 2015
BYOND Username: The Grim Sleeper
01-07-2017, 04:33 AM
(This post was last modified: 01-27-2017, 03:06 AM by The Grim Sleeper. Edited 5 times in total.
Edit Reason: Link Typo
)
Snip a wire in the Vending machine hacking interface to change the prices!
No more $20 styptic powder mini-patch.
Edit:
So I was sitting here, very busy wasting time, and then suddenly I coded all over my screen!
Ergo a patch: it adds a 5th wire to all vending machines. If the wire is cut, all items are sold at a discount!
Well most items are sold at a discount, things like booster packs and stuff goes full price of course.
Technical stuff- Discounts can be set for each item individually.
- Discounts default to 0, iow, no discount. In case there is some hidden vending machine not in this code, it should not be noticeably affected by the patch.
- I set it so items which cost less then $2 normally are free when bought at discount price. This works surprisingly well; no need to have a token amount of money in the machine.
- Most other items have their price cut to just below half of the original cost.
- If some future person wants to have some fun, you can cut the price of an item to a negative value; This works fine, the machine will magically print you extra money. Just don't tell the QM.
- I've had to had 4 new lines to global.dm. Pretty self explanatory, and I hope it will pave the road for more innovative "electrical engineering".
Code:
Special thanks to Cirral for helping me put on GitHub.
Edit: Update: Yes, obviously I tested the code with the 2016 release v510 build and yes it works fine.
Posts: 1,526
Threads: 36
Joined: Jun 2013
would you be able to change the price to 0
Posts: 95
Threads: 38
Joined: Jun 2015
BYOND Username: Calebc789
01-07-2017, 07:17 AM
(This post was last modified: 01-07-2017, 07:19 AM by Calebc789. Edited 1 time in total.)
I think changing the prices to 0 should require some NetDiag magic or some other method, so it wouldn't be as easy as pulsing a wire. Halving the prices by pulsing a wire could work though.
Posts: 2,552
Threads: 33
Joined: Oct 2014
You can get better stuff from disabling the access-restriction wire on medical vends, so why not?
Posts: 1,526
Threads: 36
Joined: Jun 2013
oh i know. it could scramble the prices with each wire pulse. maybe it make em cheaper, maybe it make em more expensive. dont like the result? scramble em again
Posts: 5,710
Threads: 303
Joined: May 2014
(01-07-2017, 11:31 AM)misto Wrote: oh i know. it could scramble the prices with each wire pulse. maybe it make em cheaper, maybe it make em more expensive. dont like the result? scramble em again
Take the total value of each item's price, and then split that amount between everything each time it's pulsed.
Example:
Original prices
1. $30
2. $60
3. $200
total value - $290
after a pulse
1. $65
2. $175
3. $50
Total Value - Still $290
Posts: 93
Threads: 12
Joined: Mar 2016
BYOND Username: ZCamperz
there needs to be a wire to just make the vending machine shit out all of its contents on to the floor
...or make it so if you smash the glass with something, the prices all say "0" because you can just steal them out of the machine
the smashed machine method should shock you or cut your arm when you buy something, because glass
Posts: 2,552
Threads: 33
Joined: Oct 2014
Is there really a need for the complication?
You can hook up a CU or button to a vending machines and it'll eject a random item. As for credits, I think the actual trouble of grabbing tools and then hacking a vend is worth more than than the credits used to purchase the items.
Are there any real downside to the vend items being set to free? I mean, you could probably get 10k per minute of effort in the derelicts.
Posts: 466
Threads: 68
Joined: Sep 2015
BYOND Username: protowizard
(01-07-2017, 12:10 PM)Frank_Stein Wrote: (01-07-2017, 11:31 AM)misto Wrote: oh i know. it could scramble the prices with each wire pulse. maybe it make em cheaper, maybe it make em more expensive. dont like the result? scramble em again
Take the total value of each item's price, and then split that amount between everything each time it's pulsed.
Example:
Original prices
1. $30
2. $60
3. $200
total value - $290
after a pulse
1. $65
2. $175
3. $50
Total Value - Still $290
I endorse this idea, but I think it should only work once. So the more expensive the thing you want is, the more likely it is to drop in price but there's also a chance you fuck yourself over.
Posts: 501
Threads: 42
Joined: Oct 2015
BYOND Username: The Grim Sleeper
(01-07-2017, 11:31 AM)misto Wrote: oh i know. it could scramble the prices with each wire pulse. maybe it make em cheaper, maybe it make em more expensive. dont like the result? scramble em again I donno, this sounds like and advanced goal.
(01-08-2017, 02:39 AM)Vitatroll Wrote: Is there really a need for the complication?
You can hook up a CU or button to a vending machines and it'll eject a random item. As for credits, I think the actual trouble of grabbing tools and then hacking a vend is worth more than than the credits used to purchase the items.
Are there any real downside to the vend items being set to free? I mean, you could probably get 10k per minute of effort in the derelicts. I agree that the 'hack prices' wire should not make things very complex to use.
I am inclined to agree on the 'for free' price as well, the soda machines practically give things away anyway.
But the Carty Party machine stocks 3 PDAs at $100 each and 2 of a few Carts between $50-$80. The mini-med vendor is also rather poorly stocked. A reduced price would be a barrier to toolboxing Grayshirts with papercuts pilfering the whole stock.
On the flipside, I'd feel very salty if manage to run away from the wizards spree only to collapse after a neat hack because I am a buck short for the reduced price of a epinephrine injector while mid-crash because I had a coffee with my grey shirt.
Also Please rate 5/5 for that added noticeablity
Posts: 501
Threads: 42
Joined: Oct 2015
BYOND Username: The Grim Sleeper
01-25-2017, 12:04 PM
(This post was last modified: 01-26-2017, 11:21 PM by The Grim Sleeper. Edited 3 times in total.
Edit Reason: Link typo
)
So I was sitting here, very busy wasting time, and then suddenly I coded all over my screen!
Ergo a patch: it adds a 5th wire to all vending machines. If the wire is cut, all items are sold at a discount!
Well most items are sold at a discount, things like booster packs and stuff goes full price of course.
Technical stuff- Discounts can be set for each item individually.
- Discounts default to 0, iow, no discount. In case there is some hidden vending machine not in this code, it should not be noticeably affected by the patch.
- I set it so items which cost less then $2 normally are free when bought at discount price. This works surprisingly well; no need to have a token amount of money in the machine.
- Most other items have their price cut to just below half of the original cost.
- If some future person wants to have some fun, you can cut the price of an item to a negative value; This works fine, the machine will magically print you extra money. Just don't tell the QM.
- I've had to had 4 new lines to global.dm. Pretty self explanatory, and I hope it will pave the road for more innovative "electrical engineering".
Code:
Special thanks to Cirral for helping me put on GitHub.
Edit: Update: Yes, obviously I tested the code with the 2016 release v510 build and yes it works fine.
Posts: 2,043
Threads: 65
Joined: Nov 2014
BYOND Username: Zewaka
Character Name: Shitty Bill Jr.
put this in patches next time or ELSEEEEEE
Posts: 962
Threads: 55
Joined: Aug 2015
While you're doing that 'hacking' nonsense, why not just make it so knocked over vending machines can be looted.
You know, because the front part is smashed in and all the goodies inside are unguarded!
Posts: 501
Threads: 42
Joined: Oct 2015
BYOND Username: The Grim Sleeper
01-28-2017, 10:40 AM
(This post was last modified: 02-01-2017, 12:23 PM by The Grim Sleeper. Edited 3 times in total.)
(01-28-2017, 01:07 AM)Grifflez Wrote: While you're doing that 'hacking' nonsense, why not just make it so knocked over vending machines can be looted. I won't do that.
Small part is that then grey shirts would wreck EVERY SINGLE MACHINE, every round.
Big part is that I don't know how to code that.
Posts: 5,710
Threads: 303
Joined: May 2014
(01-28-2017, 01:07 AM)Grifflez Wrote: While you're doing that 'hacking' nonsense, why not just make it so knocked over vending machines can be looted.
You know, because the front part is smashed in and all the goodies inside are unguarded!
If this were a thing, reaching inside to grab stuff ought to have a chance to cut you up or something, since knocking a machine over for free shit is fairly easy to do
|