Hopefully this is possible:
Give players the ability to edit the skin of the items used to pay for the items being sold.
The purpose of this, for me, is to be compatable with the ATM System plugin. I use this plugin with the Economics plugin. Players can use an ATM to take out paper money or deposit it and it gets added to/deducted from their Economics total. They can use this money to purchase items from other players instead of using scrap, etc. This would allow others to use custom items, such as reskins vodka bottles, or blood bags, as currency.
For me, I'd like to do this to sell items in the vending machine and have players pay with paper money. Paper money is just the item "Paper" with a skin ID of 2420097877.
So, is this something that could be done?
Allow currency to be skinnedSolved
Thanks for taking the time to write this detailed post!
One limitation is that the currency item cannot display a skin in the shop view. This is because the procotol between the client and server doesn't even have the option to communicate a skin id, so it can't show what it doesn't know, and plugins can't do anything about that as they are purely server side.
It is possible to actually charge for a specific skin id by overriding the server side logic. However, the players could possibly be confused.
The Vending Manager plugin has a means of directly interacting with the Economics plugin, by using a designated junk item, blood bags. I guess that players are just supposed to know that the blood bags represent coins. The plugin has to do several tricks like insert blood bags into an invisible slot in your inventory when you open the vending machine, so that the client thinks they can purchase the items. Then the plugin has to modify the transaction in order to charge your Economics account. When originally developing the GUI interface for this plugin, I was considering implementing it into other plugins such as Vending Manager, but TBH I could not tell what people use that plugin for, since it doesn't seem aimed at the monument vending machines which I primarily cared about, so I eventually decided on this plugin.
It looks like we have multiple options to try to solve your original problem.
- Direct integration with Economics like how Vending Manager does it. This could be difficult to get right without conflicting with other plugins, and pla
- Cooperation with Vending Manager. I'm not sure if this is possible today, but in theory, you could simply install Vending Manager, configure it with your fake currency item, customize the shops with CVS, and presumably the Economics transactions would just be handled by Vending Manager if it detects the transaction involves the special item.
- Settle for unskinned paper visually, but CVS can actually take only the skinned paper. This would require updates to the plugin to make it take the right items, by intercepting the transaction logic (which is currently vanilla). Several plugins in the wild modify transaction behavior so this might result in some conflicts that will have to be worked out.
That all sounds cool and very complicated. If it's something you want to work on, that would be awesome. I don't know enough about modding to know what the best approach is.
Since allowing currency to be skinned could be broadly useful, I will plan on implementing that by overlaying the custom images and overriding the transactions. I'll have to do some research to assess potential plugin conflicts. It won't solve direct integration with Economics like Vending Manager does, but it should address your use case of the skinned currency item. I can probably get to this some time in January.
The feature to show the skin overlay has finally been implemented in v2.7.0 (as a config option you must enable). Note that the feature to take the correctly skinned currency items from the player was implemented several versions ago, just without the display functionality until now.