Jump to content
The Indie Stone Forums
wintermuteai1

Npc Modding?

Recommended Posts

8 minutes ago, Faalagorn said:

Not sure if it's helpful, but I saw there's been one attempt at adding NPC companion mod before:

I never tested or seen the mod in action though

Hi Faalagorn,

I saw that but I didn't see a download? perhaps removed?

tyvm tho

Share this post


Link to post
Share on other sites
57 minutes ago, fluffe9911 said:

Here is the npc mod https://drive.google.com/file/d/0B7wp8-w7flMOdVpLamx4TUl2ejA/view

 

He also started work on a animal npc mod soon after but it was never released (I do have it though but don't know if he would be ok with me sharing)

Thank you Fluffe9911 much appreciated.

Edited by wintermuteai1

Share this post


Link to post
Share on other sites
11 hours ago, MXXIV said:

Sorry for being off topic but seeing your avatar I must ask - is Rim World still active? Is my force field shield still used?

Hi there,

Yes people still play and mod rimworld, as for your mod, I have no idea sorry :)

Edited by wintermuteai1

Share this post


Link to post
Share on other sites

If anyone would feel comfortable sharing the npc animal file as well I think I can create a decent npc mod by using both files as reference. In testing today I achieved similar results as Insayne and was able to get the npc to almost attack me, however I need some way to "tag" the npc as player or other method to get the zombies to attack the npc as well as attack methods for npc -> zombie. I also was successful in creating the guard command which makes npc react and ask where you want him to guard. 

Edit: thanks to fluffe9911 I have the animal file. 

Thank you. Will post more as I progress.

Edited by wintermuteai1

Share this post


Link to post
Share on other sites

If you've not already seen it, there's some javadocs here, which might help you find the calls you want to make;

http://projectzomboid.com/modding/

 

It's doesn't get updated often at all, but all the old abandoned AI code hooks are in there. You're more than welcome to call it, but we would recommend starting from scratch if you can. Once the 'official' code is finished, we'll have better modding ability, hopefully. Nothing's set-in-stone yet!

 

Be aware, we'll be watching this closely, for it's possibility of going bad, but also with curiosity and interest. We can't promote anything to do with NPCs mods for now as much as we'd want (see previous thread), but for sure we will if/when we can :)

 

Onwards! I'm not sure MisterInSayne is around much these days, but it might be worth dropping him a friendly PM? Maybe you could collaborate?

Share this post


Link to post
Share on other sites
1 hour ago, kirrus said:

If you've not already seen it, there's some javadocs here, which might help you find the calls you want to make;

http://projectzomboid.com/modding/

 

It's doesn't get updated often at all, but all the old abandoned AI code hooks are in there. You're more than welcome to call it, but we would recommend starting from scratch if you can. Once the 'official' code is finished, we'll have better modding ability, hopefully. Nothing's set-in-stone yet!

 

Be aware, we'll be watching this closely, for it's possibility of going bad, but also with curiosity and interest. We can't promote anything to do with NPCs mods for now as much as we'd want (see previous thread), but for sure we will if/when we can :)

 

Onwards! I'm not sure MisterInSayne is around much these days, but it might be worth dropping him a friendly PM? Maybe you could collaborate?

Hi Kirrus,

thank you, i've been researching all through there already but much appreciated. I've tested some of the more obvious ones like the guard command and it works.

one of the more annoying things so far is I have not yet figured out how to make it simply have a basic brain and do things like wander around etc.

One thing I should make clear to anyone reading in here is that I have no intention of creating anything even remotely as good as what the devs are doing. Rather,

I would like to have some simple npcs for us to play with until the real ones are finished, have them do things like wander around, attack a zombie if one gets close,

search and find food, weapons etc and "eat" if hungry, some basic conversations with player. Others reading should realize the difference between a modder trying to do this with trial and error, and the devs who have full scope and understanding of all their own code and years of working with said code. I've seen the videos by Chris Simpson where he shows a player saddled with an npc "brain". I would love it if someone who actually knows the code could give some examples of how to do some of these things.

No worries Kirrus, I have no intention of doing anything harmful here, really just a personal type of goal to see if and what I can get working :)

I'm thinking Insayne doesn't come here anymore, and has moved on, but if wanted to collaborate, i would be up for it.

-Winter

Edited by wintermuteai1

Share this post


Link to post
Share on other sites

There are a number of events designed around interacting with or replacnig the AI of NPCs (including zombines). Will see if I can find the list, assuming you haven't already. :)

 

The stuff in Chris's videos, though, is a total replacement of the NPC-centric AI code shipping with the game. There's no simple way to do that. :(

Share this post


Link to post
Share on other sites
1 minute ago, EnigmaGrey said:

There are a number of events designed around interacting with or replacnig the AI of NPCs (including zombines). Will see if I can find the list, assuming you haven't already. :)

 

The stuff in Chris's videos, though, is a total replacement of the NPC-centric AI code shipping with the game. There's no simple way to do that. :(

Ah EnigmaGrey, well I have to say what Chris showed in those videos is fantastic :) I would appreciate that Enigma, any help and any info of actually how to do some of these things the correct way would be appreciated. The only reference material I currently have are Insayne's mods, but they are missing most things other than follow the player or stay, unfortunately.

Share this post


Link to post
Share on other sites
12 minutes ago, dannyisdude said:

I've been seeing what I can do with InSayne's mod as well. I've been trying to apply a Java survivor behavior to an NPC. Unfortunately, I have no idea how. 

Well, from what I can see so far, they can be set up to do what the old npcs would do if they joined you: follow player, stay, or guard. unfortunately they have no brain whatsoever, and I also have no idea how to add a "brain" without creating my own classes in java and / or LUA. I'm guessing there might be a way to add in a standard brain, but i'm not 100%. Even something like the zombie Wander for the npc would be nice but no luck so far. Unfortunately the people who know 100% are the devs and they do not really want an npc mod so do not seem interested in answering even simple inquiries.(also too busy i'm sure.) Because of problems with LOS, classes would have to be written for literally everything. I'm honestly already burnt out and going to step back from it for a bit.

Share this post


Link to post
Share on other sites
1 minute ago, wintermuteai1 said:

Well, from what I can see so far, they can be set up to do what the old npcs would do if they joined you: follow player, stay, or guard. unfortunately they have no brain whatsoever, and I also have no idea how to add a "brain" without creating my own classes in java and / or LUA. I'm guessing there might be a way to add in a standard brain, but i'm not 100%. Even something like the zombie Wander for the npc would be nice but no luck so far. Unfortunately the people who know 100% are the devs and they do not really want an npc mod so do not seem interested in answering even simple inquiries.(also too busy i'm sure.) Because of problems with LOS, classes would have to be written for literally everything. I'm honestly already burnt out and going to step back from it for a bit.

They have a lot more than than just follow, stay, or guard. There is a whole list of npc orders, like find safehouse, loot building, ect. 

Share this post


Link to post
Share on other sites
6 minutes ago, dannyisdude said:

They have a lot more than than just follow, stay, or guard. There is a whole list of npc orders, like find safehouse, loot building, ect. 

Yes, i know. so far I haven't been able to get them to do those things though. I'm not sure how to pass those to them I tried this morning but kept getting errors.

Share this post


Link to post
Share on other sites
38 minutes ago, dannyisdude said:

I think I might be getting somewhere. I just need to figure out how to define an IsoBuilding.

If you don't figure it out after a couple days I would try the help area maybe someone would know.

Share this post


Link to post
Share on other sites

Ok:

anyone with any knowledge whatsoever what is the proper way to make the npc do a function for example:

http://www.projectzomboid.com/modding/zombie/behaviors/survivor/orders/LootBuilding.html

I have gotten things like Guard to work by doing:

npc:Guard(playerObj);

within the function for context menu commands. This does not work for other things like loot building because I do not know the correct way to call it.

thanks in advance

Share this post


Link to post
Share on other sites
5 minutes ago, wintermuteai1 said:

Ok:

anyone with any knowledge whatsoever what is the proper way to make the npc do a function for example:

http://www.projectzomboid.com/modding/zombie/behaviors/survivor/orders/LootBuilding.html

I have gotten things like Guard to work by doing:

npc:Guard(playerObj);

within the function for context menu commands. This does not work for other things like loot building because I do not know the correct way to call it.

thanks in advance

I've been trying to do something the same way with Java functions. I've been trying to call behavior functions every way I can think of. 

Share this post


Link to post
Share on other sites

I know nothing about this at all so this is just a guess will npc:Loot(playerObj);  or npc:LootBuilding(playerObj); do anything? (this is pure gussing lol)

 

Below darn

Edited by fluffe9911

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...

×
×
  • Create New...