Epic GTA2 Map Editor (0.6.6602) Beta

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by BenMillard »

May have been requested before but these would help bug-checking of levels:
  • View Surface Types. (Press 2 in DMA Editor.)
  • View Traffic Directions. (Rarely works in DMA Editor on XP.)
The setting Options > Script Objects Display Players As Peds is very useful for setting Face Off style start position! I'd even say that should be the default, if you get ped remaps working.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

I will add those when the map block editing is working.

--

By the way, what are the features you mappers need in the DMA map editor? I will implement those features first when i release the map block editor.

I havent made a single map, so i dont really know what kind of stuff you guys use in DMA editor, so it would speed up the process if you told me everything i must implement which would make you ditch the DMA editor and start using mine.
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by B-$hep »

TradeMark wrote:if you told me everything i must implement which would make you ditch the DMA editor and start using mine.
Block editing :P
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by Pyro »

Pretty much of all of the main functions listed in the help file and on other websites on how to use the editor. However, here's what I use (probably some missing):

Short cut Keys:
  • Ctrl+N - Creates a new map.
  • Ctrl+O - Opens a map.
  • Ctrl+S - Saves the map. In the DMA Editor this saved the map and didn't compress it (there was a seperate Save Compressed button). I recommend the save button automatically compresses the map, maybe also tie in with removing unnecessary file size? Makes ~6Mb maps into ~300Kb maps.
  • Ctrl+Z and Ctrl+Y - Undo and redo, respectively.
  • Arrow Keys - Used to scroll around the map (replaced with WASD in your Editor - I prefer WASD!)
  • Ctrl+Arrow Keys - Moves cube selection on X and Y axis.
  • Left Click on Cube - Selects a single cube.
  • Left Click and Drag - Selects multiple cubes. The DMA Editor will select multiple cubes on different Z levels if you make a selection box over it.
  • Ctrl+C, Ctrl+V and Ctrl+X - All the classic keys for copying, pasting and cutting!
  • Shift+Arrow Keys - Expand cube selection on X and Y axis.
  • Shift+Q - Expand cube selection up one Z level.
  • Shift+A - Expand cube selection down one Z level.
  • Ctrl+Q - Move selected cube selection up one Z level.
  • Ctrl+A - Move selected cube selection down one Z level.
  • Ctrl+F - Find a tile (number) on the map. Rarely used as it just highlights the cube with the matching tile number. Not worth putting in the editor.
  • F3 Key - Find next tile (number) on the map. Linked with above, and is still pretty useless. Also not worth putting in the editor.
  • Ctrl+G - Go to a certain block position (only shows X and Y co-ordinates). Very rarely used, and will be redundant in your editor seeing as we can zoom ALL the way out.
  • Ctrl+H - Replace tile(s) with options for whole map or current selection. Sometimes handy as you can set the rotation, transparency etc. Worth having.
  • Alt+L - Makes a new light on selected cube. Options appear to change light colour, co-ordinates, radius, intensity, timing etc.
  • P Key - Zoom in (redundant since you can use mouse scroll wheel in your editor).
  • L Key - Zoom out (also redundant because of mouse scroll wheel).
  • I Key - Uses the 'eye-dropper' tool. This highlights a specific tile and switches to "drawing mode" automatically after selection. The selected tile will also show in the tile view window on the left.
  • V Key - Changes eye-dropper/drawing/current tool to default selection tool.
  • 1 Key - Normal view.
  • 2 Key - View surface types (grey for pavement, black for roads, green for field, yellow for air, red for cube sides, blue for air ONLY at Z level 0 - usually where water level is anyway) and also show traffic arrow directions (green arrows for car traffic and trains, red arrows for non-traffic and other stuff).
  • 3 Key - I have no idea what this does, I think it's to do with surface properties ('wall+bullet' - blocks players/cars/bullets, 'wall' - blocks players/cars and lets bullets through or 'none' - anything can go through it).
  • 4 Key - Shows default tiles depending on block type. Pretty pointless and not worth including.
Other Tools:
  • Tile Properties Window - Shows the cube sides and lid, cube type (air, road, pavement or field), slope type (from 0 to 63!), traffic arrows (red and green going up, down, left and right), rotate tile graphic, "filter 1" and "filter 2" (these change how "dark" the lid is - doesn't work on cube sides), flat (does transparency - ideal for railings etc) and flip.
  • Tile List - Lists all the tiles from the STY file in a scrollable window. You can right click a tile to change its properties (wall+bullet, wall or none).
  • Mark Unused Tiles - Puts a red "cross" through tiles that you have not used in the map. Sometimes handy.
  • Tile Properties - Shows currently selected tile from tile list and lets you rotate, flip-X and flip-Y.
  • Slope Properties - Separate window, gives options to create slope (after selecting cubes) and has pictures on buttons on what style the slope is. Also gives slope gradient (1, 2 or 8) if relevant.
  • Mini-Map - Shows the map in surface type mode. You can click anywhere and it'll go to it, and click and drag to move. Your version is better as it shows the true colours of the map!
Phew, that's about all I can think of regarding map editor. Probably missed a few. This should help you, but I highly recommend you look at this list and try each button(s) in the DMA Editor to get a grasp of what they do. Things like the block properties window and slope ones are probably tricky ones but worth looking at, and the pictures make it easier!

If you don't see the options right away in DMA Editor, just go to View and select everything on the list from the top all the way down to slope. The View > Block one is quite a handy one as you can highlight some cubes, press one of the buttons (air, pavement, road, field and a unique 'building' one) and it'll create a basic version of what you pressed. The unique thing about the "building" one is it creates a building for you and will give it outer walls and a roof depending on cube selection. Try it out!

8-)

Edit - as I was typing this up, B-$hep beat me to it and practically summed everything up, all be it in a rather crude fashion :P
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

Wow thats a long list there. Thanks! I will go through it.

Is there anything you guys would like to improve from DMA style of editing? (i mean do the same thing differently but better). It would be good to know at this point, rather than implementing something clumsy now and fix later.
I recommend the save button automatically compresses the map, maybe also tie in with removing unnecessary file size? Makes ~6Mb maps into ~300Kb maps.
Yeah, the uncompressed map becomes pretty useless since the compressed version saves as fast now. Also, notice that im not gonna implement hidden surface removal since its quite useless (i will do some sort of hidden surface removal, but not the kind DMA has, so it wont remove stuff thats hidden from top-down angle only, so you can still take nice screenshots from other angles in my editor...)
Shift+Q - Expand cube selection up one Z level.
Shift+A - Expand cube selection down one Z level.
About the WASD keys... i have to change these A,Q to 1,2 buttons since they would overlap with WASD keys.
Makes a new light on selected cube. Options appear to change light colour, co-ordinates, radius, intensity, timing etc.
i think the coordinates choice becomes useless since you can move it by mouse in my editor? (i may be wrong though).
... blue for air ONLY at Z level 0 - usually where water level is anyway)
i think this should show the tiles that can drown you instead (only the animated tiles with water sound type can make you drown). And even if z-level 0 is air, you wont drown there, you just fall down to nothing. (if i remember correctly...)
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: TradeMark's GTA2 Map Editor (0.5.32) (Only zone editor a

Post by Cuban-Pete »

I'm going little offtopic here...
TradeMark wrote: Heres my program full source code (lol):
Image
One pixel equals to 3 bytes from the source code.

I generated it by first adding all my source files in one stream of string, then i removed all comments, after that i removed all the white space. Its possible to decrypt the image above and see the actual source code, but not really worth it... since theres no distinction between files, and they arent even in the "correct" order ;) And not to mention that the code is impossible to compile without first figuring out where to put the white spaces back XD ("return num;" becomes "returnnum;" for example...)
I tried to decipher it, but I got nothing useful. Each pixel is a color, which is made of three bytes, right? Each byte is a char which is a letter?
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.5.32) (Only zone editor a

Post by T.M. »

Cuban-Pete wrote:I tried to decipher it, but I got nothing useful. Each pixel is a color, which is made of three bytes, right? Each byte is a char which is a letter?
yeah exactly.

if i encoded your message above with the same encryption, the result would be something like: "0 12345 16 54738942 ..." (spaces not encoded), so if you want to decode that, its quite hard a job :roll: also, i scaled the color values to range from 0 to 255, when there was only like 60 unique values originally, so each color is multiplied by approximately by 4, which again possibly makes it even harder to decode :)

i think the best you can do is to try to guess a word thats lying in the code, and see if you can find the letter pattern exactly matching it. For example my msn address could do it ^^ and then continue from that to find more letters...
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by BenMillard »

I take it the parts with grey backgrounds are due to lots of capital letters? Maybe declaring lots of constants about a third of the way through.

"Water, Water, Everywhere..."
  • Only a tile set to Water in the .sty creates water trails.
  • Only a Water tile set as the Base Tile of an animation will drown you.
  • Any other Water tile creates a "non-drowning water" effect.
  • Non-drowning water adds the wheel trail effect to moving vehicles and changes some tyre sounds.
  • Non-drowning water doesn't change other aspects of any surface type.
  • Drowning works exactly the same at any height.
  • Drowning works exactly the same with either the Air or Field surface type.
You can create non-drowning water by using a non-animated Water tile. Snowball City 2 (SC2) by illspirit uses this. DMA use it for the sewer running under the South freeway of ste.gmp.

Water tiles which are not the Base Tile of an animation will create water trails but won't drown you. The beach areas of MultiSlayer City show this.

Maybe I should write that up as a tutorial on my site? Or put it on the GTA Wiki.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

BenMillard wrote:I take it the parts with grey backgrounds are due to lots of capital letters? Maybe declaring lots of constants about a third of the way through.
lol yeah probably ^^
Drowning works exactly the same at any height.
hmm... really? i thought only z=0 makes you insta-drown if you jump over the water at the same altitude, not sure though.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: TradeMark's GTA2 Map Editor (0.5.32) (Only zone editor a

Post by Cuban-Pete »

TradeMark wrote:
Cuban-Pete wrote:I tried to decipher it, but I got nothing useful. Each pixel is a color, which is made of three bytes, right? Each byte is a char which is a letter?
yeah exactly.

if i encoded your message above with the same encryption, the result would be something like: "0 12345 16 54738942 ..." (spaces not encoded), so if you want to decode that, its quite hard a job :roll: also, i scaled the color values to range from 0 to 255, when there was only like 60 unique values originally, so each color is multiplied by approximately by 4, which again possibly makes it even harder to decode :)

i think the best you can do is to try to guess a word thats lying in the code, and see if you can find the letter pattern exactly matching it. For example my msn address could do it ^^ and then continue from that to find more letters...
You encoded each letter differently? Oh man...

I searched with this beautiful code for the unique combination of your email, but I did not find it.

Code: Select all

	
if(l[n] == l[n+6]){ //j and j in jahka@j
if(l[n+1] == l[n+4]){ //a and a in jahka
if(l[n+8] == l[n+9]){ //p and p in jippii
if(l[n+10] == l[n+11]){ // i and i in jippii
if(l[n+11] == l[n+14]){ //i and i in jippii.fi

	//write the stuff
	for (int t=0; t<15; t++)myfile << (char)((l[n+t]/4.25)+100); //just temp conversion to see in letters
	myfile << endl;

}
}
}
}
}
I got nothing useful! Only a bunch of almost the same repeating letters. I also tried the uniqueness of "namespacestd", but no good results. Something fishy is going on. :lol:
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

you didnt find the pattern? i found, also you should check that the letters you check cant be same:

Code: Select all

	if($str[$u+0] == $str[$u+6]) // j
	if($str[$u+1] == $str[$u+4]) // a
	if($str[$u+7] == $str[$u+10]) // i
	if($str[$u+7] == $str[$u+11]) // i
	if($str[$u+7] == $str[$u+14]) // i
	if($str[$u+8] == $str[$u+9]){ // p
		if($str[$u+0] != $str[$u+1]) // j != a
		if($str[$u+1] != $str[$u+7]) // a != i
		if($str[$u+7] != $str[$u+8]){ // i != p
			print substr($str, $u, $findlen)."<hr>";
		}
	}
Edit: remember that whats in the exe is also in the code ;) theres huge list of constants in the exe, if you check where is the pattern of that list words, you can probably find 27 letters to match the encoded values, and thus get 1/3 decoded already 8-) (there was about 90 unique letters, now when i made my own decoder) but remember: the code doesnt necessarily express the data exactly like in the exe, so there might be some line splitting (\ mark in c++) to display that huge list of strings... i wont tell where they are :P also remember that the image is old (unreleased) version of the code, its not the current release.. so there might be some differences.

Edit2: i noticed that theres some code missing, not sure how much, but i think my biggest code file is missing from it o.O (which has a lot of strings to search for...)

Edit3: i managed to decode 52% of the image, with just 4 different strings i took out of the exe :mrgreen:
Last edited by T.M. on 15 Dec 2011, 00:11, edited 1 time in total.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by Cuban-Pete »

Haha, I read the image somehow in BGR, now I changed it to RGB and I'm on the right track! :D

Good tip on the exe, just opening it with notepad shows lots of names. :mrgreen:

minimapkoko :lol:
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

Cuban-Pete wrote:minimapkoko :lol:
lol, thats not even the worst of variables i have ^^
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by Cuban-Pete »

TradeMark wrote:
Cuban-Pete wrote:minimapkoko :lol:
lol, thats not even the worst of variables i have ^^
You got any last words before I release the 'key'? Before the cuban-leaks (instead of wiki-leaks) goes online, lol. Before hell breaks lose? :lol:
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

oh well, please dont publish my crappy code anywhere, even if its slightly obfuscated, its still.. well, embarrassing. :|

let others crack it on their own... if they wish.
BenMillard
Immortal
Posts: 890
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by BenMillard »

TradeMark wrote:
BenMillard wrote:Drowning works exactly the same at any height.
hmm... really?
Yes.
TradeMark wrote:i thought only z=0 makes you insta-drown if you jump over the water [...]
Happens with the pools in Conner Gardens area of MultiSlayer City. (Posh houses in the southernmost areas.)

Running over yourself with a drowning car also happen at any Z level.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by Cuban-Pete »

TradeMark wrote:oh well, please dont publish my crappy code anywhere, even if its slightly obfuscated, its still.. well, embarrassing. :|

let others crack it on their own... if they wish.
too late, the world will know how you code. lol. j/k.

some things I noticed:
- one variable (long) that popped out is "wtf". 8-)
- you use directx besides opengl? why? You have an include "ddraw.h"
- you have openal.h in it. does that mean we get/have sounds in editor? :)
- you only use once "using namespace", perhaps you can use this for others to (opengl?)?

anyway. much respect for all the coding. it's massive amount of code.

here is my image-code to decode your image-code. :lol: (spaces are left in)
out.png
out.png (5.05 KiB) Viewed 26105 times
"Mmmm, your eyes are so beautiful."
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

Cuban-Pete wrote:- you use directx besides opengl? why? You have an include "ddraw.h"
nope.. i dont use DX. but the comments says i needed it for DDS image format reading or something... i dont use it in the editor though.
Cuban-Pete wrote:- you have openal.h in it. does that mean we get/have sounds in editor? :)
yes, at some day ;)
Cuban-Pete wrote:anyway. much respect for all the coding. it's massive amount of code.
thanks :)
Cuban-Pete wrote:here is my image-code to decode your image-code. :lol: (spaces are left in)
lol, i thought making the same from my reader too! :mrgreen:
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by T.M. »

Anyone knows if "RGEN" chunk in GMP file (aka junction list) is in any kind of use by GTA2...?

I need to know this for two reasons:
1) To complete my block editor.
2) To complete my GMP optimizer (it will remove RGEN now).

I made quick tests, and i didnt see any change in traffic behaviour when i removed RGEN chunk. But as we all know, GTA2 has many hidden features... so if you know anything, please tell me.

Maybe vike could help by checking if gta2 even loads that RGEN data at all?
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: TradeMark's GTA2 Map Editor (0.6.0) NEW EPIC VERSION

Post by Pyro »

I have never heard of RGEN, but then again I never looked at how the map editor saves etc :P

Does it change the file size of the GMP? If it does, how much? Also, not sure what GTA2 defines as "junctions". We already have traffic lights and cars stop near them, and if I remember in the STY some road tiles for junctions cars will randomly stop on it. Also in the map editor we have the traffic direction arrows, so not sure if anything special happens when multiple arrows are inside, say, a traffic light zone with arrows going everywhere.

In short, keep it in if it doesn't change file size drastically (saving 1 or 2kb won't be worth it). Of course, like you said, blackmail Vike into seeing if the game loads/uses RGEN data :P
Post Reply