igroglaz / srvmgr

https://rom2.ru
8 stars 5 forks source link

modificator for item prices in shops #72

Open igroglaz opened 3 years ago

igroglaz commented 3 years ago

Add modificator which will give possibility to make selling prices in shops higher then they are now. At the same time if player selling items - prices should be the same as they are now.

Eg: player sells sword for 100 gold. With the help of this modificator shop puts this sword for 1000 gold.

This will be useful if we want to put items for sale in shops for big price as alternative to tavern rewards ( https://tangar.info/allods-blog/allody-2-hat )

serg-bloim commented 3 years ago

I can see a conflict with. magic books. If we have a modificator for all the goods in a shop, let's say x10, that means books will also cost x10. Is it possible to lower the price for books?

igroglaz commented 3 years ago

if we will lower books prices -> they will appear in taverns and in low lvl mobs loot. so just no worries about books - I'll put shop with equipment on separate server, so other servers won't be affected by it

igroglaz commented 3 years ago

from duplicate ticket:

an option to server config which will forbid player to sell items to shop

ideally, add to the server config the coefficient of the player's selling price of things to the shop. for example, a sword with a coefficient of 0.2, which used to be sold for 100g, will now be sold for 20g ... but if this is difficult, disabling selling will do...

[19:31] serg.bloim: Зукс, а почему говоришь, что протокол менять? [19:32] serg.bloim: По идее если блокировать-то можно просто кнопку продажи задисейблить... хм сам об этом раньше не думал, но получается можно даже без сервера обойтись. [19:35] serg.bloim: А если про модификатор цен-то если его глобально устанавливать, то запихнуть константу на отображение цен в клиент и гуд. Не могу понять, где тут протокол менять? Или ты думал менять/добавлять пакет чтобы сервер клиенту отсылал этот самый модификатор? [20:25] ZZYZX: Потому что это конфиг сервера [20:25] ZZYZX: Как минимум клиенту посылать список запрещённого к продаже, иначе будет эффект.. специфический, либо шмотка мигнёт и опять появится в инвентаре, либо клиента отрубит из-за ошибки расхождения данных в лавке. Я не проверял [20:26] ZZYZX: И коэффициент [20:26] ZZYZX: Потому что для визуального отображения клиент считает локально [20:26] ZZYZX: И будет расхождение [20:26] ZZYZX: Константа зло

igroglaz commented 1 month ago

from other ticket: Add to server.cfg a multiplicator for shop prices.

Demo: price_mod = 10;

means that all items in the shops will be sold for 10x prices. For example, dagger costs 100 gold. With price_mod = 10 it will cost 1000 gold.

We do not need to change anything in the client; changes in the server will be enough. So the task is to charge player upon buying item 10x gold.