Glitched imported tiles in the map editor

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 26
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Glitched imported tiles in the map editor

Post by _L1pE_ »

Hello, I imported some tiles from other style files into an edited wil.sty file that I plan to use for the map I'm making, I chose "yes" for remapping the palindex in STY Tool when importing the first tile, and used the first available black palette, then I chose "no" for the other ones that use the same palette in their original .sty files and chose the same palette as the first imported tile. When it's applied in the editor it glitches out and appears as a random default tile, and may also glitch out other unedited tiles randomly. It's not that big a deal since weirdly enough it works just fine in-game, but it's a bit annoying to work with in the editor.

An image of the glitch:
Image

Any way to fix this?
Let's go for a joyride
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Glitched imported tiles in the map editor

Post by Sektor »

Welcome to the forum. I also have that problem on bff-nyan but I only changed a few tiles, so I didn't bother looking for a solution.

Some of the maps with major sty changes work fine in the editor like all of BenMillard's maps.
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 26
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Re: Glitched imported tiles in the map editor

Post by _L1pE_ »

Thanks. I guess I will have to just live with it if there's no real solution.
Let's go for a joyride
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Glitched imported tiles in the map editor

Post by BenMillard »

Search and you shall find...how I imported Golden Lap textures into Macau, Monaco & Suzuka Race.

In that message I say that vike knows about this issue. Maybe he can explain it better?

Delfi/JernejL didn't name the buttons well in Sty Tool. He has explained in the past. Possibly on Gouraga! Forums if that still exists. Might also be on here somewhere.
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 26
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Re: Glitched imported tiles in the map editor

Post by _L1pE_ »

Thanks for the link, I tried that but replacing any of the existing palettes will screw some unedited tiles up. Tried doing that also with the new palettes created for the imported tiles, but it changed nothing.

It's kinda hard to see (sorry for the crappy pic, had forgotten to turn off light view) but the road textures are also edited (changed the curbs to bil.sty main road's), but they look fine since they still use the same palette.

I think the glitch is related to having more palettes than the default number, but I need the extra palettes, unless there are matching palettes for the tiles I'm importing, but that looks like it would be kind of a pain to figure out.
Let's go for a joyride
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 26
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Re: Glitched imported tiles in the map editor

Post by _L1pE_ »

Gonna use this thread to mention another problem I'm having right now.

I'm trying to compile a script file for my map, but it gives this error when I attempt it:
Syntax Error: unrecognized token in scriptfile
Current token = ')' on line 16
Line 16 contains:

Code: Select all

LIGHT motellight1 = (55.5,150.5,3.0) 3 208 (255,255,0) 0 0 0
Any ideas?
Let's go for a joyride
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Glitched imported tiles in the map editor

Post by Sektor »

Radius should be a float, change it to 3.0. The compiler doesn't give the most friendly error messages but that is pretty common for all compilers. It would be a nice feature if anyone updates a GTA2 IDE/compiler, inform us when we use the wrong variable type for a function.
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 26
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Re: Glitched imported tiles in the map editor

Post by _L1pE_ »

Thanks again, it fixed it. I had used this lights tutorial for some guidance before: http://projectcerbera.com/gta/2/tutorials/lights , but it doesn't list the number for radius as floats.

Also, now I have yet another problem, the compiler has this error:
SSYacc0105e: Error token failed, no valid token
Right before the last ENDWHILE that is also right before LEVELEND, that ENDWHILE is for a flashing light sequence, I used Rick's code snippet for it: http://gtamp.com/forum/viewtopic.php?f= ... t=40#p9255 , I'm using both of those but it appears the second one is causing the problem, I renamed the counters for the second one as I imagined it would be necessary to avoid some kind of conflict between them. I also tried setting differently named counters for the WHILE_EXEC commands and setting separate WHILE_EXECs for each, setting separate WHILE_EXECs with the same named counter, and setting both to use the same WHILE_EXEC, all of those give the same error.

EDIT: It seems the pseudo-random sequence code just doesn't work at all. I tested compiling both the simple flashing one and the sequence by themselves unmodified, the former works while the latter doesn't. Will see if I can find some other way to get a random flashing light.
Let's go for a joyride
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Glitched imported tiles in the map editor

Post by BenMillard »

I've changed the GTA2 scripted lights tutorial so it uses 8.0 now.
User avatar
_L1pE_
Car Jacker
Car Jacker
Posts: 26
Joined: 08 Jan 2015, 15:02
GH nick: _L1pE_

Re: Glitched imported tiles in the map editor

Post by _L1pE_ »

Well, I really can't figure out how to make flashing lights work in the script. Does anyone have a suggestion of a code for a pseudo-random flashing light and a light that changes colors in a consistent sequence? Or if it is possible to make a flashing light in the map editor be slow enough that it doesn't cause desync, and if so, what value would be the minimum for that?

EDIT: Managed to make the changing color light work, only problem now is I can't figure out a way to make it sync up with the motel sign animation (which has a frame rate value of 20), it seems like it might not be possible. Still got nothing for the random flashing light.

EDIT2: Managed to fix both problems, motel lights still seem to be one tick behind for some reason, but I think it looks mostly fine.
Let's go for a joyride
Post Reply