Page 30 of 50

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

Posted: 14 Jan 2011, 18:57
by T.M.
Cuban-Pete wrote:Can you also change the color of the cars automatically? Some look different.
I dont understand what you mean with "automatically", but, I compated the image with gta2 screenshot, and they were identical.
Cuban-Pete wrote:Left of the two taxi's is a green car and left of that is a car that has too dark color in comparison with the others. Just noticing...
Thats just an illusion, they are just fine! :P Its got weird palet on that one car yeah.

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

Posted: 14 Jan 2011, 19:25
by Pyro
Looks epic, nicely done ;)

Could the method you used for car remaps also work on character remaps? Mind you, there are three types of character remap types you can pick in the code (dummy graphic, gang graphic which is default and emergency graphic) and depending on the remap you used will show up differently. An example:

Using character remap "-1" (which shows the default, much like cars) will show as...
EMERG_GRAPHIC - SWAT guy
DUMMY_GRAPHIC - The red shirt/green sleeves guy (same as road block tank man), also visible in your last picture.
GANG_GRAPHIC - A Zaibatsu coloured guy

However, using it on a different remap (like using the number for a Redneck for example) will show the gang one perfect, but if shown as a dummy or emergency will make the sprite look pretty weird. Either way, being able to see what they look like depending on remap colour and graphic type would be pretty sweet if you can do it :)

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

Posted: 14 Jan 2011, 19:27
by Cuban-Pete
TradeMark wrote:
Cuban-Pete wrote:Can you also change the color of the cars automatically? Some look different.
I dont understand what you mean with "automatically", but, I compated the image with gta2 screenshot, and they were identical.
That you can change the color of the car with code and/or just changing the pallet. Not having to use image editing programs. :)

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

Posted: 14 Jan 2011, 19:41
by T.M.
Pyro wrote:Could the method you used for car remaps also work on character remaps? Mind you
Yeah, that was my plan, but im not sure how good plan it will be, since the ped sprites takes shit load of sprite space... maybe i will just store few animations from them, like walk/run/stand only. I'll see what i can do, the sprite storing system im using is using more texture memory for the fact that i wouldnt be able to rebuild the whole packed texture every time i change some car color in real time. So it will use maybe 20% more texture space with my method (havent tested with peds yet). Also this will speed up the mipmap generation and sprite add/delete. So i cant change the way it works...
Cuban-Pete wrote:That you can change the color of the car with code and/or just changing the pallet. Not having to use image editing programs. :)
Yeah, once you make changes in script file, it will ask for script file reload when you switch back to editor, and if you chose "yes", it will update the car color as well!

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

Posted: 14 Jan 2011, 20:08
by T.M.
I've noticed many people use -1 remap, but i've tested that it's no different from 0 remap.

Is there something i should know about -1 remap? Does GTA2 have some hidden functionality for -1 value on the remap?

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

Posted: 14 Jan 2011, 20:48
by Razor
whats that uber features you reserched? :> i would like to know.

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

Posted: 14 Jan 2011, 21:06
by T.M.
Razor wrote:whats that uber features you reserched? :> i would like to know.
What do you mean...?

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

Posted: 14 Jan 2011, 21:49
by Pyro
TradeMark wrote:I've noticed many people use -1 remap, but i've tested that it's no different from 0 remap.

Is there something i should know about -1 remap? Does GTA2 have some hidden functionality for -1 value on the remap?
There is a massive difference between remap 0 and remap -1...
  • For cars, -1 is the brown/bronze colour and 0 is dark blue.
  • For characters, depending on remap type (see my last post for three types), -1 will be either SWAT/Zaibatsu/roadblock tank guy (since the default remap type is gang, -1 will show Zaibatsu) and remap 0 is a blue police officer.
TradeMark wrote:...
maybe i will just store few animations from them, like walk/run/stand only
...
I don't think animated sprites are necessary. Just a simple top down view showing where they are will suffice. It is, after all, just a reference to where the character is.

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

Posted: 14 Jan 2011, 21:53
by Razor
i also found out new hardcoded stuff in GTA2 by making this remap functionality. Epic.

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

Posted: 14 Jan 2011, 22:55
by T.M.
Pyro wrote:There is a massive difference between remap 0 and remap -1...

For cars, -1 is the brown/bronze colour and 0 is dark blue.
I've tested this, and i dont see difference between -1 and 0, are you sure you dont confuse with stytool? it shows incorrect remap value for zero (which is blue). Zero remap cannot be used in GTA2 at all. Zero (and -1 or anything under zero most probably) is always the brown boring color.
Pyro wrote:For characters, depending on remap type (see my last post for three types), -1 will be either SWAT/Zaibatsu/roadblock tank guy (since the default remap type is gang, -1 will show Zaibatsu) and remap 0 is a blue police officer.
Now I tested -1 and 0, both are police color... I suggest you go test it just in case i messed my test up.
Pyro wrote:I don't think animated sprites are necessary. Just a simple top down view showing where they are will suffice. It is, after all, just a reference to where the character is.
Maybe, but i find it easier to see where the peds are if they animate, after all, they are so damn small.
Razor wrote:whats that uber features you reserched? :> i would like to know.
I dont think its important for non-programmers ;) But anyways, pretty much what i said above, and i am almost certain that every car which sprite palet is greater than 255 will not be possible to remap at all in GTA2. I also think theres also few hardcoded car models that cannot be remapped at all, i havent tested yet (i found out this >255 thing after i wrote the list of cars tha couldnt be remapped...)

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

Posted: 15 Jan 2011, 05:43
by Pyro
Hmm my mistake with the car remaps, you were right with -1 and 0 both being the brown colour remap. Mind you, I don't think I ever used that blue anyway, and if I remember the list in the official documentation lists car remap 0 as "AlpBlue", guess that's wrong then! :roll:

Now I know for a fact the character remaps are different between -1 and 0. Remap -1 is Zaibatsu colours on any normal character (unless you change graphic type) and 0 is still a blue police. Applies to both characters and the player (e.g. you can change the player to show a emergency graphic of 0 and he'll show as a proper sized police officer instead of the default 'gang sized' police officer which looks weird).

Tested the car remaps and character remaps using bil.sty.

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

Posted: 15 Jan 2011, 11:41
by T.M.
Pyro wrote:Now I know for a fact the character remaps are different between -1 and 0.
Mind you paste the code you used? Will be useful in my test map when i add ped remaps.

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

Posted: 15 Jan 2011, 13:46
by B-$hep
TM.
You could also display road arrows.
They are not related to junction data.

If you look GMP docs you will see that block_info has "arrows" field.
You just have to detect (with "road" flag in slope_type) if current slope / block has road flag
and display the arrow in correct direction.

If you want some nice but simplistic arrow images (both red and green) then let me know.

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

Posted: 15 Jan 2011, 13:59
by Razor
B-$hep wrote:TM.
You could also display road arrows.
They are not related to junction data.

If you look GMP docs you will see that block_info has "arrows" field.
You just have to detect (with "road" flag in slope_type) if current slope / block has road flag
and display the arrow in correct direction.

If you want some nice but simplistic arrow images (both red and green) then let me know.
What is the diffrence between red and green arrwos? I always use green ones.

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

Posted: 15 Jan 2011, 14:01
by B-$hep
Razor wrote:What is the diffrence between red and green arrwos? I always use green ones.
From DMA docs:
Green arrows are used to mark the normal road network. Dummy cars use them to see where they are allowed to drive (i.e. which side of the road to drive on, where the corners & junctions are, etc.). The green arrows must be set up perfectly for the game to function.

Red arrows are used to mark special routes which are only used in special cases, e.g. mission cars in a hurry or police cars on an emergency. They might mark shortcuts across parks or pavements, for example.
Note that green and red arrows do not have to be on road. It is allowed to place them on any ground type except air.

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

Posted: 15 Jan 2011, 14:24
by T.M.
B-$hep wrote:You could also display road arrows.
Yeah when i make new rendering, atm its quite crappy to update map every time i switch lights/arrows etc on.
B-$hep wrote:You just have to detect (with "road" flag in slope_type) if current slope / block has road flag
and display the arrow in correct direction.
Yeah, i am already using that data to move the train within the train track.

--

@Razor: you can use red arrows to make cops able to jump from block to another.

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

Posted: 17 Jan 2011, 00:52
by T.M.
industrial full size with lights & script objects:
Image
(2.5MB)

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

Posted: 17 Jan 2011, 04:30
by Pyro
TradeMark wrote:Mind you paste the code you used? Will be useful in my test map when i add ped remaps.
Sure, it's the basic one from documentation...

Code: Select all

CHAR_DATA charname = (127.0,127.0,2.0) -1 090 CRIMINAL_TYPE1
Default characters are always classed as gang characters. The above, with remap -1, will show this character having a Zaibatsu outfit (yes - remap 8 is ALSO the Zaibatsu outfit).

If you then use a command like this...

Code: Select all

SET_CHAR_GRAPHIC_TYPE (charname,EMERG_GRAPHIC,-1)
...the same guy will now show up as a SWAT guy and also be the correct "size" (police and normal peds are physically smaller in size than gang peds). Also works on players.

If you then switch to a "dummy" graphic...

Code: Select all

SET_CHAR_GRAPHIC_TYPE (charname,DUMMY_GRAPHIC,-1)
...he will show up as a road block tank guy in appearance (dark red shirt, green sleeves) and is also ped sized. Again, this works on players too.

There you have it, pretty simple. But to summarise, created characters (and players) are defaulted to gang graphic type. You have to use the SET_CHAR_GRAPHIC_TYPE for them to show up as anything else for their default values if you use -1 as the remap.

Hit me up if you need help with more stuff... :)

Edit: You can look up my tutorials on characters on Ben's website for reference. There is another one on character AI too if that will help also.

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

Posted: 17 Jan 2011, 15:10
by T.M.
Hmm, looks like you are right, thanks!

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

Posted: 18 Jan 2011, 19:53
by T.M.
More awesome news: car deltas (roof decals) visible!

Image

Note the TV-VAN's ^^ hard to notice they also have own decal there.

edit: rofl, it looks exactly like in gta2, but its actually from my editor XD