Are you tired of boring GM cities where nothing happens and you feel alone, when less than 30 people online? With BasilMod::NPC its not a problem anymore!
Create, place and script NPC to fear your enemies and add glory to your kingdom!
Guards salute while you pass them. Blacksmith working on his own. AuctionHouse vendor welcomes you to trade, while another customer checks his new suit. Citizens at town square are listening to the monks' sermon about True Gods. Thief hides inside the warehouse and guards tries to get him. Housekeeper warmly welcomes you on your arrival.
This mod works well in conjuction with quests, storylines and merchandise mods. This allow you to create truly RP-PVE server with unique storyline.
NPC can do their own business, can react to player actions and movement. They can be global (same state for everybody on server) or local (personal actions for every player who interact with NPC, i.e while you advance along the quest chains).
Download all files and place to folder "BasilMod/NPC/" of server root.
add this line to the end of file "main.cs" of the server after BasilMod::Pack: exec("BasilMod/npc/npc.cs");
Start server.
Configuration.
Spoiler
This mod requires certain skill from server admin (or the person responsible for mod maintenance). At this time, you would need basic SQL and scripting knowledge to successfuly configure this mod.
General mod configuration
Spoiler
BasilMod::NPC provides following function which can be used for NPC manipulations.
BasilMod::npc_init(); Reload NPC config. You can issue this command directly from server console, or via keybind from client in GM mode.
BasilMod::npc_clear(); Remove all NPCs from server. Reload with empty config fill with do the same.
BasilMod::npc_zone(); Core function for creating action zone for NPC. NPC reacts when player enters such zone.
"lowerbound_delay upperbound_delay" Interval in milliseconds which should be used by NPC for performing action. Random delay from the interval will be used. For constant duration upperbound can be omited.
"state" Animation which should be used for action
"hands" Equipment slot which should be used in hand during action.
Function returns Zone object, which can be used for NPC connection, with .addNpc function:
ID Chracter ID which should be used for appearance and equipment. You may use same ID for multiple NPCs. Chracters used for NPC will be hidden from your character selection window, they will be marked as inactive characters. If you would like to login into character, you should make it active at your database.
"position" Position of NPC character
"rotation" Rotation of NPC chracter
Result: This function will return the NPC Character object, which can be connected to action zone, or altered with extra animations. By default, every NPC character has idle animation performed in a loop. If you would like to alter animations, you should use .addIdle function. If NPC character has multiple idle animations, they are executed in a loop in random order according to duration bounds.
"lowerbound_duration upperbound_duration" Interval for animation duration in milliseconds. Random value will be selected from the interval. or constant duration upperbound can be omited.
"hands" Equipment slot which should be used during animation.
Template config generation.
Spoiler
You can generate template config while in GM mod with special binds. Issued actions are appended to template config content_update.cs file, which is located at BasilMod/NPC/content_update.cs.
Place NPC character (ctrl + f1) Add new NPC character placement to template config. Current character position and rotation will be used as a source.
Place NPC Zone (ctrl + f2) Add new NPC action zone to template config. Current character position will be used as zone location center.
Reload NPC config (ctrl + f3) Reload mod config from config.cs. This may cause different artifacts. Mostly a debug function, for initial mod configuration.
Would really love to see this! Is there a way to make the trader post work? Thats what i would like the npcs for.. Trading! But if otherwise works aswell, id be very interested
I'm probably the 10 521 st to say that i appriciate your job but anyway i hope it's still fine for you to read it
Any estimated time of arrival for this mod ? Can't wait for it.
By the way i'd like to introduce some monney in game so we decided to create a list of things that a Gm can buy and prices and we spawn gold/silver/copper coin to trade and introduce monney but it takes a lot of time for GM...
- can we dream that your NPC will be abble to create a trade window with a player and give them the correct quantity of coins for each stuff sold ?
(config file could be set for what to sell / what to buy / prices and of course the limited quantity of what NPc sell / buy because if you set no limit you can imagine someone being rich by farming always the most efficient thing to sell wich is not the purpose...)
Darkbouzouf wrote:Any estimated time of arrival for this mod ? Can't wait for it.
No ETA. Soon(tm).
Darkbouzouf wrote:- can we dream that your NPC will be abble to create a trade window with a player and give them the correct quantity of coins for each stuff sold ?
You will be able to do it with merchandize(sells unlimited/or conditional amount of goods to players) and auctionhouse(gm can place items with specifics prices) mods.
Halvdal wrote:Sorry, the error comes from my client. The mod is active on my server but i don't have any keybinds for placing npcs or zones.
Mod and basilmodloader are up-to-date.
may i ask you how u get the basil working on ur server? the host wont let me use the .exe in the files. i get no where any answere's. would be great if anyone can help me we have it all in our clients etc but server side... not allowed to put the: base64encoder.exe in to the server files.
Halvdal wrote:Sorry, the error comes from my client. The mod is active on my server but i don't have any keybinds for placing npcs or zones.
Yep, my mistake in release files. Please redownload the mod. Server log should say that v2 was loaded.
Padme wrote:we have it all in our clients etc but server side... not allowed to put the: base64encoder.exe in to the server files.
base64encoder required for content syncronization between client and server. As a general solution, I sugget you change your hosting provider. Some of them officially supports BasilMods. If syncronization is not available, your player must manually download "client" folder of the mod and place its content to "basilmod/npc/" on their computers. If they wont do this, mod will malfunction.
Fikoleite wrote:Do you think the mod can cause lag?
It depends on your NPC configuration and timings. You can increase certain timings to reduce serverload if actions are looped (i.e. sawing, mining, etc), if you NPC only do this kind of action.
Try to remove all actions added to you NPCs, or remove all NPCs, or disable NPC mod and ask your players(but dont say what you done, say like 'an optimization was made') if they notice any lags, or performance changes.
Future version of NPC mod will provide an action queue, so less processing will be required by the server, which should cause overall performance incsease for non-movable NPCs. But movable NPC will require pathfindings between way points, so it would lag a lot
Fikoleite wrote:Do you think the mod can cause lag?
It depends on your NPC configuration and timings. You can increase certain timings to reduce serverload if actions are looped (i.e. sawing, mining, etc), if you NPC only do this kind of action.
Try to remove all actions added to you NPCs, or remove all NPCs, or disable NPC mod and ask your players(but dont say what you done, say like 'an optimization was made') if they notice any lags, or performance changes.
Future version of NPC mod will provide an action queue, so less processing will be required by the server, which should cause overall performance incsease for non-movable NPCs. But movable NPC will require pathfindings between way points, so it would lag a lot
So I decided to create a whole new world on my computer, making my LiF server and client (my gf will join this server later on, after I worked out how to use all your mods).
I installed/copy-pasted all the needed files as you explained.
Then I used the CTRL+F1 and +F2 function to create a testing npc + area, copypasted the text from config_update.cs to config.cs, so it kinda looked like that:
Spoiler
... ... //NPC: TestingNPC // position = "2159.03 2286.78 1016.83";
At first I had some problems with the client-based options I guess, then I just deleted all mod files but kept the server-files in /server, so my client "downloaded" all the needed client files again.
That helped me to get rid of this console warn:
Spoiler
WARN 2016-05-21 02:50:27.308 {02} <[BasilModNpc]BasilModNpcCharacter::switchHands> [677403] BasilMod/npc/npc.cs (952): Unable to find object: '-1' attempting to call function 'mountImage'
But there is still an error and I totally dont know how to solve it:
You should not use 0 as a used slot value for the idle or actions. If hands should be empty, omit argument, or use "" (empty quotes).
FrittiDeluxe wrote:But there is still an error and I totally dont know how to solve it:
If you reload mod multiple times and has multiple disconnects, there could be different issues. While you are configuring this mod, you can start mod with empty confing, and after you have connected to the server, place/update your config and then reload mod.
Tycomaru wrote:When trying to run the mod on server, it keeps reading "Error can not find file for player 0" and repeats continually
Make sure you have created your NPC character, and used its characterID for NPC placement. Share your log, as I haven't seen "Error can not find file for player" message before.
распишите пожалуйста как установить данную модификацию не на отдельный какой то сервер, а на скаченную игру в стиме. Ну чтобы когда создаешь Мой мир, этот мод можно было испоьзовать