IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (2) [1] 2   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 littleguna's Coding Tutorial

 [Coding | VC]
 
timmy2004  
Posted: Thursday, Nov 4 2004, 01:24
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



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:


CODE
032B: $471 = create_weapon_pickup #COLT45




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

CODE
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:


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:


CODE
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:


CODE
0213: $495 = create_pickup -86




(you should see heaps of these lines)
the one u just searched for should look like this:


CODE
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:


CODE
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:


CODE
014B: $457 = init_parked_car_generator #ADMIRAL


the whole line should look like 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.2032




and it will have this line underneath it:


CODE
014C: set_parked_car_generator $457 cars_to_generate_to 101



lets take a look at this code:


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.2032

014C: 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


CODE
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.2032
014C: 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:


CODE
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: eetmorechikin2003@hotmail.com
PMMSN
  Top
 

 
RCagent  
Posted: Thursday, Nov 4 2004, 06:27
Quote Post


Trick
Group Icon
Group: Members
Joined: May 2, 2004

XXXXX



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

 
timmy2004  
Posted: Thursday, Nov 4 2004, 08:05
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



QUOTE (RCagent @ Nov 4 2004, 06:27)
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
PMMSN
  Top
 

 
aad  
Posted: Thursday, Nov 4 2004, 08:38
Quote Post


3d artist
Group Icon
Group: Members
Joined: Mar 15, 2004

nl.gif

Member Award




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.gif tounge.gif tounge.gif
Just joking good work litleguna
PMYahoo
  Top
 

 
timmy2004  
Posted: Thursday, Nov 4 2004, 08:54
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



QUOTE (aad @ Nov 4 2004, 08:38)
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.gif tounge.gif tounge.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?
PMMSN
  Top
 

 
what_a_beast  
Posted: Thursday, Dec 9 2004, 12:20
Quote Post


the thing hunter
Group Icon
Group: Members
Joined: Nov 25, 2004

XXXXX



where can i get
QUOTE
BW’s Mission builder Version 1.3

thanx 4 any help
PM
  Top
 

 
fatcat92  
Posted: Thursday, Dec 9 2004, 23:21
Quote Post


Dumbass, Yes, I am Dumbass.
Group Icon
Group: BUSTED!
Joined: Jul 20, 2004

XXXXX



QUOTE (what_a_beast @ Dec 9 2004, 12:20)
where can i get
QUOTE
BW’s Mission builder Version 1.3

thanx 4 any help

You can get it here

http://home.no.net/barton57/
PMMSN
  Top
 

 
bmxer8118  
Posted: Monday, Dec 13 2004, 05:15
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: Dec 6, 2004

XXXXX



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
PM
  Top
 

 
timmy2004  
Posted: Monday, Dec 13 2004, 05:31
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



QUOTE (bmxer8118 @ Dec 13 2004, 05:15)
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
PMMSN
  Top
 

 
BCspeed34  
Posted: Monday, Dec 13 2004, 05:32
Quote Post


Evolve
Group Icon
Group: $outh $ide Hoodz
Joined: Jun 24, 2004

mn.gif

XXXXX



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
Users WebsitePMMSNAOLXbox Live
  Top
 

 
timmy2004  
Posted: Monday, Dec 13 2004, 05:37
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



QUOTE (BCspeed34 @ Dec 13 2004, 05:32)
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.
PMMSN
  Top
 

 
bmxer8118  
Posted: Monday, Dec 13 2004, 22:20
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: Dec 6, 2004

XXXXX



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)

This post has been edited by bmxer8118 on Monday, Dec 13 2004, 22:32
PM
  Top
 

 
timmy2004  
Posted: Thursday, Dec 16 2004, 14:16
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



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

Maybe you should create your own thread on it.
PMMSN
  Top
 

 
Alucard_HllSng  
Posted: Sunday, Dec 19 2004, 11:57
Quote Post


Ashes to ashes, dust to dust...
Group Icon
Group: Members
Joined: Dec 6, 2004

lh.gif

XXXXX



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

 
nielsvandenbroek  
Posted: Monday, Dec 20 2004, 17:35
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Sep 17, 2004

XXXXX



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?
PM
  Top
 

 
AdTec_224  
Posted: Monday, Dec 20 2004, 23:39
Quote Post


Peon
Group Icon
Group: Members
Joined: Sep 22, 2004

en.gif

XXXXX



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

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


That should solve your problems
PMMSN
  Top
 

 
Newbie41  
Posted: Monday, Jan 10 2005, 02:21
Quote Post


/ -Adio- \
Group Icon
Group: BUSTED!
Joined: Dec 31, 2004

us.gif

XXXXX



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

 
nesse  
Posted: Saturday, Jan 22 2005, 11:21
Quote Post


nesse
Group Icon
Group: Members
Joined: Jan 21, 2005

XXXXX



Very good tutorial biggrin.gif
Users WebsitePM
  Top
 

 
timmy2004  
Posted: Saturday, Jan 29 2005, 09:30
Quote Post


Gangsta
Group Icon
Group: Members
Joined: Aug 5, 2004

au.gif

XXXXX



QUOTE (newbie3951 @ Jan 10 2005, 02:21)
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.

QUOTE
Very good tutorial
Thanks.
PMMSN
  Top
 

 
Gta_ Gamer  
Posted: Sunday, Mar 20 2005, 01:24
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Feb 14, 2005

XXXXX



where do u get bws thing
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (2) [1] 2 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG