Sleep packages questions and a couple of answers

Post » Sun Aug 22, 2010 12:49 am

I wanted to have a bunch of soldiers sleep in a bunch of beds - I naively set "Location > Near editor location > Radius 512".

The results were : complete chaos when bedtime came : the soldiers were walking eternally on the same spot, they were not unequipping their armor etc. When they did go to bed, if i waited nearby they woke up and started looking for a bed again. I spent countless hours changing the path grid, using blue nodes (which if I am correct are no use in interiors anyway), disconnected path grids from each soldier to a different bed and whatnot till finally i had to assign to every soldier a different bed. Needless to say this made every soldier unique, making updating them a chore. But all strange behavior disappeared - meaning when i got in the dungeon all soldiers were sleeping with no armor on etc (one must not check the unequip armor flag btw, otherwise strange things happen). BUT when i was present in their changing shifts (half of the soldiers awake, the rest go to bed) the ones that went to bed went to their respective beds with armor (if they had no shirt in their inventory), boots (all of them), while the ones that were put to bed before I (the player) went in the dungeon sleep happily shirtless (if they don't have a shirt in their inventory) and of course barefoot. Setting the armor unequipped flag does not make any difference, it is my presence that makes them shy, flag or not flag.
Any ideas ?

Also (and most importantly) any ideas to make them go to bed without making each one of them an individual ? I have this problem of walking in place (as if the grid were defective which is not the case), not taking their armor off etc - been experimenting with 6 new soldiers. If i wait for some hours they go to bed (sometimes in the beds that they cannot reach).
This has been going on for a month.
help
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Sun Aug 22, 2010 4:03 am

Location > cell > "current cell" doesn't help either
Enable low level processing does not help

In a nutshell : the sleep package does not run when I (the player) am present. The NPCs walk in place and don't seem to find the beds. If I assign a bed to each one they go to bed but they don't unequip their boots (and their armor if they have no shirt in inventory). If i wait for some hours (like 5h) OR if i enter the place after sleep time the package runs normally.

???

I have read other topics on sleep bugs but I got nowhere. Ply at least verify the bug (or tell me if I overlooked something).
User avatar
Lilit Ager
 
Posts: 3444
Joined: Thu Nov 23, 2006 9:06 pm

Post » Sun Aug 22, 2010 10:33 am

Played a little with this: The aimless walk stopped when I assigned ownership of the cell to the NPC faction (beds ownership = None). He went to bed fine, although he chose a far bed instead of a nearby one.

But he does wear armor in bed. Weird. I set the unequip armor and weapon flags and the NPC changes to civilian clothes while walking to the bed, but puts the armor on when sleeping.
User avatar
Michelle Chau
 
Posts: 3308
Joined: Sat Aug 26, 2006 4:24 am

Post » Sat Aug 21, 2010 11:05 pm

Played a little with this: The aimless walk stopped when I assigned ownership of the cell to the NPC faction (beds ownership = None). He went to bed fine, although he chose a far bed instead of a nearby one.

Hmmmm - I'll trY this one and post back - many thanks anyway
But he does wear armor in bed. Weird. I set the unequip armor and weapon flags and the NPC changes to civilian clothes while walking to the bed, but puts the armor on when sleeping.

Yes I know - i discovered that early on - the unequip armor is built in the sleep packages - but not very well - if the package runs in one#s absence works fine though...
http://www.gamesas.com/bgsforums/index.php?showtopic=1044372&hl=sleep for unequip weirdness

Thanks again for your time QQuix

PS - what are the consequences of setting ownership of a cell to a faction ? trespassing issues ?
User avatar
Gemma Flanagan
 
Posts: 3432
Joined: Sun Aug 13, 2006 6:34 pm

Post » Sun Aug 22, 2010 6:34 am

Nope - doesn't seem to work
I used location > cell > *current cell*, and location > near editor location (radius 0, as in default packages, for instance aaaSleep5x6) and no location at all (as in BanditSleep8x4)

BTW there are vanilla sleep packages that have the armor unequip flags checked (at random ArcaneUSleepBasemant00x6) : ???
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Sun Aug 22, 2010 11:40 am

I am afraid I dont know enough to be of any help in the matter of ownership. All I know is that any item or container that does not have an explicit owner, is owned by the cell owner.

The sleep package that works for me has Location = Near current location, Radius 0, No flags.
It also works if I uncheck the Location completely (top left of the location tab).

I mean the NPC selects a random bed and goes to sleep.

As for the armor/clothes, I suppose it is an engine thing.
What I did when I had this problem, was to add a token to the NPC that checked "if refActor.IsAnimGroupPlaying "SpecialIdle". It is true during the get-to-bed animation. When the animation ends and the NPC is sleeping, the anim group changes to DynamicIdle.
I don't use this token anymore. Not sure if I still have the full code. I may try to find it, if you want it.
User avatar
yermom
 
Posts: 3323
Joined: Mon Oct 15, 2007 12:56 pm

Post » Sun Aug 22, 2010 1:23 am

Thanks a lot ! It doesn't work for me with the location unchecked (the NPCs walk in the same spot) - the faction I made, say Myfaction, i gave to both the NPCs and the cell.

No flags here too

The unequip armor is a mystery - it is being set in some vanilla packages (???)

If you don't mind unearthing the code for this token it's ok - post it here - others may need it too

Bottom line : when player is around people don't go to bed (if they have no bed explicitly assigned to them). If they do go to bed they don't unequip boots and armor. I'll have to sneak in the guards quarters and see what happens there. I'll post back.

Still if anyone has a workaround...Using "package must complete" flag would help ?

Btw I deleted all other packages from my soldiers and nothing changed - so it's not a package conflict issue.
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Post » Sun Aug 22, 2010 4:21 am

Have you removed the bed ownership?
Other than that, I can't imagine why it works for me and not for you.

Found the token code, it changes to clothes the moment it is added to the NPC because the NPC is playing anim group SpecialIdle from the moment the AI package starts and he starts walking to the bed.

Even equipping the clothes every frame, the armor still flashes just before the NPC enters the bed. If that is a problem, maybe you could remove the armor from inventory at the beginning and put it back at the end.

scn aaqqxxTestGotoBedTokenSCRIPT								array_var arr				array_var asEntry				ref basItem 				ref refActor								begin gamemode					if refActor == 0					let refActor := getcontainer				if refActor == 0					RETURN			endif			endif								if refActor.IsAnimGroupPlaying  "SpecialIdle" 					;=== Unequip armor ===				let arr :=  refActor.GetEquippedItems				foreach asEntry <- arr					let basItem := asEntry [Value]				if GetObjectType basItem == 20 					refActor.unequipitem basItem 			endif			loop								;=== Equip clothes ===				let arr :=  refActor.GetItems 22				foreach asEntry <- arr					let basItem := asEntry [Value]				if refActor.Getequipped basItem == 0					refActor.equipitem basItem 			endif			loop							elseif refActor.IsAnimGroupPlaying "DynamicIdle" 					removeme			endif			end

User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Sun Aug 22, 2010 7:33 am

there is no bed ownership - I'll keep testing...

Yes it's strange - I'll have to go through it again

Thanks very much for code

Still my major issue is that they won"t go to bed

Thanks again :)

BTW tested the Must Complete flag - no use
User avatar
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm

Post » Sun Aug 22, 2010 6:16 am

IT IS A BUG :brokencomputer:

wait till around 8:30 pm
cast invisibility (you will be trespassing)
coc to ICImperialLegionWatchTowerNEGuardQuarters
at around 9:02 reference 000837F8 appears and starts walking on the same place
at around 9:32 reference 000837FA appears and starts walking on the same place
when they finally go to bed they wear boots and gloves

I have disabled everything but Oblivion.esm - 1.2.0416 - no shivering isles

The package the soldiers use (ICArenaGuardDaySleepLower21x7) has location > cell : ICImperialLegionWatchTowerNEGuardQuarters - no flags, nothing.

The references belong to cells ICArena05 and ICArena01 (exterior)

Please confirm
User avatar
Dustin Brown
 
Posts: 3307
Joined: Sun Sep 30, 2007 6:55 am

Post » Sun Aug 22, 2010 4:11 am

I've never had the kind of trouble described here. I almost never assign a specific bed to an NPC and they have no issues finding one, laying down in it, and sleeping through the whole package. They even take their armor off whether they have clothing to switch to or not if I check the "armor unequipped" flag. Cell ownership doesn't factor in because bed ownership has to be specifically set or the bed is available to anyone.

That said, there are a number of AI packs in vanilla Oblivion that are labeled as "sleep" but are really find, travel, or some other package type. That may have some influence on what you describe with the vanilla NPCs.

You also need to be sure you've got proper durations set and that no other AI packs are trying to fire off at the same time you want your guys to be asleep. The game doesn't like it when you have 2 packs set to the same start time.
User avatar
Steve Bates
 
Posts: 3447
Joined: Sun Aug 26, 2007 2:51 pm

Post » Sun Aug 22, 2010 1:22 pm

at Arthmoor

thanks for your reply !

the issues occur when the player is present

check my last post - there is an occurrence of this issue in vanilla oblivion as described in the post - so I guess it is a bug (no simultaneous packages running or anything)

I didn't know of sleep packages being actually of other type, how can this be ?

The armor unequiped flag gives me the behavior described by qquix : "I set the unequip armor and weapon flags and the NPC changes to civilian clothes while walking to the bed, but puts the armor on when sleeping."

Still there are vanilla sleep packages that use it and this is beyond me.

Please check my last post and if possible confirm the bug

Thanks again for your time :)
User avatar
Brian LeHury
 
Posts: 3416
Joined: Tue May 22, 2007 6:54 am

Post » Sun Aug 22, 2010 3:59 am

So it boils down to : is ICArenaGuardDaySleepLower21x7 a sleep package that actually is of another type (its type is "sleep" alright) - cause otherwise there is a bug in the game. If yes, how can one tell ?
As for having two packs starting at the same time, no at least not the sleep package - and anyway I tested with only the sleep package active.
I think there is an issue here - please confirm :)
User avatar
Marquis T
 
Posts: 3425
Joined: Fri Aug 31, 2007 4:39 pm

Post » Sun Aug 22, 2010 4:45 am

I did as you said: went to ICImperialLegionWatchTowerNEGuardQuarters just before 9PM.

Nobody showed up until about 11PM. So I saved exited and reloaded.
Three guards entered the room immediately.
They walked to the beds, switched to civilian clothes and went to sleep.

Yes, they kept their boots and gloves (although they have civilian shoes to replace the boots)
But the walk in place scenario did not happen to me.

Everything vanilla
User avatar
Emzy Baby!
 
Posts: 3416
Joined: Wed Oct 18, 2006 5:02 pm

Post » Sun Aug 22, 2010 2:37 am

That is strange - well I forgot to mention I use the OBSE loader. I'll check without.
Thanks very much for your time :)
Btw, that is really strange - the "Imperial watches" must show up and sleep at this time - check the ICArenaGuardDaySleepLower21x7 package.

EDIT : I did check without OBSE - at 9:39 a guard (837f8) came and started walking at the same place, then slept with boots etc.
at 22:24 837fa showed up - same routine

I do use a no cd patch but this walking behavior was here before (not in the vanilla but in my mod) - I have no dvd available here - I will make a dvd check soon but since you kindly checked this it looks like it is a hardware issue :(
The boots and gloves thing though must be a bug
Thanks again :)

BTW loading a save past the sleeping time or waiting for a fair amount of time helps the engine running the packages correctly - the presence of the player causes the gotcha, when present at the package start
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Sun Aug 22, 2010 9:34 am

The delay for the NPC to show up depends on how often he reevaluates his packages which, I guess, depends on his processing level. I've read multiple versions of this interval, from 5 to 30 game minutes.

Anyway ...
OBSE should not affect the NPC in thic case.
I also think that a hardware or installation problem is very unlikely, although possible . . . worth a try.
Maybe some ini settings?

But I found out why he (the guard with formID 000837FA) does not show up for me:
Instead of invisibility + COC, I added the player to the ImperialWatch faction and walked to the room.
When I passed thru the lower room at 08:45, the he was seated and eating.
I went up and he entered processing level 1
At 9:02 he switched to the sleep package and started to get up from the chair - starts the "Get_up" procedure (I print his state to the console every frame).

It just happens that I've found out the other day that an actor in a "Get_up" procedure in an unloaded cell gets stuck. No command seemed to work on him. No MoveTo. No PositionCell, No PickIdle, etc

The good news (for me) is that now I tried EvaluatePackage and it does work to un-stick him - it changes his procedure from "Get_Up " to "Travel". This solves a serious problem I have.
PurgeCellBuffers also seems to un-stick him.

Still no walk in place, thou.
User avatar
Gaelle Courant
 
Posts: 3465
Joined: Fri Apr 06, 2007 11:06 pm

Post » Sun Aug 22, 2010 12:35 pm

Thanks a lot !

For me there is walking in place - when I say hardware I mean the GPU (rather old one) or something

Glad you solved your issue and interesting remarks there - still try the coc/invisibility thingy if you feel like it to see if walking in place takes place.

Strange it doesn't - at least now the guard shows up - yes, precise moment it does show up varies here also.

I'll be testing further, hope to have news soon

(btw since you did experience this issue of aimless walking yourself chances are there is something wrong)

:)

PS for me no get_up issues probably cause i coc directly to second floor
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Sun Aug 22, 2010 7:01 am

haven't looked much into this till then but it is what scientists call an err open question
that is : why can't they find their bed when the player is looking ?
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm


Return to IV - Oblivion