DMA Scripting Documentation in HTML
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
DMA Scripting Documentation in HTML
The official GTA2 scripting information (250kB) is now on my website in HTML. Just a draft at this stage. With nearly 300 commands it's a lot to remember! I'm going categorise to and re-arrange all the commands, too.
Your web browser is probably a more comfortable place in which to move around the document. You can bookmark individual commands...once I finish setting up those 300+ "Table of Contents" links.
Remember you can trade and edit code samples in realtime using the GTA2 Etherpad.
Your web browser is probably a more comfortable place in which to move around the document. You can bookmark individual commands...once I finish setting up those 300+ "Table of Contents" links.
Remember you can trade and edit code samples in realtime using the GTA2 Etherpad.
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.)
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
This document is basically working now. Table of Contents jump you to that command. You can guess the URL by adding a # character and then the command name. For example, CREATE_CAR is .../scripting#CREATE_CAR.
I corrected quite a few errors in the text and added some formatting. There's probably another month before the content is noticeably better than DMA wrote.
There's a commented-out section in the HTML near the current Table of Contents. This shows the categorisation and re-ordering I plan to do. Maybe that will be done this week.
I corrected quite a few errors in the text and added some formatting. There's probably another month before the content is noticeably better than DMA wrote.
There's a commented-out section in the HTML near the current Table of Contents. This shows the categorisation and re-ordering I plan to do. Maybe that will be done this week.
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: DMA Scripting Documentation in HTML
please tell us when you finished categorizing all commands.
yur sa'nok ngeyä
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
It will be quite a while away. But if people want it then I can do it instead of some other GTA2 stuff.
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: DMA Scripting Documentation in HTML
a grouped list of scripting commands would be especially helpful for new modders.
for me personally it is not that important, i know most of the quirks already but noobs will easily get confused if something is not working like described in docs and if they don't know which commands are available for what purpose.
for me personally it is not that important, i know most of the quirks already but noobs will easily get confused if something is not working like described in docs and if they don't know which commands are available for what purpose.
yur sa'nok ngeyä
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
Oh, actually the Table of Contents has been categorised for quite some time! The description of each command is still in DMA's slightly random order, though.
For now, you can do this:
It's a long way to scroll but means Ctrl+F takes you straight to the command. No need to use a search box or browse 20 separate pages.
Moving the commands around will be laborious but once I get into a good rhythm it'll happen fairly fast. (A couple of evenings, probably.)
For now, you can do this:
- Click a command from the Table of Contents.
- Read, scroll, Copy and Paste or whatever.
- Click the Back button in your browser to get the Table of Contents again.
- Choose the next relevant command. (Or a totally different command.)
It's a long way to scroll but means Ctrl+F takes you straight to the command. No need to use a search box or browse 20 separate pages.
Moving the commands around will be laborious but once I get into a good rhythm it'll happen fairly fast. (A couple of evenings, probably.)
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: DMA Scripting Documentation in HTML
so this means that at the moment every command is in at least one category yet? that's what i wanted to know. i'm a bit confused by the "Mission Language Commands (All 298 of them!)" and by the fact that some categories are black and some blue
yur sa'nok ngeyä
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
Yes, each command is in one category. I think only one or two commands are in more than one category at the moment. That might increase or decrease.
The different colours are different levels in the categories. Here it is with indents, maybe I can flatten some parts. Or design better <h4> and <h5> styles.
A lot more cross-linking could be done, just takes lots of time. It's getting there.
The different colours are different levels in the categories. Here it is with indents, maybe I can flatten some parts. Or design better <h4> and <h5> styles.
- GTA2 Scripting Information by DMA Design
- Table of Contents
- GBHscript
- Mission Language Structures
- Mission Language Commands (All 298 of them!)
- Players
- Arrows
- Counters
- Timers
- Wanted Level
- Messages
- Objects
- Blocks
- Cranes
- Doors
- Lights
- Sounds
- Weapons
- Vehicles
- Characters
- Checkpoints
- Drivers & Passengers
- Groups
- Objectives
- City System
- Zones
- Gangs
- Respect
- Mission System
- Phone System
- Kill Frenzy System
- Savegame System
- Thread System
- Players
- General Concepts
- GTA2script Overview & Example
- Frequently Asked Questions
- Constants
- Table of Contents
A lot more cross-linking could be done, just takes lots of time. It's getting there.
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.)
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
- The categories are now a little different.
- There's a bit more cross-linking.
- A couple of categories start with a list of relevant commands.
- Syntax has been tidied and corrected in many places - many still need work.
- Some lists of constants have been put into HTML tables instead of ASCII grids.
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.)
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
Thanks, I've now made that correction. Kinda forgot about this project as there was almost no feedback. Am I the only one using 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: DMA Scripting Documentation in HTML
im using it most of the time and i know of at least 1 other person but there aren't that many modders active atm, so there possibly be more in future.
yur sa'nok ngeyä
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
Good news, everyone! I've updated the entire collection of GTA2 modding tutorials on my website. I plan another round of updates, so they have better cross-linking to the main scripting guide.
Speaking of which, my re-formatted version of the official GTA2 scripting documentation now includes some properly ordered groups of commands at the start. That's a preview of what I want to do to the rest of the document. Just takes a lot of time. I also corrected and highlighted all the code samples in that grouped area.
A couple of commands in that document now have a "Multiplayer" sub-section in them, which explains their compatibility requirements. Eventually this could say "needs a character health check wrapper" and that could link to a common description. Such as a new tutorial which would cover all the tricks we know to write multiplayer-safe code.
Work is ongoing. Hopefully people are finding it useful, or will do next time they want to code something. I'm using it whenever I write code these days...'dogfooding' you might say!
Speaking of which, my re-formatted version of the official GTA2 scripting documentation now includes some properly ordered groups of commands at the start. That's a preview of what I want to do to the rest of the document. Just takes a lot of time. I also corrected and highlighted all the code samples in that grouped area.
A couple of commands in that document now have a "Multiplayer" sub-section in them, which explains their compatibility requirements. Eventually this could say "needs a character health check wrapper" and that could link to a common description. Such as a new tutorial which would cover all the tricks we know to write multiplayer-safe code.
Work is ongoing. Hopefully people are finding it useful, or will do next time they want to code something. I'm using it whenever I write code these days...'dogfooding' you might say!
Last edited by BenMillard on 08 Apr 2012, 01:17, 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: DMA Scripting Documentation in HTML
Every time you say that I always think Professor Farnsworth from Futurama:BenMillard wrote:Good news, everybody!
On a more serious note however, not sure what's new on some of the tutorial pages but then again I've not had to refer to them in quite a long time. Did notice, for example, that you haven't yet updated some of the code examples like my Remote Control example and my new Basic Phone example which could be useful to others (after all, I did mention in my phone tutorial to look up answering phones in the guide not helpful!).
Speaking of which, I keep meaning to update some of my tutorials and possibly do some new ones. The script guide is still a good reference and I look it up for some commands and syntax for others, but actual relevant tutorials on specific things are good. Might make a new thread for you to look at and copy in time, will see how it goes.
Keep up the good fight!
- 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: DMA Scripting Documentation in HTML
Ah yes, forgot about your updated content! Will merge that into them during the next round of updates.
It's a deliberate Futurama reference; glad it is noticed.
It's a deliberate Futurama reference; glad it is noticed.
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.)
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Many small updates
Have made a few updates, not yet folded Pyro's stuff in though. These are based on stuff I've needed to use recently and realised wasn't properly described:
- Working Trains Example:
Added complete name table for zone names based on a railway with 2 stations. Also did this for a 2-railway system, each with 2 stations. - Scripting Guide:
Lots of changes!- Firstly, a note about CHECK_CHARACTER_HEALTH for multiplayer support.
- Filled in and highlighted the MAP_ZONE examples.
- For the first time I've used WARP_FROM_CAR_TO_POINT so I updated that - hope to write a tutorial about forcing respawns for certain teams and chapters in a level.
- Lists of Constants are now near the top of the Table of Contents and have shorter link text. I've removed the actual lists which are already provided in Pyro's specific tutorials.
- General corrections, more highlighting and standardised some more phrases.
- Gangs in GTA2 Multiplayer:
Updated and matched this information with the main scripting guide. Now it explains how to make gangs without arrows, too. - Complete list of Weapons:
Icons are now centred in their column. Removed all MOVING_COLLECT_* entries as nobody uses them.
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.)
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
A bit more neatening up and a new section about EXEC blocks. Haven't tested them myself, though.
A long time after Pyro suggested it, the tutorials are now arranged into sections.
A long time after Pyro suggested it, the tutorials are now arranged into sections.
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.)
-
- Hitman
- Posts: 108
- Joined: 19 May 2012, 18:12
- GH nick: CarThief
- Location: Holland, AKA The Netherlands
Re: DMA Scripting Documentation in HTML
Well i suppose Elypter suggested i post about this here.
It would seem the FOLLOW_CAR_ON_FOOT_WITH_OFFSET command is rather poorly documented in the official and this online version doesnt seem to have improved much on how to use it. So perhaps a improved explanation on that command, most notably that it needs 2 extra commands after the target, first being rotation and the latter being distance.
I stored this on some random mis file back in the day so i might be a bit off with the accuracy of the instructions:
It would seem the FOLLOW_CAR_ON_FOOT_WITH_OFFSET command is rather poorly documented in the official and this online version doesnt seem to have improved much on how to use it. So perhaps a improved explanation on that command, most notably that it needs 2 extra commands after the target, first being rotation and the latter being distance.
I stored this on some random mis file back in the day so i might be a bit off with the accuracy of the instructions:
Code: Select all
SET_CHAR_OBJECTIVE ( character , FOLLOW_CAR_ON_FOOT_WITH_OFFSET , car , rotation , distance )
character - Name of the character to follow the car.
car - Name of the car to follow.
FOLLOW_CAR_ON_FOOT_WITH_OFFSET - Command used with SET_CHAR_OBJECTIVE.
rotation - Decides on what side the ped will walk. Common values would be: 0(down), 90(right), 180(up), and 270(left).
distance - How far the ped will be from the centre of the car. Usefull/reasonable distances are 0.50 (for small cars), 0.75 (for average cars) and 1.0 (for big cars?).
Note: Depending what direction you do, higher/lower distances may be more usefull. Especially with cars like Limo's.
-
- Immortal
- Posts: 889
- Joined: 16 May 2009, 06:14
- GH nick: BenMillard
- Location: London, UK
- Contact:
Re: DMA Scripting Documentation in HTML
Thanks for the information! I've updated the guide and made it so you can link directly to FOLLOW_CAR_ON_FOOT_WITH_OFFSET instructions.
I've brought the change over to Character AI tutorial as well.
While I was working on the main document, I linked up the other Objective Types. For example, GUARD_AREA and DESTROY_OBJECT.
So much more tidying up and correcting to do with it. It's getting better every time, little by little.
I've brought the change over to Character AI tutorial as well.
While I was working on the main document, I linked up the other Objective Types. For example, GUARD_AREA and DESTROY_OBJECT.
So much more tidying up and correcting to do with it. It's getting better every time, little by little.
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: DMA Scripting Documentation in HTML
You're doing a great job with this Ben, much easier to use than the original DMA document. One thing though, have you considered increasing the amount of whitespace that follows the parameters for each command to make things a bit more readable?