GTA VICE CITY - GAME DEVELOPMENT


I have decided to write a coding tutorial to vice city because some of the current tutorials although they are good are a bit out of date because of new tools coming out. I have tried to write this tutorial so easy that a total n00b to coding could understand it, but if you have any problems with it just E-Mail me or PM. I will be using BW Vice City Mission Builder 1.5 in this tutorial.

The Tools.

Just click the tool name to download.

I've uploaded BW's Vice City Mission Builder 1.5 and Steve-m's Player Position onto my site because in this tutorial I will be using the versions on my site and it will be easier to understand using these versions.

BW's Vice City Mission Builder 1.5
Steve-m's Player Position
Vice City (I've used version 1.0)
Notepad Is Sometimes Handy
You Can Download The Latest Version Of BW's Vice City Mission Builder Here

Aim

What I aim to teach you in this tutorial is how to:

Place Pickups (bribes, health etc.)
How To Understand How The Basic Code

Backup

Right now you have downloaded all of the required tools I strongly recommend that you back up the file main.scm if you used the default vice city install directory it will be:

C:\Program Files\Rockstar Games\Grand Theft Auto Vice City\data

look down the list until you find main.scm

if you have installed vice city somewhere different just follow it into the data folder

copy it and paste it into a folder in my documents call this folder what ever you want just remember were it is

Step 2 Pickups

Right so we will start with pickups as you know a pickup is bribes, health etc.

First I will explain each bit of the code.

Open up BW's Vice City Mission Builder.
Then click file, open file and then just look for your main.scm NOT the one that you copied to a different location but the one that is in the vice city install folder.
Wait for it to open it does take a while so don't worry if it looks as if its screwing up its not. It will then give you a report just click ok. Now click edit/find and type in bribe. It should just highlight the word bribe with out scrolling down this is not the one that you want so press F3. It should now scroll down the screen and highlight the word bribe in a different line:

CODE
0213: $8 = create_pickup #BRIBE type 15 at 393.9 -60.2 11.5


this line its a bribe pickup code. Right so now I will explain each of the bits of this code:

CODE
0213:


this bit is called and opcode. Basically a opcode is a name type. 0213: is a unique code name for the bribe pickup. Every thing has got a unique opcode. There should be a full list of opcodes with vice builder.

CODE
$8


this is basically just a name that rockstar has given to that line of code.


CODE
=create_pickup


this is what the code does it is creating pickup.

CODE
#BRIBE


this is what pickup the code is creating it is creating a bribe pickup.

CODE
type 15


this is just if the code makes the pickup free or not I THINK that 15 is free and 1 is not free so:

CODE
type 15


should be a free pickup and

CODE
type 1


should be a buyable pickup.

CODE
at 393.9 -60.2 11.5


is the position in the game

393.9 is the x position in the game
-60.2 is the y position in the game
11.5 is the z position in the game.

Right so that is all of that code explained I hope you understood it?

Now lets put our own bribe pickup in the game ok?

Copy all of the code line and then just add a new line underneath the original code (you can do this by pressing enter but make sure that none of the code is highlighted), then paste your copied code into your newly created space. It should just fill in the line and not add another but it sometimes does if it does just go to the end of your added line and press delete.

Right so now lets edit our code.

You need to leave the opcode as it is because as I said before its unique to pickups and is needed in the game.

CODE
$8 =


this bit we will change as I said before it is the name that rockstar has given to this line of code so lets give our new line of code its own name. Lets call it

CODE
$mybribe1=


ok you need to leave the $ sign in front of the name.

so now our code should look like this

CODE
0213: $mybribe1 = create_pickup #BRIBE type 15 at 393.9 -60.2 11.5


You need to leave

CODE
create_pickup #BRIBE type 15


this bit as it is because if you remember it is telling the game to create a bribe pickup and make it free.

But this bit we will alter

CODE
at 393.9 -60.2 11.5


if you remember this is the position in the game so because we are adding our own pickup we don't want it in the same place as the proper one do we?

No of course not so this is where steve-m's player position comes in handy. Just minimize everything and open up Steve-m's player position and play vice city. I have chosen a position for my bribe I will place it at the top of ocean beach mall near the shotgun.

user posted image

Now the coordinates that Steve-m's player position gives me is 43.257, -947.583, 20.792. So my code would be

CODE
0213: $mybribe1 = create_pickup #BRIBE type 15 at 43.257 -947.583 20.792


Now your own added code should look like mine if you used my coordinates if not then the same but with different coordinates.

Now go to Run-Compile Copy&Run GTA Vice. It will take a while but be patient it will give you some sort of error message I cant remember it exactly but its something to do with something not matching and you have to change some thing just change it so that all of the something's must match.

Remember to start a new game. You have to start a new game after every bit of editing in the main.scm file.

user posted image

As you can see it isn't quite right so we will raise our position by 1 on the z axis so our new code will be

CODE
0213: $mybribe1 = create_pickup #BRIBE type 15 at 43.257 -947.583 21.792


Which as you can see is wrong:

user posted image

So we will try adding 0.5 onto our original code so our new code will be

CODE
0213: $mybribe1 = create_pickup #BRIBE type 15 at 43.257 -947.583 21.292


Which as you can see is right:


user posted image

That's it for this tutorial I have covered what I said I would I may write more later if I get bored.

Please don't flame me for this I know some bits are crap and there is likely spelling mistakes I have admitted that so please no flaming.

Since writing this i have wrote two more tutorials one on VC Coding and two on SA Coding. Here are links to them all.

YeTi's VC Coding Tutorial Part Two

YeTi's SA Coding Tutorial Part One

YeTi's SA Coding Tutorial Part Two

YeTi
Previous
Next Post »