Difference between revisions of "Riven NAME resources"

From A look inside The Link @ wiki
Jump to: navigation, search
(import)
 
(list of different NAME IDs and their functions)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
<noinclude>{{Riven}}</noinclude>
 
They contain a list of strings with an associated value, and their purpose is to store names for variables, cards, hotspots and other entities. They have the following structure:
 
They contain a list of strings with an associated value, and their purpose is to store names for variables, cards, hotspots and other entities. They have the following structure:
  
Line 9: Line 10:
 
|-
 
|-
 
|char*||strings
 
|char*||strings
 
+
|}
  
 
''strings'' is a list of zero-terminated strings. You can access string ''n'' by looking at ''string_offsets[n]'', which is the offset starting from strings (not from the beginning of resource data). The meaning of ''values[]'' is not yet known, but it seem to go from 0 to ''field_count''-1 (not in sequential order). This field apparently has no function (the record index is important, instead).
 
''strings'' is a list of zero-terminated strings. You can access string ''n'' by looking at ''string_offsets[n]'', which is the offset starting from strings (not from the beginning of resource data). The meaning of ''values[]'' is not yet known, but it seem to go from 0 to ''field_count''-1 (not in sequential order). This field apparently has no function (the record index is important, instead).
Line 15: Line 16:
 
In saved games there's only one NAME resource; it stores the name of each variable in the VARS (the record index in the NAME matches the one in the VARS).
 
In saved games there's only one NAME resource; it stores the name of each variable in the VARS (the record index in the NAME matches the one in the VARS).
  
In data files there are more NAMEs: ID 1 stores card names, ID 2 hotspot names, ID 3 external command names and ID 4 variable names. In this case, the record index is equal to the number used in script commands to access the variable. Finally, ID 5 stores stack names and it's used by command 27 to change island.
+
In data files there are more NAMEs:
 +
*ID 1 stores card names.
 +
*ID 2 stores hotspot names.
 +
*ID 3 stores external command names.
 +
*ID 4 stores variable names. In this case, the record index is equal to the number used in script commands to access the variable.
 +
*ID 5 stores stack names and it's used by command 27 to change island.

Latest revision as of 19:42, 8 February 2008

Riven
Mohawk Overview
BLST CARD FLST HSPT
MLST NAME PLST RMAP
SFXE SLST tBMP tMOV
tWAV VARS VERS ZIPS
Scripts Variables
External commands

They contain a list of strings with an associated value, and their purpose is to store names for variables, cards, hotspots and other entities. They have the following structure:

unsigned short field_count
unsigned short string_offsets[field_count]
unsigned short values[field_count]
char* strings

strings is a list of zero-terminated strings. You can access string n by looking at string_offsets[n], which is the offset starting from strings (not from the beginning of resource data). The meaning of values[] is not yet known, but it seem to go from 0 to field_count-1 (not in sequential order). This field apparently has no function (the record index is important, instead).

In saved games there's only one NAME resource; it stores the name of each variable in the VARS (the record index in the NAME matches the one in the VARS).

In data files there are more NAMEs:

  • ID 1 stores card names.
  • ID 2 stores hotspot names.
  • ID 3 stores external command names.
  • ID 4 stores variable names. In this case, the record index is equal to the number used in script commands to access the variable.
  • ID 5 stores stack names and it's used by command 27 to change island.