OdinPlus-Marketplace_and_Server_NPCs icon

Marketplace and Server NPCs

A mod made by KG that adds 5 NPCs that admins can configure: Marketplace, new Trader, ServerInfo, Daily Reward, Feedback

Last updated 2 years ago
Total downloads 2573
Total rating 3 
Categories Mods Misc Server-side Client-side
Dependency string OdinPlus-Marketplace_and_Server_NPCs-1.4.1
Dependants 9 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.1502 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.1502

README

A mod made by KG that adds 5 NPCs that admins can configure: Marketplace, new Trader, ServerInfo, Daily Reward, Feedback

How to install:

Put MarketplaceAndServerNPCs.dll into BOTH server and client BepInEx plugin folder. Mod WILL NOT WORK ONLY IN CLIENT SIDE.

SHORT VIDEO ON HOW ITS WORKING

NPCs Demonstration Video

Description:

Mod adds 5 different NPCs to server so admins can configure them from serverside with no need to restart server for applying settings.

  1. Marketplace NPC - allows players to sell/buy items by setting them on marketplace with setting quantity + price. Even if player is offline he still will get gold if someone buys his item. (Player will need to get his gold by clicking "Income" button in right bottom).

  2. new Trader NPC - is basically a trader npc that sells items that admins set in MarketPlace.cfg file. This file is auto-updated into serverside so that you don't need to restart server for applying new items to a trader.

  3. ServerInfo NPC - shows text info from ServerInfo.cfg file which is also updated in runtime. Rich-text is automaticly applied to text, so you can use <color=red> </color> and other rich text markers. Also I added custom <button>Name, link, width, height<button> mark so you can add dynamic buttons to your server info

  4. Daily Reward NPC - allows players to get reward setted up by admins in RewardList.cfg file every N seconds (DailyRewardTime value is setted in MarketPlace.cfg)

  5. Feedback NPC - players can send message to your discord server webhook. So its basically some kind of feedback / ask admins for help / report trouble NPC. Webhook link setted up in MarketPlace.cfg file

How to spawn/change NPC:

  1. you need to have NPCtoolAdmin in your hands. You can spawn this tool prefab with any mod that can spawn prefabs and items.

  2. with NPCtoolAdmin in your hands open console (F5) and write: kgspawnnpc

  3. If you want to change NPC type you need to interact with him while NPCtoolAdmin is equipped in your hand

  4. If you CROUCH + interact - you're going to snap him to floor and turn him if NPC is not auto-turnable for player

YOU NEED TO START SERVER ONE TIME IN ORDER TO FOLDERS / CFG FILES TO BE CREATED. I RECOMMEND YOU TO WATCH MOD SHOWCASE VIDEO FIRST. NOTE THAT THIS MOD IS STILL NOT TESTED WELL AND ITS IN BETA. PLEASE FEEL FREE TO REPORT ALL BUGS YOU FIND

With NPCtoolAdmin in your hand you can add NPC component to any CHARACTER / HUMANOID object IF YOU NEED TO. (you can try to add it on RRR NPCs). But I DO NOT RECOMMEND you to do that since this new feature NOT TESTED YET

VIDEO ABOUT ADDING COMPONENT TO SKELETON FOR EXAMPLE

More Detailed Guide on every NPC:

MarketPlace NPC

NPC that players can use to BUY/SELL any item in game. After item is sold, player needs to click "Income" button to get his gold in inventory. Even if player is offline he will still get Gold if his item is purchased. MarketPlace.cfg has values related to Marketplace NPC: MP1

OnlyEpicLootItems <= if this option is true, then players will be able to sell ONLY EPICLOOTITEMS. So the enchanted items with ANY EpicLoot effect.

ItemMarketLimit <= This is LIMIT OF SLOTS players can have. not COUNT of items but slots that they are putting in marketplace. Limit is shown on top of Marketplace GUI window name.

BlockedPlayers <= steam ids of players you want to block from using Marketplace NPC, example: BlockedPlayers: 77123712381238, 77312312731283, 732189381239

[BlockedPrefabs] <= this option allows you to make a list of items that players cannot put in Marketplace, so if you want to block players from putting Silver and Iron in market, this is an example:

MP2

MP3

ServerInfo NPC

NPC will read info from ServerInfo.cfg and display that on GUI. Rich text markers can be applied to text you write. Guide

Also if you want to add button in your GUI (that will open any link), you can use <button>Name of button, link to site, width, height<button> ServerInfo npc uses "default" profile by default. But you can add as many info profiles you want (same as Trader NPC profiles). Example below:

ServerNPC

non-profiled text will be applied to every new Info NPC with "default" profile. But if you want to add your own you need to add new line with [ProfileName] and then in new line write your text you want Don't forget to come to Info NPC with TOOL => press G => write profile name and press Enter

Trader NPC

NPC allows admins to add items to it, so they can make vanilla Coins useful Server reads info from Traders.cfg. Example:

TraderConfigNPC

If you want to add new profile just add new line with [ProfileName], and add items in next line as you want with format = ItemPrefab, count, price So if you want to add an npc profile that will sell 10 wood for 5 gold and 1 firesword for 5000 gold you need to write:

TraderLOLProfileNPC

Don't forget to use NPCtoolAdmin to set Trader NPC current profile. Come close to NPC and press G

TraderSwapNPC

Reward NPC

NPC will read info from RewardList.cfg and display that on GUI. Players can obtain next reward every N minutes, that value is taken from MarketPlace.cfg :

RewardNPC

DailyRewardTime: 360 <= it allows players to get next reward every 360 minutes = 6 hours Rewards reading images from plugins/MarketImages folder, and reading RewardList.cfg every line as new reward. Every line should look like this:

png/jpg file name | list of items you get for reward (PrefabName,count) | description

You can add as many reward items you want, just make sure every ItemPrefab has number name after coma.

If you want to add reward with jpg/png name IMAGE.png and reward items : 10 Coins, 50 Silver, 80 Wood and 20 Iron with description LOL, it will look like that:

IMAGE.png | Coins, 10, Silver, 50, Wood, 80, Iron, 20 | LOL

How my RewardList + MarketImages folder from video looks like:

RewardNPCMarketImages

RewardNPCRewardList

RewardNPCResult

Feedback NPC

NPC allows players to send message that then will be showed up in your discord webhook. Discord webhook link is taken from MarketPlace.cfg file:

TraderConfigNPC

Update Information

v1.4.0

  • H&H Compatibility
  • Added packets compression

v1.2.0

  • Added NPCtoolAdmin as new admin tool for editing NPC instead of old SwordCheat mechanics. (All other mechanics/buttons are same, just use new item)
  • Fixed bug with trader not being able to handle more than 5 items (now you can use scroll to see all trader profile items)
  • Fixed bug where few epicloot items (Megingjord, Dverger circlet) were crashing marketplace
  • Fixed few send/get info methods

v1.1.1

  • Added NPCtoolAdmin as new admin tool for editing NPC instead of old SwordCheat mechanics. (All other mechanics/buttons are same, just use new item)
  • Fixed bug with trader not being able to handle more than 5 items (now you can use scroll to see all trader profile items)
  • Fixed bug where few epicloot items (Megingjord, Dverger circlet) were crashing marketplace
  • Fixed few send/get info methods

v1.1.0

  • Added Traders.cfg file where admins can add Trader profiles. Also did same for ServerInfo.cfg.. Now admins can add serverinfo + traders profiles as many as they want and attach them to NPCs. Also added NPC name override

v1.0.0

  • File added