Collection of gta scripting and map weirdness
Re: Collection of gta scripting and map weirdness
- crane ranges are squares (instead of circles as you would think), 4 blocks away from the crane.
replace:
- "Some cars will instant crash GTA2. (eg. HOTDOG_D4)."
to:
- "(GTA2 CRASH) Cars that will insta crash GTA2: TRAINCAB, TRAIN, TRAINFB, BOXCAR, CAR9, CAR15, CAR20, CAR43."
replace:
- "Declarations must always be before LEVELSTART command."
to:
- "Declarations should always be before LEVELSTART command to avoid possible crashes."
replace:
- "Spray car shop with CREATE_OBJ will always crash compiler if using 2d coordinates."
- "Objects BIN and CAR_SHOP (spray) with CREATE_OBJ will always crash compiler if using 2d coordinates, however 255.0 makes 2d coords possible."
to:
- "(COMPILER CRASH) CREATE_OBJ using 2d coords with ammo or remap value (spray shop), will crash compiler. workaround: use 3d coords with 255.0 as z-position."
replace:
- "All car shops that were not created with CREATE_OBJ will crash compiler if using 2d coordinates or 255.0 as z-position."
to:
- "(COMPILER CRASH) Car shop (except spray shop) that was created with OBJ_DATA will crash compiler if using 2d coordinates and it is the first OBJ_DATA declaration in the script. workaround: use 3d coords with 255.0 as z-position, or move it to not be the first declaration."
replace:
- "Some cars will instant crash GTA2. (eg. HOTDOG_D4)."
to:
- "(GTA2 CRASH) Cars that will insta crash GTA2: TRAINCAB, TRAIN, TRAINFB, BOXCAR, CAR9, CAR15, CAR20, CAR43."
replace:
- "Declarations must always be before LEVELSTART command."
to:
- "Declarations should always be before LEVELSTART command to avoid possible crashes."
replace:
- "Spray car shop with CREATE_OBJ will always crash compiler if using 2d coordinates."
- "Objects BIN and CAR_SHOP (spray) with CREATE_OBJ will always crash compiler if using 2d coordinates, however 255.0 makes 2d coords possible."
to:
- "(COMPILER CRASH) CREATE_OBJ using 2d coords with ammo or remap value (spray shop), will crash compiler. workaround: use 3d coords with 255.0 as z-position."
replace:
- "All car shops that were not created with CREATE_OBJ will crash compiler if using 2d coordinates or 255.0 as z-position."
to:
- "(COMPILER CRASH) Car shop (except spray shop) that was created with OBJ_DATA will crash compiler if using 2d coordinates and it is the first OBJ_DATA declaration in the script. workaround: use 3d coords with 255.0 as z-position, or move it to not be the first declaration."
My GTA2 related projects:
Re: Collection of gta scripting and map weirdness
WHAT THE FUCK!
Equals:
CRAZY!!
it seems to work only for those 3 different trailer models, i think... need to test.
i found this on a map called "frenzy" after i decompiled the script and looked at the mis file in my editor: i spotted weird looking car combination which had a car as the trailer and the trailer as the car, but in game it wasnt looking like that at all.
Edit: Tested all cars and noticed it works only with TRUKTRNS model as the car!
Here is how it looks, see how it gives default remap for the car on top of it:
Code: Select all
CAR_DATA auto2 = (100.50, 215.50, 255.0) 1 0 TRUKTRNS SPRITE
Code: Select all
CAR_DATA auto1 = (100.50, 215.50, 255.0) 1 0 SPRITE
CAR_DATA auto2 = (100.50, 215.50, 255.0) 1 0 TRUKTRNS
PUT_CAR_ON_TRAILER(auto1,auto2)
it seems to work only for those 3 different trailer models, i think... need to test.
i found this on a map called "frenzy" after i decompiled the script and looked at the mis file in my editor: i spotted weird looking car combination which had a car as the trailer and the trailer as the car, but in game it wasnt looking like that at all.
Edit: Tested all cars and noticed it works only with TRUKTRNS model as the car!
Here is how it looks, see how it gives default remap for the car on top of it:
My GTA2 related projects:
Re: Collection of gta scripting and map weirdness
about the trailer part: i cant really put that directly into the list. some of the points depend on the car handling values. that would not belong to the scripting weirdness part. a few could maybe go into a new GCI section but there are also some things that are just logical and not weird at all. like that weak cars cannot pull a trailer. These should be put in something like a tutorial. Ben has a page on his site where wants to put information like this and I have a txt file on my pc with various discoverings about how gci values cause weird things (eg negative values) btw i also made a non cab vehicle(tow truck in tiny tiny tiny town army) quite handleable for pulling trailers. these findings could be combined to a tutorial at some time (some time after my desktop pc is working again)Pyro wrote:A few things (mostly about trailers):
Quite a list about trailers As you can guess trailers were only meant for the Truck Cabs and specific trailer types hence all these weird issues.
- Trailers are ignored if you use the PARKED_CAR_DATA and only shows the towing vehicle. Work around: Use CAR_DATA instead. (I know this is listed but I thought I'd expand on it a little)
- You can make any type of vehicle have any type of trailer (such as Dementias with Tanks as a trailer) but there are some (lots!) issues:
- Only trucks (TRUKCAB1 and TRUKCAB2) can tow most vehicles at full speed (3rd gear). Any other car is limited to 1st gear with poor acceleration and turning.
- Depending on the vehicle towing and what vehicle you have as a trailer, sometimes the towing vehicle cannot start moving unless you turn slightly. Rarely you cannot move or turn at all (usually applies to small vehicles trying to tow big vehicles).
- Using a big, powerful vehicle to tow a small car will make the towing vehicle extremely agile compared to normal and accelerate to top speed extremely quickly.
- Entering any vehicle attached as a trailer will crash the game. Detach it and then enter it to work correctly.
- If you have a towing vehicle that has a gun on it (vehicle guns, Armed Land Roamer Gun, tank gun etc) it will not detach until you switch to a non-vehicle weapon.
- Setting the trailer type to TRAIN (train passenger carriage) will make the trailer not appear until you get in the towing vehicle. However, this trailer is extremely buggy and will crash the game randomly. Will instantly explode if it touches another car and crash the game. (Thanks to TM for the basic information while I went and tested this and other train ones as well)
- Setting the trailer type to TRAINFB (train flat-bed) will also appear hidden until you get in the towing vehicle. Even more buggy than TRAIN as trailer.
- Setting the trailer type to BOXCAR (train box carriage) will appear hidden until you get in the towing vehicle. Still buggy as TRAIN.
- Setting the trailer type to TRAINCAB (the train itself) will appear hidden until you get in the towing vehicle. Will instantly crash the game when you enter though and doesn't appear anyway.
- Towing a tank and then detaching it will make the tank roll over the towing vehicle destroying it leaving a tank above the wreck you now can't enter.
- GIVE_WEAPON command on a vehicle ignores the amount you list and always gives +50. Work around: Either use GIVE_WEAPON command twice to get 99 ammo (sets car bomb to 1 ammo) on a vehicle or use OBJ_DATA to create specific weapon under the vehicle if you want to specify an exact amount such as 1 vehicle bomb but at the cost of hearing the voice over on picking up a weapon. (Thanks Sektor for pointing out the work around)
if you organize them like TM its much easier for me to put them into the list.
yur sa'nok ngeyä
Re: Collection of gta scripting and map weirdness
- Cars HOTDOG_D1-4 will crash GTA2 after they explode into a wreck.
i wonder if its possible to make them to not crash, isnt there some way of setting which wreck a car will wreck into?
i wonder if its possible to make them to not crash, isnt there some way of setting which wreck a car will wreck into?
My GTA2 related projects:
Re: Collection of gta scripting and map weirdness
Yeah there is quite a lot about trailers there. But you can definitely use/update the first bullet point about PARKED_CAR_DATA ignoring the trailer code as well as the last bullet point about GIVE_WEAPON too.
Still, handy reference for anyone wanting to mess more with trailers beyond their original design
Still, handy reference for anyone wanting to mess more with trailers beyond their original design
- Old School GTA2 Mapper and Scripter.
- Creator of the original GTA2 Scripting tutorials hosted by Ben Millard.
-
- Immortal
- Posts: 890
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: Collection of gta scripting and map weirdness
Folding some of these findings into my tutorials would be do-able. Is any of it captured on existing GTA2 wiki websites? Perhaps this information was already published somewhere and we could simply refer to it.
Good to have a central list, even if many of the bullet points become links. (Or especially if that happens? Depends how you look at it.)
Good to have a central list, even if many of the bullet points become links. (Or especially if that happens? Depends how you look at it.)
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: Collection of gta scripting and map weirdness
i already wanted to do another article on this wiki:
http://en.wikigta.org/index.php/GTA2 but it is invite-only and Lantyz wasn't here for over a month or so.
http://en.wikigta.org/index.php/GTA2 but it is invite-only and Lantyz wasn't here for over a month or so.
yur sa'nok ngeyä
Re: Collection of gta scripting and map weirdness
Incomplete/broken command:
SET_CHAR_OBJECTIVE ( p1 , ENTER_TRAIN )
SET_CHAR_OBJECTIVE ( p1 , LEAVE_TRAIN )
SET_CHAR_OBJECTIVE ( p1 , ENTER_TRAIN, p1car )
SET_CHAR_OBJECTIVE ( p1 , LEAVE_TRAIN, p1car )
Unfortunately all they do is make the character face south instantly. It doesn't get on or off a train. There's a reason it wasn't in the documentation. It's still good to list the unused/incomplete commands since Vike might be able to fix them or replace them with his own burp/fart command.
SET_CHAR_OBJECTIVE ( p1 , ENTER_TRAIN )
SET_CHAR_OBJECTIVE ( p1 , LEAVE_TRAIN )
SET_CHAR_OBJECTIVE ( p1 , ENTER_TRAIN, p1car )
SET_CHAR_OBJECTIVE ( p1 , LEAVE_TRAIN, p1car )
Unfortunately all they do is make the character face south instantly. It doesn't get on or off a train. There's a reason it wasn't in the documentation. It's still good to list the unused/incomplete commands since Vike might be able to fix them or replace them with his own burp/fart command.
Re: Collection of gta scripting and map weirdness
Edit: oops, doesnt work that way
edit2: found something weird too: SWITCH_GENERATOR(gen1, ON, COLLECT_00) compiles fine but doesnt seem to do anything with the COLLECT_00, the output is same as without it, but compiler wont accept anything other than object type for there...
edit3: yeah, would be cool to create it already on state, i tried to twiddle with the SCR data but no success.
i also tried to manually make these work: CREATE_CONVEYOR, CREATE_GENERATOR, CREATE_DESTRUCTOR, but no success, create_generator crashed gta2, others just didnt do anything in game.
edit2: found something weird too: SWITCH_GENERATOR(gen1, ON, COLLECT_00) compiles fine but doesnt seem to do anything with the COLLECT_00, the output is same as without it, but compiler wont accept anything other than object type for there...
edit3: yeah, would be cool to create it already on state, i tried to twiddle with the SCR data but no success.
i also tried to manually make these work: CREATE_CONVEYOR, CREATE_GENERATOR, CREATE_DESTRUCTOR, but no success, create_generator crashed gta2, others just didnt do anything in game.
Last edited by T.M. on 13 Nov 2011, 19:28, edited 2 times in total.
My GTA2 related projects:
Re: Collection of gta scripting and map weirdness
would be great if you could define it in an already on state
yur sa'nok ngeyä
-
- Immortal
- Posts: 890
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: Collection of gta scripting and map weirdness
Maybe split a couple of the recent messages to the decompiler thread, leaving short summaries behind?
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: Collection of gta scripting and map weirdness
- CHECK_CAR_SPEED can take negative values as well, using -1 will trigger it instantly when you get inside the car.
- CHANGE_INTENSITY takes integer value, not floats.
- CHANGE_INTENSITY takes integer value, not floats.
My GTA2 related projects:
Re: Collection of gta scripting and map weirdness
addedT.M. wrote:- CHECK_CAR_SPEED can take negative values as well, using -1 will trigger it instantly when you get inside the car.
thats a doc error. if you tell ben he probably fixes it.T.M. wrote: - CHANGE_INTENSITY takes integer value, not floats.
yur sa'nok ngeyä
Re: Collection of gta scripting and map weirdness
where is this so called fixed doc thread??thats a doc error. if you tell ben he probably fixes it.
My GTA2 related projects:
-
- Immortal
- Posts: 890
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: Collection of gta scripting and map weirdness
Yes, I do want that to be the best summary of every command you can use in GTA2 mission scripting. But only a summary. For detailed explanations, it's better to link to other pages. (Already done for a few things.)
Navigation within the document will get a lot better over time. Such as the linked lists of commands at the start of each major section. Re-arranging the sections to match the Table of Contents.
It's a lot of boring text editor work. But I do intend to complete it...eventually!
Navigation within the document will get a lot better over time. Such as the linked lists of commands at the start of each major section. Re-arranging the sections to match the Table of Contents.
It's a lot of boring text editor work. But I do intend to complete it...eventually!
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: Collection of gta scripting and map weirdness
checked some of the objects that i didnt have syntax highlighting in my editor:
- MOLOTOV_MOVING object explodes instantly (can hurt player). same functionality as EXPLODE_SMALL(x,y,z) function except you can use MOLOTOV_MOVING as a generator object too!
- GRENADE object doesnt fall down and explodes after some delay (can hurt player).
- ROCKET and PISTOL_BULLET objects will shoot at that object direction. (can hurt player).
- TASER_BULLET object will shoot pistol-looking bullet but it doesnt hurt player.
- SHOT object creates pistol/machinegun etc. bullet spark 2 blocks forward from the placed position at the direction it was set. (can hurt player).
- SPARK object will create blue version of BLOOD_SPARK object.
GRENADE/ROCKET was already highlighted but i added them just to know what other same style objects there are. im not sure if thats all of them, might be more.
i was surprised that "SHOT" (which shows as a spark) can kill player! (if you spam many of them on the player)
- MOLOTOV_MOVING object explodes instantly (can hurt player). same functionality as EXPLODE_SMALL(x,y,z) function except you can use MOLOTOV_MOVING as a generator object too!
- GRENADE object doesnt fall down and explodes after some delay (can hurt player).
- ROCKET and PISTOL_BULLET objects will shoot at that object direction. (can hurt player).
- TASER_BULLET object will shoot pistol-looking bullet but it doesnt hurt player.
- SHOT object creates pistol/machinegun etc. bullet spark 2 blocks forward from the placed position at the direction it was set. (can hurt player).
- SPARK object will create blue version of BLOOD_SPARK object.
GRENADE/ROCKET was already highlighted but i added them just to know what other same style objects there are. im not sure if thats all of them, might be more.
i was surprised that "SHOT" (which shows as a spark) can kill player! (if you spam many of them on the player)
My GTA2 related projects:
- Cuban-Pete
- Immortal
- Posts: 909
- Joined: 29 Jan 2010, 15:03
- GH nick: Cuban-Pete
Re: Collection of gta scripting and map weirdness
Indirect bullet damage in a game from 1999, awesome!
"Mmmm, your eyes are so beautiful."
Re: Collection of gta scripting and map weirdness
that has probbly just been added for the case that players are too close for a bullet to appear
yur sa'nok ngeyä