cp2077_extractor.cr2w.utils

Utility functions.

Functions:

get_array_variables(chunk, names_list)

Parse variables for an array from the given chunk.

get_chunk_variables(chunk, names_list)

Parse variables from the given chunk.

get_names_list(file_info)

Returns the name lookup table for the file.

get_array_variables(chunk, names_list)[source]

Parse variables for an array from the given chunk.

Parameters
  • chunk (bytes)

  • names_list (list[bytes]) – Name lookup table for the file.

Return type

list[list[tuple[bytes, bytes, Any]]]

Returns

List of lists of variables, as tuples of variable name, variable REDengine type, variable value.

get_chunk_variables(chunk, names_list)[source]

Parse variables from the given chunk.

Parameters
  • chunk (bytes)

  • names_list (list[bytes]) – Name lookup table for the file.

Return type

list[tuple[bytes, bytes, Any]]

Returns

List of variables, as tuples of variable name, variable REDengine type, variable value.

get_names_list(file_info)[source]

Returns the name lookup table for the file.

Parameters

file_info (CR2WFileInfo)

Return type

list[bytes]