Generally speaking cutscenes are non-playable sequences of events in a videogame. In Fable, they work the same way. Cutscenes are implemented using a simple scripting language, but more on that below.
Note! This is work in progress. Anything could change at any moment.
Fable's cutscene scripts are divided into two sections: main and skip. Main section defines the main part of the cutscene, where as skip defines what happens if the player presses ESC during it. So, the purpose of the skip part is to make sure that the situation after the cutscene is like it would be if the cutscene was not skipped. There is also a third section to the cutscenes, but it's not known what it does at this point.
Example: UseCamera SNAP
Enables or disables the camera changes with the creature speaking functions.
Does a camera shake. Duration is given in seconds.
Assumption: Wait for the camera move to end.
This sections describes the various functions that handle Thing (houses, chests, creatures, etc.) specific actions.
Pause or resume thing. Stop all animation, movement, etc.
Play an object related animation.
Set thing conscious or unconscious.
Example: SetThingConscious FIGHTER,TRUE
Fade thing in. Doesn't quite seem to work.
Fade thing out.
Example: FadeThingOut HERO,2
Create a mixed crowd consisting of variations of ModelMale and ModelFemale characters at Marker. Marker refers to collections of markers in the TNG file with the same ScriptName.
Example: CrowdCreateMixed CREATURE_KN_VILLAGER_MALE, CREATURE_KN_VILLAGER_FEMALE, MK_EXAMPLE, CROWD
Make the crowd look towards Thing.
Do a crowd animation.
Example: CrowdAnimate CROWD,SCRIPT_CHEER_3,0.5,0.05,0.05,TRUE,TRUE,2
Example: CrowdCombatAnimate CROWDBANDITS, CS_WALK_BACKWARDS_01, 0.0,0.0,0.0,FALSE,TRUE,FALSE
Kill all characters associated with the crowd. When they die they leave loot behind.
Example: CrowdKill HHUndead,1.5,TRUE,TRUE
Hero specific functions.
Give hero an item. Item is the item's enumerator, e.g. OBJECT_SWORD_OF_AEONS.
Example: GiveHero OBJECT_HERO_HAT_JOB_MASK,1,-1,TRUE
Remove all clothes, only union jack underwear remain.
Set hero's health.
Example: GiveHeroHealth MAX
Give hero Amount of “morality”. Negative numbers for evil, positive for good.
Sets hero tattoo.
Examples: HeroTattoo OBJECT_TATTOO_CARD_CHEST_01
Sets hair or beard for the hero.
Examples: HeroHair OBJECT_HERO_HAIR_YOUNG_01, HeroHair OBJECT_HERO_BEARD_TRAMP_01
Puts something into hero's hands. NULL is for empty. Objects not weapons.
Example: PutInHeroHands NULL
See also: Creature.HoldInHand
Set the current weapon for the hero (the weapon on his back). Hero will not wield it.
Take an object from the hero's inventory.
Example: TakeObjectFromHero OBJECT_TROPHY_JOB_MASK_01
Make the hero wear a hat. For no hat, use OBJECT_HERO_NO_HAT.
Example: HeroWear OBJECT_HERO_HAT_JOB_MASK
Gives gold to hero.
This section contains all the functions that don't really belong into any specific category or if the category is just too small.
Ask a yes and no question. It's unknown how the handling of the answer is done.
Example: AskQuestion TEXT_QST_B04_GM_QUESTION_LEAVING_TO_GRAVEYARD
Disable cutscene skip if Disabled is true. Remember to call AToSkip FALSE at the end of the cutscene.
Creates a new object to use in the cutscene. Object is the object enumerator defined in game.bin, Location is the starting location marker defined a TNG file. Var is a name that you want use when referring to the object in the cutscene.
To delete the object use the Remove function.
Removes an object. Object can be a creature, house, chair, etc. It can either be created by the engine (in case of TNG objects) or created in the script with Create function.
Starts playing music. Music is an enumerator for an audio file. Using MUSIC_SET_NULL stops playing music.
Do a screen fade in. Duration is given in seconds.
Do a screen fade out. Duration is given in seconds.
Pauses the game for the given duration. Duration is given in seconds. Note that the function doesn't stop any cutscene actions like walking, talking, etc.
Do script frames aka. proceed a number frames. Count specifies the frame count.
You would assume that it allow sounds (or not) right? That doesn't seem to be the case though.
Assumption: Target specifies the world location of the sound. It can be NULL.
Example: PlaySound HERO,$SOUND,CRITERIA
Makes people put away their weapons. At least the hero.
Relocation of loaded extras (characters). Remove tells to remove or return. Location is the location where the engine should put the extras, it is one of values: LIMBO, RETURN.
Wait until currently active dialog ends.
Open or close chests. Chest is a variable specified in the TNG files with the ScriptName attribute.
Open or close doors, gates, etc. Door is a variable specified in the TNG files with the ScriptName attribute.
Example: SetDoorOpen DragonGate
Get a variable to a global object.
Example: Get Dragon,DRAGON
Assumption: Registers a global object to the cutscene.
Assumption: Show text even if the screen is black.
Assigns an effect to an object. Effect is the name of the effect. Target is the target location object/thing/creature of the effect. Var is the variable that is used to refer to the effect from the script.
Example: CreateEffect DG_SOUL_SWIRL,HERO
See also: RemoveEffect
Object is the target for the effect. Var is the variable that is used to refer to the effect from the script.
Example: DummyEffect JACK_OF_BLADES_MASK_FINAL,HERO,WEAPON_FOCUS_01,MASKGLOW,TRUE
Removes an effect. Effect is the variable used with the CreateEffect function.
Assumption: Set a quest script flag.
Example: SetFlag OPENCAGE,TRUE,TRUE
Does a credit screen.
Set object collision.
Prints gray text on screen.
Returns to the main menu.
Change cutscene mode to fullscreen – no black bars.
Show the message Message at the center of the screen.
Example: GameInfo 'Hello!'
Play a video file in the data\Video folder.
Example: PlayAVI 6_Arena_Mothers_Story_Comp.xmv
Classes are used for the different types of objects in the cutscenes. You can use these functions by using the syntax <Class variable>.<Function> e.g. Jack.Speak.
Object is the base class of creatures, effects, etc. What that means is that creature variables and effects, etc. all have these functions as well.
Set object's alpha/transparency value. 1.0 is opaque, 0.0 is invisible.
Fade in the character. Use SetAlpha to first make the object invisible.
Fade out the object.
Creature class represents characters, etc. in the cutscenes.
Makes the specified character speak and turn towards the Target which refers to the listening creature. If NoDialogCam is off, camera is positioned relative to the Target. For example if the target is different from the speaking creature the camera will be placed slightly behind and above the target creature.
Text is the text that the character should say. It's usually an enumerator that's defined in text.big, but it can also be a normal string, like 'text'.
Example: THER.Speak THER,TEXT_QST_048_THERESA_INTRODUCTION_20
Example: VILL1.Speak HERO,'TEXT_CS_024_FAKE'
Allows speaking while doing something else, like walking.
Something to do with additive dialog?
Example: ORGANISER.DataSpeak $LINE,_10
Example: TRADER.DataSpeak TEXT_QST_B11_,_OUTRO_10,DATA
Look to specified direction – an angle given in degrees.
Assumption: Makes the thing to look at a thing.
Turn the creature towards the target, not just the head, but the whole body.
Makes the thing just look at nothing, aka. look just forward.
Instantly Teleport creature to a location. Location is a marker.
Example: VICTIM.Teleport M_COE_VictimTeleport
Slowly teleports the creature. This allows other commands to be played as the person moves into place.
Example: VICTIM.SlideTeleport M_COE_VictimTeleport,M_COE_VictimAltar,100,TRUE,TRUE
Makes the creature walk to a location.
Makes the creature run to a location.
Makes the creature walk to a location. The difference between this and WalkTo might be in “synchronicity”.
Loads an animation into memory.
Plays an animation.
Plays a looping animation.
Assumption: Variable Count tells the number of times it should be played, -1 is forever.
Plays a looping animation.
Same as PlayAnimation but waits until the animation is finished.
Waits for certain tasks to end, like walking or animations. Variable unknown is usually just a temporary variable with no particular meaning.
Example: HERO.WaitTask FOO
Make the creature drawable or not.
Clear all active creature commands, like animations and such.
Example: HERO.AddScriptedMode CUTSCENE
Assumption: Makes the creature to sheathe their weapon. The parameter can take values like TRUE and MELEE.
Example: HERO.Sheathe MELEE
Set walking speed.
Set running speed. Value 1.05 is a good value.
Sets the appearance seed for a villager.
Set creature scared or unscared depending on Scared.
Example: TRADERS.SetScared FALSE
Puts an object into creature's hand. Weapon or an object. In case of weapons the results might differ according to character.
Make a creature fight another. Doesn't work for Hero.
Assumption: Make the fight stop that was previous started via FightWith.
Make the creature drunk.
Change current health.
Changes a creature into another. In case of the hero the the target creature has to meet certain requirements. What they are, we don't know yet.
It seems that there are a few problems with this function when it comes to NPC creatures.
Example: HERO.TurnInto CREATURE_HERO_CHILD
Fades one thing into another. Notice that Target is a variable. Not an enum, so you have to create the target object before doing the fade.
Example: TRADER.FadeCross BALV,0.5
Makes the creature attackable/unattackable
Example: HERO.SetAttackable FALSE
Makes the creature damageable/undamageable
Example: HERO.SetDamageable FALSE
Unknown what this does.
Possibly enables the Bounding Box??
Example: PRIS.SetBound TRUE
Looks to be hostage quest specific. Probably allows them to move.
Example: HOST1.SetFree TRUE
Disables Force push on creature
Example: JACK.SetPushable FALSE
Summoner Specific Attack
Example: SUM.SummonerAttack MK_AM_TARGET
Waits for the specified event to complete before moving on.
Example: Hero.WaitForAnimationEvent CUT_SCENE_HOH_HERO_STANDUP
Waits for the creature to get within a certain radius of a location before continuing.
Example: Hero.WaitForUnderRadius OUTRO_MARKER_HERO,2.2
In all cutscenes, by default, HERO (of class Creature) refers to the player character.
CreateEffect BALVERINE_TRANSFORM_3,HERO,EFF1 EFF1.SetAlpha 0.0 EFF1.FadeIn 3 GamePause 3 HERO.ClearCommands TRUE,TRUE HERO.TurnInto CREATURE_HERO_CHILD HERO.WaitTask FOO EFF1.FadeOut 3 GamePause 3 RemoveEffect EFF1