Jump to content
Ainz Ooal Gown

[AOG] NPC Summoning

Recommended Posts

Description:

This is very simple(ish) system, but affective way of doing summons for your game using the event system. It also works with PvP but the player must be attacked (Or have met a condition you set), it also works with a criminal system I have so if a player is a criminal the summon will attack. Can set different conditions based on your game.

 

Video:

https://www.ascensiongamedev.com/resources/filehost/ac1bd0b14a7dd8123876ca9015247bc8.mp4

 

Process:

Use a spell or Item event to "Summon" your NPC Minions :)

 

Issue:

Player will not get experience when a summon kills a NPC.

PvP does not seem to be working anymore... I am investigating to find a solution.

 

Addon:

None

 

Note: Below build is for my space game, change naming of variables and such to suit your game style.

 

Build: 

1. First we need a two player variables as this is key to the system working correctly and have the NPC not attack the player, PVP, as well as so other players summons do not conflict:

Spoiler

Main Variable (Integer)

1d443e210608b3d01476514b58d9629f.png

 

Optional - Criminal Variable (Boolean)

c17e90c9a004c2f1e62652ddc9042029.png

 

2. Let create the NPC we want to summon. This system utilises NPC vs NPC, so as you add more NPCs to you game you will have to amend this NPC and other NPCs you add so they can attack eachover:

Spoiler

Behavior:

Make sure the behavior of the NPC is Aggressive, Swarm is optional.

9ec7d7878f4c6cc0622c8c5e2d4ad479.png

 

NPC Vs NPC:

b74b62ceb8eddf5fbd609af576a93073.png

 

Now the bit that makes all this work, the conditions...

 

Player Friend/Protector:

So what is happening here? We are setting the condition so "Drone Deploy Player Variable" must be EQUAL to "Drone Deploy Player Variable"... This will make more sense later on :)

66298787dc1d2b82cc56795053717108.png

 

Should Not Attack Player on Sight:

You can customise this bit based on your game conditions, for my game I want a summon to attack "Criminal" Players on sight, later on I will add so if the player is a "Criminal himself" then it wont. Will also work great for factions and such.

 

This part is so the summoned NPC/s wont attack other players on sight, so you could add level ranges or something different if you dont want that to happen.

acce7d26e444208e8ed029b813ff3553.png

 

3. Now lets make the common event which will spawn/summon our minions:

Spoiler

Very simple but affecting solution...

 

First we set the "Player Variable - Deploy Drone" to a random number between 1 to 1000000000. This is so the player who summoned will be assigned a random number, and that NPC wont attack the person who generated that number as it will match, we set this in the last stage in "Player Friend/Protector".

 

Then we just summon/spawn then NPC around the player (In this example we summon 3 Civ Drones):

e1ca1d4d2406dfb9338bd3b5fb2994d4.png

 

To add a timer that will despawn the NPCs summoned after a set amount of time add this:

52512a5459ef8dc524f6f8e6ecea48aa.png

 

 

4. Lastly we build the spell or item that you want to use to summon your minions:

Spoiler

Add a cooldown of 60 seconds (60000ms) if you dont want the player to spam summons, this will coincide with the event timer.

 

059b6598bbc3faf4b139f48ebb076db1.png

 

Thats it...simple really using the powerful event system of intersect :)

 

Enjoy

Share this post


Link to post
Share on other sites

Man, what a simple and impressive system.  I liked very much.  The "1 in 1000000000" part took me by surprise.  I would like to know the following: What will come next?

 

In the sense that we will not be able to use the "despawn npc" command as it would kill all monsters on the map in question.  And also they will not follow the player, the intersect does not allow you to know it well.  Then they will be summoned and will help against a simple npc, player or boss.  But What will come next?

Share this post


Link to post
Share on other sites
8 hours ago, Weylon Santana said:

Man, what a simple and impressive system.  I liked very much.  The "1 in 1000000000" part took me by surprise.  I would like to know the following: What will come next?

 

In the sense that we will not be able to use the "despawn npc" command as it would kill all monsters on the map in question.  And also they will not follow the player, the intersect does not allow you to know it well.  Then they will be summoned and will help against a simple npc, player or boss.  But What will come next?

 

Thanks :) yeah the variable is key to the system working as it makes sure that each NPC that is summoned won attack its owner.

 

Despawning NPCs from events now only despawns the NPCs that  were spawned by event. So just add a wait command and despawn like this:

 

Spoiler

52512a5459ef8dc524f6f8e6ecea48aa.png

 

Follow the player I dont think we can have, not until source and I add a few more functions to the event system.

 

Also I had a message of someone saying that PvP with the system doesnt work, but Im sure it did.

Share this post


Link to post
Share on other sites

One drawback to this that I can see is that the NPC kills don't give you any experience points. But other than that this is a really good system

Share this post


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

One drawback to this that I can see is that the NPC kills don't give you any experience points. But other than that this is a really good system

 

Ah yeah forgot to mention that, I think its a 50/50 if this is a good thing or not. Means players can just use summons all the time to kill stuff.

 

Ive added that to Issues. Thanks

Share this post


Link to post
Share on other sites
54 minutes ago, Ainz Ooal Gown said:

 

Thanks :) yeah the variable is key to the system working as it makes sure that each NPC that is summoned won attack its owner.

 

Despawning NPCs from events now only despawns the NPCs that  were spawned by event. So just add a wait command and despawn like this:

 

  Hide contents

52512a5459ef8dc524f6f8e6ecea48aa.png

 

Follow the player I dont think we can have, not until source and I add a few more functions to the event system.

 

Also I had a message of someone saying that PvP with the system doesnt work, but Im sure it did.

I did not know that.  As far as I can remember when I tried to summon monsters and then use despawn they all disappeared which would be bad against a boss.  This is already a step forward.

 

Share this post


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

I did not know that.  As far as I can remember when I tried to summon monsters and then use despawn they all disappeared which would be bad against a boss.  This is already a step forward.

 

 

Yeah think it was a fix? Becuase It used to delete every NPC on the map, but when I tried it the other week it didnt so I got excited haha as opens possiblities...

Share this post


Link to post
Share on other sites
4 minutes ago, Ainz Ooal Gown said:

 

Yeah think it was a fix? Becuase It used to delete every NPC on the map, but when I tried it the other week it didnt so I got excited haha as opens possiblities...

I agree with you. Haha

Share this post


Link to post
Share on other sites
2 hours ago, Ainz Ooal Gown said:

Also I had a message of someone saying that PvP with the system doesnt work, but Im sure it did.

Using Player Variable makes other players count as "Friendly" too, I tried it. Atm to make it possible for PvP, in the Friendly conditions, I use "Class is" and then put Necromancer, it won't attack other Necromancer class tho xD 

Share this post


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

Using Player Variable makes other players count as "Friendly" too, I tried it. Atm to make it possible for PvP, in the Friendly conditions, I use "Class is" and then put Necromancer, it won't attack other Necromancer class tho xD 

 

Good idea but it will make it so necromancers cant attack eachover with summons. My game doesnt really use classes as I dont like restrictions. I dont think player variables should work that way so Ive asked the question.

Share this post


Link to post
Share on other sites
Just now, Ainz Ooal Gown said:

 

Good idea but it will make it so necromancers cant attack eachover with summons. My game doesnt really use classes as I dont like restrictions. I dont think player variables should work that way so Ive asked the question.

I just saw it, still waiting for the answer too! :D This is truly an amazing system, I always wanted to have a necromancer class

Share this post


Link to post
Share on other sites
24 minutes ago, Miharukun said:

I just saw it, still waiting for the answer too! :D This is truly an amazing system, I always wanted to have a necromancer class

 

Glad you like it buddy :)

Share this post


Link to post
Share on other sites

Nice! This is the same system I use for mine.
I can confirm that in Intersect 6.0 the 'despawn NPC' in the same event command will only despawn the NPCs that was summoned.

Another work around for despawning is to give the NPC a spell that will 'tick' away HP slowly using the DOT box.

af7f02649585df76c4bca74e44c4cc4f.jpg

Share this post


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

Nice! This is the same system I use for mine.
I can confirm that in Intersect 6.0 the 'despawn NPC' in the same event command will only despawn the NPCs that was summoned.

Another work around for despawning is to give the NPC a spell that will 'tick' away HP slowly using the DOT box.

 

 

I like that idea of giving a NPC a spell that damages it overtime, nice one cheers!

Share this post


Link to post
Share on other sites

la invocación no me sigue, osea por ahora he conseguido que no ataque a otros jugadores y que si ataque a los npc, pero no se como hacer que se mantenga a cierta distancia de mi

Share this post


Link to post
Share on other sites
2 minutes ago, emparin said:

la invocación no me sigue, osea por ahora he conseguido que no ataque a otros jugadores y que si ataque a los npc, pero no se como hacer que se mantenga a cierta distancia de mi

 

English: the summoning doesn't follow me, I mean for now I have managed not to attack other players and to attack the npc, but I don't know how to make it stay at a certain distance from me

 

Please use english in english part of forum.

 

This tutorial event does not have the ability to follow the player character. Its just a once off summon to fight anything that attacks the player within the sight range of the summoned NPC.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...