Author Topic: [NPCs] System NPC behaviours  (Read 7120 times)

0 Members and 1 Guest are viewing this topic.

Phearcia

  • Member
  • ***
  • Posts: 157
    • View Profile
    • Awards
  • Xbox: Phearcia
[NPCs] Re: System NPC behaviours
« Reply #30 on: August 07, 2016, 04:25:04 PM »
What about creating a script that allows us to manipulate the npc behavior to suit our needs.

Various actions could include

Mine (speed)
Attack (speed)
Retreat
Build (component:type)
Behviour (range) range at which the behaviour activates
Script (dialog, menu)
Jump
Climb (could be script as well)

Maybe even have a script that allows the npc to activate a script if the players heaalth falls below a certain %.

AlienizdPixel

  • Tester
  • Supreme Member
  • *****
  • Posts: 2601
  • Hello
  • Awards 3 years on site+600 posts Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: A1ienizdPixe1
  • Steam: Alienizd
Re: System NPC behaviours
« Reply #31 on: August 18, 2016, 05:47:46 PM »
TrollChief:
Inventory: 1-4 Troll Hide [70%], 1 Gold Block [.1%], 1-3 Gold Bars [.5%], 1-50 Gold Pieces [1%]
Combat: Hostile, Melee
Will target Gold Blocks more than players, using them as a distraction. They will destroy the block(s), taking around 5 seconds each, and return to chasing their target if is still visible. They will drop any collected blocks on death. They will alert any nearby (~25 blocks) TrollChiefs, TrollBoys, and TrollGirls if they target a player or npc. They will not send an alert if they target a Gold Block.

TrollBoy:
Inventory: 1-3 Troll Hide [60%], 1-2 Gold Bars [.1%], 1-200 Gold Pieces [.5%]
Combat: Hostile, Melee
Will target Gold Blocks more than players, using them as a distraction. They will destroy the block(s), taking around 6 seconds each, and return to chasing their target if is still visible. They will drop any collected blocks on death. They will alert any nearby (~25 blocks) TrollChiefs, TrollBoys, and TrollGirls if they target a player or npc. They will alert only TrollChiefs if they target a Gold Block, in which they will chase them and give them any gold within their inventory (gold bars, pieces, or blocks). They will follow TrollChiefs, staying about 5-15 blocks away from them unless they target either a GoldBlock, player, or non-monster npc.

TrollGirl:
Inventory: 1-2 Troll Hide [50%], 1 Gold Block [.01%], 1-3 Gold Bars [1%], 1-250 Gold Pieces [.5%]
Combat: Hostile, Melee
Will target Gold Blocks more than players, using them as a distraction. They will destroy the block(s), taking around 7.5 seconds each, and return to chasing their target if is still visible. They will drop any collected blocks on death. They will alert any nearby (~25 blocks) TrollChiefs, TrollBoys, and TrollGirls if they target a player or npc. They will not send an alert if they target a Gold Block. They will give TrollChiefs any gold within their inventory if one is near (~7 blocks). They will follow TrollChiefs, staying about 5-20 blocks away from them unless they target either a GoldBlock, player, or non-monster npc.
-Alionz

AlienizdPixel

  • Tester
  • Supreme Member
  • *****
  • Posts: 2601
  • Hello
  • Awards 3 years on site+600 posts Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: A1ienizdPixe1
  • Steam: Alienizd
Re: System NPC behaviours
« Reply #32 on: August 30, 2016, 06:20:49 PM »
Werewolf
Has two "modes", standard hind-legged mode, which will reduce the speed of the to standard (around the average speed for most monsters) and can quickly turn, and is when they either have no targets or is close attacking, and sprint mode, which will increase their speed to retail, but will be slower for them to turn. It is possible for them to attack if close, but is not common. Prefers to be in range of at least one other Werewolf. If they are not, they will wander until they find one. If they fight and are close to death without another Werewolf near, they will begin to flee. They will "howl" when they have a target that is far from them (~25 blocks), which they will stop to do; the howl can be heard from a far distance (~250 blocks), which will alert any Werewolves that hear it to come towards it if they do not have a target and do not have one on their way towards. Does not prefer water. They will become a Boy during the day.
-Alionz

Platinum Dryym

  • Supreme Member
  • *****
  • Posts: 4233
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts Site art contributions/TPs in-game/Contest winners 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: dryym
Re: System NPC behaviours
« Reply #33 on: November 18, 2016, 05:40:27 PM »
I know the guard is taken in the OP, But this behaviour only really works for the guard.

Guard:
Patrols an area around the spawn block by default.

When a guard encounters another guard in their patrol, He will talk to the other one with a randomly selected phrase (Things like "Should we gather for Whisky and Cigars tonight?" Or "Do you think you'll get your own squad afterwhat happened last night? " Obviously, Use something else, I just took those from Dishonored.)

To which the other guard would reply with a different random phrase.


When a player enters a guard's view frustum, The guard should check both the light level where the player is standing, And how far away the player is.

The guard would have an "Awareness" var attached to him which would increase based on these factors when a player is in their view frustum.

When this awareness variable reaches 100, The guard will become hostile towards the player and call all guards within a 25 block radius to them.


There's the basic behaviour out of the way. Now for the harder bits.

When attacked from behind, Guards should be instantly incapacitated. If attacked with a weapon, They should instantly die. When attacked by the hand, They should be knocked out.

When a guard is knocked out, They should cease all behaviour for 10 minutes, Or until woken up by another guard.

When a guard is woken up, Their awareness var should be set to 50.

When a guard encounters an unconscious guard, The guard should wake the guard and set their awareness var to 50.

When a guard's awareness var is => 50, They should enter a heightened sense of alertness where they more actively search the area for a hostile.

When a guard hears a suspicious sound, They should set their awareness to 50 and move to the source of the sound.


You should also be able to interact with an unconscious guard to move them and avoid detection.



This is totally not me asking you to create the guards from Thief/Dishonored. Trust me.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym