Quick Questions -- Quick Answers, The 26th

Post » Wed Sep 22, 2010 10:51 pm

Not sure about that. I think it's more likely that you have to modify the creature's actor values (strength, attack bonus, etc.). I've always used setattackdamage on weapons, but it might work on creatures, who knows.

Turns out it does work on creatures. Scruggsy confirmed this in the OBSE thread, and I've now tested it successfully.

As with weapons, it sets the creature's attack damage on the base object.

I've now successfully used this in a damage overhaul mod, so creatures aren't overshadowed by increased weapon damage (as tends to happen with Deadly Reflexes or other weapon damage boosters).

EDIT: And yes, Doc, this is built on top of your Normalized Weapon Damage mod. It works like a charm (although I use a different formula for weapon damage based on weight, speed, reach,price, etc). I've integrated it with the good parts of my Better Blocking mod... I'm very pleased with the results, and will release as soon as OBSE 19 comes out of beta.
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Wed Sep 22, 2010 10:20 pm

@QQuix: Wow, thanks. That will save me a heap of time. Not that I mean to sound ungrateful, but I did notice that this doesn't include the IC. If you have that data somewhere else, that would be helpful too.
User avatar
Siidney
 
Posts: 3378
Joined: Fri Mar 23, 2007 11:54 pm

Post » Wed Sep 22, 2010 8:45 pm

How do I get an NPC to defende other actors in the same faction?
I'm trying to get Galdrehel in Cheydinhal to react more realistically if I attack her dogs. The two dogs are already in the same faction and I added Galdrehel to the same faction. But she still doesn't react to me killing her dogs. Her Responsibility is 50. Does it need to be higher for her to react?

And while I'm at it, what effect does it have if a Creature is owned by an NPC?
User avatar
Manuel rivera
 
Posts: 3395
Joined: Mon Sep 10, 2007 4:12 pm

Post » Thu Sep 23, 2010 1:53 am

How do I get an NPC to defende other actors in the same faction?
I'm trying to get Galdrehel in Cheydinhal to react more realistically if I attack her dogs. The two dogs are already in the same faction and I added Galdrehel to the same faction. But she still doesn't react to me killing her dogs. Her Responsibility is 50. Does it need to be higher for her to react?

And while I'm at it, what effect does it have if a Creature is owned by an NPC?

I think the problem is that only an NPC can "raise an alarm". There's no mechanism in the engine for notifying a faction member if a creature is attacked, so there's nothing for her to react to. You'd have to steal the dog to get noticed. The only instance of ownership having an effect is for a horse (or ridable substitute), and the dogs don't qualify there either. However, in the case of horse, I think it is ownership, not faction, that matters (except where the owner IS a faction).
User avatar
Anna Beattie
 
Posts: 3512
Joined: Sat Nov 11, 2006 4:59 am

Post » Wed Sep 22, 2010 8:34 pm

Yeah, I'd try setting the ownership flag on the dogs. I have had a lot of NPC's getting killed for attacking horses and it pretty much wound up being due to the ownership flag. You probably saw my comments in the NPC Friendly Fire thread.
User avatar
Jessica Colville
 
Posts: 3349
Joined: Wed Oct 18, 2006 6:53 pm

Post » Thu Sep 23, 2010 5:19 am

Yeah, I'd try setting the ownership flag on the dogs.


Problem is that the dogs already are owned by Galedrehel, but it doesn't seem to have any effect.
If it did I was planning on making a mini mod to make the the dogs and their owner behave more realisticially and also give G some dialogue options which my male characters always want to ask her. :D
User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm

Post » Thu Sep 23, 2010 10:54 am

I was afraid you were going to say that (about dog ownership, not G dialog :)). I wonder what the difference is between horses and dogs, then.
User avatar
Madison Poo
 
Posts: 3414
Joined: Wed Oct 24, 2007 9:09 pm

Post » Thu Sep 23, 2010 4:28 am

Would be a first person paralyze animation possible? I mean like the jump and crouch animations (I know only very little about animations :unsure: ). I get really annoyed by the constant "out of body" experiences. I mean, my char isn't dead yet! <_<
User avatar
Cccurly
 
Posts: 3381
Joined: Mon Apr 09, 2007 8:18 pm

Post » Thu Sep 23, 2010 2:11 am

I was afraid you were going to say that (about dog ownership, not G dialog :)). I wonder what the difference is between horses and dogs, then.

I think it's that you can steal a horse by riding it. There's no equivalent "steal" possible for the dog.

Since you can get kicked out of guilds for hitting your own horse during combat, it appears that a horse can report assaults. Maybe the answer is to make the dog ridable, but disallow that by attaching a script that says you can't in onactivate. That should get both attempted activation and damage reported.
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Wed Sep 22, 2010 7:11 pm

it appears that a horse can report assaults. Maybe the answer is to make the dog ridable,


That's because they have a Responsibility of 50. There is a mod that sets it to 0, to prevent horses from reporting crime.
User avatar
Lucie H
 
Posts: 3276
Joined: Tue Mar 13, 2007 11:46 pm

Post » Wed Sep 22, 2010 11:36 pm

I think it's that you can steal a horse by riding it. There's no equivalent "steal" possible for the dog.

Since you can get kicked out of guilds for hitting your own horse during combat, it appears that a horse can report assaults. Maybe the answer is to make the dog ridable, but disallow that by attaching a script that says you can't in onactivate. That should get both attempted activation and damage reported.


Sounds like an overly roundabout way to solve this. How about a short script attached to the dogs with an "OnHit player" block that gives their owner an "Attack player" AI package? Alternately, a script on the owner that checks each frame if either dog is in combat with someone, and if so, triggers the AI package.
User avatar
Carlos Rojas
 
Posts: 3391
Joined: Thu Aug 16, 2007 11:19 am

Post » Thu Sep 23, 2010 6:35 am

At a given in-game time, I want my companion NPC to make a random comment. This is my current code, which isn't working.

Spoiler
begin gamemode

; Name the variable.

short ValRandomComment


; FIRST, the time must be 12.00, AND the event must not have happened already.
; THEN, the NPC says the comment.
; THEN, the variable increments, to ensure that it won't keep firing after the NPC has spoken.

if GameHour == 12 && ValRandomComment == 0
cmValREF.SayTo player ValMudcrabs00 1
set ValRandomComment to 1

; ...but since I want this to happen again, at 13.00 (IF the NPC has spoken) the variable resets to zero.

else if GameHour == 13 && ValRandomComment == 1
set ValRandomComment to 0


endif
endif

end


I have a feeling I'm missing something incredibly obvious-- either in my syntax, my understanding of if/else if, or the way GameHour needs to be used. Or, okay, possibly all three.

Checking via console verifies that I'm not even getting the variable to correctly increment, presumably since the SayTo isn't triggering. I've managed to make it work with trigger zones, rather than a given time of day, which makes me feel a shade less incompetent.
User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Wed Sep 22, 2010 10:56 pm

Would be a first person paralyze animation possible? I mean like the jump and crouch animations (I know only very little about animations :unsure: ). I get really annoyed by the constant "out of body" experiences. I mean, my char isn't dead yet! <_<


Paralyze is not an animation its an effect -> Hardcoded Effect.
User avatar
Sylvia Luciani
 
Posts: 3380
Joined: Sun Feb 11, 2007 2:31 am

Post » Thu Sep 23, 2010 1:09 am

Paralyze is not an animation its an effect -> Hardcoded Effect.


Ow, that really hurts. :facepalm: I miss the good old "kiss the floor" when low on Fatigue from Morrowind. *sigh* Will have to grit my teeth and bear with it.

Thanks for the enlightening answer. :)
User avatar
brian adkins
 
Posts: 3452
Joined: Mon Oct 01, 2007 8:51 am

Post » Wed Sep 22, 2010 8:02 pm

At a given in-game time, I want my companion NPC to make a random comment. This is my current code, which isn't working.

Spoiler
begin gamemode

; Name the variable.

short ValRandomComment


; FIRST, the time must be 12.00, AND the event must not have happened already.
; THEN, the NPC says the comment.
; THEN, the variable increments, to ensure that it won't keep firing after the NPC has spoken.

if GameHour == 12 && ValRandomComment == 0
cmValREF.SayTo player ValMudcrabs00 1
set ValRandomComment to 1

; ...but since I want this to happen again, at 13.00 (IF the NPC has spoken) the variable resets to zero.

else if GameHour == 13 && ValRandomComment == 1
set ValRandomComment to 0


endif
endif

end


I have a feeling I'm missing something incredibly obvious-- either in my syntax, my understanding of if/else if, or the way GameHour needs to be used. Or, okay, possibly all three.

Checking via console verifies that I'm not even getting the variable to correctly increment, presumably since the SayTo isn't triggering. I've managed to make it work with trigger zones, rather than a given time of day, which makes me feel a shade less incompetent.


I'm surprised your script even saves properly. I see a few potential problems:


1. Most likely culprit: GameHour actually returns a float value, even though it appears to be a short. The CS wiki mentions this on the page on time variables. So GameHour will never match 12 or 13; it will always be 11.997, 12.00123, whatever. Even if it were a short, you should make the conditions be e.g. "GameHour > 12" instead of "GameHour == 12", since it's possible to skip over several hours while sleeping, etc without triggering this gamemode block.

2. That "else if" should be "elseif".

3. Is "cmValRef" defined anywhere? I assume this is what you've named the instance of your companion in the CS, but make sure that's true.

4. Your comment in the script don't match what it's actually doing. Even if the code worked properly, it would fire at noon, then reset the flag at 1pm, then fire the comment again on noon the next day, etc. But the comments imply that you want a new comment every hour.

5. Is this script attached to the companion? To a quest? If it's a quest, is the quest running?

How about this instead:

begin gamemodefloat lastCommentTimeif (GameHour > (lastCommentTime + 1))	cmValREF.SayTo player ValMudcrabs00 1	set lastCommentTime to GameHourendif	end


Viola, one comment per hour, as long as "cmValREF" points to somebody real.
User avatar
Lil Miss
 
Posts: 3373
Joined: Thu Nov 23, 2006 12:57 pm

Post » Thu Sep 23, 2010 8:06 am

How do I made an NPC flee after dialog with the player?
User avatar
Fluffer
 
Posts: 3489
Joined: Thu Jul 05, 2007 6:29 am

Post » Thu Sep 23, 2010 3:28 am

I'm surprised your script even saves properly. I see a few potential problems:

GameHour returns float value - That makes a lot more sense; checking it via the console should have clued me in, but I didn't make the connection. I'll also go over elseif / else if again; I keep forgetting that one adds another option, while the other actually starts a new block.

Script comment - That actually would be what I was aiming for, although I worded it badly-- a daily comment at X time, resetting an hour later, so that at that same time the next day, it will fire again.

cmValREF is defined already, yes-- ditto for attaching the script to a running quest.

Thanks not only for the script, but for the clarification on the multiple things I got wrong. It's much appreciated.
User avatar
jessica breen
 
Posts: 3524
Joined: Thu Aug 03, 2006 1:04 am

Post » Thu Sep 23, 2010 6:38 am

How do I made an NPC flee after dialog with the player?


Take a look at Roleplaying Dialogues. It makes Highwaymen run away after certain dialogue options.
User avatar
ANaIs GRelot
 
Posts: 3401
Joined: Tue Dec 12, 2006 6:19 pm

Post » Thu Sep 23, 2010 12:24 am

Thanks not only for the script, but for the clarification on the multiple things I got wrong. It's much appreciated.

You bet. It's annoying that the CS catches about 90% of formatting errors, but then lets a few ones through. Also annoying that GameHour is advertised as a short, but is actually a float. Hope you get it working.
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm

Post » Thu Sep 23, 2010 9:14 am

Final edit! - I finally figured it out-- and if I'd thought to start out just sit down and dissect others' work while using the CS, I'd've avoided all this. An auto-recharge, but reviewing MenuMode + GameDaysPassed + floats = successful code. I feel like an idiot, but I'm going to leave all this up, just to remind myself of the importance of doing my homework beforehand (but put it behind spoiler tags to keep from cluttering things up any worse). Thanks to all for their patience.

You bet. It's annoying that the CS catches about 90% of formatting errors, but then lets a few ones through.

It's just trying to help us become better scripters. Really! Frustration is a learning tool!

Spoiler

I'm noticing, however, that the script might be getting derailed by wait and sleep-- it doesn't seem to be "counting" the hours properly. There's also a decent chance that it's colliding with the NPC voice mod, or even my preference for setting the timescale forward. I've included, for now, a dialogue option that resets the variable, which seems to help a bit.

That's what beta-testing is for, though.

EDIT: AHA! At midnight, the script decides to go to bed-- and I have the numbers to prove it.

Spoiler

Script currently in use:

begin gamemode

float ValRComTime

if (GameHour > (ValRComTime + 5))
cmValREF.SayTo player ValRandCmt 1
set ValRComTime to GameHour
endif

end


Comment 1 fired at gamehour 16.8, ValRComTime showed 16.8, in-game time 4.49pm.

I waited 4 hours, then goofed off for another hour (bringing us to 5 total), and
Comment 2 fired at gamehour 21.9, ValRComTime showed 21.9, in-game time 9.56pm.

I waited 5 hours, and
Comment 2 fired at gamehour 21.9, ValRComTime showed 21.9, in-game time 9.54pm.

I waited 6 hours, and
Comment 2 fired at gamehour 22.9, ValRComTime showed 22.9, in-game time 10.54pm.

I waited 7 hours, and
Comment 2 fired at gamehour 23.9, ValRComTime showed 23.9, in-game time 11.55pm.

I waited 8 hours, and
Comment 2 never fired! gamehour 0, ValRComTime showed 23.9, in-game time 11.54pm.

Ditto for 9 and 10-- ValRComTime stays put at 23.9, while the in-game time & gamehour move on.

I did a test both at the normal timescale, and at timescale set to 50, with similar results. I also went from 6am, waited 'til 11pm-- and the comment fired. Midnight hit-- and nothing.) Once zero hour hits, for whatever reason, that's that.


My "fix" has a dialogue option to reset the variable to the current gamehour... and five hours later, we're back to normal.

So. Is the most practical fix to plug in an extra check to see if GameHour is more than 0, but less than 1, and set the variable accordingly?

...or am I still on the wrong track? I've removed the PC / NPC voice mods that seemed like they might be the culprits, just for the record.

(Edited to remove my obviously wrong code!)

User avatar
elliot mudd
 
Posts: 3426
Joined: Wed May 09, 2007 8:56 am

Post » Wed Sep 22, 2010 11:13 pm

Hi,

I've been making my own mod but I've come up with a problem. I need to try and make a group of NPC's attack another group of NPC's on sight. They are a group of Imperial gaurds and a group of Anvil gaurds. I'm not sure how to edit the NPC to make them attack others. If this is possible (or if it's not) can you please reply to this post telling me how to do this.

-----Thanks!
User avatar
koumba
 
Posts: 3394
Joined: Thu Mar 22, 2007 8:39 pm

Post » Thu Sep 23, 2010 11:34 am

Want an NPC to approach and engage the player in converation, when the player enters the cell the NPC is in.

Got AI package type 'Ambush'

Location, BahCell at x marker

Target, Object 'Player'

This doesn't work. How should it be set up? Thanks!
User avatar
jadie kell
 
Posts: 3497
Joined: Sat Jul 29, 2006 3:54 pm

Post » Thu Sep 23, 2010 12:26 pm

Want an NPC to approach and engage the player in converation, when the player enters the cell the NPC is in.

Got AI package type 'Ambush'

Location, BahCell at x marker

Target, Object 'Player'

This doesn't work. How should it be set up? Thanks!

What's not working, and how is the package conditioned/added? I don't see what's doing the "when the player enters the cell" bit.
User avatar
Guy Pearce
 
Posts: 3499
Joined: Sun May 20, 2007 3:08 pm

Post » Thu Sep 23, 2010 9:37 am

Is there a way to get rid the dopey smiles on your followers' faces when you have a high disposition with them?

I've made a few CM Companions npcs, but when I Speechcraft or Bribe them to a high enough disposition that they join me, every time I talk to them, they get this queer, stoned smile on their faces. And the weird thing is, some of them get bigger smiles than others, even though their dispositions are all around the same values.
I've tried tweaking the faces in the CS (even dropped the happy/sad slider all the way down to sad so they frown all the time), but it doesn't seem to help at all. Is there some kind of AI setting I can use so they keep a little more serious look on their faces when I talk to them?

I know it's kind of trivial, but it bugs me when I round up my badass posse for some raiding parties, and they all show up looking like they just passed the dutchie to the left hand side.
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Thu Sep 23, 2010 2:35 am

That's just Oblivion facial expressions. Happens to all NPCs. Unless you fancy going around editing skeletons there's nothing that can be done about it.
User avatar
Patrick Gordon
 
Posts: 3366
Joined: Thu May 31, 2007 5:38 am

PreviousNext

Return to IV - Oblivion