GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
San Andreas Strings EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
San Andreas Strings EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
San Andreas Strings EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
San Andreas Strings EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
San Andreas Strings EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
San Andreas Strings EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
San Andreas Strings EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
San Andreas Strings EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
San Andreas Strings EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar


You are not connected. Please login or register

San Andreas Strings

Go down  Message [Page 1 of 1]

1San Andreas Strings Empty San Andreas Strings Sat Mar 14, 2009 12:55 am

gtasbigfoot

gtasbigfoot
Admin

Strings are commonly used in mission scripting, strings are the sequences of symbols. Which including letters, numbers, and also some other chars like underscore or the at-sign(@). All 3D GTA games has no limits on what symbols could or could not be used in the strings.

San Andreas has two types of strings, a short string, which is the most commonly used, this string is very limited to its length. It could contain 7 characters and the last one (8th) is a null-terminator byte. When compiling a script using a string, if it is actually shorter, the rest of bytes is filled with zero byte(s).

San Andreas scripting engine also has data type 15 that denotes the short string containing up to 15 symbols. This is not supported by any other mission editor, other than Sanny Builder. They are handled in a same manner as 8-bytes strings, but occupy 16 bytes of a SCM file.


Code:

String data    Equivalent of the SCM

'MODDING'   09  4D F4 44 49 4E 47 00
'Sanny Builder' 0F  53 61 6E 6E 79 42 75 69 6C 64 65 72 00


Long strings are also seen in San Andreas, it's maximum length depends on the opcode.






Here is how the game handles with the long strings. There is a number of limits and the game sets the needed one itself for specific opcodes:
(the following numbers are real maximum without a null-terminator);


Code:

8 bytes (the smallest limit I've ever seen):
is set for the car numberplate used in 0674, 09e2

14 bytes:
is used for the textures names: 038F, 09A9

15 bytes: is used for the opcodes that store a string into the var block memory.

For example: 06D1
also is used for the shopping item names:
For example: 087B, 075D, 075E

17 bytes: is used for the object group names.
For example: 0776, 0777, 0778; the 5th parameter of 0755;

23 bytes: is used for the animation names.
For example, 0393, 0812; the 4th parameter of 0755; the 2nd param of 075a and so on.

31 bytes: is used for the particle names.
For example: 064B, 0669, 066A and so on.

39 bytes: is used for the debug opcodes.
For example: 0660, 0661, 0662 and similar.



There was an issue of trying to pass a string to a new thread, obviously it's not just a matter of one line, but it's possible, see this post by Seemann

http://gtamodding.com

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum