InSayne Companionship - An NPC companion.
19 19

143 posts in this topic

Recommended Posts

05b06f540edf21db2edd7ed0168f0b33.jpg

 

Well, this all originates from a request from miss DemonXelo, found at http://theindiestone.com/forums/index.php/topic/16455-a-reason-for-doing-what-we-do-request/

 

 

 

 

 

So, if I get it right, coding wise you want an ingame stationary object that has a sprite of a human, with menu options and properties that degrade over time which you need to keep up such as hunger etc? Doable!

Yes! XD Something to just make life a little more livable in PZ, not sure about stationary, but if that's the only way, it's what it has to be since there are no npc's :c, but It is doable?! YES!! :D


If you can do this that would be even more amazing then portable fridges! (And that's amazing!)

And I agree, If you can do this, that'd be AMAZING! xD!!

 

 

I'll first finish the portable fridges, then first do some tests with making my own npc's (or well, companions), and if the tests are unsuccesfull, it'll be a stationary object.

 

So no promises for making it anything but a stationary object. But I will give it a try <3

 

Yay I love you! :D Good luck!

 

 

Gonna do some tests today ^__^ I'll let you know what comes out!

 

 

Sooo... First tests are VERY promising and sucessful!

 

2015_09_27_00001.jpg2015_09_27_00008.jpg

 

 

I can make the NPC follow me around, say things, and pretty much everything! So, the NPC Companion mod is now confirmed, and will be made.

Now, my plan is to make a companion NPC that does basic things, but generally just follows you around. The companion will need feeding, sleeping, etc. I don't know how far I can push this, but I don't see any limits so far.

 

If you have any questions, by any means, ask them :D

 

And yes... I am a wizard!

 

 

Things I got working:

- LOS systems

- Basic functions.

- Follow and Stay commands.

- NPC spawning.

- Base Saving/loading system is set up.

 

Todo/Currently working on/Being researched:

Current Problem: The NPC code doesn't allow for npc's to attack. It causes a fatal error.

Working on:

- Making a new attack system? or explore further options.

 

Todo:

- Inventory management.

- Toggling npc safety.

- Intigration into the "shout" button (Q by default).

- Writing a 'environmental awareness' system (making the npc know where it is, and what options there are around it)

- Make it so Zombies don't completely ignore the npc.

- Making the NPC work as a container.

- Situational responders (Basicly the speach system, responding to the world around the npc)

- Memory

- AI

 

Features currently being worked in on the go:

- Custom Event triggers; Such as OnNPCDead, OnNPCLoadedFromSave, etc

- Saving npc data. It only saves the location and name of the npc atm, adding more is easy so low priority untill more is needed for other functions. (such as memory, ai, etc)

- Menu's for things that are being added on the go.

Edited by MisterInSayne

Share this post


Link to post
Share on other sites

Pretty much it opens up a lot of custom options for servers.

 

Well, primarily my focus is for single player atm, I'll try to keep in multiplayer support as much as I can, and the final version will support it, but at the start it is possible certain functions may not fully work on multiplayer. But I agree, this could be amazing for servers aswell. I'll do loads of testing along the development to make sure it will eventually work on multiplayer aswell ^__^

Share this post


Link to post
Share on other sites

Any chance of npcs cats,dogs/any animals? lol

 

That is the thing I would love more than anything. However, I'll need to find out how to add character sprites and animations in if I were to do that... I want to say yes, because that is my personal goal to make... buuuuut.... I'm not that great with making sprites and animations. Nor do I know how the game uses character sprites... I do think I can do it, if I had a range of 2d animation sprites of every direction etc, because I can hook onto the game object's render/update event and change the 'current showing sprite' according to what direction it's facing, and what action it's doing.

 

But again, like I said... I'm pretty shit at making sprites, and it'll need a looot of sprites for each animation etc.. The coding will take up a lot of time, but is definetly possible. And, with the info I've found so far with my tests, I can confirm (if I get the sprites suplied) that I can make things such as deers and such for hunting, but also dogs and such. And do things such as make dogs immune to zombification.

Share this post


Link to post
Share on other sites

there is a textures on demand area so maybe Cyrrent can help you out you could also ask hydro for some textures also lol

 

And if you mean models than WolfeClaw and Jab are  good modelers

 

Lets first get the base code set up, and work out all possible issues. Currently the NPC's don't get saved, so they despawn if you reload the game. I'm pretty sure there will be more things like that I'll first need to fix and get working, once the base code is tested and stable I'll see if there are any artists around willing to help out ^__^ <3

I'll take this one thing at a time, seeing the size of the project. But every suggestion helps, so thank you! :D I'll check up with them when I get to that point! :D

Share this post


Link to post
Share on other sites

 

there is a textures on demand area so maybe Cyrrent can help you out you could also ask hydro for some textures also lol

 

And if you mean models than WolfeClaw and Jab are  good modelers

 

Lets first get the base code set up, and work out all possible issues. Currently the NPC's don't get saved, so they despawn if you reload the game. I'm pretty sure there will be more things like that I'll first need to fix and get working, once the base code is tested and stable I'll see if there are any artists around willing to help out ^__^ <3

I'll take this one thing at a time, seeing the size of the project. But every suggestion helps, so thank you! :D I'll check up with them when I get to that point! :D

 

 

Someone say artists lol :P So word around town is you're a coding guru, making fridges move, npc's. Good work! love it, ill be testing both mods now :) if you need help with item art /32x32 sized art and npc art let me know, for large isometric items, do what Fluffe said ad ask Cyrrent :)

Share this post


Link to post
Share on other sites

 

 

there is a textures on demand area so maybe Cyrrent can help you out you could also ask hydro for some textures also lol

 

And if you mean models than WolfeClaw and Jab are  good modelers

 

Lets first get the base code set up, and work out all possible issues. Currently the NPC's don't get saved, so they despawn if you reload the game. I'm pretty sure there will be more things like that I'll first need to fix and get working, once the base code is tested and stable I'll see if there are any artists around willing to help out ^__^ <3

I'll take this one thing at a time, seeing the size of the project. But every suggestion helps, so thank you! :D I'll check up with them when I get to that point! :D

 

 

Someone say artists lol :P So word around town is you're a coding guru, making fridges move, npc's. Good work! love it, ill be testing both mods now :) if you need help with item art /32x32 sized art and npc art let me know, for large isometric items, do what Fluffe said ad ask Cyrrent :)

 

 

Hahaha, thank you so much for the compliment! <3 I will definetly let you know! I'm amazed at the excitement all of this gets, again, thank you! I'll let you know as soon as I get everything set up and get to a 'not just testing all the things' stage :D I have sooo much plans for this <3

Share this post


Link to post
Share on other sites

Wow, im Impressed !  :eek:  

 

I remained speechless when i saw the two test, great work  :-D

I will follow this mod with an very good interest, yosh.

Otherwise, just an question, did they could help us (a little) with zombies ? 

They will be useful for searching, i hope we can equip them with bags and came back at the base fully loaded of interesting and useful items  :razz: .

 

Keep up doing nice !

 

Cheers !

Share this post


Link to post
Share on other sites

Wow, im Impressed !  :eek:  

 

I remained speechless when i saw the two test, great work  :-D

I will follow this mod with an very good interest, yosh.

Otherwise, just an question, did they could help us (a little) with zombies ? 

They will be useful for searching, i hope we can equip them with bags and came back at the base fully loaded of interesting and useful items  :razz: .

 

Keep up doing nice !

 

Cheers !

 

Thank you! <3

 

Yes, they'll be able to help in combat, and will have an inventory of their own. ^__^ And seeing I made a mod to move fridges and other things yesterday, they'll be able to carry that, and generators, as well as do pretty much anything a player can do ^__^

Share this post


Link to post
Share on other sites

Thank you! <3

 

Yes, they'll be able to help in combat, and will have an inventory of their own. ^__^ And seeing I made a mod to move fridges and other things yesterday, they'll be able to carry that, and generators, as well as do pretty much anything a player can do ^__^

 

 

*----------------------------------------------------------------------------* just love you!! <3

Share this post


Link to post
Share on other sites

 

Wow, im Impressed !  :eek:  

 

I remained speechless when i saw the two test, great work  :-D

I will follow this mod with an very good interest, yosh.

Otherwise, just an question, did they could help us (a little) with zombies ? 

They will be useful for searching, i hope we can equip them with bags and came back at the base fully loaded of interesting and useful items  :razz: .

 

Keep up doing nice !

 

Cheers !

 

Thank you! <3

 

Yes, they'll be able to help in combat, and will have an inventory of their own. ^__^ And seeing I made a mod to move fridges and other things yesterday, they'll be able to carry that, and generators, as well as do pretty much anything a player can do ^__^

 

 

Thank for your answer  :-D .

 

WOW ! Amazing :eek:  !  Im getting so excited when i read that   :razz: .

I will keep an very attentive eyes to this subject  ;-) .

Share this post


Link to post
Share on other sites

Also will they loot items themselves? Lol

 

That will be a balancing choice later on, we'll see :)

 

Will they be able to take care of themselves? If so how well lol :P

 

Also a balancing choice, and depending on what shape the mod takes, but I guess the answer is yes, and depends on how well I make them take care of themselves :P

 

 

*Sees first post* Ah-ha, someone found the CreateSurvivorGroup function, or whatever it's called!

 

Hehehe, funny...

the CreateSurvivor() function only creates a SurvivorDesc object, SurvivorGroup I creates a group based AI system and sets up needs for that collective group, the latter I haven't tested yet, but I'm going to assume it's not fully implimented yet or has kinks, so I'll write my own to replace it if thats true.

Now here is your problem with your assumption... neither function creates an ingame 'IsoGameCharacter'. All it does is the 'behind the screens' model/sprite creation (which is also used for the player, as well as the avatar you get during character creation), and setting up the AI. But, no usable object, or anything you can manipulate in the world. So guess again.

 

I hope it's not ment that way, but it feels a lot like you're belittling or even critisizing the effort I'm doing... twice now. Both times you actually had no idea on what you're talking about. Last time saying there was a mod that already did working fridges, when that mod clearly states it doesn't, and now a similar thing. If you have a problem with me, or the things I do, just let me know... :/

Share this post


Link to post
Share on other sites

*Sees first post* Ah-ha, someone found the CreateSurvivorGroup function, or whatever it's called!

Did you find Lemmy's tutorials on interfacing with their AI through Lua, though? ;) It's really for zombies, but it still applies.

Ah, there it is. Haven't looked at in a year or so:

IsoWorld: public void CreateSurvivorGroup(IsoGridSquare sq, IsoPlayer player) You'll notice it does indeed create IsoSurvivors and place them at the player's location, complete with basic AI.

You can actually find poeple playing with this on the old forum: http://www.theindiestone.com/community/viewtopic.php%3Ff=34&t=6487&start=120.html ;)

I hope it's not ment that way, but it feels a lot like you're belittling or even critisizing the effort I'm doing... twice now. Both times you actually had no idea on what you're talking about. Last time saying there was a mod that already did working fridges, when that mod clearly states it doesn't, and now a similar thing. If you have a problem with me, or the things I do, just let me know... :/

Uh . . . huh . . .

Can't say I expected such a defensive post from you, MisterInSayne. I'm not sure why our past interaction warrants it.

As far as fridges go, we've been using XBO on SpiffoSpace to replace damaged tiles, including fridges, without much trouble. We did have to modify the mod a bit to bring it up to date and add some new tiles. Perhaps we mistakenly fixed it? I'll have to check, as you insist.


But sure, on reflection, I suppose I do have a small problem, but none of it is on you.

This has been possible since NPCs were removed from the game (and probably before that).

A large portion of the NPC code found in the current game will either be work in progress, incomplete, or buggy. It should be noted this code specifically isn't related to the development of the newer NPC system. They're contained on a separate branch and aren't merged into the normal updates.

Suddenly having NPCs back in, even in mod form, could restart the old "NPCs suck!" and "We want NPCs now!" wars of our past. For example, your selling it as something that' impossible, which you've surmounted gives the impression that TIS should be much faster, after all, a modder could do it . . . even though this functionality has been quietly stewing in the JavaDocs for several years now.

I appreciate that you may have done this in an unorthodox way, and am in no way prohibiting you from working on this mod, but it does have some unfortunate side effects that you probably should be aware of.

Share this post


Link to post
Share on other sites

 

I hope it's not ment that way, but it feels a lot like you're belittling or even critisizing the effort I'm doing... twice now. Both times you actually had no idea on what you're talking about. Last time saying there was a mod that already did working fridges, when that mod clearly states it doesn't, and now a similar thing. If you have a problem with me, or the things I do, just let me know... :/

Uh . . . huh . . .

Can't say I expected such a defensive post from you, MisterInSayne. I'm not sure why our past interaction warrants it.

 

 

At the time of posting that the second sentence wasn't added to your post yet, my appologies. That combined with your previous post gave me an impression the 'seemingly' deconstructive comments we're going to happen more, and acted accordingly to prevent that from happening. I ment no harm with it, I misinteperted the context. Again, my appologies for acting in poor judgement! I rather not use it as an excuse, but I've had negative experiences with scenarios like these in the past. My intentions were not ill ment.

 

 

Ah, there it is. Haven't looked at in a year or so:

IsoWorld: public void CreateSurvivorGroup(IsoGridSquare sq, IsoPlayer player) You'll notice it does indeed create ISoSurvivors and place them at the player's location, complete with basic AI.

You can actually find poeple playing with this on the old forum: http://www.theindiestone.com/community/viewtopic.php%3Ff=34&t=6487&start=120.html ;)

 

 

Now a proper answer; Hmmm, interesting! That is one way to do it. However, it doesn't return an IsoSurvivor object. Sure you can pull it from the square's object list, but that seems very backway around to me, and you can't really control the creation of things.

 

I'm currently using the "IsoSurvivor.new()" function inside a custom lua object derived from ISBaseObject, which will later be an overlay for an actual IsoGameCharacter object instead. Because the IsoSurvivor has a lot of things already made, which I want to customize myself lateron, such as movement, orders, and the memory system. Mainly because there is no way for me to see what their functions do exactly, and I like to be able to write it out the way I want them to do things instead of rely on an AI can't change. :P

 

I will have a read through the old post though! So thank you! :D

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
19 19