Quantcast

Jump to content

» «
Photo

Creating cut-scenes in GTA-VC??

9 replies to this topic
digita1mind
  • digita1mind

    Player Hater

  • Members
  • Joined: 13 Jun 2005

#1

Posted 13 June 2005 - 01:41 PM

Does anybody have references or tutorials on how to create cut-scenes in GTA-Vice City? whatsthat.gif

Has anyone attempted to create cut-scenes? Where would I be able to learn more about this process, because there are some really interesting Machinima possibilities here. What's the best program to use?

A well choreographed car chase, similiar to "Gone in 60 Seconds" would be very cool in Vice City! Thanks. biggrin.gif

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#2

Posted 13 June 2005 - 02:17 PM

its more or less the ultimate thing to do, and to my knowledge hasnt been done yet. btw, your topic-title as it reads right now implies you've done it, im gonna change that real quick..

ceedj
  • ceedj

    PEDS Creator

  • Feroci Racing
  • Joined: 21 May 2005

#3

Posted 13 June 2005 - 02:58 PM Edited by ceedj, 13 June 2005 - 03:04 PM.

Actually, a car chase wouldn't be that hard to do. You would need to:

Create an driver for the car
Create the car
Create a car for the player to drive
Command the actor to enter the car and follow.

This would need be to done in a modified scm and also using Racer_S' CamHack. The problem you MIGHT run into is deciding where to set the camera, since you'll need to see your player and getting into the car to start the scene. Straightaways would be easier than corners, for obvious reasons. Make a lot of quick cuts and WHAMMO! Car chase!

I may do a small film to show you what I mean...

EDIT: I wonder if there is a way to override the "follow" posistion of the camera on the car when you are driving. It would be handy to have a different starting posistion, say at the front of the car. Although driving forwards backwards can be fun. wink.gif

Y_Less
  • Y_Less

    629

  • Members
  • Joined: 14 Mar 2004

#4

Posted 13 June 2005 - 04:12 PM

You can set exactly where the camera is and where it points for a static camera in SCM. Or you could have it follow another invisible object which is somewhere near your car (an old trick from Half Life).

Y_Less
  • Y_Less

    629

  • Members
  • Joined: 14 Mar 2004

#5

Posted 13 June 2005 - 04:13 PM

You can set exactly where the camera is and where it points for a static camera in SCM. Or you could have it follow another invisible object which is somewhere near your car (an old trick from Half Life).

ceedj
  • ceedj

    PEDS Creator

  • Feroci Racing
  • Joined: 21 May 2005

#6

Posted 13 June 2005 - 04:25 PM

QUOTE (Y_Less @ Jun 13 2005, 16:13)
You can set exactly where the camera is and where it points for a static camera in SCM. Or you could have it follow another invisible object which is somewhere near your car (an old trick from Half Life).

Sure, but that would defeat the purpose of the CamHack, wouldn't it?

Not sure about the car/camera thing. I'll have to check it later (no gamepad at work, sadly). I hope I'm not confusing VC with SA... blink.gif

digita1mind
  • digita1mind

    Player Hater

  • Members
  • Joined: 13 Jun 2005

#7

Posted 14 June 2005 - 12:05 AM

Thanks for the tips everyone!

I'm a bit new to scripting and map editing for VC, so I don't quite know whats available in the modding community for tools and other editing resources. I've just downloaded "MooMapper" and "BW's Vice Mission Builder v0.22" for VC and have been trying to find some online tutorials to get me started.

I was able to do a bit of research on the "Racer_S" camhack, but I haven't tried playing around with it yet. It seems like a cool utility for generating cinematic camera angles.

I've also opened the 'main.scm' in the '/data' directory of VC, but really don't have an idea of the code I'm looking at. I guess I'll have to study it more and download examples to perform the trial and error.

Ceedj, would you be able to make up a quick tutorial, or even a modded script that I could learn from. I have some awesome ideas for a cut-scene, but really don't know how to begin. Thanks again for your feedback.

I hope to hear from you soon. I'll be up for a good portion of the night, so feel free to respond. Thanks.

Phil
[email protected]





ceedj
  • ceedj

    PEDS Creator

  • Feroci Racing
  • Joined: 21 May 2005

#8

Posted 14 June 2005 - 03:27 PM

Hi Phil,

Here's a small smattering of code for a chase vid I'm working on right now.

Firstly, get Bartons ViceBuilder 1.3 or better. Hard to find, but it's out there.

Secondly, study, study, STUDY! Study how the differnt parts of the scm work. I can't count the number of things I've learned just by reading the original code.

Here's a couple of small examples:

Variables are very VERY tricky, if you don't know how to use them right. Case in point, last night I was trying to get the game to store a car color value. In my script, I use $CarSelect to temporarily store the model of the car as part of the selection routine. When the car is created, I use a local variable (since I'm dumping it's charateristics in the same thread anyway) so it turns out to be 4@ = create_car blah blah blah. My problem was using $CarSelect in this code:

get_car $CarSelect colors 6@ 7@

when I should have been using

get_car 4@ colors 6@ 7@.

Another small example: make sure when definining variables that you use the PROPER OPCODE. The FINDOPC text file that comes with the mission builder is invaluable, as it has a ton of simple little opcodes like 0@ = 5 and $90 = 45.0 , etc. The point is, make sure you use the right opcode. I can't count the number of crashes I've had from using a integer opcode when I should have been using a float. Same with the +=, -+, etc. USE THE PROPER OPCODE.

The only reason I'm saying this is because I don't use the builder in the traditional way - just type the argument and data. I don't know, I just feel more comfortable doing it by hand (so to speak, like I code most web pages), knowing that if something screws up, it's probably something in my code. I think if you just put in the arguments, the builder will sort it out; it's just easier for me to track down bugs (the car colors one was a NASTY one).

Anyway, with all that said, this little mod doesn't use the CamHack (although I plan to use it for shorter, closeup shots); it uses the in game cinematic camera. To use it, once you have it installed (see below), use the following keys:

Press PREV WEAP + Sprint to create a ped. Press NEXT/PREV WEAP to browse the peds, press ACTION to choose. (NEXT WEAP + SPRINT to delete)

Press PREV WEAP + Crouch to create car #1 (your car). Use the same process as above. To get a specific color, bounce back between NEXT and PREV WEAP until you find the color you want, then press ACTION to choose. (NEXT WEAP + CROUCH to delete)

Press PREV WEAP + FIRE to create car #2 (the peds car). Again, same as above. Both cars will have immunities set (bulletproof, fireproof, damageproof, etc), HOWEVER, the car can still be rolled, and if it winds up upsidedown, it will still explode. (NEXT WEAP + FIRE to delete)

Press NEXT WEAP + ACTION to delete EVERYTHING. You'll have to start over. Handy if you've parked a couple of cars up a tree and they won't blow up.

Press PREV WEAP + FORWARD (usually arrow key up) to freeze the game clock. Press PREV WEAP + BACKWARD (usually arrow key down) to unfreeze. Helpful in getting mulitple takes without dealing with a natural time flowing lighting shift.

Press PREV WEAP + CAMERA to change the weather. Press again to scroll through. I recommend using this with the clock freeze, otherwise the weather will reset to normal after a short time.

Anyway, here's the code:
CODE

; First, add these lines near the beginning of the script (find the rest of the create threads, add this below)
004F: create_thread ££FreezeOn
004F: create_thread ££SetWeather
004F: create_thread ££Create1PedWait

;Then, add this code BEFORE MISSION 0 (if you are using a stripped scm, which you should)

:FreezeOn
0001: wait 250 ms
00D6: if 1
00E1: key_pressed 0 7
00E1: key_pressed 0 8
004D: jump_if_false ££FreezeOn
00BF: 1@ = current_time_hours, 2@ = current_time_minutes

:FreezeOff
0001: wait 900 ms
00C0: set_current_time 1@ 2@
01B5: force_weather $WeatherSelect
00D6: if 1
00E1: key_pressed 0 7
00E1: key_pressed 0 9
004D: jump_if_false ££FreezeOff
01B6: set_weather $WeatherSelect
0002: jump ££FreezeOn

:SetWeather
0001: wait 0 ms
0004: $WeatherSelect = 0

:SetWeatherWait
0001: wait 0 ms
00D6: if 1
00E1: key_pressed 0 7
00E1: key_pressed 0 13
004D: jump_if_false ££SetWeatherWait
0001: wsit 250 ms
0008: $WeatherSelect += 1
00D6: if 0
0038: $WeatherSelect == 6
004D: jump_if_false ££ChooseWeather
0038: $WeatherSelect == 0

:ChooseWeather
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££ChooseWeather
0169: set_fade_color 5 5 5
016A: fade 0 () 500 ms
0001: wait 1500 ms
01B6: set_weather $WeatherSelect
016A: fade 1 (back) 500 ms
0002: jump ££SetWeatherWait

:Create1PedWait
0001: wait 0 ms
00D6: if 1
00E1: key_pressed 0 7
00E1: key_pressed 0 19
004D: jump_if_false ££Delete1PedWait      
0050: gosub ££Old1PedCleanup
0050: gosub ££Pick1Ped

:Delete1PedWait
00D6: if 1
00E1: key_pressed 0 5
00E1: key_pressed 0 19
004D: jump_if_false ££CreateCarWait
0050: gosub ££Old1PedCleanup

:CreateCarWait
0001: wait 0 ms
00D6: if 1
00E1: key_pressed 0 7
00E1: key_pressed 0 18
004D: jump_if_false ££DeleteCarWait
0050: gosub ££OldCarCleanup
0050: gosub ££PickCar

:DeleteCarWait
00D6: if 1
00E1: key_pressed 0 5
00E1: key_pressed 0 18
004D: jump_if_false ££CreateCar2Wait
0050: gosub ££OldCarCleanup

:CreateCar2Wait
0001: wait 0 ms
00D6: if 1
00E1: key_pressed 0 7
00E1: key_pressed 0 17
004D: jump_if_false ££DeleteCar2Wait
0050: gosub ££OldCar2Cleanup
0050: gosub ££PickCar2

:DeleteCar2Wait
00D6: if 1
00E1: key_pressed 0 5
00E1: key_pressed 0 17
004D: jump_if_false ££KillAllWait
0050: gosub ££OldCar2Cleanup

:KillAllWait
0001: wait 0 ms
00D6: if 1
00E1: key_pressed 0 4
00E1: key_pressed 0 5
004D: jump_if_false ££Grp1Anim
0050: gosub ££KillAllCleanup
0002: jump ££Create1PedWait

:Old1PedCleanup
034F: destroy_actor_with_fade $Grp1Ped1
0051: return

:OldCarCleanup
00A6: destroy_car 4@
0051: return

:OldCar2Cleanup
00A6: destroy_car 5@
0051: return

:KillAllCleanup
034F: destroy_actor_with_fade $Grp1Ped1
00A6: destroy_car 4@
00A6: destroy_car 5@
0051: return

:Pick1Ped
0001: wait 250 ms
0050: gosub ££ThePeds
0050: gosub ££CreateCoordPed
009A: $Grp1Ped1 = create_actor 4 $PedSelect at $Fish $Sock $CatFood
020F: set_actor $Grp1Ped1 look_at_player $PLAYER_CHAR
0249: release_model $PedSelect
0051: return

:PickCar
0050: gosub ££TheCars
0050: gosub ££CreateCoordCar
00A5:  4@ = create_car $CarSelect at  1@  2@  3@
0175: set_car  4@ z_angle_to 315
0229: set_car 4@ color_to 6@ 7@
0249: release_model $CarSelect
01C3: remove_references_to_car  4@;; Like turning a car into any random car
02AC: set_car 4@ immunities 1 1 1 1 1
0001: wait  400 ms
0051: return

:PickCar2
0050: gosub ££TheCars
0050: gosub ££CreateCoordCar
00A5:  5@ = create_car $CarSelect at  1@  2@  3@
0175: set_car  5@ z_angle_to 315
0229: set_car 5@ color_to 6@ 7@
0249: release_model $CarSelect
01C3: remove_references_to_car  5@;; Like turning a car into any random car
02AC: set_car 5@ immunities 1 1 1 1 1
0001: wait  400 ms
0051: return

:ThePeds
0004: $PedSelect = 1
0002: jump ££ShowPed

:PedSelectForward
0001: wait 0 ms
00D6: if 0
00E1: key_pressed 0 5
004D: jump_if_false ££PedSelectBack
0002: jump ££NSevenCheck

:PedSelectBack
0001: wait 0 ms
00D6: if 0
00E1: key_pressed 0 7
004D: jump_if_false ££PedSelect
0002: jump ££PSevenCheck

:PedSelect
0001: wait 0 ms
00D6: if 0
00E1: key_pressed 0 4
004D: jump_if_false ££PedSelectForward
009b: destroy_actor $Tmp1Ped
0051: return

:NSevenCheck
00D6: if 0
0038: $PedSelect == 6
004D: jump_if_false ££NPed
0008: $PedSelect += 2

:NPed
0008: $PedSelect += 1
00D6: if 0
0038: $PedSelect == 107
004D: jump_if_false ££ShowPed
0004: $PedSelect = 1
0002: jump ££ShowPed

:PSevenCheck
00D6: if 0
0038: $PedSelect == 9
004D: jump_if_false ££PPed
000C: $PedSelect -= 2

:PPed
000C: $PedSelect -= 1
00D6: if 0
0038: $PedSelect == 0
004D: jump_if_false ££ShowPed
0004: $PedSelect = 106
0002: jump ££ShowPed

:ShowPed
0001: wait 250 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££ShowPed
04C4: create_coordinate $Fish $Sock $CatFood from_actor $PLAYER_ACTOR offset 0.0 2.0 0.0
0247: request_model $PedSelect
038B: load_requested_models

:ShowPed2
00D6: if 0
0248: model  $PedSelect available
004D: jump_if_false ££ShowPed2
009b: destroy_actor $Tmp1Ped
009A: $Tmp1Ped = create_actor 4 $PedSelect at $Fish $Sock $CatFood
020F: set_actor $Tmp1Ped look_at_player $PLAYER_CHAR
0001: wait 250 ms
0249: release_model $PedSelect
0002: jump ££PedSelectForward

:CreateCoordPed
0001: wait 250 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££CreateCoordPed
04C4: create_coordinate $Fish $Sock $CatFood from_actor $PLAYER_ACTOR offset 0.0 2.0 0.0
0247: request_model $PedSelect
038B: load_requested_models

:CreatePed
00D6: if 0
0248: model  $PedSelect available
004D: jump_if_false ££CreatePed
0051: return

:TheCars
0004: $CarSelect = 130
0002: jump ££ShakeItUp

:CarSelectForward
0001: wait 0 ms
00D6: if 0
00E1: key_pressed 0 5
004D: jump_if_false ££CarSelectBack
0002: jump ££N180Check

:CarSelectBack
0001: wait 0 ms
00D6: if 0
00E1: key_pressed 0 7
004D: jump_if_false ££CarSelect
0002: jump ££P180Check

:CarSelect
0001: wait 0 ms
00D6: if 0
00E1: key_pressed 0 4
004D: jump_if_false ££CarSelectForward
03F3: get_car 9@ color 6@ 7@
00A6: destroy_car 9@
0051: return

:N180Check
00D6: if 0
0038: $CarSelect == 179
004D: jump_if_false ££NCar
0008: $CarSelect += 5

:NCar
0008: $CarSelect += 1
00D6: if 0
0038: $CarSelect == 237
004D: jump_if_false ££ShakeItUp
0004: $CarSelect = 130
0002: jump ££ShakeItUp

:P180Check
00D6: if 0
0038: $CarSelect == 185
004D: jump_if_false ££PCar
000C: $CarSelect -= 5

:PCar
000C: $CarSelect -= 1
00D6: if 0
0038: $CarSelect == 129
004D: jump_if_false ££ShakeItUp
0004: $CarSelect = 236
0002: jump ££ShakeItUp

:ShakeItUp
0001: wait  250 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££ShakeItUp
00D6: if  0
80E0:   NOT   player $PLAYER_CHAR driving
004D: jump_if_false ££ShakeItUp
0172:  0@ = actor $PLAYER_ACTOR z_angle
04C4: create_coordinate  1@  2@  3@ from_actor $PLAYER_ACTOR offset  0.0  4.0  0.0
0247: request_model $CarSelect
038B: load_requested_models

:JustWhatINeeded
0001: wait  250 ms
00D6: if  0
0248:   model $CarSelect available
004D: jump_if_false ££JustWhatINeeded
00A6: destroy_car 9@
00A5:  9@ = create_car $CarSelect at  1@  2@  3@
0175: set_car  9@ z_angle_to 315
0249: release_model $CarSelect
01C3: remove_references_to_car  9@;; Like turning a car into any random car
0001: wait  400 ms
0002: jump ££CarSelectForward

:CreateCoordCar
0001: wait  250 ms
00D6: if  0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false ££CreateCoordCar              
00D6: if  0
80E0:   NOT   player $PLAYER_CHAR driving
004D: jump_if_false ££CreateCoordCar
0172:  0@ = actor $PLAYER_ACTOR z_angle
04C4: create_coordinate  1@  2@  3@ from_actor $PLAYER_ACTOR offset  0.0  4.0  0.0
0247: request_model $CarSelect
038B: load_requested_models

:CreateCar
00D6: if 0
0248: model  $CarSelectavailable
004D: jump_if_false ££CreateCar
0051: return

:Grp1Anim
0001: wait 50 ms
00D6: if 1
00E1: key_pressed 0 16; Sprint
00E1: key_pressed 0 6 ; Aim
004D: jump_if_false ££Grp1Anim2
034F: destroy_actor_with_fade $Grp1Ped1
0129: 10@ = create_actor 4 $PedSelect in_car  5@ driverseat
00AE: unknown_set_car 5@ to_ignore_traffic_lights 2
00AD: set_car 5@ max_speed_to 50.0
00A8: set_car 5@ to_psycho_driver
00AF: set_car 5@ driver_behaviour_to 4

:Grp1Anim2
0001: wait 50 ms
00D6: if 1
00E1: key_pressed 0 16 ;Sprint
00E1: key_pressed 0 15 ;Enter/Exit
004D: jump_if_false ££Grp1Anim3
011C: actor $Grp1Ped1 clear_objective
0372: set_actor $Grp1Ped1 anim 10 wait_state_time 5000 ms    

:Grp1Anim3
0001: wait 50 ms
00D6: if 1
00E1: key_pressed 0 16 ;Sprint
00E1: key_pressed 0 18 ;Crouch
004D: jump_if_false ££Create1PedWait
0372: set_actor_wait_state $Grp1Ped1 08 2000 ms
0002: jump ££Grp1Anim


I haven't gotten a concrete answer on distributing a modded stripped scm (since the stripped file came from Barton's editor). However, if some of the bigwigs around here say that it's ok, then I'll post the modified main.scm here as well.

Anyway, create your cars and your ped. Press SPRINT + AIM to put the ped in the car. Get in your car and the ped will follow! Use the CAMERA button to switch views to the Cinematic Camera. It may be tricky driving, but you get some AWESOME shots doing it this way. Use FRAPS to record to your HD. By using the clock freeze, you can take as long as you want to get the shots right!

MINOR BUGS:
DON'T USE A KEYPRESS FOR AN ANIMATION (car follow, etc) IF THE OBJECT/ACTOR DOES NOT EXSIST. IF YOU DO, THE GAME WILL CRASH. You have been warned.

Ped Car: Will sometimes get "lost." Try going back a bit to find it; if it doesn't show up, wait a few minutes. Still not there? Create another ped and car.

Player Car: Be carefull using the PREV/NEXT WEAP keys to look left, right and behind on a normal camera. Pressing fire while pressing these keys will probably kill the peds car, but might also crash the game. If you use the cinematic camera, this shouldn't be an issue.

Weather: If you want rain, wait until the clock hits the time of day you want, then change the weather. The first or second selection should be rain; FREEZE the clock! Or the rain will go away after a time (this has been tested - I made it rain for two game days straight!)

I think that's all. Try it an post back with your results!

rah.gif

digita1mind
  • digita1mind

    Player Hater

  • Members
  • Joined: 13 Jun 2005

#9

Posted 15 June 2005 - 12:11 AM

rah.gif Thanks so much for all the information. This code should definitely get me going in the right direction.

Unfortunately, it's about 7:00pm CST, and I need to study a few hours for my final exam I'm taking tomorrow night. I'm currently taking marketing management for my Masters degree at DeVry Keller.

If I have some time later this evening, I'll dump your code into Mission Builder and play around with it a bit. I get the sense that you really now how to script in this game. biggrin.gif One of my ideas was to use the REPLAY feature, enabling me to drive according to the normal game camera, and then replay everything with the modded or custom cameras.

I watched "Gone in 60 Seconds" last night and am itching to re-create an awesome car chase all throughout Vice City! If you'd like, send me your email address so I can respond more consistantly while I'm at work and at home. Thanks again; You've been an awesome resource! cool.gif

Stay tuned as further results become available. rahkstar2.gif

ceedj
  • ceedj

    PEDS Creator

  • Feroci Racing
  • Joined: 21 May 2005

#10

Posted 15 June 2005 - 02:49 PM

QUOTE (digita1mind @ Jun 15 2005, 00:11)
I get the sense that you really now how to script in this game.

I am but a speck of dirt on the GTA modding landscape. Seriously, I know what to script to suit my own needs. I'm sure it could be cleaned up, but it works for me!

BTW, use LOOK BEHIND instead of SPRINT with PRE WEAP to create Peds. I forgot I changed that to aviod interference with driving. suicidal.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users