Jump to content

Recommended Posts

Hey, fellow players!

Here's the mod which adds machines and coins for server offline trading!

tradeorug.thumb.jpg.ee6799a601f0d0cdf44249268b7beb49.jpg

Vending machine variant:

tradeomat.png.c1d7b364733669310ca960cad6e73058.png

Market stall variant:

tradeobox.thumb.png.c3c2bf3b069f132445b0fa4958edd190.png

Trade'o'rug (allows to sale five different items "as-is" for a difference prices - so it's possible to sell food for example):

tradeorug-1.jpg.5d56c1de1f82ac8188ddf16c2df63a39.jpg

 

These blocks are used for trading of course! The owner (player who has placed the block down) is able to set the trade (sneak-click):

owner.png.f93d5253837e14c4a902a32d97097418.png

 

Here Trade'o'mat expects to exchange 4 cattail roots for 1 sack of carrot seeds. And stock is filled for 12 deals. When the potential buyer opens interface, he sees the following:

customer.png.af395d4442a3df1f9ea91a2808f3451b.png

Just place required price to the left slot and push "Deal!" button to make a trade.

And here are the coins to use with my Trade'o'mats and just for exchange between players.

2021-01-09_15-04-24.thumb.png.1af453608f359de591b6f17cb300738e.png

 

Video Tutorials (English and Deutsch) courtesy of Julius van Vern:

Spoiler

 

Changelog:

1.5.5:

- Disallow hotkeys usage when hovering mouse over an item in tradeomats (thanks, @Hexedian)

Spoiler

1.5.4-B:

- Fixed crash when trying to buy already bought product (in trade'o'rug)

- Fixed crash when leaving "price" field empty (in trade'o'rug)

1.5.2-B:

- Added config options to disable various mod content.

1.5.1-B:

- Fixed Admin-shop crash on dedicated server.

1.5.0-B:

- Added "creative" variant for tradeomats (not trade'o'rug!). To set tradeomat to "creative mode", player with "gamemode" privilege have to check "Creative shop" tick in Owner GUI.

1.4.9-B:

- Fixed crash in multiplayer when trying to purchase something from Trade'o'mats type 1 and 2.

- Fixed stacks merging in existing slots.

1.4.8-B:

- Fixed prices display on various GUI scale

- Fixed crash when trying to pick up Tradeomat with installed CarryCapacity

- Fixed shift-click behavior

1.4.7-B:

- Added third Trade'o'mat version (named Trade'o'Rug), which allows to sell exact items (or the whole stack) for the defined price. First of all it can be used to sell such items as weapons, tools and food

- Added "Deal!" check-out sound :)

1.4.4-B:

- Fixed ability to trade items with temperature (wow, that was hard to catch)

- Fixed memory leak

- Added three coin variants: Copper, Silver, Gold. Coins are smelted from corresponding metals using clay mold (4 coins per 100 units of metal). They also reverse-smeltable. Coins can also be placed on solid ground.

1.3.4B:

- Fixed snow layer on open crate

- Fixed open crates with items rendered empty on world load.

- Added Brazilian-Portuguese translation (thanks @xCoiotex)

1.31B:

- Fixed claim behavior (now players can use tradeomats inside claimed areas)

- Fixed Crate server sync

1.3B:

- Added second variation of Trade'o'mat! This variant renders it's contents inside! (dedicated server testing needed!)

1.21B:

- Added configurable limit of allowed Trade'o'mats per player. (You can find the TradeomatConfig.json file on ModConfig folder of your VintagestoryData).

- Now players can use Trade'o'mats inside claims.

1.12B:

- Fixed incorrect side config for the upper Trade'o'mat part.

- Now owner's name displayed on top popup.

1.1B:

- Completely rewrote synchronization code. Hopefully it will solve sync issues.

1.0B:

- Fixed client crash when trying to make a deal without configuring the Trade'o'mat first.

- Fixed client crash when performing the last deal possible before selling out.

- Fixed wrong attributes in purchased item.

- Added "Block Help" tooltip for Trade'o'mat.

Latest version:

1.13.4 (no longer maintained):

tradeomat_v1.13.4-1.31B.zip

1.14.0+:

tradeomat_v1.14.0-1.5.5.zip

Suggestions are welcome! And bug reports also of course.

 

 

 

Edited by ZigTheHedge
  • Like 8
  • Cookie time 1
  • Amazing! 1
  • Thanks 1
Link to post
Share on other sites

Hey.. i tryd to test your mod, but i get this Servermessage. 

14:15:49 [Server Event] Player Juliusvanvern got removed. Reason: Threw an exception at the server
14:15:49 [Server Error] System.NullReferenceException: Object reference not set to an instance of an object.
   at Vintagestory.API.Common.CollectibleObject.Equals(ItemStack thisStack, ItemStack otherStack, String[] ignoreAttributeSubTrees)
   at tradeomat.src.TradeomatBlock.BETradeBlock.OnReceivedClientPacket(IPlayer fromPlayer, Int32 packetid, Byte[] data)
   at Vintagestory.Server.ServerSystemBlockSimulation.HandleBlockEntityPacket(_G9je56dJHtKJvFSBsXkB7nErImG packet, ConnectedClient client)
   at Vintagestory.Server.ServerMain.ProcessNetMessage(NetIncomingMessage msg, NetServer mainSocket)
14:15:50 [Server Notification] All clients disconnected, pausing game calendar.

do you have any idea, what goes wrong? 🙂

Thank you

Link to post
Share on other sites
15 hours ago, ZigTheHedge said:

What've you done exactly? ;)

I placed the TradeO´Mat Block, fill it with Root and Carrots and click on Deal. 

I tryd to run the game without other Mods, clean the Cache in %Appdata/VitnageStoryData%

I dont understand what happend. I´m on the Same Server like Rhonen (see above). 

Link to post
Share on other sites

Server side crashes gone with the 1.0b :)
but seems it's not synchronized from server to clients.

Setting up a Trade-o-Mat
mod1.png.25a793906a03b24ec2365579abf52aa9.png

Both players can see it

grafik.png.a34e14bd133b192eae2635aaa496c411.png

Julius input the 3 gears and pressed "Deal!"

I can see the correct ouput
grafik.png.87d56d42e332ac5caaba1cb37411252c.png

But Julius can not see his bought item.
m2.png.4e48d7f4cb0b2c1296071b6577092e36.png

Seems there is something still wrong while synchronizing the clients :(

Edited by Rhonen
  • Mind=blown 1
Link to post
Share on other sites

Hello Zig, I have tried the new version. There seem to be no problems with the synchronization at the moment. Rohnen will do another one tonight against check. But so far it looks good. Could you perhaps shorten the title in the field? It seems a bit too long for the display field.okay.. i try it :)

 

Thank you. I think your Mod will replace the ShopMod on our Server. 🤩

  • Amazing! 1
Link to post
Share on other sites
  • ZigTheHedge changed the title to Trade-o-mat [v1.5.5]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.