GTA2 Tile Selektor
GTA2 Tile Selektor
THIS MIGHT SLIGHTLY REDUCE THE LIFE OF YOUR SSD. IT WRITES THOUSANDS OF IMAGES TO THE HARD DRIVE EVERYTIME YOU RUN IT.
This requires MSSTDFMT.dll which for some reason I didn't add to the installer. I don't recommend using this since it's slow, writes many files and it's just not useful since it doesn't have 2 way selection.
Download: VB6 source code: This is a modified version of GTA2 File Editor. GTA2 File Editor was created by Stephen Dawkins, Exc0r5 and Gavin Rudd.
The tile selector in the official map editor has a bug that displays most tiles as white until you click on them. This program works around that issue by using its own tile viewer and syncing it with the map editor when you click on a tile.
Sektor added the map editor listbox/window controlling code. Ben Millard fixed some bugs, made various changes to the GUI, made the window always on top and modified the tile viewer to adjust the number of columns and rows displayed when you resize.
This requires MSSTDFMT.dll which for some reason I didn't add to the installer. I don't recommend using this since it's slow, writes many files and it's just not useful since it doesn't have 2 way selection.
Download: VB6 source code: This is a modified version of GTA2 File Editor. GTA2 File Editor was created by Stephen Dawkins, Exc0r5 and Gavin Rudd.
The tile selector in the official map editor has a bug that displays most tiles as white until you click on them. This program works around that issue by using its own tile viewer and syncing it with the map editor when you click on a tile.
Sektor added the map editor listbox/window controlling code. Ben Millard fixed some bugs, made various changes to the GUI, made the window always on top and modified the tile viewer to adjust the number of columns and rows displayed when you resize.
Re: GTA2 Tile Selektor
if you add scroll wheel support 2 way support, so you can use the pick tool without displaying the left panel it would be perfect.
yur sa'nok ngeyä
- Gustavob
- Immortal
- Posts: 407
- Joined: 18 May 2009, 21:40
- GH nick: Gustavob
|Gustavob| - Location: Nowhere.
- Contact:
Re: GTA2 Tile Selektor
Very nice, but could be made better with scroll wheel support, like elypter said
You just lost the game.
Re: GTA2 Tile Selektor
Nice work Sektor and Ben.
Maybe this helps adding wheel support:
http://vb.mvps.org/samples/HookXP/
http://visualstudiomagazine.com/article ... wheel.aspx
Maybe this helps adding wheel support:
http://vb.mvps.org/samples/HookXP/
http://visualstudiomagazine.com/article ... wheel.aspx
Always wear safety glasses while programming.
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: GTA2 Tile Selektor
Changelog for the version I just sent privately to Sektor:
Ideas
- Window size, position and state are now remembered by using Windows registry.
- Re-arranged the GUI so tabs are on the right, merged with scrollbar and Refresh button.
- Renamed some tabs to be shorter, giving more space for scrollbar in new GUI.
- F5 is now a shortcut for Refresh.
- Up and Down scroll by 1 row.
- PageUp and PageDown scroll by nearly one page: the first (or last) fully visible row will remain fully visible, so you can keep track of context.
- Fixed a bug where there was sometimes an empty row after all the tiles.
- Fixed a bug at startup, when only the tiles in the initially visible area were visible. (Might still see this when going from a short .sty to a long one.)
Ideas
- Tabs might just be removed so this project can be focus entirely on selecting tiles.
- The project it was based on is available online...somewhere? Maybe add it to GTA2 Tools page?
- Just realised that Ctrl+R should be a shortcut for Refresh. Easily added but can't right now.
- Using a small icon instead of the letter "R" might be better for the Refresh button. It has a tooltip to help explain, for now.
Last edited by BenMillard on 29 May 2011, 16:54, edited 1 time in total.
GTA5 Race, DM & Capture | GTA2 Levels & Coding | GTA2 YouTube Videos
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Re: GTA2 Tile Selektor
Thanks for the updates. I added Tile Selektor and GTA2 File Editor to the tools page.
I attached the Nullsoft installer script and icon (just if someone wants to improve the installer or package it themselves).
I attached the Nullsoft installer script and icon (just if someone wants to improve the installer or package it themselves).
- Attachments
-
- installer.7z
- (1.97 KiB) Downloaded 1247 times
Re: GTA2 Tile Selektor
Looks good
Hopefully the scroll-wheel support will be added in future, make it a lot easier!
As you mentioned, only the tile selector is useful in the map editor since we already have STY editors out there for the sprites/fonts etc. If the other tabs can be removed that'd be good.
Also, with the refresh shortcut, F5 seems the more common than Ctrl+R so perhaps keep it as F5? Also, you could change the button caption from saying "Refresh" to a little refresh icon with a tooltip saying refresh also.
Hopefully the scroll-wheel support will be added in future, make it a lot easier!
As you mentioned, only the tile selector is useful in the map editor since we already have STY editors out there for the sprites/fonts etc. If the other tabs can be removed that'd be good.
Also, with the refresh shortcut, F5 seems the more common than Ctrl+R so perhaps keep it as F5? Also, you could change the button caption from saying "Refresh" to a little refresh icon with a tooltip saying refresh also.
- Old School GTA2 Mapper and Scripter.
- Creator of the original GTA2 Scripting tutorials hosted by Ben Millard.
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: GTA2 Tile Selektor
Just sent an updated version to Sektor with these changes:
A couple of loose ends which I keep forgetting about:
- Basic scrollwheel support. One unit of scroll equals one row in the list.
- Scrollwheel support ignores "smooth scrolling" magnitudes and the Windows "scroll by this many lines" multiplier.
- Simply pressing R will Refresh the view. Ctrl+R and F5 also work.
- Tabs are now covered up by the scrollbar.
A couple of loose ends which I keep forgetting about:
- Scrollwheel should work in Tile Selektor even when it doesn't have focus. (Is that possible in VB6?)
- Update the Tile Selektor if DMA Editor has picked a different tile. (Avoiding fights and race conditions between them.)
- Give focus to DMA Editor when any tile is clicked in Tile Selektor.
- Remove all redundant controls and code.
GTA5 Race, DM & Capture | GTA2 Levels & Coding | GTA2 YouTube Videos
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Gran Turismo 6 custom track club(Sign in with PSN details, then follow link again.)
Re: GTA2 Tile Selektor
I wonder is the installer really needed?
Always wear safety glasses while programming.
Re: GTA2 Tile Selektor
The installer is required because this VB6 program needs OCX files registered and users should never have to do that manually.
I attached Ben Millard's updated version to the first post.
I attached Ben Millard's updated version to the first post.
- JohnTooray
- Mugger
- Posts: 19
- Joined: 06 May 2011, 11:43
- Location: Munster, Germany
Re: GTA2 Tile Selektor
Is it possible to remove the window decorations? So you only have the window itself without borders and a title bar...
That would make this quite handy tool even a bit handier
cheers,
2Ray
That would make this quite handy tool even a bit handier
cheers,
2Ray
Re: GTA2 Tile Selektor
afaik it is possible to do this in autoit. it would also be possible to position the window inside the editor automatically
yur sa'nok ngeyä
Re: GTA2 Tile Selektor
You could use this to put the list into gta2 map editor itself, making it appear as part of gta2 editor:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Also nice to see someone actually using Gavin's code after all this time, this was his late version SRC i released?
To people who don't know about it, it is this:
http://www.mathpudding.com/temp/gta2fesrc.zip (Gavin Rudd's nearly complete sty editor written in VB around year 2002, parts of it were used to help me make my sty editor (delta stream decoder) )
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Also nice to see someone actually using Gavin's code after all this time, this was his late version SRC i released?
To people who don't know about it, it is this:
http://www.mathpudding.com/temp/gta2fesrc.zip (Gavin Rudd's nearly complete sty editor written in VB around year 2002, parts of it were used to help me make my sty editor (delta stream decoder) )
Re: GTA2 Tile Selektor
It looks like the same code. There's a lot of room for optimisation. When it opens a STY file, it goes through each tile, writes it to disk as temp.bmp and then reads it from disk. There is really no good reason for writing to disk, it could all be done in RAM.
The code is still much better than most of my code and I'm impressed he was able to create it in 2002.
The code is still much better than most of my code and I'm impressed he was able to create it in 2002.
Re: GTA2 Tile Selektor
I found a post of mine from 2007 about a tile selector:
* With lots of help
I thought it was amusing, especially since 4 years later, I ended up doing it myself*.Posted 22/06/07 at 18:20:54
I'm sure Delfi has the skills to take over the interface for the GTA2 map editor and add his own style viewer. It could select the same tile in the real interface but hide it from view. He was able to change the GTA2 network screen completely but that is a much more basic interface. He's a busy man though and this would take some effort.
* With lots of help
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: GTA2 Tile Selektor
Here is my version, with plenty of bugs, but it integrates automatically to DMA window and moves his own ass to correct position when you move DMA window.
Thousands of thanks and credits go to: Ben Millard, Sektor, JernejL.
I must go to sleep now, i will return and will tell you more guys.
I have many ideas, how to make it better.
And i will post the source (Delphi).
Code is yours guys, but i just basically translated it to Delphi and added some nice things to it.
Thousands of thanks and credits go to: Ben Millard, Sektor, JernejL.
I must go to sleep now, i will return and will tell you more guys.
I have many ideas, how to make it better.
And i will post the source (Delphi).
Code is yours guys, but i just basically translated it to Delphi and added some nice things to it.
Always wear safety glasses while programming.
Re: GTA2 Tile Selektor
Cool. This does deserve to be done properly or at least better than my attempt. I'd rather work on GH
Translating my window controlling code to Delphi might have been harder than just going to MSDN (not really they both would use same API calls).
Now where is the download?
Translating my window controlling code to Delphi might have been harder than just going to MSDN (not really they both would use same API calls).
Now where is the download?
Re: GTA2 Tile Selektor
Hi Sektor.
Well you always could do the same things in VB i guess.
I dunno.
I just translated the most important stuff, finding gta2 editor handle, clicking on listbox etc.
But it's not complete yet, because tiles drawing order is not same as in DMA editor and it clicks on wrong tiles in DMA.
Also, it loads sty from my temp folder, instead of locating it in registry.
I just wanted to test it guickly.
And there is some more stuff to be done, i could upload the messy incomplete source if you want? Or the exe. It atleast shows how it looks like.
I will improve it of course and the final source will be available anyway.
I have plan to rewrite it in assembler, to make it as fast as possible.
I didn't bother to mess with SetParent anymore.
I tried it and didn't get good results. So just decided to remove all the unneeded borders, make it topmost, position to DMA gta2 tiles tab and move it, whenever dma editor moves.
More checks are needed for that thing, for ex: if DMA editor is active (has focus) or not, is it minimized or not.
And hide the selector accordingly.
Also hide it from windows taskbar, etc small things.
EDIT:
I attached simple demo.
Just run DMA editor first and then this tool.
If you close DMA editor, then tool closes also.
STE.STY must be in C:\TEMP\ !!!
ie:
c:\temp\ste.sty
EXE is clean, don't worry. I checked it.
Well you always could do the same things in VB i guess.
I dunno.
I just translated the most important stuff, finding gta2 editor handle, clicking on listbox etc.
But it's not complete yet, because tiles drawing order is not same as in DMA editor and it clicks on wrong tiles in DMA.
Also, it loads sty from my temp folder, instead of locating it in registry.
I just wanted to test it guickly.
And there is some more stuff to be done, i could upload the messy incomplete source if you want? Or the exe. It atleast shows how it looks like.
I will improve it of course and the final source will be available anyway.
I have plan to rewrite it in assembler, to make it as fast as possible.
I didn't bother to mess with SetParent anymore.
I tried it and didn't get good results. So just decided to remove all the unneeded borders, make it topmost, position to DMA gta2 tiles tab and move it, whenever dma editor moves.
More checks are needed for that thing, for ex: if DMA editor is active (has focus) or not, is it minimized or not.
And hide the selector accordingly.
Also hide it from windows taskbar, etc small things.
EDIT:
I attached simple demo.
Just run DMA editor first and then this tool.
If you close DMA editor, then tool closes also.
STE.STY must be in C:\TEMP\ !!!
ie:
c:\temp\ste.sty
EXE is clean, don't worry. I checked it.
Always wear safety glasses while programming.
Re: GTA2 Tile Selektor
Nice it loads the tiles nearly instantly. As you said, the tile order isn't exactly the same, so it gets it wrong sometimes. It follows the map editor window around (you can see it catching up but it's good enough). ASM isn't needed since it's speedy already but if that's what you want to do, it would be cool.
Will you add the option to resize the window so you can see many tiles without scrolling? After you fix the bugs of course.
If you undock the map editor's tile selector before starting your program then it doesn't follow properly. It does follow if I undock (drag it off the map editor) after running your program.
Will you add the option to resize the window so you can see many tiles without scrolling? After you fix the bugs of course.
If you undock the map editor's tile selector before starting your program then it doesn't follow properly. It does follow if I undock (drag it off the map editor) after running your program.