Jump to content

Custom Cutscenes


Jimbob
 Share

Recommended Posts

Creating Custom Cutscenes

 

This tutorial will teach you how to make custom cutscenes in LEGO Racers 2. The only tools you need are a generic text editor, such as Notepad, and JrMasterModelBuilder’s >UNGTC.

 

I have created an example mod to showcase the techniques covered in this tutorial, which you can view >here. Included is the original script, so if you need help with using certain effects, check it out.  :)

 

Additionally, Xiron has compiled a list of all the various script functions, actor names, etc. usable in cutscene scripting. >See the list here. Thanks, Xiron!

 

Note: This tutorial is only half complete as I am still researching into this area of LR2 modding. I apologise in advance for the lack of clarity in some sections of the file descriptions, I’ll be looking into them to learn more (unless anyone can explain them to me, which I’d be very grateful for).

 


 

1. Setting Up the Mod

Navigate to your LEGO Racers 2 install folder. In it is a file called GAMEDATA.GTC. Select this and drag it onto the ungtc.exe file included in the UNGTC tool; the file will be extracted into a folder called GAMEDATA. You are now ready to start modding!

 

 

2. The Scripts

All the subtitles in LEGO Racers 2 are contained in the following file:

GAME DATA/TEXT/LEGO STRINGS.TXT

They are stored along with many other items of text, such as menu item names. However, modifying these strings doesn't change anything in-game, and the other text files aren't particularly pleasant to go through, so for now this tutorial is excluding the editing of subtitles.

 

The cutscenes are stored in GAME DATA/SCRIPTS. Within this are the five locations in LEGO Racers 2 – note that CARCRAZE is Xalax, ADVENTURERS is Dino Island, and SANDY ISLAND is Sandy Bay – each containing dialogues that occur in that location. In the SANDY ISLAND folder is an example file called ANIMS.TXT. This contains example animations for you to use in your cutscenes. The rest of the files are the cutscenes themselves.

 

 

3. Modifying a Cutscene

To modify a cutscene, first choose the file you wish to edit. It would take too long to compile a list of each file’s purpose just yet (but hey, I may do it some day), so for now you’ll need to use common sense to work out what each file’s cutscene is.

 

In this tutorial we will use INTRO1.TXT as an example. Locate the file in the SANDY ISLAND folder and open it in a standard text editor. Below are the various details it contains, and what they represent (note that currently unidentified headings are best left unchanged).

$global
        $name      intro     # Not sure where this is used
        $story     INTRO     # Not sure where this is used

        $length 25     # Total time, in seconds, that the cutscene lasts for

        $setactor    PLAYER    DRIVE_CENTRE     # Players and NPCs are added with $setactor. Firstly, the character is defined, and this is followed by their model. I’m not sure what the models are, however.
        $setactor    SPARKY    CB_IDLE     # CB_IDLE is the default

        $carposition    intro1_carpos     # The player’s car is positioned using this. I don’t know where car positions are defined yet.
        $nocancel     # Prevents the player from skipping a dialogue. Remove this to make dialogues in this particular file skippable.
$end

After this initial section, the dialogues are implemented. Each follows the same format.

IMPORTANT: The times specify when a section begins, not how long it lasts – this means that the final section will continue on until the time specified in the global declarations section.

Below is an example segment from the file:

$time 0     # The time at which this section starts, in seconds. Can be a half decimal, e.g. 3.5.

        $actor 1     # Each character is given a number based on the order in which they were listed in the global declarations. The player is always first and is 0, from then on it’s 1, 2, 3, etc.
                 $position intro1_sparkypos     # Again, the position of the character speaking
                 $expression TALK 4.5     # Not sure what this is, I’m assuming the texture/model. The number is its duration in seconds.
                 $animation TALK_NORMAL 3.5 1.0     # The character’s animation. This particular one isn’t in ‘ANIMS.TXT’. The first number is its duration in seconds, the latter I'm not so sure.
        $end     # Almost everything must be ended

        $cinematic     # The camera position, I think
                   $shot  OBJECT_STATIC   SPARKY     # I think this means it focuses on Sparky.
                   $startrelative 0.2 1.1 2.0     # Where the camera starts?
                   $endrelative   -0.2 1.2 1.8   # If so, then this is where it finishes, for a pan/zoom effect.
                   $targetoffset  0.0 1.2 0.0     # Perhaps to reposition the camera off-center from the character
        $end

        $subtitle SPARKY   SP_INTRO1     5     # The dialogue itself. ‘SPARKY’ is the name written in the dialogue box, and ‘SP_INTRO1’ is a reference to the ‘LEGO STRINGS.TXT’ file mentioned earlier. This is the part where you can change what the actor says. The number is the time in seconds that the dialogue lasts, and can carry over multiple $time segments so long as no new subtitles are specified before the time finishes. You can use this to have a single dialogue with multiple animations strung together.

You can continue adding, editing and/or removing these segments, so long as they are in chronological order and don’t go over the total time you set.

 

So, now you know (well, to a degree) what the various parts of the file do, you can go ahead and modify them!

 

 

4. Editing Subtitles

Coming soon…

 

 

5. Recompiling the Mod

Now you have created your mod, it is time to recompile it for testing. Save and close all files within the GAME DATA folder, and navigate back outside it. Then click and drag the blank .GTC file onto the ungtc.exe file to recompile it. The program will compile a new GAMEDATA.GTC file (which is noticeably larger than the original), in addition to new COMPRESS.INF and FILELIST.INF files. Place all three files back into your install directory (or a duplicate directory, if you wish to keep mods separate). Voila, your mod is ready for running!

IMPORTANT: Always make a backup of the original GAMEDATA.GTC file, if you are replacing the original install directory’s file.

 

 

Example Cutscene Mod

This mod changes the very first dialogue with Sparky. It replaces Sparky with a doctor and animates him differently, in addition to removing much of the dialogue.

The code for this modification is below. This code was placed into INTRO1.TXT.

$global
            $name                          intro
            $story                         INTRO

            $length 10     # Set the cutscene length to 10 seconds
            $setactor        PLAYER        DRIVE_CENTRE
            $setactor        doctor        CB_IDLE      # Add the doctor
            $setactor        SPARKY        CB_IDLE      # Also add Sparky, for reasons explained later

            $carposition     intro1_carpos
            $nocancel        # I left this as-is, but you can remove it.
$end

$time 0
            $actor 1
                        $position intro1_sparkypos     # Place the doctor in Sparky’s position
                        $expression TALK 6            # Give him a talk expression. After 6 seconds he returns to his standard expression.
                        $animation TALK_EXCITED 6 1.0     # This animation lasts 6 seconds too, and makes him jump up and down. Note that it loops for six seconds, it isn’t stretched into slow-motion.
            $end

            $actor 2
                        $position intro2_sparkypos     # Sparky is the character you must speak to in the next part of the intro, so he is placed here ready. Alternatively you could change ‘INTRO2.TXT’ to have the doctor as the trigger.
            $end

            $cinematic
                        $shot  OBJECT_STATIC    doctor     # Standard cinematic for the doctor, nothing changed here.
                        $startrelative 0.2 1.1 2.0
                        $endrelative   -0.2 1.2 1.8
                        $targetoffset  0.0 1.2 0.0
            $end

            $subtitle DOCTOR   SP_INTRO1    10     # Reference the subtitle, and tell it to last 10 seconds.

$time 10
            $actor 1
                        $position sparkyhidden      # At the end of the animation, hide the doctor so he doesn’t get in the way. For some reason this doesn’t actually work, and he stands where Sparky is so they merge together. I’ll look into it.
            $end

 

A screenshot of this mod in action:

gallery_5738_300_25777.png

  • Like 2
Link to comment
Share on other sites

Advanced Cutscene Modding

 

Not satisfied enough with simply swapping around characters and animations? Check out these advanced modding mini-guides.

 

 

Camera Tricks

The aspects of a game camera that can be modded are: position, pan and zoom. You can use any combination of these, allowing for simple cuts and more elaborate shots (say you wanted an establishing shot of the town). Additionally, you can add fade effects instead of having the camera cut between shots.

 

 

Declaring a Camera Shot

Camera shots are defined within the $time segment of a script. This allows multiple camera shots to be used throughout a cutscene. A camera shot must be declared in the first $time segment, and that shot will be used continuously until another one is declared. Below is an example script:

$cinematic
     $shot     OBJECT_STATIC doctor
     $startrelative -2.0 0.0 0.0
     $endrelative   2.0 0.0 0.0
     $targetoffset  0.0 0.0 2.0
$end

Placing the Camera

The first part of camera editing is to place the camera on an object. In this case, the camera is focused on a doctor actor that was added in earlier on in the script. The object you focus on must be declared at the beginning of the script using $setactor.

 

 

Positioning the Camera

Next, you tell the camera where to begin, using $startrelative. Three decimal coordinates follow. The first is the X-position, then the Y-position, and finally the Z-position. Modifying the X-position will change how far to the left/right of the object the camera goes (it is relative, so moving left on one object will likely not be moving in the same direction as moving left on another object). The Y-position changes how far up/down the camera goes, and the Z-position changes how far forwards/backwards it goes. Note that a coordinate of 0.0 is centered on the object (generally inside it), negative values move it left/down/backward and positive values move it right/up/forward. Also note that, on a minifigure, the centre is considered its… groin area. For this reason a Y-value above 1 is recommended for good composition.

 

 

Panning/Zooming the Camera

If you do not wish to move the camera, you must set the $endrelative values of the camera declaration to be identical to the $startrelative values. If you would like a pan or zoom effect, then this is done through a combination of $startrelative and $endrelative.

 

To create an effect, all you have to do is set the start and end points of the camera ($startrelative and $endrelative respectively) to the desired start and positions of your camera effect. To zoom in to an object, for example, you might use:

$cinematic
     $shot     OBJECT_STATIC doctor
     $startrelative 0.0 0.0 5.0
     $endrelative   0.0 0.0 1.5
     $targetoffset  0.0 0.0 0.0
$end 

This places the camera in front of the doctor and moves towards him. By keeping the values positive, the camera doesn't go into him. Alternatively, you could have the camera pan from left to right:

$cinematic
     $shot     OBJECT_STATIC doctor
     $startrelative -2.0 0.0 1.5
     $endrelative   2.0 0.0 1.5
     $targetoffset  0.0 0.0 0.0
$end

Note how both Z-values here are set to 1.5 – this doesn’t create an effect, as the values are the same, but instead positions the camera in front of him to avoid going into him.

A combination of the two is hence possible by adding the values together:

$cinematic
$shot     OBJECT_STATIC doctor
     $startrelative -2.0 0.0 5.0
     $endrelative   2.0 0.0 1.5
     $targetoffset  0.0 0.0 0.0
$end

Camera Duration

The duration of a camera effect isn't directly defined, but rather is set by the $time values of the camera’s segment and the next segment. So, if the camera was declared in a segment starting with $time 0, and the next shot had a different camera at $time 5, the camera would last 5 seconds. This can be used to create camera effects of varying speeds. If no camera effect is declared in the next shot, the camera will continue its effect until another camera is declared.

If you wish to have a camera perform an effect for a certain time and then hold its final position, set its effect in one $time segment, then create a second $time segment with both the $startrelative and $endrelative values identical to the $endrelative values of the first time segment.

 

 

Example Script

If all this isn’t quite clear, the following is an example script (a modified INTRO1.TXT) showing different camera effects discussed above. You can copy this into the INTRO1.TXT, recompile it and launch a new adventure in the game to see it in action.

# This first part of the script declares the actors being used.
$global
     $name         intro
     $story        INTRO

     $length 15
     $setactor PLAYER    DRIVE_CENTRE
     $setactor doctor  CB_IDLE

     $carposition intro1_carpos
     $nocancel
$end

# The first camera shot – a zoom into the doctor.
$time 0
     # Make sure we position the doctor correctly.
     $actor 1
          $position intro1_sparkypos
     $end
     # Here is the zoom effect.
     $cinematic
          $shot     OBJECT_STATIC doctor
          $startrelative 0.0 0.0 5.0
          $endrelative   0.0 0.0 1.5
          $targetoffset  0.0 0.0 0.0
     $end

$time 5
     # Hold this effect for a couple of seconds.
     $cinematic
          $shot     OBJECT_STATIC doctor
          $startrelative 0.0 0.0 1.5
          $endrelative   0.0 0.0 1.5
          $targetoffset  0.0 0.0 0.0
     $end

$time 7
     # Then pan across the doctor.    
     $cinematic
          $shot     OBJECT_STATIC doctor
          $startrelative -2.0 0.0 1.5
          $endrelative   2.0 0.0 1.5
          $targetoffset  0.0 0.0 0.0
     $end

$time 12
     # Animate the doctor. Because a second camera isn’t declared, the previous one continues.
     $actor 1
          $expression TALK 6
          $animation TALK_EXCITED 6 1.0
     $end
# This is the last time segment, so the camera finishes panning 15 seconds in, then the cutscene stops. 

 

Note that the change from $time 0 to $time 5 isn’t quite crisp, the latter segment jumps forward slightly. In situations like this you just need to play around to get the positioning perfect (e.g. change the values in the second segment from 1.5 to 1.7).

 

 

Camera Facings

Positioning the camera and moving it about is all well and good, but the fact that it’s always focused on an object isn’t always useful. The final section of the camera declaration, $targetoffset, tells the game where to face the camera. This can be used to create camera shots from all sorts of angles, effectively nullifying the fact that it’s relative to an object.

 

Camera facings use coordinates too, but not in exactly the same way to the camera positioning:

$targetoffset  0.0 0.0 0.0

The values are the same in that they are X, Y and Z values respectively. However, this doesn’t change the camera’s position, but rather the point it faces. Take the following for example:

$targetoffset  -5.0 0.0 0.0

This would have the camera facing over to the object’s left. Likewise…

$targetoffset  0.0 1.0 0.0

…this would make the camera look up to the object.

 

To better understand this, imagine that a node is created at the coordinates defined in $targetoffset. Just as the camera is repositioned using the coordinates in $startrelative, so is the node positioned using the coordinates in $targetoffset. The camera always looks at this node, not the object, which is why a $targetoffset of 0.0 0.0 0.0 is focused on the object. Hence you can have any camera shot you wish, ignoring the objects the camera is bound to.

 

 

Camera Zoom

It’s also possible to change the zoom level of the camera. This is done by adding in the following to the camera declaration:

$zoom CUSTOM_SIZE 3.0

Do not confuse this with an actual zooming effect; rather this is like zooming in or out on a camera before taking a picture. The zoom value starts at 0.0 and increases. Note that, with zoom values, negative and positive values are counted as the same, so a value of -1.0 is the same as a value of 1.0, the game measures its zoom based on the value’s difference/distance from 0.

 

A zoom value of 0.0 sets the camera to the closest it can get, zooming right inside the object. As you increase the values distance from 0, the camera zooms further and further out. This can be used in combination with various other effects too. The following are two examples of its implementation:

$cinematic
     $shot     OBJECT_STATIC doctor
     $startrelative 0.0 1.0 4.0
     $endrelative   0.0 1.0 4.0
     $targetoffset  0.0 0.0 0.0
     $zoom CUSTOM_SIZE 3.0
$end

This first cinematic would originally be positioned facing the doctor, slightly away from him to get a full-body shot as well as showing the environment behind him. By adding the $zoom part, it is instead zoomed out slightly.

$cinematic
     $shot     OBJECT_STATIC doctor
     $startrelative -3.0 0.0 0.0
     $endrelative   -3.0 0.0 0.0
     $targetoffset  3.0 0.0 0.0
     $zoom CUSTOM_SIZE -1.0
$end

The zoom in this cinematic is a negative, yet it is the same as having it set to positive 1.0. The camera is positioned to the left of the doctor and uses the offset to face him. The zoom then forces the camera slightly outside his body.

 

 

And that’s about it for camera modding, have fun playing around!

 

 

 

Sound Effects


Sound effects can be added into cutscenes too. This is how the characters laugh in the Sandy Bay gathering intro, for instance.

 

 

Adding Sounds

Sound effects must be declared at the beginning of the script, in the $global section. This is generally done after declaring actors and positions, but before extras such as $nocancel. Declaring a sound is done using $setsound, and the game is actually very nice in that any sound can be used. Consider the following:

$setsound LARF1
     $sample   Game Datasoundsvoicesspeciallaf4ppl.vag
     $bindto PLAYER
$end 

The modder can set the name of the sound. This is done in the first line, next to $setsound, and works like declaring any variable in a program – it must be unique, for example.

 

Next, you input the path of the sound file. This is great because it allows you to place custom sounds files in custom folders. For example, I created my own sound file in the following path:

$sample   Game DataCUSTOM SOUNDSmysound.aif

IMPORTANT: The sound file can only be in the formats .vag and .aif. Other formats, such as .wav, cause the game to crash. The easiest way to get around this is to have your file (in whatever format it originally is), open it in a program such as Audacity, change its rate to 11025Hz, set it to mono, export it as an AIFF file, and finally rename this file to .aif. These files load and work fine.

For more information on sound effects, see le717’s >Custom SFX Tutorial.

 

After the sound file has been determined, the sound must be bound to an object. This is done using $bindto. Note that the sound doesn't actually come from that object, it just plays normally rather than positionally.

 

Finally, as always, the sound declaration is finished with an $end.

 

 

Playing Sounds

Sounds are played very easily. They are set to play using the following:

$sound WHATTHE

This is placed at the end of a $time segment, after any actor and cinematic sections. If the sound is long (for instance, a music track), it will continue to play until the end of the cutscene, and will even continue to play after the cutscene if it is longer than the time set in the $global declaration.

 

 

Sound Effect Example

The following is a script which plays a sound. I chose to use a music track from LEGO Rock Raiders, converting it to an AIF file and renaming it to mysound.aif.

$global
     $name         intro
     $story        INTRO

     $length 10
     $setactor PLAYER    DRIVE_CENTRE
     $setactor doctor  CB_IDLE

     $carposition intro1_carpos
     # The sound is declared here.
     $setsound WHATTHE
          $sample   Game DataCUSTOM SOUNDSmysound.aif
          $bindto doctor
     $end

     $nocancel
$end


$time 0
    
     $actor 1
          $position intro1_sparkypos
     $end
    
     $cinematic
          $shot     OBJECT_STATIC doctor
          $startrelative 0.0 1.0 2.0
          $endrelative   0.0 1.0 2.0
          $targetoffset  0.0 0.0 0.0
     $end
     # The music is set to play. It starts 0 seconds in, as it is in the $time 0 segment.
     $sound WHATTHE
    
$time 5
     # The music continues to play as it is very long.
     $cinematic
          $shot     OBJECT_STATIC doctor
          $startrelative 0.0 0.0 4.0
          $endrelative   0.0 0.0 4.0
          $targetoffset  0.0 0.0 0.0
          $zoom CUSTOM_SIZE 3.0
     $end
# As the music is longer than the total time, it is cut here and no longer plays. 

 

And there you have it – custom sounds!

 

 

 

More advanced modding coming soon!

  • Like 1
Link to comment
Share on other sites

Might as well leave this here...



Open GAME DATASCRIPTSSANDY ISLANDINTRO2.TXT and comment the last section (lines 98-101). Sparky will be speechless. Not this causes the area to lag, and if you do anything after this, he will be unloaded. Also, untested what happens if it is disabled before talking to him (presume it will work).

 

4. Editing Subtitles Coming soon…

 

What we really need is a tool to do this for us, but I was having no luck writing a parser.

Link to comment
Share on other sites

Updated, this tutorial is a lot more in-depth now (at least the second post is).

 

I'll check out that video later le, I think I know what you're talking about :)

Link to comment
Share on other sites

Fluffy Cupcake

Custom sounds eh? Does it loop? If so, maybe this could be a way to change foyer/explore music to be different for each world, that is if we can't find what controls what song plays where.

Link to comment
Share on other sites

1) Might as well leave this here...

-snip-

Open GAME DATASCRIPTSSANDY ISLANDINTRO2.TXT and comment the last section (lines 98-101). Sparky will be speechless. Not this causes the area to lag, and if you do anything after this, he will be unloaded. Also, untested what happens if it is disabled before talking to him (presume it will work).

4. Editing Subtitles Coming soon…

2) What we really need is a tool to do this for us, but I was having no luck writing a parser.

1) Okay, I'm not sure why it's doing that, I'll take a look in the script you're referring to. If you're asking for an explanation, that is, I can't tell :/

 

2) I would certainly love that!

 

Custom sounds eh? Does it loop? If so, maybe this could be a way to change foyer/explore music to be different for each world, that is if we can't find what controls what song plays where.

Sounds don't loop, no. At least I haven't experienced any looping.

 

You can certainly create custom music, however the music volume would have to be set to 0, and I've discovered that if music goes over the cutscene duration it will continue to play just once and stops if you pause the game. Probably easier to modify current music files :)

 

This is awesome. I can't wait to see what some people make with this.

Glad you think so! I've already started making a music video intro instead of Sparky's boring tutorial, however I can't record it as my laptop can't handle screen recorders... If anyone's willing to record the mod for me, I would be very grateful.

 

 

Also, I've updated the camera offset explanation to make it clearer, I stupidly woke up last night and realised how I could do so. Ugh.

Link to comment
Share on other sites

1) Okay, I'm not sure why it's doing that, I'll take a look in the script you're referring to. If you're asking for an explanation, that is, I can't tell :/

 

I was dropping an example you can use if you wish. It is not a true cutscene mod, but it is scripting.

 

2) I would certainly love that!

...but I was having no luck writing a parser.

 

Another great tutorial Jimbob! You once again excelled in your writing and explanations! :D

 

I've already started making a music video intro instead of Sparky's boring tutorial, however I can't record it as my laptop can't handle screen recorders... If anyone's willing to record the mod for me, I would be very grateful.

 

ship.png it over here. I'll do it right now.

Link to comment
Share on other sites

  • 2 months later...
Fluffy Cupcake

$carposition intro1_carpos # The player’s car is positioned using this. I don’t know where car positions are defined yet.

I have your answer!

q657.png

Link to comment
Share on other sites

Yay! Assuming this allows players/cars to be positioned anywhere on the island, cutscenes will be so much better, so thanks Segatendo!

 

If only there were some tool for editing .WRL files, or at least the positions, more easily... *hint hint*

Link to comment
Share on other sites

Fluffy Cupcake

Yay! Assuming this allows players/cars to be positioned anywhere on the island.

It does. The part that says " (aÚBü2«B]k.Ã " is the location (and some following stuff is rotation), which can be very easily changed through the hex part of it by using the >coordinate tool. ;)

Link to comment
Share on other sites

  • 1 month later...
Fluffy Cupcake

Here is a list of things I've gathered for Scripts. JJ already started leaving comments on a few, though most are mine.

Primary

   PrimaryTokens

Vitals

    $global            #This is like declaring public and private variables in a programming language. Anything specified here is available to the entire script/program.

    $length            #Length of whole scene

    $time              #At what time a part of the scene is played.

    $savepositions     #when new 'talk' mode is in, player might be quite a way from the npc when the script starts, so I guess we should plop them back when finished" - LR2 Dev

    $setactor          #Declares an actor to be in use. PLAYER is always first. I think actors don't show up unless declared, not sure... Have to be careful not to use actors for race cutscenes in explore cutscenes, and vice-versa. After setting an actor, also declair their animation (eg CB_IDLE, for standing still)

    $end               #Used to close off the pre-scene setup, as well as close off the entire script so you can continue playing.

---------------------
Camera Movement

    $cinematic         #Cinematic Camera Type

    $startrelative     #This is explained somewhat in JJ's tutorial. It's the camera's starting position coordinates relative to the actor specified, so the actor's coordinates are (0x, 0y, 0z) for the camera.

    $endrelative       #Same idea as above, but if these values are different then it will pan/zoom between them. Note that while the speed varies according to the $time and distance between both points, it doesn't seem to complete an entire movement to the $endrelative coordinates.

    $shot              #See Shot Tokens for Valid Entires

    $targetoffset      #Changes the (0x, 0y, 0z) coordinates of the camera. So this is changed relative to the actor, and the camera is positioned relative to this.

    $zoom              #Camera Zoom, see Zoom Tokens for Valid entires

---------------------
Camera Effects

    $dontfade          #Don't fade scene out

    $effect            #I'm pretty sure this goes along with the FADE below, it just declares that an effect is to be used in that specific $time segment.

    FADE UP (*or DOWN) #Fades the camera up/down, like in my Paradise City mod.

    SHAKE              #Shakes Camera

---------------------
Positions

    $carposition       #Position of the car. This are set in the WRL.

    $figposition       #Position of the minifigure. This are set in the WRL.

    $trigger           #Multi-use: 1) Which trigger location to use (like where in the world you go to trigger this script) Trigger location is set in the WRL. #2 DELAY or trigger some thing ONCE.

---------------------
Actor

    $actor             #Reference to actors declaired at beginning of script, 0 being first actor mentioned, 1 second actor, etc...

    $animation         #Sets an animation to a character. Any animation file (.BSA) under GAME DATACHARACTERSBODIESMODELS are valid entires.

    $expression        #What expression an actor has. See Expression Tokens for valid entires.

    $motion            #Make actor follow a spline (path), set in WRL.

    $position          #Allows you to change the position of an actor in a $time segment

---------------------
Arguments

    DELAY              #Delays action

    ONCE               #This is unused, need to play around with it. Supposedly it does an action once.

    SHAKE              #Shakes Camera

    NULL               #This is unused, need to play around with it.

    SMOKE              #Presumably creates smoke, untested

--------------------
Dialogue

    $subtitle          #Which icon, as well as which subtitle to display

    $yesno             #Prompts a yes/no choice box.

---------------------
Sound


    $sound             #This plays a sound, but more specifically if the sound is longer than the $time segment it continues to play it to completion after that $time segment. (Again, e.g. my Paradise City mod). I don't know if it loops though should it be shorter than the $time slot.

    $setsound          #Declares that a sound is to be used, and you can give it a custom name

    $sample            #The location of the sound file. Can also be custom.

    $bindto            #'Binds' the sound to a certain actor. Music can be bound to the PLAYER actor. I think this is used for Berg's footsteps.


---------------------
Misc

    $name              #Script Name (only used in story or bonus scenes)

    $story             #Story progression. See Story area for valid entries. This is what checks if you are allowed to proceed in the adventure, this also initiates a race after script is finished.

    $spinner           #Used to make an object spin. Entry is valid only if it exists in the WRL.

    $tracking          #I seem to recall this being used on the Policeman's challenge intro? I think it makes the camera follow the actor if they move. Maybe not.

    $linkto            #Noted usage of putting a minifig in a moving vehicle

    $mobile            #Makes something mobile???

    $dirlight          #Unknown

    $pointlight        #Unknown

    $sparkymenu        #Unknown

    $rendersleep       #Unknown

    $jibber            #Unknown

    $looped            #Unknown

    $nocancel          #This makes it so you can't skip the cutscene.


Valid tokens to be used with some primary tokens.

Story Tokens

    INTRO

    PRE_TOWN_HALL

    TOWN_HALL

    WORKMAN_CHALLENGE

    POSTMAN_CHALLENGE

    FIREMAN_CHALLENGE

    POLICEMAN_CHALLENGE

    NULL

--------------------------------

    Shot Tokens

    FIXED_TARGET

    FIXED_OBJECT

    FIXED_PATH

    OBJECT_STATIC

    OBJECT_OBJECT

    OBJECT_PATH

    PATH_TARGET

    PATH_OBJECT

    PATH_PATH

    NULL

--------------------------------

    Zoom Tokens

    DEFAULT_SIZE

    CUSTOM_SIZE

    VALUE

    ZOOM_IN_HOLD

    ZOOM_IN

    HOLD_ZOOM_OUT

    ZOOM_OUT

    NULL

--------------------------------

   Actor Tokens

    PLAYER

    SPARKY

    BOSS_ALIEN

    BOSS_MECH

    BERG

    ROCKET_RACER

    NULL

--------------------------------

    Expression Tokens

    HAPPY1

    HAPPY2

    SAD1

    SAD2

    ANGRY1

    ANGRY2

    SURPRISED1

    SURPRISED2

    TALK

    TALK_SAD

    NULL

--------------------------------

    Effect Tokens

    UP

    DOWN

    IDLE

    NULL

--------------------------------

NPC Tokens

Sandy Bay

SPARKY

PROF_VOLTAGE

POSTMAN

FIREMAN

DOCTOR

POLICEMAN

NURSE

FISHERMAN

WORKMAN1

WORKMAN2

WORKMAN3

LIGHTHOUSE_KEEPER

BEACH_BABE1

BEACH_BABE2

BEACH_BABE3

BEACH_DUDE

GENERIC_MALE1

GENERIC_MALE2

GENERIC_MALE3

GENERIC_FEMALE1

GENERIC_FEMALE2

GENERIC_FEMALE3

COASTGUARD

FOREMAN


Mars

BB

DOC

VEGA

ALTAIR

RIGEL

SCIENTIST

ANTARIES


Dino Island

SAM_SANISTER

SLYBOOTS

ACHU

MORAT

BUNGO

ALEXIS

MIKE


Arctic

BERG

FROSTY

CHILLY

ROSS

CRYSTAL

COSMO

SCOOTER

ARCTIC_DOC


Xalax

ROCKET_RACER

LIGHTOR

WARRIOR

GHOST

CHILL

DUSTER

FREEZE

SNAKE

NULL

  • Like 4
Link to comment
Share on other sites

  • 1 month later...
Fluffy Cupcake

I updated the primary list with the remains I found in the .exe.
Here is what is new

    $sparkymenu        #Unknown
    $rendersleep       #Unknown
    $nocancel          #I'm aware this was in a script used in JJ's tutorial but I missed it somehow. Anyhow, this makes it so you can't skip the cutscene.
    $jibber            #Unknown
    $looped            #Unknown
    SMOKE              #Presumably creates smoke, untested

By the way, question. Should I put $nocancel under Vitals or Misc?

 


Alright guys, I need to ask you all a question. For my video tutorial series I'm going to make a script from scratch for the scripts tutorial. What should I make a script of?
Link to comment
Share on other sites

  • 1 year later...
Fluffy Cupcake

Well that's interesting, if you replace the highlighted bit here with any other script that doesn't have "$name world_completed" in it, it won't play.

 

Also note that the intro and world complete both share the same ScriptTrigger.

1) How does that work? I haven't seen any if/or check fields to see whether the world is complete or not (hardcode?).

2) How are scripts determined to be automatically triggered (like this and track intros) instead of manually?

 

Scripty_zpstvixjihh.png

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.