Short Explanation of modding GTA2. (For Beginners).

Post GTA1/GTA2 maps here (finished and work in progress).
Post Reply
User avatar
Alberto
Hitman
Hitman
Posts: 115
Joined: 19 Jan 2012, 20:13
GH nick: Raef/ RaefGH
Location: Calgary.

Short Explanation of modding GTA2. (For Beginners).

Post by Alberto »

GTA2 Maps consists of 4 official files:
GMP
MMP
SCR
MIS

Other files like:
gxt
sty

And there are programs which produce these files like:
GTA2 Map Editor Produes GMP Files.
Notepad Produces MMP Files.
GTA2 Script Pad Produces MIS And SCR Files.

GTA2 MAP EDITOR
Map editor is the most important program in gta2 modding, you can make buildings, Streets, Water by using it.
How to use GTA2 Map Editor: http://en.wikigta.org/wiki/GTA2_Editor
----------------------------------------------------------------------------------------
GTA2 Script Pad :
GTA2 Has a modding language, each Code you put in the script pad has its own effect in the map,
How to use GTA2 Script pad: http://projectcerbera.com/gta/2/ ((BenMillard's site))

The main scripting language (ALWAYS WORK) By Davidio :
you should type/copy this in GTA2 script pad, Save it to produce .mis file, compile it for .SCR

//players
PLAYER_PED p1 = ( 128.5 , 121.5 , 255.0 ) 0 180
PLAYER_PED p2 = ( 129.5 , 125.5 , 255.0 ) 4 180
PLAYER_PED p3 = ( 130.5 , 127.5 , 255.0 ) 9 180

//weapons
GENERATOR rocket1 = (124.5, 210.5, 255.0) 0 COLLECT_02 0 0 99

//counter
COUNTER loop = 1

LEVELSTART
SET_AMBIENT_LEVEL(1.0, 0)

SWITCH_GENERATOR(rocket1, ON)
WHILE_EXEC(loop=1)

DO_NOWT

ENDWHILE
LEVELEND
---------------------
This script is not stable, you can add/delete codes as you wish when you learn GTA2 Coding language.
After typing this Script, save it and compile it.
------------------------------------------------------------------------------------------------------------

MMP File:
To make an mmp file, Open Notepad and copy this in it:

[Mapfiles]

GMPFile = mapname.gmp
STYFile = bil.sty
SCRFile = mapname.scr
Description = mapname


[Map]
UpDate = Year-M-D
CreaDate = Year-M-D
LongDesc = "mapname :"description"

Tags[] = mapname
Author= mapowner
Readme = mapname_readme.txt

Replace:
Mapname: The map's name you made
Year-M-D: Year-month-day
Desc: Description of your map.

SAVE it, and then rename the file to .mmp, For example:
GTA2.txt ---> Rename it ---> GTA2.mmp
--------------------------------------------------------------
I Finished this topic for now, more updates will come later.
Attachments
GTA2 Map Editor
GTA2 Map Editor
GTA2 Script pad
GTA2 Script pad
Last edited by Alberto on 05 Dec 2012, 23:34, edited 1 time in total.
The fuck you looking at?
Galactic Boy
Immortal
Posts: 334
Joined: 15 Apr 2012, 08:26

Re: Short Explanation of modding GTA2. (For Beginners).

Post by Galactic Boy »

And .gci files. .gci files aren't very important. If you want to edit and change car physics, you can use .gci files. :)
User avatar
Alberto
Hitman
Hitman
Posts: 115
Joined: 19 Jan 2012, 20:13
GH nick: Raef/ RaefGH
Location: Calgary.

Re: Short Explanation of modding GTA2. (For Beginners).

Post by Alberto »

I Finished this topic for now, more updates will come later. :]
The fuck you looking at?
Galactic Boy
Immortal
Posts: 334
Joined: 15 Apr 2012, 08:26

Re: Short Explanation of modding GTA2. (For Beginners).

Post by Galactic Boy »

OK. :)
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Short Explanation of modding GTA2. (For Beginners).

Post by Pyro »

That code is a basic multiplayer script, really.

The most basic code for single player testing (which you should do even before you try multiple players) would be:

[syntax=mis]PLAYER_PED p1 = (127.5,127.5,2.0) 25 000 // the player

COUNTER loop = 1 // a simple loop for later

LEVELSTART

WHILE_EXEC (loop = 1) // main game loop
DO_NOWT // do nothing
ENDWHILE

LEVELEND[/syntax]

Again, that is the most basic code you can get to test a map with until you get familiar with GTA2 coding, then you can start adding cars, objects and other things.

A few other things I'll mention just for the hell of it:
  • If you're saving a map, make sure you export it but also compress it too; this turns the GMP file from about ~6MB to nearly ~350kb. Use Delfi's GMP Compressor to do this, and I also believe TM's Map Editor does it too.
  • The MMP file only needs to be like this:

    Code: Select all

    [MapFiles]
    GMPFile = your-map.gmp
    STYFile = ste.sty
    SCRFile = your-map.scr
    Description = Your Map Description
    You don't need the rest of the stuff you've listed, the above is the essential information.
  • Your script example says it always works, but then right below it says it's unstable? What?
  • Finally, there are enough tutorials out there really but your post just seems to link to other peoples' tutorials anyway.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Short Explanation of modding GTA2. (For Beginners).

Post by BenMillard »

I wrote my tutorials for myself, at first. Then I started making them much, much better so other people could use them.

Everyone starts somewhere. I suggest starting with the multiplayer script with most common features.
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Short Explanation of modding GTA2. (For Beginners).

Post by Pyro »

BenMillard wrote:I wrote my tutorials for myself, at first. Then I started making them much, much better so other people could use them.
That is pretty much how I started too. I just started writing down a list of commonly used script items I used a lot and then gradually expanded outwards by trying out new things, looking at the official DMA script guide and looking in bil.mis and its mission files that were included in the mission compiler.

Back in the days (boy, that makes me feel old now :P ) GTA2 modding really took off and I started helping other people, contributing and felt I should at least put my research/findings up for others to see. To cut a long story short, it was pretty popular and I kept expanding it with new bits until eventually Ben asked if he could host it on his site, which I did, and has since been there right up until now! We've even updated some of the tutorials recently but still plenty of scope to add new things.

8-)
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Short Explanation of modding GTA2. (For Beginners).

Post by BenMillard »

Oh yes, I should clarify that many (most?) of the GTA2 tutorials on my site were originally written by Pyro. That's credited at the bottom of each one.

The first guides I wrote were about mission scripting in GTA1.
Post Reply