GTA2 Tile Selektor

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
AssainGuy
Hitman
Hitman
Posts: 101
Joined: 01 Feb 2012, 13:11
GH nick: AssainGuy
Location: Hungary
Contact:

Re: GTA2 Tile Selektor

Post by AssainGuy »

nice job! works perfectly, thanks! =)
i come here sometimes
Software Development / Audio Engineering
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Tile Selektor

Post by BenMillard »

Oh dear, I forgot for ages my version of Tile Selektor crashed when minimised! Attached version fixes that glitch.

However, sometimes my version needs you to Render the style file twice, with the window at the right size. There must be some bozo mistake in my use of events, like calculating with a value which needs to be updated. (Or doing the calculation at a moment which is simply too early.)

B-$hep! Your code but with the resizeable layout of my tool would be ideal. Please, will you find time to try?

Maybe we'd add a + button above the R which makes it lose border edges and attach to DMA Editor. Button then becomes - and it's a free-floating window again, like mine?
Attachments
2012-03-15-tsbm.zip
All files, including VB6 source code. It won't need an installer if you've used the Tile Selektor from the first message.
(99.13 KiB) Downloaded 854 times
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Tile Selektor

Post by B-$hep »

Hi Ben.

I haven't been here for a while now. I was pretty tired of all that GTA stuff and lost my interest, even in coding. I just have been busy more with my car and things.
Now few days ago i got my interest back. But im sick atm, the cold, small fever and little headache.

I tried to make DMA editor to select tiles on my tile selector (i mean selecting tiles in DMA editor makes selections in my tile selector) but i failed to find a working solution.
It was the biggest problem for me. Maybe i should give another try now.

Making resizeable layout should be easier now, because i found nice grid, i found even more faster way to draw tiles and redrawing them when resizing could be made more easily now.


I will find my src and will see what i can do.
Always wear safety glasses while programming.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Tile Selektor

Post by BenMillard »

That's great news! Well, apart from the cold, naturally. ;-)

This is probably the most long-awaited and most wanted fix in all of GTA2 modding.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Tile Selektor

Post by B-$hep »

The cold i have is horrible, i do not smell anything, i do not feel the taste of anything, absolutely "cut off". I can eat and drink but what's the point, lol. I can't enjoy it.


I'm currently working on this thing. I also figuring out how to make DMA editor to select tiles on my selector.

Have to do some tests.
Always wear safety glasses while programming.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Tile Selektor

Post by BenMillard »

Please finish this!

I just tried fixing some missing page glitches in the VB6 one I hacked together from Sektor's code.

Got nowhere with. Have to render it twice at large sizes and small sizes make the later tiles impossible to access. Doesn't re-render when window changes size because the code is so slow.

Please give yours a GUI like mine but use your fast in-memory code so it can work awesomely.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Tile Selektor

Post by B-$hep »

I tried to mess with this some time ago, but i had trouble detecting which tile is currently CLICKED ON on the DMA editor.

I really dont remember exact problem but one thing for sure that i was unable to detect if user clicked on DMA editor tile selector. I needed this but was unable to find a way.


I have to take another look at this, just guessing here doesnt do anything.
Always wear safety glasses while programming.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Tile Selektor

Post by BenMillard »

Making the editor update the Selektor isn't an essential feature, imho.

If you could make the pipette update the Selektor that would be awesome. But as long as we can see the tile number in the editor, we can find it in the Selektor.

The main advantage to your code was the rendering speed. And avoiding the rendering glitches that I introduced to the VB6 one!

Check back through page 2 to see really good discussion of this. It was over 2 years ago.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Tile Selektor

Post by B-$hep »

I did something on it. Attached a small demo.
Its now possible to resize it as needed, tiles will be updated accordingly.

Its just a demo. Not new tile picker.
But it tries to get .sty file name from registry from DMA editor keys and displays tile_id on window caption when you move the mouse.

Try the resizing also.


Do you like it or not. What could be different or modified or made better?
Attachments
TilePickerPRW.zip
Tile Picker Preview
(427.84 KiB) Downloaded 752 times
Always wear safety glasses while programming.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: GTA2 Tile Selektor

Post by Sektor »

Looks good. I think it just needs to communicate with GTA2 Map Editor now, both ways. One place in the map editor that could also use a tile selector is the animation editor (for creating those animated tiles, fans, water etc).

The option to embed in the map editor or fake it like before and just move on top might be good but I don't need it. Displaying transparency in a different colour would also be useful.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: GTA2 Tile Selektor

Post by BenMillard »

Brilliant, it's so fast!! 'Snapping' the window size to the nearest tile is a good idea and works well.

Basically it all works well so there's just a couple of enhancements I'd like, in priority order, some the same as Sektor:
  1. Remember window size, position and state for the picker from last time.
  2. Scrolling with mouse wheel doesn't work for the first 1 second. After that second it works OK. But if I stop using the wheel or change direction, again it takes 1 second before scrolling picks up what I'm doing and starts scrolling.
  3. Page Up and Page Down only scroll by 1 row at first. When changing direction, again it only goes by 1 row at first.
  4. Allow selecting a tile.
  5. Show the selected tile number in caption first. (Optionally with "mouse over" tile second - this is surprisingly useful.)
  6. Set the selected tile in the editor!
  7. Read selected tile from the editor.
  8. Arrow keys should move to the selected tile in that direction.
  9. Please fit the rows to the available width so it only has vertical scrolling.
  10. When maximised at 1600x900, the last column of tiles is only half visible. It's better to leave a gap at the end of each row than to show a partially visible tile.
  11. Please use bright pink for transparency, like Delfi/JernejL's tools and Tile Selektor.
Not essential and very fiddly: Support for multiple editor windows?
  1. Read from the most recently changed and write to them all.
  2. Ignore windows with a different .sty than is currently loaded in that tile picker.
  3. Loading another tile picker will get the .sty from most recently opened map editor, as that will have updated the registry the most recently.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Tile Selektor

Post by B-$hep »

Im currently working on it, as requested.
A while ago i wrote:
I tried to make DMA editor to select tiles on my tile selector (i mean selecting tiles in DMA editor makes selections in my tile selector) but i failed to find a working solution.
It was the biggest problem for me. Maybe i should give another try now.
I was thinking a bit here and decided to try CheatEngine, find out where DMA editor stores currently selected tile and read this memory cell in my tile picker.
Hopefully the address wont change, so its same at each run.
It should allow DMA editor to select cells in my tile picker.

Currently it was impossible. maybe i was stupid and still am, but DMA actually displays selected tile at left bottom, where tile preview is.
I could actually read this label each second.
But again, its not nice thing to do. Adding timer, will create lags.

Hmmm.

In my computer selected tile is stored at: 007713DC 4 bytes
Edited the value in memory and DMA editor changed the selected tile accordingly.
Dunno, if it will be same on all machines. Have to test.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 Tile Selektor

Post by B-$hep »

Found a problem with tile selector.
Dunno if anybody noticed it.
When tile picker is set to topmost then if you open Edit menu then you can't even use it. Because menu opens behind the tile selector.
Very bad!
It shows up even here on forum. This way too ugly..

Image

Dunno if there is a solution for this.
One idea that popped into my head atm is to try to hide the original tile picker grid and use my own picker instead in that position.
Have to try.
Dunno if i can hide the original picker with WINAPI.
Will try this..
Always wear safety glasses while programming.
Post Reply