Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

YeTi

YeTi's Coding Tutorial Part One

Recommended Posts

YeTi

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:

 

 

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:

 

 

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.

 

 

$8

 

 

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

 

 

 

=create_pickup

 

 

this is what the code does it is creating pickup.

 

 

#BRIBE

 

 

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

 

 

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:

 

 

type 15

 

 

should be a free pickup and

 

 

type 1

 

 

should be a buyable pickup.

 

 

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.

 

 

$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

 

 

$mybribe1=

 

 

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

 

so now our code should look like this

 

 

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

 

 

You need to leave

 

 

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

 

 

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

 

 

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

 

 

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

 

 

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

Edited by YeTi

Share this post


Link to post
Share on other sites
Andrew

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

Share this post


Link to post
Share on other sites
YeTi

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.

Share this post


Link to post
Share on other sites
Andrew

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

Share this post


Link to post
Share on other sites
YeTi

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?

Share this post


Link to post
Share on other sites
mickarrow

 

confused.gif nope, can't see them.

Share this post


Link to post
Share on other sites
YeTi

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?

Edited by YeTi

Share this post


Link to post
Share on other sites
Andrew

Yeah I can see the images just fine.

Share this post


Link to post
Share on other sites
YeTi

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

Share this post


Link to post
Share on other sites
Vercetti Gangsta

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!

Share this post


Link to post
Share on other sites
YeTi

Thanks vg i love praise tounge.gif

Share this post


Link to post
Share on other sites
Urban Legend

Nice tutorial smile.gif

 

-----

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

Edited by Urban Legend

Share this post


Link to post
Share on other sites
timmy2004
Wow, cool tutorial.

Share this post


Link to post
Share on other sites
YeTi

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.

Share this post


Link to post
Share on other sites
yoPhilly528

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

Edited by yoPhilly528

Share this post


Link to post
Share on other sites
Stormydayz

Very nice tutorial.

Share this post


Link to post
Share on other sites
Wikus

Thanks for tutorail its really good.

But your programs dont work

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.