NPC animation strategy

#11
(2013-06-12, 01:33 PM)Verdite link Wrote:John just to add, the 'spoken to from side' animations wont fit with an enemy, because they'll just keep doing the attack and resetting rather than turn and lock, like an NPC would.
That said if the NPC was set up like an enemy they would turn constantly if you wanted, which is fine if a bit threatening! I suppose 'neutral' or slightly hostile NPCs could be setup this way. To be honest I like the idea of an NPC pushing you back if you get too close. A zero damage attack, you could set it up by keeping the NPC still while the root bone pushes into the player. ‎ 

I know that when an enemy turns it uses (possibly) the first ten frames in its walking animation.

Not so. The turn to acknowledge animations don't actually play until you trigger the event. At which point the game freezes in time. And the text pops up when the animation is finished (then I guess it plays in reverse after the text is cancelled, but I can't say for certain)
Reply

#12
Actually with some animations the full animation length isnt played fully before the text pop-up. You can set when the animation triggers the text pop-up but its something ive not conquered completely.

I was probably not being clear before, by turn and lock I meant when you activate them from the side.
Reply

#13
I thought that "talk" was a single animation whose first half played before the message popup and its second half after the message. But I remember having trouble getting the message to pop at the correct time.

Inspector Clouseau: "Do you have for me the massage?"
Hotel Clerk: ‎  "Sir, I don't give massages."
Inspector Clouseau: "But you gave me one early this morning."
Hotel Clerk: "Sir, you are mistaken!"
Inspector Clouseau:: "But I received a massage this morning from Inspector Quinlan of the Yard of Scotland."
Hotel Clerk: "He gave you a massage, sir?!"
Inspector Clouseau: "No, it was you that gave it to me." ‎ 
Hotel Clerk: "... ‎  ... a message Sir?"
Inspector Clouseau: "Yes, you fool! Now give me my massage!" ‎ 
Rofl

Ben, can you give the enemy/npc's a long attack animation and lower the AI emphasis so that it doesn't continually repeat a quick loop?



Reply

#14
Okay I apologise John, I came here to post some new ideas and just saw your question

Quote:Ben, can you give the enemy/npc's a long attack animation and lower the AI emphasis so that it doesn't continually repeat a quick loop?

You could effectively, and lower the attack speed of the NPC. Anyway in the end I just stuck to the usual NPCs, the spoken to front / side is important to use though...

Anyway if you had an 'enemy npc' with a quick turn rate the spoken to left / right wouldnt matter, because when the player approached them they would begin turning when the player entered their 'set distance' or 'visibility' radius. You could set it low enough to have them turn when needed, and use the reset option to have them return to their set positions, like in warband. I saw a few videos online poking fun at Kings Field's 'when spoken to' animations. https://youtu.be/koqwTYg4qEU

Having NPCs as enemies would work really well because you have a trigger (possibility for a wave, beerchug etc) , and six possible different movement animations, range detected (for 'attacks'), voices, and sounds.

Anyway I came to post about using the 'seated to standing' to change from one set of animations to another. For example a seated enemy that is asleep, then woken up by the player.



Reply

#15
Thank you for catching that question Verdite ‎  Smile

It made me think, the enemy PRF files have ~16 unused slots for additional animation effects. ‎  I wonder if SoM actually has additional animations-triggers that just weren't utilized in the default models?

To test, you would have to make a model that included a normally unused animation number, then write an FX into the corresponding PRF slot and see if anything triggered that animation in-game. ‎ 

Attached is a chart of the animation sounds and FX for each enemy animation in SoM. ‎  The unlabeled areas are all unused "slots".


Attached Files Thumbnail(s)
   
Reply

#16
John, could you elaborate a bit on the 16 unused slots post? I downloaded hxd, though the display is different to your screenshot.

I would like to test, to see if there is anything hidden that we dont know about.
Reply

#17
That's a dusty memory, but I'll try! If you go to "view > byte group size > 4" in HxD, it should look more like my picture and it will make understanding the PRFs much easier.

The sound effect and FX charts have "fixed" locations (aka always the same) in the PRF file starting at 0x134. I think the top chart (see picture) is for sounds, the bottom one is for FX. Each slot in a chart is 4 bytes long, but the values written in them will differ depending on how many sounds/FXs the model uses.

The empty "slots" are the 4-byte-long areas in the above picture that are not labeled. ‎  The reason they have data in them (0x00003402 etc) is because Fromsoft's PRF making tool just continues writing the last-used value in each slot until it reaches another active slot. ‎  You'll notice that the chart's slots correspond to the SoM animation number for each action (Slot0=animation 0 (Idle), Slot1= animation 1 (Walk), Slot2=Empty, Slot3=Empty, Slot4= animation 4 (Dying) etc.

A slot's format is as follows:
First 2 bytes = number of sounds/FX used for current animation.
Last 2 bytes = start location of animation's sounds/FX definiton (written backwards: 34 02= 0234 in PRF)
Note that many PRFs have odd junk data written in unused areas like the "FF003402" in the third slot in the picture. The 00FF would normally signify 256 sounds used for this animation, but the model doesn't have an "animation #2" (aka 3rd slot) so this value is never ever read by the game.

These slots just hold the info for the sounds/FX, not the animation itself. But their existence may mean that non-standard animation numbers (ie 2, 3, 5, 8, 13, 14, 18, 19, 21-30) might be triggered in game if they exist in the model. It's fairly common for SoM to have built in features that aren't used by the default model set.

If you want to see, just make a model with animations numbered for the unused slots and see if you can do anything to trigger them in game. That's assuming x2mdl actually processes those non-standard animations correctly.

Does that make sense...bet you're sorry you asked! ‎  Drool
Reply





Users browsing this thread:
2 Guest(s)