Updates to STY Tool by Delfi/JernejL

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Updates to STY Tool by Delfi/JernejL

Post by elypter »

wow thanks for the update.

i have one little suggestion and one bug to report:
-a possibility to open by commandline would allow to assign file types and do dragndrop
-there is a bug when importing some cars and especially deltas.

below a screenshot and the car i was trying to import. it does not only happen with this car.
Attachments
streicher.zip
(236.95 KiB) Downloaded 511 times
bug.jpg
yur sa'nok ngeyä
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Updates to STY Tool by Delfi/JernejL

Post by elypter »

unforunately there is another more severe error. i never saw it in previous versions. when you start gta2 it fails with the error message: sprite 255 has multiple delta entries.
yur sa'nok ngeyä
User avatar
JernejL
Hitman
Hitman
Posts: 141
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Updates to STY Tool by Delfi/JernejL

Post by JernejL »

It's very possible that i broke delta compression code while messing with it, avoid this version until i fix this.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Updates to STY Tool by Delfi/JernejL

Post by elypter »

I tried again and made backups before every change this time. This time it worked although i think i did not made much differently. I was importing, exporting, changing sprite sizes and car properties. So unfortunately it is not reproducable. Maybe it is only a very rare bug and i was just lucky that it didn't happen in earlier versions. If it helps you i can upload the corrupted file.

Edit:
The other problem, partial importing cars&deltas, already existed in earlier versions. You get around it when you open it in gimp and save them. So it's probably only a tiny change in the format which could be found by winmerge easily i guess.
yur sa'nok ngeyä
User avatar
JernejL
Hitman
Hitman
Posts: 141
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Updates to STY Tool by Delfi/JernejL

Post by JernejL »

Hmm, well i checked now and there were no changes done to the deltas compressor, can you message me on irc with any samples / ways to reproduce any of problems you reported here?
User avatar
JernejL
Hitman
Hitman
Posts: 141
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Updates to STY Tool by Delfi/JernejL

Post by JernejL »

Ok, it appears the reason for deltas being imported wrong is, that the format used by that bitmap is not a totally classic bitmap, but it has some slight differences which cause the 13+ year old delphi RTL library to not read the bmp properly, right now i can't give you any fix for this.. it would require a few hours of coding that i don't have :(

But any competent delphi coder is welcome to take over development of the tool, i'll make source code availible to whoever is competent and interested in it.

EDIT:

A small update to actually implement some of Elypter's suggestions (fixed gci stuff, jasc .pal export/import, mass. tile export and some other stuff.. in theory opening by command line SHOULD now work. + xpmanifest (sigh..)).

It still doesn't fix the odd 8 bit .bmp importing bug tho (that requires re-saving bmp in gimp or paint shop pro).

http://www.mathpudding.com/temp/gta2stytool.rar

I really didn't think i would be updating this tool after all these years, but if you guys insist on modding this game, i won't stop you ;)

EDIT:
BenMillard wrote: Re-write the retarded "Yes/No/Cancel" message box about importing tiles with different palettes. Nobody can understand it and the confusion can waste epic amounts of time. Such as the way

The option there MAKE PERFECT SENSE, just read what it says, if unsure then click the last option to leave the palette alone..
BenMillard wrote: Name buttons consistently. "go away!" might be novel to a Slovene weirdo when he's making at app at 4am 6 years ago. But it doesn't make good button text for users, imho.

When did you turn into such an arse? You should be the last person to have the right to call ME a weirdo.. :|
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: Updates to STY Tool by Delfi/JernejL

Post by Pyro »

Good to see your alive Jernej :) Not seen you around in ages heh heh, how's things? Better keep this short and not de-rail this thread ;)
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Updates to STY Tool by Delfi/JernejL

Post by Cuban-Pete »

JernejL wrote:
I really didn't think i would be updating this tool after all these years, but if you guys insist on modding this game, i won't stop you ;)
Perhaps some more motivation for a next update: I made you a sharper looking icon. :D
new icon gta2 tool.png
new icon gta2 tool.png (2.27 KiB) Viewed 23826 times
gta2tool_icon.zip
(2.03 KiB) Downloaded 510 times
What do you think about it?
"Mmmm, your eyes are so beautiful."
User avatar
JernejL
Hitman
Hitman
Posts: 141
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Updates to STY Tool by Delfi/JernejL

Post by JernejL »

Cuban: there, included your icon, it's the same link as is posted above.

Pyro: long time no see, i didn't know you still hang around gta2, i think i still have you on my msn.. somewhere, ping me on msn sometimes if you got time.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Updates to STY Tool by Delfi/JernejL

Post by Cuban-Pete »

JernejL wrote:Cuban: there, included your icon, it's the same link as is posted above.
well... your welcome... :)

it looks here on my pc a bit weird. i think my icons are set at 48 and it takes my 32pixel and stretch it ugly to 48. I can always make/add an 48 size if you want.
"Mmmm, your eyes are so beautiful."
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Updates to STY Tool by Delfi/JernejL

Post by elypter »

on my pc it looks nice. i tested all sizes in directory opus
yur sa'nok ngeyä
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Updates to STY Tool by Delfi/JernejL

Post by elypter »

update by JernejL:
  • info tab also shows physical palette for sprites now.
  • info tab text is selectable.
  • there is a dragable window splitter between right and left tabs. the right tabs can be made completely invisible if you dont need it.
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Updates to STY Tool by Delfi/JernejL

Post by BenMillard »

Just downloaded from URL in JernejL's message... those are some neat improvements. Command line support especially!

Initial opening time seems faster now. But there's a bit of redraw time while scrolling between pages. If you could somehow "cache" pages which have already been drawn, that would be a perfect compromise between initial speed and in-use speed.

My main remaining requests:
  1. Remember the window size and position from last time.
  2. "Word wrap" the pages, so the whole viewport is used. That would also make scrolling vertical, which is more common.
  3. Make the scrollwheel scroll through the rows. Respect the "number of rows to scroll" setting in Windows, if Delphi can read that. Scrollwheels aren't for moving the focus rectangle - arrow keys are good for that. (If the "word wrap" thing is too hard, making scrollwheel go horizontally by columns would still help.)
  4. Support PageUp and PageDown keys. My mouse has extra buttons so I can skip up and down. Really handy for web browsing and code editing, would be useful in Sty Tool as well. (Again, can go horizontally if "word wrap" is too hard.)
  5. Drag-drop opening of .sty is a small convenience which allows re-using the window more easily in some situations.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Updates to STY Tool by Delfi/JernejL

Post by Cuban-Pete »

Is it possible that you add an option that the background is not black but purple/pink when I export the images, that way I can easily remove it without taking parts of the image sometimes. Sometimes the icon/image itself also contains black so that is why it goes wrong. Even better would be png support and directly export to png with background set to transparent. ;)
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Updates to STY Tool by Delfi/JernejL

Post by Sektor »

GTA2 File Editor can export as bmp with pink transparency but I agree it should be in STY Tool. I can add a mass export to File Editor if you want it.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Updates to STY Tool by Delfi/JernejL

Post by Cuban-Pete »

Sektor wrote:GTA2 File Editor can export as bmp with pink transparency but I agree it should be in STY Tool. I can add a mass export to File Editor if you want it.
Thanks for the info, I did not know about file editor. You sure it can export with pink background? It only shows the pink in the editor, not in the exported bmp.

A mass export would be nice, but don't do it if jernejl adds it, else it's double work. :)
"Mmmm, your eyes are so beautiful."
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Updates to STY Tool by Delfi/JernejL

Post by Sektor »

STY Tool has a mass export but I guess you knew that and it doesn't use pink.

I see, File Editor transparency only works on tiles, not sprites. Too bad.
User avatar
JernejL
Hitman
Hitman
Posts: 141
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: Updates to STY Tool by Delfi/JernejL

Post by JernejL »

Cuban-Pete wrote:Is it possible that you add an option that the background is not black but purple/pink when I export the images, that way I can easily remove it without taking parts of the image sometimes. Sometimes the icon/image itself also contains black so that is why it goes wrong. Even better would be png support and directly export to png with background set to transparent. ;)

you can do that - edit the palette clut, replace first row with pinkish and use max exporter.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Updates to STY Tool by Delfi/JernejL

Post by Cuban-Pete »

nothing changes when I edit the palette. completely nothing. even saving the .sty and re-opening it and the custom palette is gone.
"Mmmm, your eyes are so beautiful."
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Updates to STY Tool by Delfi/JernejL

Post by BenMillard »

Edit Car button does nothing in the updated Sty Tool. :(

I was hoping to make several cars have the same axle positions and collision sizes, so we can have several F1 cars which perform very much like each other. The only differences would be in the actual handling data, rather than strange differences in the .sty file.

The previous edition still works, so I can make progress using that.
Post Reply