October 16, 2018, 09:13:15 AM

Username
Password

Pages: 1 [2]   Go Down
Print
Author Topic: Cut-Scene Modding  (Read 8637 times)
0 Members and 1 Guest are viewing this topic.
Ghabry
Developer
*
Offline Offline

Posts: 1009



View Profile
« Reply #15 on: December 10, 2013, 01:11:48 AM »

How to do a conversation:
Look at the whmtg script and try to alter it Wink

The needed commands are Speak, SpeakNoWait and Narrate

Speak is used for the initialization.
First argument is how many faces you want (4 seems to be the maximum)
Second argument is the background graphic behind the portraits (too lazy to dump the strings)
Now variable length: First_arg * 4 arguments follow
These are always: head_id, unk_id (just use 0, 1, 2 and 3), x-pos, y-pos
No idea how the head map to ids, 0 is Morgan, 1 is Klaus, 59 is Dread King. You can use the <head> section in Wh32Edit database.xml as a reference, but the id mapping is not correct.

Example

Speak 4 2 59 0 176 78 60 1 346 122 61 2 28 204 62 3 496 182


SpeakNoWait is second initialisation step
Call this for any head_id used in Speak.

Example

SpeakNoWait 59
SpeakNoWait 60
SpeakNoWait 61
SpeakNoWait 5062

When you add 5000 to the argument a injured head is rendered (used for Volkmar after consulting the libar mortis or how that was called). An injured head is rendered, too, when the unit with that head is in the party and is heavily injured (you probably noticed this feature already).

Narrate
Now the talking begins.

First arg is the head_id.
Second arg controls what kind of animation is played by the head (like look right/left, move forward/back)
Third arg is the file to play.
Forth arg is unused.
Fifth can be 1 or 0, when 1 the head is not disabled after finished talking. Use this when the next Narrate is done by the same head.

Example

Narrate 59 2 "KF036" 0 0
« Last Edit: December 10, 2013, 01:34:24 AM by Ghabry » Logged

Ghabry
Developer
*
Offline Offline

Posts: 1009



View Profile
« Reply #16 on: December 10, 2013, 01:41:50 AM »

And that one is funny:
You can detect via WHMTG if the Save or the Unit Book button were clicked.

This way you can add e.g. the following functionality:
When you click the Book a MeetingPoint is spawned, and Klaus says "Morgan! We can't recruit units here, we must be in a city!".

Or for saving:
Klaus: "Morgan! Sleeping in the tavern costs 1000 gold coins for all our regiments. Do you want to take a break?" [Yes (Save the game)] [No]

Ohhhh, so many evilness possible now.
Logged

Pages: 1 [2]   Go Up
Print
Jump to: