-
Notifications
You must be signed in to change notification settings - Fork 0
Reference
This is a complete function reference for the AzgaarMap resource.
Convenience functions combine coordinate lookup, cell mapping, and property resolution into a single call for ease of use.
These cover most of the use cases. Other functions are internal helpers that are exposed anyway in cases where the return value being a Dictionary is unfavoured and a directly returned integer ID is preferred instead. (for example, comparisons that happen in _process() or _physics_process() that need to be completed in as less time as possible.)
Retrieves the biome dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The biome details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the culture dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The culture details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the religion dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The religion details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the state dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The state details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the burg dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The burg details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the province dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The province details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the river dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The river details dictionary, or an empty dictionary if out of bounds.
-
Retrieves the feature dictionary corresponding to a specific pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate on the map.
-
-
Return:
-
Dictionary- The feature details dictionary, or an empty dictionary if out of bounds.
-
Finds the cell ID corresponding to a given pixel coordinate.
-
Parameters:
-
pixel:Vector2i- The pixel coordinate to query.
-
-
Return:
-
int- The cell ID, or-1if the pixel is outside map bounds.
-
Default properties are packed into bitfields within cell_data.
Unpacks all default property IDs for a given cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
Array- An array of IDs[biome_id, culture_id, religion_id, state_id, height], or[-1, -1, -1, -1, -1]for invalid cell IDs.
-
Gets the biome ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The biome ID, or-1if invalid.
-
Retrieves the full biome details dictionary by its ID.
-
Parameters:
-
id:int- The biome ID.
-
-
Return:
-
Dictionary- The biome details, or{}if invalid.
-
Gets the culture ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The culture ID, or-1if invalid.
-
Retrieves the full culture details dictionary by its ID.
-
Parameters:
-
id:int- The culture ID.
-
-
Return:
-
Dictionary- The culture details, or{}if invalid.
-
Gets the religion ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The religion ID, or-1if invalid.
-
Retrieves the full religion details dictionary by its ID.
-
Parameters:
-
id:int- The religion ID.
-
-
Return:
-
Dictionary- The religion details, or{}if invalid.
-
Gets the state ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The state ID, or-1if invalid.
-
Retrieves the full state details dictionary by its ID.
-
Parameters:
-
id:int- The state ID.
-
-
Return:
-
Dictionary- The state details, or{}if invalid.
-
Gets the height value for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The height value, or-1if invalid.
-
Extensive properties map cell IDs to secondary structures (burgs, provinces, rivers, features).
Gets the burg ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The burg ID, or-1if invalid.
-
Retrieves the full burg details dictionary by its ID.
-
Parameters:
-
id:int- The burg ID.
-
-
Return:
-
Dictionary- The burg details, or{}if invalid.
-
Gets the province ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The province ID, or-1if invalid.
-
Retrieves the full province details dictionary by its ID.
-
Parameters:
-
id:int- The ID of the cell.
-
-
Return:
-
Dictionary- The province details, or{}if invalid.
-
Gets the river ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The river ID, or-1if invalid.
-
Retrieves the full river details dictionary by its ID.
-
Parameters:
-
id:int- The river ID.
-
-
Return:
-
Dictionary- The river details, or{}if invalid.
-
Gets the feature ID for a specific cell.
-
Parameters:
-
cell_id:int- The ID of the cell.
-
-
Return:
-
int- The feature ID, or-1if invalid.
-
Retrieves the full feature details dictionary by its ID.
-
Parameters:
-
id:int- The feature ID.
-
-
Return:
-
Dictionary- The feature details, or{}if invalid.
-
Warning
Internal Functions: The following underscored functions are internal helpers used for bitfield packing and unpacking. They are not to be called directly.
Packs biome, culture, religion, state, and height values into a single 32-bit integer.
-
Parameters:
-
biome:int(4 bits) -
culture:int(7 bits) -
religion:int(7 bits) -
state:int(7 bits) -
height:int(7 bits)
-
-
Return:
-
int- The packed 32-bit integer containing all property IDs.
-
Unpacks a 32-bit integer into individual property and height IDs.
-
Parameters:
-
int32:int- The packed 32-bit integer fromcell_data.
-
-
Return:
-
Array[int]- An array containing[biome, culture, religion, state, height].
-