vike's GTA2 update patch enhancement upgrade fix v11.44

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: Vike's enhanced GTA2

Post by elypter »

it would be fun on a no arrow map(& not showing names). hiding in the ped crowd ... and then suddenly attacking. :lol:
yur sa'nok ngeyä
Razor
Lunatic
Lunatic
Posts: 456
Joined: 19 Jul 2008, 14:14
GH nick: Razor, R
Location: Poland / Szczecin
Contact:

Re: Vike's enhanced GTA2

Post by Razor »

yes i always wanted to script hide & seek map :>
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Vike's enhanced GTA2

Post by Sektor »

Is there any gxt line that can trigger D.wav, M.wav, A.wav (DMA) lines found in gta2.exe? I know the wav files don't exist but just curious if the code to play them is still there.
User avatar
Lantyz
Psycho
Psycho
Posts: 71
Joined: 14 Apr 2009, 08:20
GH nick: Lantyz
Location: The Netherlands
Contact:

Re: Vike's enhanced GTA2

Post by Lantyz »

Vike the Hube wrote:Definitely doable
Is there any guideline on what is doable and what isn't? I'm sure there's an infinite amount of improvements that could be made to GTA2, but most of them are probably far from feasible. What kind of suggested improvements are worth considering?
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube »

Lantyz, good question :P You're completely right, everything is possible, and the only problem is how long it all takes, i.e. what is feasible. To understand what's feasible it helps to understand how I work...

Most of what I do is finding code. GTA2 has some ridiculous number of lines of code in assembly, so there is no way that I can go through and map the structure of it completely because it would take forever. So what I do is try to find a point of reference. As an example, to fix the 100 MMP limit, I figured GTA2 would be using a Windows API search function on the data directory to find *.mmp files. So what did I find? References to FindFirstFile, FindNextFile, and the string "*.mmp". That allowed me to find the code quickly. That was an easy finding fix, but a hard code-wise fix, because I had to basically rewrite the map parsing loop to use a dynamicly allocated array instead of the original (static) array. Another example is the UDP -> TCP fix- easy, because all I had to do was find all the DirectPlay send calls, and change one parameter of them.

So, easy fixes are normally things where I can find a nice reference point. API/DirectX functions names that I can guess, strings embedded in the EXE or read into memory, debug displaying text (because of its strings), things like that that directly point to the relevant code are easy.

Hard things are normally where I can't find the relevant code. A good example is most changes to the script compiler. They are mostly changes to GTA2's internal data structures which I have no reference points into; carried out by interpreting a bytecode no one understands; at who knows when in the game cycle. I can definitely find the code (in fact already have) that reads in the compiled script files into memory, from the API calls, but I have very little chance of finding the relevant code that executes them without first totally mapping out the compiler and bytecode reading parts of GTA2 :P

Sometimes though hard things are when I can find part of the code but the overall structure is too complex for me to discern without spending huge amounts of time on it. An example of this is the chat special characters code. I found the code easily from the DirectX receive chat message call and the interpretation of the DirectX key constants. But what it does with the keys you press is really weird and even comparing between 9.6 and 10.3 I couldn't figure out what the hell was going on. I did try copying some of the code over but didn't get it all so it just crashed.

Add to all this the fact that I'm forever distracted by a million things wanting my time and that I'm currently trying to help Sektor fix the ports issue and you get the idea.

Hope that helps ;-D
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube »

Also Ben I'm staaaaaaaaaaarting to get the idea that you want me to fix ROAD_BLOCK_TANK_MAN :P
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Vike's enhanced GTA2

Post by BenMillard »

Great description of what it takes, Vike. Also, you're writing directly in (x86?) Assembly language which is totally hardcore.

You could make a tiny script with no AI, then add a ROAD_BLOCK_TANK_MAN and see what's different in the compiled .scr? That might give you an opcode or something which you could then find in the EXE, leading to the necessary code.

It seems like a really special-cased feature, so who knows how much work it would be to adapt. Even if it always shoots at Player 1, at least there'd be no more desync. Plus, natural Tank roadblocks with deadly cannon fire against the hosting player would be epic!

Even if you prevent natural tanks from shooting or using the turret at all, we'd still get natural Army and stay synchronised. Streets would be full of Armed Land Roamers. Pavements would swam with soldiers. You'd get the elite commando duos chasing you down and attacking.

You've made grenades, molotovs and complex explosions work reliably (that was the UDP -> TPC change, though). making Army work reliably seems the next biggest gameplay improvement for multiplayer, although would likely mean untangling a lot of deeply complicated AI code.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Vike's enhanced GTA2

Post by Sektor »

v11.39 is out.

- GTA2 can be run multiple times. You can host and join your own network games on a single PC without using any virtual machines. It's great for testing. If someone can figure out how to control GTA2 when the window isn't active then you could play a split screen game (both GTA2 instances would need to be running in window mode).
- GTA2 will now run in windowed mode even if you don't have your colour depth set to 16 bit. Unfortunately it buggers up the menu graphics. If you care about the menu then run in full screen mode or 16 bit colour depth.
- Increased size of points/frags box so you can have higher points limits.
- Removed the requirement for the "PlayerCount" line in MMP files- if you leave it out, 6 players are allowed; if you put it in, only that number is allowed. No more "...2 player.mmp" "...3 player.mmp" if they all use the same files.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Vike's enhanced GTA2

Post by elypter »

awesome changes !
every feature is very useful. :D
about splitscreen:
If it is possible to allow gta to be controlled without having focus and to select the dinput(direct x input) device by commandline a hot seat game would be possible with 2 keyboards. And with the help of GlovePie http://glovepie.org/ it would be possible to control multiple fake keyboards with only 1 real keyboard.
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Vike's enhanced GTA2

Post by BenMillard »

Are all those redistributed original files supposed to be in there? I could understand if the *.scr have crane fixes and stuff but why new *.mmp files and replacing the obsolete GTA2 manager?

(EDIT) I'm still seeing very high traffic densities in a map with the CityInfo zone set to produce 250 traffic density. It's the same "traffic jam" bug which was in earlier v11.3 editions. I'm launching it via "Play Alone" but it's the same in true multiplayer games.
Image

That density extends about 4 rows of vehicles further South, 2 rows of vehicles further North and 2 more vehicles East. When on the freeway, you suddenly hit big herds of traffic.

Jailbreak with 250 traffic density.
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Vike's enhanced GTA2

Post by Cuban-Pete »

I played the first level and the traffic is enormous when you speed, no fun. :(
"Mmmm, your eyes are so beautiful."
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube »

Yeah I know about the traffic, still working on the fix for it.

Sektor and I wondered if you could do hotseat like that :D I guess currently GTA2 needs focus to accept keyboard input though.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Vike's enhanced GTA2

Post by Sektor »

I include all the files that the v10.3 patch included and that patch had MMP files. I'm not sure if MMP files have ever changed (I think Downtown had spacing changes) but they are small so it doesn't hurt to include them. I didn't include all the crane fixed SCR since B-$hep applied those changes to old versions of the SCR instead of the kill frenzy fixed version. I will include the best versions of the default maps that I can get.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Vike's enhanced GTA2

Post by BenMillard »

Making a "best of everything" version for script files and including those would make sense. Quite a lot of time to put all that together, I imagine? Could include the deduced .mis versions of the multiplayer ones, too.

I particularly dislike having all those MMPs as it makes the Maps list under Create Game extremely long in GH. I only play those levels when exploring how their textures and terrain affect gameplay.

So if the .mmp are the same (as I imagine they must be) then please don't include them.
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube »

We could always include versions without the PlayerCount line, so the additional mmps don't have as much impact. But I guess then the difficulty is removing the original 1-6P versions that people may have. We could replace them with mmps without any lines?
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Vike's enhanced GTA2

Post by Sektor »

I could make a clean up function or tool that optionally removes/renames all the MMP files that don't use unique SCR/GMP files and update the 6 player .mmp file to remove the PlayerCount = 6 line. All the default maps use different SCR files for each playercount, so they might not change but many of the redundant user created MMP files could be removed.
Mr Zero

Re: Vike's enhanced GTA2

Post by Mr Zero »

Vike the Hube wrote:Yeah I know about the traffic, still working on the fix for it.
Oh that's great. Some roads are full 'o cars which is a bit annoying. D:
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: Vike's enhanced GTA2

Post by BenMillard »

Putting traffic back as original would be fine by me.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Vike's enhanced GTA2

Post by elypter »

I have an idea about desyncs:
I think desyncs can not be completely eliminated. But maybe it is possible to resync the game. It is not possible to do this with a script because afaik only key presses are transmitted. So the only way would be something that is triggered by a key.
With a key that resets the game it should be possible to resync the game. This could be done without the need of transmitting coordinates or other data. I don't know if this would be easy to implement but i guess its the easiest way it could be done.
yur sa'nok ngeyä
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Vike's enhanced GTA2

Post by Vike the Hube »

elypter wrote:But maybe it is possible to resync the game.
Yes, this is actually on my list already ;) There is already a way to detect desyncs in game- if all players have "do sync checks" turned on (and the same value for "log random", "log random extra", and "do free shopping") then it will tell you when it desyncs. I could use this to resync it. Unfortunately it would be hard to reset the whole game state to some base state- I don't think there's a script command to do it. It's probably just as easy to individually go through and fix all the things that make it desync. But we'll see :P
Post Reply