Jump to content

Recommended Posts

Posted (edited)

I am currently working on a 'dark/evil style night club esque' mod - Depraved

 

As part of this mod I have replaced an applaud animation with a dance animation (The mod is in very early stages and I don't know how to get a new idle to work in the same way as the script below using FNIS - Fores New idles in Skyrim...if anyone can show me how, that would be even better)

 

Anyway

 

For now I have replaced an Applaud Idle with an Umpa Dance Idle and implemented it on an actor with a script. The Script works and In game the Actor plays the idle but they don't finish the animation...it appears that it gets interrupted... and then starts from the start shortly after.

Does anyone know what is interrupting it/ how to make the idle animation complete rather than playing the start, stopping and then playing the start again.

 

here is the script...

 

Scriptname DepravedStripperScript01 extends Actor

 

Idle Property NPC_Applaud Auto

 

Int Dance

 

Event OnCellAttach()

Dance = 1

While Dance == 1

PlayIdle(NPC_Applaud)

(I have tried placing a Utility.Wait(10.0) on this line, I thought maybe If I figured out how long the animation went for I could make it wait that long, but the only effect this had was the actor played the idle animation for slightly longer...still did not complete the animation.)

EndWhile

EndEvent

 

Any help on this matter would be greatly appreciated.

Cheers,

FatalisticZero

 

P.S I am very new and uneducated when it comes to scripting.

Edited by FatalisticZero
Posted

PlayIdle is something you call once. "If everything works out" that should play the whole animation once (if it's an acyclic animation), or forever (if it's cyclic). NEVER make this while loop. I'm surprised that this does not freeze your whole game.

 

I wrote "If everything works out", because you can't control an NPC by using PlayIdle(). This is done using AI packages. So if the NPC is requested to execute an AI Package, it will happen that s/he doesn't start your idle, is interrupted, or does the idle while performing the movement from the package. With custom NPCs you have better chances that no other packages take effect. But even then s/he might be involved into other NPC's socalled sandbox packages.

 

Packages are very complicated in Skyrim. You might look for that in the CK Wiki. In my FNIS Idle Spells (you can check the sources) I use quests and quest reference aliases to prevent this behavior as good as possible, but even this cannot totally exclude the interaction of other packages. To fully get into control I think you have to write a scene manager, but I have no experience about that.

Posted

Now I have managed to get the animation to complete its cycle...Created a quest used an alias for the actor and made it use an AI Package in a Scene phase. However, there is a long pause before the Animation plays through again...something to do with the animation being acyclic or cyclic perhaps?...Does anyone know of a way to decrease the time between the animation finishing and starting again?

 

Once again any help would be much appreciated

 

cheers,

FatalisticZero

Posted

You are a quick learner. :thumbsup:

 

Now there are different ways to make idles play. You don't tell which one you use. Apparently you have attached it to the package definition, or to an idle marker. But I would use a script that calls the PlayIdle(), so you have control when something happens.

Posted

Hey fore, the way I set up the idle was in Idles section of AI Package I selected Use Specific Idle and then added the one I wanted. At an earlier stage I tried mucking around with idle markers, but that was when I was trying to implement things with my simple scripts(My scripting knowledge is lacking) rather than AI Packages, so I should probably experiment with them a bit more. As far as using a script goes I'm not sure how exactly I would do it or where said script would go...To be more specific about what I am trying to achieve in this mod animation wise...>

 

4 Strippers/Dancers that will be up on pedestals playing these two Idles at random 24/7 hours a day and ideally will have no interaction with anything else, ActorBase has no AI Packages etc.

FNISc022.hkx SkyrimDanceAnimations\Sexy\SexyJA.hkx

FNISc024.hkx SkyrimDanceAnimations\Sexy\SnakeDance.hkx

The base strippers will be female using a retex of the vanilla 'wench' outfit, however at a later stage in development I will be using various CBBE outfits etc giving users a 'Scantily Clad' Stripper option...and maybe some other options later down the track

 

Another bunch of NPCs (Probably make varying amounts to cater for different PC Rigs/capabilities, Eg. 10 club goers option, 20 club goers option, 30, etc.)

These NPCs would random between the following Idles

FNISc010.hkx SkyrimDanceAnimations\Disco\Disco_VB.hkx

FNISc011.hkx SkyrimDanceAnimations\Disco\GrooveGirl.hkx

FNISc013.hkx SkyrimDanceAnimations\Disco\Seph05Disco.hkx

and probably a few others, at beta release stage I would probably just have them doing these 24/7 in a static location or If I figure it out have them going back and forth between various Idle Markers in the different rooms of the Club.

 

If I can I want to implement the Idles using your mod, but I have no idea how to...So as I mentioned in my first post for now I have taken a Dance Animation - FNISc010.hkx SkyrimDanceAnimations\Disco\Disco_VB.hkx and replaced an NPC Applaud Animation with it NPC_Applaud5 to be specific.

 

<READ BELOW IF INTERESTED IN OTHER ASPECTS OF THE MOD>

 

So far I have implemented

Club Lighting - some dark red, green and blue ambient lights and also the typical White Rapid On/Off light, I have implemented this one at varying speeds and there is also a green and blue version in one of the rooms...I have a concern with the way I scripted this, whether it will drain memory over time or if it is fine the way it does it....here is the script

 

Scriptname DepravedLightOnOff extends ObjectReference

 

 

 

ObjectReference Property ClubLight Auto

 

int LightCheck

 

Event OnCellAttach()

LightCheck = 1

While LightCheck == 1

ClubLight.disable()

Utility.Wait(0.06)

ClubLight.enable()

Utility.Wait(0.06)

EndWhile

EndEvent

 

10 Music Tracks for Cell/Interior Area. Users will select their own music that will play at random in club by placing 3-10 Wav files into Data/Music/Depraved and renaming them Track 1 - Track 10 eg

Track 1

Track 2

Track 3

etc

Users will have 3 options here. 3 tracks, 5 tracks or 10 tracks...

(only part not done here is creating the options for 3 or 5 tracks)

 

And finally the club itself at this stage will feature 3 interior cells, 2 completed thus far

Depraved Entrance, A cave area that connects to the Skyrim Worldspace (Tamriel) Map Marker is set up. (mostly used green cave kit)

Depraved, The Club itself, Main Hall with Upstairs section/balcony, 2 Side rooms, a smaller back room infront of Lounge. (mostly used Nord Ruins Kit)

Depraved, Lounge - Yet to be implemented.

 

-Yet to be implemented-

- An NPC who will sell black/dark re-textures of a large number of Vanilla Skyrim clothing and Armours and Weapons

-The Re-textures for the above

-1 - 3 bars or NPCs in the club, who will sell alcohol and perhaps a few other items...various things to make the player get drunk and perhaps some kind of drug (As far as the drug taking stuff goes, not sure whether I will make it)

- The effects to accompany the above beverages etc

 

Possibility - Depending how I progress with the development of this mod, how it is received by players etc, I may start adding some short quests etc, to make it more interesting...but that is a long way off.

 

I will probably post a video tomorrow displaying what I have done so far...as a reference.

 

Anyway any help is as always greatly appreciated.

Cheers,

FatalisticZero

Posted

I probably it's hard to make random looking idles purely based on package conditions, unless you make tons of packages with different start/end times and combine them with the random condition. Because I think you won't get other sufficient conditions to change packages.

 

I probably would do a quest script which is activated randomly and then starts new packages randomly. Package condition could be like a number of tokens, which has always been the easiest way to do.

 

EDIT: and get away from these never ending loops inside an event function. This is very dirty programming. You go out of the cell, the function is still looping, you get in the cell again, get a new event, but the event functions is still looping. What happens? I don't know. Or you update you script, but the save file indicates the (old) function still loops. Might make a clean save necessary?

 

Instead, register for an update, and get out of the function.

  • 2 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...