Oops. Looks like I messed up.
I'll fix it in the next update but that might be a little while.
In the meantime you could edit the .cs at line 1242
Change
AttackPlayer(player, entry.Key, entry.Value);
to
AttackPlayer(target, entry.Key, entry.Value);
That should sort it out.
Thanks for flagging it.![]()
BotSpawn
Moved
Total Downloads: 11,691 - First Release: Jul 31, 2017 - Last Update: Jul 27, 2018
- 5/5, 81 likes
-
Downloaded Rust and Oxide a day ago (10/13). What I'm trying to do is have the server be PvE except for the areas around monuments which will be open season on PvP (using TruePvE and Zone Manager for this, the latter I think I can also use to remove/reduce rad damage from some locations) and I want hostile NPCs in those areas. I can't seem the get these guys to do anything, though, and it's probably because I'm missing something obvious. I'm not using custom locations, just included landmarks (Watertreatment, Airfield, etc.).
When they do decide to spawn they stand still in an idle animation staring at the ground a few feet ahead without responding to the "peacekeeper: false" I've set for them. I've checked "nav_grid true," "nav_disable false," even tried the "+nav_grid 1" trick from way back in the thread, no change. When nav_disable was true I switched it to false and reloaded the plugin.
I haven't equipped them with any kits and I am just using the "default" loadout, didn't want to complicate things when I'm having this much trouble.
I did "oxide.unload *" to get all my other plugins to stop followed by "oxide.load BotSpawn" loads the plugin with no errors. Reloading the plugin leads to bots that refuse to repopulate and bot.count comes back with 0 no long how long I wait. Restarting the server will get the bots I want to spawn but, as above, either they're motionless or despawn and won't respawn. Ugh.Attached Files:
-
-
Have you set nav_grid true, nav_disable false and then restarted the server?
Having done that, in that order, type 'nav_grid' and then 'nav_disable' into console to confirm that they report back true, and false, respectively.
If they don't, your provider is overriding your values and you should submit a ticket. -
Logged back in to a hail of shotgun fire which was sufficient test that the NPCs now work. -
how would i get the bots to automatically have certain clothes and weapons on spawn? aswell as make sure each bot wears and each weapon is different from the others at that radtown? say i have 5 bots at gas station... i want all 5 to wear and holster different clothes/weapons... how would i set the kit section for that?
-
@Steenamaroo i do not follow development of AI, do they changed something in the behavior of bots or they still leave the location? i am curious if it worth to remowe reset and respawn(respawn only if killed) of the bots at all.
-
-
Hey again! I came up with an idea. Could you add another command which instead of spawning them around the player to be discovered it will spawn them where they sre looking for example if you bind the Scientist command it will spawn scientist at the area you are looking at. But for bots with kits. Like in the command you can select what the bots kit should be. And also select the stats by choosing on of the areas normal bots spawn in so it will load the stats from that bot. Or make itleast something similer. Let me know if you like it.
-
Accuracy, what does the scale represent? Is it a percentage of hit chance?
Last edited by a moderator: Oct 15, 2017 -
I know I was just here trying to get them to work so I shouldn't be worried about intricate features, but would it be possible to add a panic mode for the NPCs? What I mean is that at a certain heath threshold (ie when they go below 50% hp) they would enter "Panic" and their accuracy would decrease but movement or fire rate would increase? Just a thought.
-
Instead of customising the Dome profile with ten bots and one kit, for example,
go to the dome and create 10 new custom points.
Now, in /data/BotSpawn.json, you can give a different kit to each of those bots.
If you set specific manual points and set radius to 0, you can count on the same bot being in the same place each time.
That makes further customisation meaningful. People will remember that the sniper at the east tower is a crap shot, for example.
I was testing 'toplayer' yesterday and tabbed out to do something else.
The same bot walked by me three or four times so I'm thinking maybe they don't just pick a compass point and keep trekking any more?
[DOUBLEPOST=1508082020][/DOUBLEPOST]
I'm not sure if I have control of fire rate right now.
I know they have different statuses (word?) like idle, wondering, flee etc so hopefully those will become more obvious in time.
I could certainly decrease their accuracy if their health is < X (I think), but it'd be much cooler if fire rate was rapid to really show off that they're spooked.
[DOUBLEPOST=1508082287][/DOUBLEPOST]
Yes, that would be preferable.
Right now I'm not using any kind of targeting or following - It is literally just spawning bots near a player and assuming they'll attack him.
If, for example, the target player has no weapon and peacekeeper is on, they'll just ignore him.
In the longer term I would like toplayer + airdrop bots to just KOS regardless.
The toplayer bots should actively hunt the target, giving him priority over anyone else, unless they're attacked by someone else.
All this stuff is down the road, though, I imagine.
I'm hoping FP gradually introduce more and more options regarding targeting, path control etc.
I haven't checked up on the code in a while though - Might have a browse today.
Right now you can't choose their kit on its own, but you do have to assign them a pre-made custom profile which covers kits.
If I made it kit-select specifically, all other values would have to be defaults which probably isn't as good.
I'm assuming the people who used 'toplayer' will just have a few 'toplayer' profiles made in advance which never spawn otherwise....?
That was the idea. -
-
If I make a command that is /botspawn toplayer PlayerName Kit NumberOfBots then someone's saying, "Can you add accuracy", "Can you add Radius" etc, it ends up being a nightmare.
I suppose every parameter could be added optionally, like in ZoneManager, but, honestly, I think it's better just making your profile and having it customised 'on-file' to be used later.
At m0st maybe I'd make the profile creation via GUI.
I don't think we can handle strings in GUI so that command would be /botspawn add ProfileName BotName, then all the numerical values and bools would be set via GUI?
Again....looong term. -
-
-
hi,
any idea how to fix this error?
Code:Unloaded plugin BotSpawn v1.2.2 by Steenamaroo Failed to call hook 'OnServerInitialized' on plugin 'BotSpawn v1.2.2' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.BotSpawn.FindMonuments () [0x00000] in :0 at Oxide.Plugins.BotSpawn.OnServerInitialized () [0x00000] in :0 at Oxide.Plugins.BotSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in :0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in :0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in :0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in :0 Loaded plugin BotSpawn v1.2.2 by Steenamaroo
-
If you want two bots at the same place with different kits, you'll need two profiles at that location.
I'd love to make this as customisable as possible, but setting kits and specific parameters per bot would be ridiculous, I'm afraid.
Last edited by a moderator: Oct 15, 2017 -
-
Have you tried a duplicate Dome entry with a different kit? I've never tried it but I'm curious if it would spawn in a second set.
Or Like Steenamaroo said, create a custom zone which wouldn't be to hard to do. I think the hardest part is creating the kits. hehe -
OK....It wouldn't really be do-able with the default monuments because number-0f-bots is user customisable.
It'd be doable with the custom profiles but number of bots would have to be specified on creation, to know how many sets of options there should be.
So you do /botspawn add Name NumberofBots
Quite honestly, I'd just create several custom profiles. It's not much easier or harder, really.
Maybe it's a pain when there's an update that introduces a new variable, but there's always the option of manually updating to keep your previous setup.
[DOUBLEPOST=1508095879][/DOUBLEPOST]