Page 1 of 1

Short Explanation of modding GTA2. (For Beginners).

Posted: 15 Nov 2012, 10:02
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.

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

Posted: 15 Nov 2012, 14:38
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. :)

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

Posted: 16 Nov 2012, 09:06
by Alberto
I Finished this topic for now, more updates will come later. :]

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

Posted: 16 Nov 2012, 14:46
by Galactic Boy
OK. :)

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

Posted: 16 Nov 2012, 18:23
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.

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

Posted: 17 Nov 2012, 00:37
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.

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

Posted: 17 Nov 2012, 13:52
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-)

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

Posted: 21 Nov 2012, 22:00
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.