Bob the Bully

Post » Thu Apr 07, 2011 11:42 am

Hey hey everyone. I know some of you old hats out there are crying from laughing so hard at this thread. But hey I've been playing TES since Arena came out and just love the series. I have been playing Morrowind on and off for at least 6 years and have enjoyed several of the awesome mods out there. I have finally hit the point where I'd like to try my hand at modding not just changing a few things to give me an advantage.

So that brings me to the point of this post. My first attempt at making a mod was the "Bob the Bully" tutorial by Rukinea which covers NPC Scripting/dialog and a few CS basics ( Awesome for a noob like me to understand and follow ).

On to the meat of the problem. I sorted out all the dialog, journal, and script kinks that are not really covered in this tutorial mod except one. When I lead Jim back to Bob in Seyda Neen and Jim kills Bob every guard acts as if I started the combat, even when I just stand there and let them fight it out. Any ideas as to what I'm doing wrong or may have missed?

And please be gentle this really is my first mod.
User avatar
Markie Mark
 
Posts: 3420
Joined: Tue Dec 04, 2007 7:24 am

Post » Thu Apr 07, 2011 9:53 am

I don't know a thing about the tut you're using, so forgive me if I go way off-base. However, You saj you lead Jim to Seyda Neen where he kills Bob. That would seem to indicate that Jim has the AI "follow" package, and that he is set to follow the player.

Generally speaking, as far as guards are concerned, the player is responsible for any and every action of his followers or companions. That means that if Jim kills Bob, you dunnit whether you meant to or not. If you have a follower, and you punch Bob your follower will gleefully join in unless he is scripted to some other action, and if he kills Bob while you stand and watch, you will get the bounty on your head.

As far as I know, other than scripted responses, the only way around it is to make Bob a hostile, in which case every guard in sight will try to kill him the second he shows his face. That means you are not likely to take part in the fight.
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Thu Apr 07, 2011 1:56 am

How are you getting Jim to start attacking Bob?
User avatar
K J S
 
Posts: 3326
Joined: Thu Apr 05, 2007 11:50 am

Post » Thu Apr 07, 2011 2:23 pm

I'll admit that I'm not the most experienced modder about, so this could be complete nonsense, but from what neildarkstar said it seems like your problem could be avoided by scripting Jim to stop following the PC before he initiates combat with Bob?
User avatar
Christine Pane
 
Posts: 3306
Joined: Mon Apr 23, 2007 2:14 am

Post » Wed Apr 06, 2011 10:50 pm

For a moment, I thought this topic was about me.
User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm

Post » Thu Apr 07, 2011 3:08 pm

I'll admit that I'm not the most experienced modder about, so this could be complete nonsense, but from what neildarkstar said it seems like your problem could be avoided by scripting Jim to stop following the PC before he initiates combat with Bob?


That should do it. As long as he doesn't have 'follow' status on the player when he hits Bob, the player won't get busted by the Guards.

Alternatively, make Bob attack Jim.
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm

Post » Thu Apr 07, 2011 2:52 pm

Have Bob initiate the combat with jim or player on getdistance....

That way player can take part if ya want.


FOR BOB;

if ( getdistance jim <= 500 )
startcombat jim
endif
User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Thu Apr 07, 2011 7:56 am

Thanx for responding everyone.

Neildarkstar that makes sense but just to make sure here is the script I am using for Jim, this is the one stright out of the tut. Now to make sure i understand what I did, if I move the AiWander line from point B to point A that should work, maybe?

The Greatness check the second if endif bit I tell Jim to check his distance to Bob then start combat.

Begin Fg_JimFollowScript

short FollowNow

if ( GetCurrentAIPackage != 3 )
set FollowNow to 1
AiFollow Player 0 0 0 0 0
endif

if ( GetDistance npc_bob<=200 )
set FollowNow to 0 <-point A
StartCombat npc_bob
endif

if ( GetTarget npc_bob == 1 )
if ( GetHealth<= 0 )
StopCombat
AiWander 280 6 0 40 30 20 0 0 0 <-point B

endif

endif

End

User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Thu Apr 07, 2011 12:32 pm

Maybe someone else will have a better answer for you, but here's my experience with follow and companions...

If when you created the NPC Jim you gave him the AI package follow and entered Player in the box that pops up, Jim will almost always be your follower as far as the game and combat is concerned. Setting follow to 0 and giving him an AIwander as his current package only prevents him from following you around, but if you are attacked, he will often (not always) join the fight on your side anyway. You can create creatures and place them around your house or stronghold as guardians, and they will wander until a hostile creature shows up, then they attack.

I think perhaps this is a bug in the game engine regarding AI. Quite often stopcombat won't work either, or the NPC will stopcombat for a few seconds and then attack again. Perhaps MCP could come up with a solution if you presented the problem to Hrmchnd. I'm afraid I don't really have a solution to offer.

[EDIT] After thinking about it, it occurred to me that i've been looking at this from a purely linear point of view... that is, only considering the problem from one angle.

Here's an alternative thought that might work better. Try changing the script so that jim approaches Bob, but no startcombat. Then attach a script to Bob that has something like:

if ( Getdistance, "Jim" <= "xnumbergameUnits" )      startcombat, "Jim"endIf


The Player probably won't even be able to tell who attacked who first if the distance is short, and guards won't go after the PC or Jim (hopefully) and no bounty would be added. This of course assumes that Jim doesn't hit a guard, or something stupid like that, eh?
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm


Return to III - Morrowind