Author Topic: Fun behaviors for creatures  (Read 499 times)

Legacy_DM_Vecna

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +0/-0
Fun behaviors for creatures
« on: June 25, 2011, 08:08:45 pm »


               On my PW and have created a custom AI set used to give color to areas that a PC is walking through. This is for non combat actions.  For instance when a PC spawns one of my goblins and is near them they can do one of the following. (please note I took most of these ideas from ffbj - Thanks again
+ speak a line 
+ start a conversation
+ hide
+ play dead
+ lay a trap
+ give the PC some room
+ steal from the PC

What are some fun actions for 
Orcs
Wolves
imps (maybe some fun conversation/quest/ interactions
               
               

               
            

Legacy_Borden Haelven

  • Hero Member
  • *****
  • Posts: 681
  • Karma: +0/-0
Fun behaviors for creatures
« Reply #1 on: August 17, 2011, 01:22:08 am »


               The imps could dance around the PC shouting insults. Such things as :- 'Look at the size of that sword! You think perhaps he's over compensating?'

The wolves could just stalk them. just keeping in the distance but following th PC.

The orcs could be arguing loudly over some food cooking on a fire.
               
               

               


                     Modifié par Borden Haelven, 17 août 2011 - 12:24 .
                     
                  


            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Fun behaviors for creatures
« Reply #2 on: August 17, 2011, 02:08:30 am »


               the name Noober comes to mind....
               
               

               
            

Legacy_DM_Vecna

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +0/-0
Fun behaviors for creatures
« Reply #3 on: August 17, 2011, 05:01:32 am »


               Good ideas Borden, I particularly like the wolves idea.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Fun behaviors for creatures
« Reply #4 on: August 22, 2011, 04:00:14 am »


               Sometimes my wolves will spawn in lying down, but don't be fooled for I give them regenerate added to that line.  So if you beat on them they will jump up and bite you and heal up some of that damage.
So best to let sleeping wolves lie.
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Fun behaviors for creatures
« Reply #5 on: August 22, 2011, 04:01:15 am »


               Part of the script:

effect eRegenerate = EffectRegenerate(1, 5.0);
 

       if (GetIsNight() || (GetWeather(oArea) == WEATHER_RAIN))
          {
          DelayCommand (2.0, ActionForceMoveToLocation(lWP1,TRUE));
          DelayCommand (12.0,ActionPlayAnimation(ANIMATION_LOOPING_DEAD_FRONT, 4.0f, 200.0f));
          DelayCommand (14.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRegenerate, oSpawn, 15.0));
          return;
          }
The WP1 is a dog house since I use this script for my dogs too, but you could make it anything you want, like their lair or the entrance to it.  Then in certain conditions they will move there lay down and sleep.  I could post the entire thing and it would make more sense but I think you get the idea.

At the botom of the above on perception script, just part of it I have a % chance to execute chasepc, which is below:

#include "x0_i0_position"

void main()

{

object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN);
int iHd = GetHitDice (oPC);
int iHd1 = GetHitDice (OBJECT_SELF);
int iHdd = iHd - iHd1;
effect eSpeed = EffectMovementSpeedIncrease(125);
//change number to change speed.  added for possible temporary speed increase.


ClearAllActions(TRUE);
// you probably want to use the TRUE parameter here as this is likely to occur
// in combat otherwise the ClearAllActions call will have no effect.


if ((GetDistanceToObject(oPC) >= 3.0f) && (GetDistanceToObject(oPC) <= 10.0f))
// do this the chase stuff, else do something else.  Condition not met PC is not
// between 3.0 and 8.0 meters, changed to or equal too.


{

ActionMoveToLocation(GetAheadLocation(oPC), TRUE);
//not sure that you need to keep repeating this.
//maybe use a delay command of a few seconds if the chasing
//npc seems to be losing it's target

}
if (GetDistanceToObject(oPC) < 3.0f)

// added this in so no point attacking unless you are actually there in contact
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSpeed, OBJECT_SELF, 6.0);
if (GetIsEnemy (oPC) && (iHdd < 3))
//if you are too tough they just try to get  in the way.
 {
ActionAttack(oPC);
 }
 else ActionMoveToLocation(GetAheadLocation(oPC), TRUE);
}
Of course this is just the general idea there is other stuff in the ondamaged, but thought you might want to take a look.  This was and idea I worked on from the vault which I tried to improve upon.  Can't remember who wrote it.
Thus some of the comments. I looked it up it was uther1978:
http://nwvault.ign.c....Detail&id=3761

Oh and to briefly get on my soapbox and say that sometimes people have great ideas, but don't really have the technical expertise to implement them.  Mostly people here encourage them but there are times when it seems that only certain technically adept indivduals are really taken seriously.  Be that as it may, not really whining but just pointing this out, as regards the poor vote someone gave this script.  Truely it did not work that well but I thought the idea was fine.  The result can be that someone gets their feelings hurt and just quits trying.  I used to try to help some people with their writing and man people can be really sesnitive.  So we all need encouragement, not derision.  Picks up his sopabox and leaves.
               
               

               


                     Modifié par ffbj, 22 août 2011 - 03:28 .