GTAMP.com

Grand Theft Auto Media Press
It is currently Sun May 26, 2013 12:49 am

All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Dec 26, 2010 6:46 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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.

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Thu Dec 30, 2010 7:01 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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.

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Sun Feb 06, 2011 9:44 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
please tell us when you finished categorizing all commands.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Sun Feb 06, 2011 10:44 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
It will be quite a while away. But if people want it then I can do it instead of some other GTA2 stuff.

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Sun Feb 06, 2011 11:48 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
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.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Tue Feb 08, 2011 1:23 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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:
  1. Click a command from the Table of Contents.
  2. Read, scroll, Copy and Paste or whatever.
  3. Click the Back button in your browser to get the Table of Contents again.
  4. Choose the next relevant command. (Or a totally different command.)
At the start of each major section, I could display the list commands in that section. So if you're working on a Kill Frenzy, it would link to BONUS and DO_BASIC_KF_TEMPLATE with a "Return to Top" link as well. (That section has a bullet list which sort of does this, but I'd copy-paste the complete list for Kill Frenzies from the current Table of Contents.)

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.)

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Tue Feb 08, 2011 4:54 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
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ä


Top
 Profile  
 
PostPosted: Tue Feb 08, 2011 10:15 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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.

  • 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
      • General Concepts
      • GTA2script Overview & Example
      • Frequently Asked Questions
      • Constants
(EDIT) I've now hidden the lowest level of headings - the black ones. The first command in each list is enough to see what they will relate to. Did a bit of re-arrangement, so COUNTER is in the Mission Language Structures. The actual entry is cross-linked to the ONSCREEN_COUNTER stuff.

A lot more cross-linking could be done, just takes lots of time. It's getting there.

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Sun May 08, 2011 12:50 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
  • 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.
The list of GTA2 slope types is now a lot nicer than the original, imho. Perhaps some map editors might use this degrees-based naming system?

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Tue Sep 27, 2011 3:04 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
viewtopic.php?p=4906#p4906

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 10:16 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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?

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Fri Sep 30, 2011 11:54 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
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ä


Top
 Profile  
 
PostPosted: Mon Jan 30, 2012 6:56 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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!

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Last edited by BenMillard on Sun Apr 08, 2012 1:17 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Jan 30, 2012 8:11 pm 
Offline
User avatar

Joined: Wed Mar 17, 2010 4:07 am
Posts: 395
Location: Wales, UK
BenMillard wrote:
Good news, everybody!


Every time you say that I always think Professor Farnsworth from Futurama: http://www.youtube.com/watch?v=1D1cap6yETA :P

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 :shock: 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. 8-)

Keep up the good fight!

_________________


Top
 Profile  
 
PostPosted: Tue Jan 31, 2012 10:32 am 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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. :-)

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
 Post subject: Many small updates
PostPosted: Tue Mar 20, 2012 9:57 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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!
    1. Firstly, a note about CHECK_CHARACTER_HEALTH for multiplayer support.
    2. Filled in and highlighted the MAP_ZONE examples.
    3. 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.
    4. 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.
    5. 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.
So inspired about GTA2 again; funny how it just takes 1 idea to work out well and everything starts falling into place. <3

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Thu May 03, 2012 9:58 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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.

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Wed May 23, 2012 8:39 pm 
Offline
Hitman

Joined: Sat May 19, 2012 6:12 pm
Posts: 108
Location: Holland, AKA The Netherlands
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:
Code:
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.


Top
 Profile  
 
PostPosted: Thu May 24, 2012 2:47 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 782
Location: London, UK
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.

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Thu May 24, 2012 3:22 pm 
Offline
Car Jacker

Joined: Sat Jun 25, 2011 12:52 pm
Posts: 22
Location: London, UK
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group