dev icon indicating copy to clipboard operation
dev copied to clipboard

Official Global Variable Names for San Andreas

Open OrionSR opened this issue 2 years ago • 15 comments

Is there any interest in updating SB's custom variable lists for San Andreas? I just finished filling in the data for an updated version of the spreadsheet I've been maintaining to assist with save editing and script porting across various versions of San Andreas.

GTASA Global Translation Table 2022

This Google Sheet uses data from the variable-info output file from the leaked cs.exe compiler to lookup as-is variable names and variable type data mined from the source text to populate the variable table. Data for all classic versions are based on sergeanur's Undefinified Grove project, and should be as accurate as his reproduced scripts; the PCv1 version was spot on.

Variable lists for mobile, Xbox360 and PS3 were created by adjusting mock data from DE, a main.sc consisting of only variable declarations, to generate data for the Remastered versions based on prior research.

Version specific sheets include columns to produce CustomVariable.ini and CustomArray.ini files in Sanny's format.

  • The complete list adds roughly 75KB to the size of compiled cleo scripts that include extra SCM info.
  • Custom arrays for text labels have double-sized array declarations so Sanny will number all array elements properly.
  • All arrays except the few single element custom arrays are declared as CustomArrays even if SB can identify them anyway. The extra declarations don't seem to cause any issue.
  • Undefined global variable names created by users are compiled to unnamed array elements, which defeated the primary goal of naming all variables to push undeclared var names into the extended var space where they can't do any permanent damage.

OrionSR avatar Jul 15 '22 16:07 OrionSR