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. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    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 IV 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 SA Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA III 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

Please be aware that this is not a tutorial request forum! Use the appropriate topic for the effect.
timmy2004

littleguna's Coding Tutorial

Recommended Posts

timmy2004

Welcome to my Vice City coding tutorial for beginners!

 

Tutorial 1

 

Ok, this tutorial is strictly for beginners. Before we start I hope that you have BW’s Mission builder Version 1.3 (MUST BE VERSION 1.3!!!!!!!!!!!!!!) (u will need it to code vice city).

 

In this tutorial I will show u how to place cars, health, weapons, and show you how to change the starting position of the player, etc. In the next tutorial (tutorial 2) these things will be explained more and you will learn how to place money, actors and markers. And by the end of it, you will know how to make a car spawn by pressing a button and a simple bodyguard mod.

 

Lesson one: Weapons

Ok, in BW’s mission builder, open up the file called main.scm in the vice city data folder

Then goto search, and search for this line:

 

 

 

032B: $471 = create_weapon_pickup #COLT45 

 

 

 

 

as u can see, there are a whole lot of:

 

 

create_weapon_pickup

 

 

 

 

things, this is where all the weapons are placed in the game. But before u create your own weapon you must understand the code:

 

 

 

032B: $471 = create_weapon_pickup #COLT45  15 ammo  34 at -228.4 -1318.2  9.1

 

 

 

 

-the ‘032B’ part is called the opcode (this can be ignored at the moment)

-the ‘$471’ is what rockstar games decided to name this particular weapon (every thing that u create must have a name)

-the ‘create_weapon_pickup’ is what the code is telling the game to do

-the ‘#COLT45’ is the weapon that it is creating

-the ‘15’ is the type (this can be ignored at the moment)

-the ‘ammo 34’ is how much ammo the weapon has

-the ‘at -228.4 -1318.2 9.1’ are the coordinates that you want the weapon to be created

 

so to create your own weapon copy that piece of code that I just showed you and paste it under it’s self so that you have two of the same codes, you will soon modify this and make your own weapon.

 

-Ok, first of all give your new weapon a different name, like ‘$myweapon’ instead of ‘$471’

-Then change the ‘#COLT45’ part to another weapon that you like, e.g. ‘#UZI’. Here are some names of weapons that u can choose:

#UZI

#COLT45

#M60

#M4

#GRENADE

#TEC9

#SNIPER

there are just some of the weapons, (but don’t choose any melee weapon because they use a different opcode).

-Then change the ‘ammo 34’ part to whatever u want, like ‘ammo 999’

-Then change the coordinate part of the code to a coordinate of your choice. I have chosen: ‘at 402.428 -465.688 9.918’ (outside the Washington beach police station)

-If you want to get coordinates then download a coordinate reader, like ‘Player Pos’

 

So I ended up with a piece of code that looks like this:

 

 

 

032B: $myweapon = create_weapon_pickup #UZI  15 ammo  999 at  402.428 -465.688 9.918

 

 

 

 

you can now test it by going to: ‘Copy, Compile, Run GTA Vice’

BUT YOU MUST START A NEW GAME!!!!!!!!!!!!!!

 

It should work!

 

 

 

Lesson two: Pickups (health)

 

I hope u still have mission builder open.

Ok, search for the line:

 

 

 

0213: $495 = create_pickup -86

 

 

 

 

(you should see heaps of these lines)

the one u just searched for should look like this:

 

 

 

0213: $495 = create_pickup -86 (HEALTH) type  15 at -113.2 -975.7  10.4

 

 

 

 

as u can see it is much similar to the weapon placing we did in lesson one.

It has an opcode, a name, the thing that tells the game what to do, the pickup that we are placing, a type (type 1 is buyable health and type 15 is free (I think)), and the coordinates. I don’t think I need to explain in further detail.

 

So copy that line and paste it under its self

 

So just like before, change the name to whatever u want

then change the coordinates to whatever u want, I have chosen 206.666 -491.721 11.351 (outside the hardware store near the police station)

 

so now my code should look like this:

 

 

 

0213: $mypickup = create_pickup -86 (BRIBE) type  15 at  206.666 -491.721 11.351

 

 

 

 

Copy compile run

Start new game!

 

 

 

Lesson three: Cars

 

Cars are a bit more tricky (some parts of this I don’t even know what they are) , but you should be able to do it if you stick to this tutorial. But if at any time you get lost, just skip to the next lesson

 

Search for this line:

 

 

 

014B: $457 = init_parked_car_generator #ADMIRAL

 

 

the whole line should look like this:

 

 

 

014B: $457 = init_parked_car_generator #ADMIRAL  8  8  0 alarm  50 door_lock  0  0  10000 at -401.2715 -534.6655  11.7534 angle  149.2032

 

 

 

 

and it will have this line underneath it:

 

 

 

014C: set_parked_car_generator $457 cars_to_generate_to 101

 

 

 

lets take a look at this code:

 

 

 

014B: $457 = init_parked_car_generator #ADMIRAL  8  8  0 alarm  50 door_lock  0  0  10000 at -401.2715 -534.6655  11.7534 angle  149.2032014C: set_parked_car_generator $457 cars_to_generate_to  101

 

 

 

 

it is a little similar to the other things we have been doing; it has an opcode, a name, a piece of code that tells the game what to do (init_parked_car_generator), it has what car we are creating (in this case it is an admiral), the ‘8 8’ is the color, I’m not sure what the ‘0’ before the alarm is, it also says ‘alarm 50’ this means that there is 50% chance that the alarm is on and ‘door_lock 0’ this means that there is 0% chance of a locked door, I don’t know what the other ‘0’ is for, but I think the 10000 is the cars health, and obviously the ‘at -401.2715 -534.6655 11.7534 angle 149.2032’ is the coordinates and the angle (angle 0 is facing north and angle 180 is facing south, it goes all the way up to angle 360).

 

The line after it, is a line that tells the car to acutely appear, it has an opcode, code that tells the game what to do (set_parked_car_generator), the $457 is the name of the car that you want to appear (101 is always appear and 0 is never appearing)

 

So to create your own car copy those lines and paste them underneath the ones you just copied. Then you need to edit the following to your standards:

 

You can edit the $457 to name that you want like; $car. Then you can change ‘#ADMIRAL’ to a much better car, here are some:

#banshee

#hotring

#PCJ600

#POLICE

Then you can change the 8 8 to another color, just choose 0 0 (it means random color). Change the door lock and alarm to 0 and 0 (so that we can actually get in the car). Leave the other zero alone and leave the 10000 alone too. Change the coordinates to what ever you want and change the angle to what ever you want. I have chosen;

 

With the next line, just change the $457 to what ever you called the car. But leave the rest

 

So my code should look like this

 

 

 

014B: $car = init_parked_car_generator #PCJ600  0  0  0 alarm  0 door_lock  0  0  10000 at -401.2715 -534.6655  11.7534 angle  149.2032014C: set_parked_car_generator $car cars_to_generate_to  101

 

 

 

 

copy, compile, run

and start a new game

 

 

 

Lesson 4: Changing the players starting position, (this is easy)

 

Search for this line:

 

 

 

0053: $PLAYER_CHAR = create_player #NULL at

 

 

 

 

This line creates the player; it should be near the top.

The coordinintas after it tell the player where to start the game. I have chosen; -369.9 -537.1 18.3 (near the hard ware store, next to the health that we placed earlier)

 

Compile copy run (like always)

 

That’s it just start a new game

 

This is the end of tutorial 1

 

For questions or comments me email me at: [email protected]

 

Share this post


Link to post
Share on other sites
RCagent

Thanks man! You probably saved me, and probably others from creating numerous topics about how to change the players spawn point ect.

Share this post


Link to post
Share on other sites
timmy2004
Thanks man! You probably saved me, and probably others from creating numerous topics about how to change the players spawn point ect.

thats ok, np, i might post more s*** like this later smile.gif

Share this post


Link to post
Share on other sites
aad

LOL this is really an tutorial for noobs biggrin.gif

but it may help some people

maybe you should make another one of creating actors and stuff. biggrin.gif

i dont need an tutorial tounge.giftounge.giftounge.gif

Just joking good work litleguna

 

Share this post


Link to post
Share on other sites
timmy2004
LOL this is really an tutorial for noobs biggrin.gif

but it may help some people

maybe you should make another one of creating actors and stuff. biggrin.gif

i dont need an tutorial tounge.giftounge.giftounge.gif

Just joking good work litleguna

thanks aad, i might post my second tutorial here soon

 

@gansta killer: can u please add this to your tutorial archive?

Share this post


Link to post
Share on other sites
what_a_beast

where can i get

BW’s Mission builder Version 1.3

thanx 4 any help

Share this post


Link to post
Share on other sites
timmy2004
Hi, ive been working on a prog with tuturials on how to mod San Andreas. If I get some good comments, I will add how to do everything under "Things to do in san andreas" in the program.

 

Please download and tell me what you think!

 

http://www.geocities.com/bmxer81182004/SANANDREASSECRETS.zip

It doesn't work, even when you right click and goto 'Save Target As' the archive is currupted. sad.gif

Share this post


Link to post
Share on other sites
BCspeed34

erm, i wish i could download it, but the link doesnt work try this:

 

http://www.mm2x.com/upload

 

smile.gif

 

EDIT: btw tim, great tut, it may get me back into coding smile.gif

Share this post


Link to post
Share on other sites
timmy2004
btw tim, great tut, it may get me back into coding

Thanks!

 

I think I will post my second tut later on, I have written heaps of tuts for VC (coding, mapping, etc) I might realese them soon.

Share this post


Link to post
Share on other sites
bmxer8118

Ok guys thanks and sorry for the bullcrap, this should work:

 

Hi, ive been working on a prog with tuturials on how to mod San Andreas. If I get some good comments, I will add how to do everything under "Things to do in san andreas" in the program.

 

Please download and tell me what you think!

 

http://www.mm2x.com/upload/files/SanAndreasSecrets.zip

 

(When it asks you which video to play in the program choose clip0012.avi in the SanAndreasSecrets folder)

Edited by bmxer8118

Share this post


Link to post
Share on other sites
timmy2004

That was OK, but only good for people that have a DVD burner.

 

Maybe you should create your own thread on it.

Share this post


Link to post
Share on other sites
Alucard_HllSng

So timmy2004 where is your second tutorial? Then are you going to realise it?

 

Share this post


Link to post
Share on other sites
nielsvandenbroek

if i open up main.scm and search for

032B: $471 = create_weapon_pickup #COLT45

i get the message match not found,

even when i only try 032B: $471

that error appears, what can I do about this?

Share this post


Link to post
Share on other sites
AdTec_224

nielsvandenbroek: open up the main.scm in Mission builder v1.3 and try and search for:

 

 

032B: $7D0 = create_weapon_pickup #COLT45  15 ammo  34 at -228.4 -1318.2  9.1

 

 

That should solve your problems

Share this post


Link to post
Share on other sites
Newbie41

what code do you use to make tommy able to drink and dance at the malibu club?

Share this post


Link to post
Share on other sites
nesse

Very good tutorial biggrin.gif

Share this post


Link to post
Share on other sites
timmy2004
what code do you use to make tommy able to drink and dance at the malibu club?

It was a whole bunch of code. Search in the opcode database to find it.

 

 

Very good tutorial
Thanks.

Share this post


Link to post
Share on other sites
Gta_ Gamer

where do u get bws thing

Share this post


Link to post
Share on other sites
shocker275
Thanks man! You probably saved me, and probably others from creating numerous topics about how to change the players spawn point ect.

thats ok, np, i might post more s*** like this later smile.gif

Oh thanks a lot man I've been looking for stuff like this.

 

I'm looking forward to more! smile.gif

Share this post


Link to post
Share on other sites
Guest Timmy2006m

Oh right you want to know where to get bartons mission builder have a look in his sig.

 

You wont be able to get the v3 any more the only one you can get now is the v5. xmas.gif oh i am not santa smile.gif

Share this post


Link to post
Share on other sites
shocker275
Oh right you want to know where to get bartons mission builder have a look in his sig.

 

You wont be able to get the v3 any more the only one you can get now is the v5. xmas.gif oh i am not santa smile.gif

Are you timmy2004 on a duplicate account?

 

And did you skip v4? tounge.gif

Share this post


Link to post
Share on other sites
Guest Timmy2006m

No i am not timmy 2004.What do you mean skip v4

Share this post


Link to post
Share on other sites
htsb8

Very Nice!

i have been looking for it for long time,thanks very very much !

 

and then?Coding Tutorial 2?

Share this post


Link to post
Share on other sites
timmy2004

Thanks, I've got number 2 somewhere...

 

If I do find it, I'll post it I swear!

 

And no, that other guy isn't me, I told him not to have that name because people wiuld think I have a 2nd account, but he can have have whatever name he wants I guess, I cant stop him.

 

 

-Sweden pwns you.

Share this post


Link to post
Share on other sites
stevegta

Hey very good tutorial for noobs (like myself).

Although, im having a problem when I press compile and copy. I get this error:

 

'The number of conditions used doesn't match the IF command parameter.

Use 00D6: IF 3 if all of the conditions must match, or

00D6: IF 23 if just one of the conditions must match'

 

And the screen goes to:

 

':Label0F6850

00D6: if 24

8248: NOT model #COLT45 available

83D0: NOT wav 1 loaded

83D0: NOT wav 2 loaded

8248: NOT model #FAKETARGET available

004D: jump_if_false £Label0F6877

0001: wait 0 ms

0002: jump £Label0F6850'

 

I somewhat understading of what this means, but I don't wanna mess around with the file and screw Vice City up. Does any one know what is wrong or what I'm supposed to do?

 

Thanks a lot.

Share this post


Link to post
Share on other sites
choofa

I am trying to learn this for my skatepark mod so I can make the player start at the food shop and also have bikes next to him.

I do the possion

 

 

0053: $PLAYER_CHAR = create_player #NULL at  -978.636 -764.989  13.0689

 

 

I Compile Copy & Run and it comes up as

 

 

The number of conditions used doesn't match the IF command parameter.Use 00D6: IF 3 if all of the conditions must match, or 00D6: IF 23 if just one of the conditions must match

 

 

What is goign on?

Share this post


Link to post
Share on other sites
Jumper
Very nice tutor, it`s written very easily, definitly for ppl who open main.scm first time (like me) Great job

Share this post


Link to post
Share on other sites
YeTi

nice tutorial just got to ask whens part 2 coming out confused.gif

 

@stevegta:

00D6: if 24

i got the same message just change the 24 to 3 it works perfect then

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


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

×
×
  • Create New...

Important Information

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