DMA Scripting Documentation in HTML

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: DMA Scripting Documentation in HTML

Post by Pyro »

Speaking of FOLLOW_CAR_ON_FOOT_WITH_OFFSET, I think it might be useful to include what a player/ped running speed is and also tie that in with SET_CHAR_MAX_DRIVESPEED too. If I remember, an example of these combined was in 1st city Yakuza hard mission to destroy Zaibatsu tanks with guards surrounding them.

I used to have it noted down but can't find it, will have try experiment with this command(s) I think!
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: DMA Scripting Documentation in HTML

Post by BenMillard »

I'll probably use a "see Character AI tutorial" link instead of repeating the table. The tutorial could include a working example with speeds set up, if you feel like writing it. :)

Normal running speed is 0.050, fwiw. So the vehicle speed be 0.049 at the fastest, I think.

Instant Gang peds run slightly faster, possibly 0.051? Elvis impersonators run much faster; could tail one in a car to find out.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: DMA Scripting Documentation in HTML

Post by CarThief »

I'll just throw in my own input here from what i found while testing about with runspeed in the attemp of making a character faster then a cop on low wanted levels but not as fast as a player, put this small list with the other strange commands i found so far:

Code: Select all

SET_CHAR_MAX_RUNSPEED( character , x.y )
Speed 0.1 : Pretty damn high speed.
Speed 0.07: Reasonable but faster then normal speed.
//Speeds above 0.06 may cause instability and crash the game, especially high values.//
Speed 0.06: Normal running speed.
Speed 0.055: Almost as fast as normal speed. Perhaps handy for stronger peds.
Speed 0.053: A small bit faster then 0.05, handy for targets who are supposed to be chased.
Speed 0.05: Half-ish of normal speed. Cops use this on the lowest Wanted Levels.
Quite fun how Speeds 1.0 and above just make the character go faster then Superman in flight and just dash across the screen with steps of several miles, essentially teleporting forward rapidly, but this event almost always ends up in a crash.
Its also hilarious to see a bot catch up to a high-speed car with these speeds. :P

I suppose a list of reasonable speeds wouldnt hurt. Or atleast the speeds of low wanted level cops, and regular speed.
User avatar
Pyro
Immortal
Posts: 414
Joined: 17 Mar 2010, 04:07
GH nick: Pyro
Location: Wales, UK

Re: DMA Scripting Documentation in HTML

Post by Pyro »

Been playing around with these commands today, but no matter the speed I set the character to he can always keep up with any car, even a GT-A1!

However, there are a few things I noticed:
  1. Accelerating as hard as you can he will not be able to keep up with you until you slow down/stop (he will run at normal speed).
  2. If you slowly accelerate up to top speed, he can keep up with you even in the fastest cars!
    • If you turn slightly when a character is following you at maximum speed he will stop and go back to normal speed. Only seems to do it if he has to jump.
Also worth noting, if not obvious enough, when doing the offset for the character they will be on one side even when the car turns around etc.

Might also be worth changing the 'rotation' description too, seems to be the following:

000 = In front of car.
090 = Passenger side.
180 = Behind the car.
270 = Driver side.
CarThief
Hitman
Hitman
Posts: 108
Joined: 19 May 2012, 18:12
GH nick: CarThief
Location: Holland, AKA The Netherlands

Re: DMA Scripting Documentation in HTML

Post by CarThief »

I suppose it might be worth to mention FOLLOW_CAR_IN_CAR only seems to actually work when the car being followed has a driver in it(even if its simply a ped). If it doesnt have one it basically ignores the command and they'll just drive off seperately. Was thinking of posting this in the scripting weirdness section but its rather realistic and somewhat logical.

Still an issue though when you dont want to spend extra lines on waiting untill a ped has entered a car or anything. Would safe people the trouble of having to figure that one out.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: DMA Scripting Documentation in HTML

Post by BenMillard »

I've added that to the description of FOLLOW_CAR_IN_CAR now.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: DMA Scripting Documentation in HTML

Post by B-$hep »

Ben
There is a typo in:
http://projectcerbera.com/gta/2/tutorials/gangs

In the Parameters table, you have there:

gang_name
car_remap

But it should be

gang_name
gang_remap

Gang car remap is already set as the last in the table.

For compiler coding i often use your homepage because its much better to read and i discovered this when working with set_gang_info.
Always wear safety glasses while programming.
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: DMA Scripting Documentation in HTML

Post by BenMillard »

Oh yeah, that's a simple mistake. Fixed.

The big scripting document was a pet project for a while. It had a lot of time spent on it. As you can imagine, it gets boring so I forget about it for months at a time, then make a load of updates.

The main task is arranging the content to match the table of contents. Then adding the formatting for sections. Then adding the jump lists on the left.

GTA5 will be out for PC before it's done, most likely. It's already been really useful to me and hopefully a few other modders over the past couple of years, though.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: DMA Scripting Documentation in HTML

Post by elypter »

the constants seem to be missing. the anchor doesnt work and i cant find them manually.
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: DMA Scripting Documentation in HTML

Post by BenMillard »

All worked for me except Objects and the one for Sounds. These skip to the contents list, not to their section.

Was that the only issue? What system etc as normal please.

You can Ctrl+F for the text in the link to find the corresponding heading.
User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: DMA Scripting Documentation in HTML

Post by elypter »

sorry, now they work for me too.
btw nice to see you again
yur sa'nok ngeyä
BenMillard
Immortal
Posts: 889
Joined: 16 May 2009, 06:14
GH nick: BenMillard
Location: London, UK
Contact:

Re: DMA Scripting Documentation in HTML

Post by BenMillard »

Nice to be back! I've fixed the Object Types and Sound Types anchor links.
Post Reply