Quantcast

Jump to content

» «
Photo

YeTi's Coding Tutorial Part One

16 replies to this topic
YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#1

Posted 28 April 2005 - 04:38 AM Edited by YeTi, 06 September 2005 - 04:01 PM.

YeTi's n00b Vice City Coding Tutorial

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

Andrew
  • Andrew

  • Andolini Mafia Family
  • Joined: 21 Jul 2003
  • None

#2

Posted 28 April 2005 - 10:10 PM

Nice tutorial man, approved and added to the tutorial forum.

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#3

Posted 28 April 2005 - 11:35 PM

Thanks man i kind of screwed up when i was posting because i wasnt sure that i had got it right i was clicking preview post but i got it wrong and clicked post by accident suicidal.gif . Anyway this was a wrong one i've just edited it and made it right, ie all the links right and the image right.

Andrew
  • Andrew

  • Andolini Mafia Family
  • Joined: 21 Jul 2003
  • None

#4

Posted 29 April 2005 - 04:19 PM

Ah that might explain it then.. As you can guess this forum has New Top moderation, on. So I have to approve each topic.

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#5

Posted 29 April 2005 - 04:24 PM

Just to clarify can you see the images because on other forums people are saying they cant see images i post i think its my host?

mickarrow
  • mickarrow

    ---

  • Members
  • Joined: 04 Feb 2004

#6

Posted 29 April 2005 - 05:26 PM

confused.gif nope, can't see them.

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#7

Posted 29 April 2005 - 05:47 PM Edited by YeTi, 30 April 2005 - 04:55 AM.

Sh*t ok ill add them to a imagehost tommorow i haven't got time today.


EDIT: ive uploaded the images to a imagehost can you see them now?

Andrew
  • Andrew

  • Andolini Mafia Family
  • Joined: 21 Jul 2003
  • None

#8

Posted 30 April 2005 - 08:45 PM

Yeah I can see the images just fine.

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#9

Posted 30 April 2005 - 11:16 PM

Oh good i was thinking i might have to upload them to some were else.

Vercetti Gangsta
  • Vercetti Gangsta

    Li'l G Loc

  • Members
  • Joined: 12 Jan 2004

#10

Posted 01 May 2005 - 03:02 PM

As i said on the other forums.
Yeti, this Tutorial rocks wink.gif It also learned me the basics smile.gif
And it also says that i'm a noob in my profile biggrin.gif
Anyway, very good tutorial!

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#11

Posted 01 May 2005 - 03:28 PM

Thanks vg i love praise tounge.gif

Urban Legend
  • Urban Legend

    No, f*ck no.

  • BUSTED!
  • Joined: 04 Jan 2005
  • None

#12

Posted 01 May 2005 - 09:19 PM Edited by Urban Legend, 01 May 2005 - 09:27 PM.

Nice tutorial smile.gif

-----
EDIT: Please make one that shows you how to put cars in certain areas wink.gif

timmy2004
  • timmy2004

    Gangsta

  • Members
  • Joined: 05 Aug 2004

#13

Posted 01 May 2005 - 11:41 PM

Wow, cool tutorial.

YeTi
  • YeTi

    S'up Bitches?

  • Andolini Mafia Family
  • Joined: 28 Mar 2005

#14

Posted 02 May 2005 - 02:25 AM

Thanks i love praise biggrin.gif . Also @Urban Legand i was planning on making another section telling you how to do that i wrote this mainly to explain how a simple code works. I'll start writing section two now i wont be able to post until at least tuesday though.

yoPhilly528
  • yoPhilly528

    Player Hater

  • Members
  • Joined: 27 Feb 2008

#15

Posted 06 March 2008 - 10:09 PM Edited by yoPhilly528, 06 March 2008 - 10:13 PM.

I cant download the tools ... my downloader says that the files don't exist. where do i download them?

Stormydayz
  • Stormydayz

    Player Hater

  • Members
  • Joined: 20 Jan 2009

#16

Posted 25 March 2009 - 12:34 PM

Very nice tutorial.

Wikus
  • Wikus

    GTA Tales of Vice city leader and GTA Virus Alert texturer

  • Members
  • Joined: 07 Oct 2009

#17

Posted 17 November 2009 - 05:12 PM

Thanks for tutorail its really good.
But your programs dont work




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users