Implementing Trust NPCs

User avatar
IncognitoEel
Posts: 5
Joined: Thu Jan 21, 2016 9:26 am

Implementing Trust NPCs

Post by IncognitoEel » Mon Jan 25, 2016 2:10 am

Hey, guys.

Love 'em or hate 'em, Trust NPCs are a big addition to the game. I know that adding support for them is quite a ways down on the To-Do list, and for many they may not want them on their servers at all. However, I feel that I should share the progress I've made getting them to function. Currently, these are just modified packets that I've injected, but transferring that to code should be fairly simple now that I understand the packet structure of the Trust System.

My progress thus far:
https://youtu.be/1cLZHucRzk8

Having them follow the player should be simple enough to code; though working out a way to get them to perform actions may be a bit of a challenge.
Would people be interested in having Trusts on their servers? Or would the project be open to a Trust System commit down the line?
Image



Also:
In theory, you could Spawn any NPC model with any name (Fun fact, Bahamut has a summon-spawn animation just like normal avatars do. The spawn packet used changes the spawn animation based on the ID used.)
Image

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Implementing Trust NPCs

Post by demolish » Mon Jan 25, 2016 3:01 am

as long as it works like retail and there's an option to enable/disable it we don't mind if you submit it to the project ;) (bear in mind we may want you to make adjustments to your code before merging to the project so any criticism will be for the purpose of improving the code, and not just to be nitpicky)
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

Delaide
Posts: 469
Joined: Sat Jun 14, 2014 8:58 am

Re: Implementing Trust NPCs

Post by Delaide » Mon Jan 25, 2016 11:30 pm

I am interested. For actions, have you checked out things like cure please? We could look at some of the open source bots to work on ai.

User avatar
IncognitoEel
Posts: 5
Joined: Thu Jan 21, 2016 9:26 am

Re: Implementing Trust NPCs

Post by IncognitoEel » Tue Jan 26, 2016 4:34 am

demolish wrote:as long as it works like retail and there's an option to enable/disable it we don't mind if you submit it to the project ;) (bear in mind we may want you to make adjustments to your code before merging to the project so any criticism will be for the purpose of improving the code, and not just to be nitpicky)
Yeah, of course. I'm always open to improving my code if people see something I could be doing better.
I'll get it as close to retail as I can before I open any Pull Requests. I'll be sure to add an option to disable Trusts as well when the time comes. :roll:
Delaide wrote:I am interested. For actions, have you checked out things like cure please? We could look at some of the open source bots to work on ai.
It may be difficult to convert that kind of AI to something DarkStar can understand. It shouldn't be TOO difficult to get proper actions working, though. Trusts function almost identically to other pets in the game, the only real big difference being that they're technically considered party members. Of course, each Trust has it's own logic: Ayame's Skillchain system, Ulima/Joachim having different logic for certain songs, etc; Those will be the difficult parts to code/script, but I've got a pretty good baseline in place. I just need to break down an action packet and I should have everything I need. :D




A few more clips of some progress:
Movement: (Shown moving between two waypoints, but making it follow the player is as simple as copying the logic from other "pet" types)
https://www.youtube.com/watch?v=g9cbYR2efsQ

Casting Animation: (Missing the second packet where the player uses the finishing animation. For now I'm using an avatar packet which is pretty close but not quite retail)
https://www.youtube.com/watch?v=jVL840pLJKA

Spawning/Despawning and Party Structure formation: (Pretty straight forward. It creates a party > names the additional party member(s) > makes the player leader > determines the area the player and Trust are in > then spawns the specified Trust or NPC based on the costume ID provided. The same is true for dismissing the Trust or handling their death; The only exception is an edited byte that plays the despawn animation, from there it reverts the party structure and deletes the NPC ID > then injects the dying or dismissing party chat message)
https://www.youtube.com/watch?v=6YC2gZt5ZQM

And for fun; As I said you could, in theory, create unique Trust NPCs: (Hades/Melvien with custom party message)
https://www.youtube.com/watch?v=Q7FK1s9--Mk

Altreer
Posts: 15
Joined: Wed Nov 06, 2013 7:27 am

Re: Implementing Trust NPCs

Post by Altreer » Tue Jan 26, 2016 10:04 am

Trust is one thing they implemented in retail that I have desperately wanted in DSP. The work you have done thus far is astounding. You should be proud of what you have, and will, accomplish with this if you see it through. I'm rooting for you!

User avatar
IncognitoEel
Posts: 5
Joined: Thu Jan 21, 2016 9:26 am

Re: Implementing Trust NPCs

Post by IncognitoEel » Wed Jan 27, 2016 4:27 pm

Altreer wrote:Trust is one thing they implemented in retail that I have desperately wanted in DSP. The work you have done thus far is astounding. You should be proud of what you have, and will, accomplish with this if you see it through. I'm rooting for you!
Thank you :D


There are still quite a few things to work out, but I think I am making some good progress
I've implemented a rough start into the source:
https://www.youtube.com/watch?v=7J1BaVFw97c


**Edit**
Working on having multiple pets out now:
Image

kennxonline
Posts: 56
Joined: Sun Mar 23, 2014 2:58 pm

Re: Implementing Trust NPCs

Post by kennxonline » Fri Jan 29, 2016 11:28 am

OMG this would be awesome on my server is a solo play server!

Altreer
Posts: 15
Joined: Wed Nov 06, 2013 7:27 am

Re: Implementing Trust NPCs

Post by Altreer » Sat Jan 30, 2016 10:45 am

This is making my mouth water

nevaeh
Posts: 7
Joined: Tue Sep 23, 2014 9:33 am

Re: Implementing Trust NPCs

Post by nevaeh » Sat Feb 13, 2016 3:04 pm

Oh...my...god.

You have no idea how long I've been watching the Github commits and forums waiting for any shred of evidence of Trust being developed/implemented.

I wish you luck and to the entire Dark Star team! You guys are amazing!

bluesolarflare
Posts: 127
Joined: Wed May 27, 2015 4:23 pm

Re: Implementing Trust NPCs

Post by bluesolarflare » Tue Mar 15, 2016 12:38 pm

I have been working on the same thing. After conquering Automaton AI, I took a look at a few forks and found a way to do Trusts as well. I then implemented the same logic for Automaton AI over to trusts. There are still some tweaks that need to be made to individual trusts stats, weaponskill damage, and a few other bits. Currently I am also using an @command to remove trusts from the party using the Warp animation on the desummon but I may change that later on when the server goes live.

https://www.youtube.com/watch?v=oG76Drh_eDA

Note: This is using the older ai_xx_dummy implementation which has been depreciated since December 2015. I will most likely begin working on a port over to the newer system in the coming months.

Post Reply