Module RELIGION_SCRIPT_INTERFACE
Script interface for a religion entry in a region.
Functions
| GetIconPath () | UI icon image path for this religion. |
| GetKey () | Database record key of this religion from religions_tables (e.g. |
| GetProportion () | Proportion of this religion in the region as a normalized float (0.0 to 1.0). |
Functions
- GetIconPath ()
-
UI icon image path for this religion.
Returns:
-
string
icon file path (e.g.
"UI/Religions/att_rel_chr_catholic.png")Usage:
local icon = rel:GetIconPath()
- GetKey ()
-
Database record key of this religion from
religions_tables(e.g."att_rel_chr_catholic").Returns:
-
string
religion database key
Usage:
local key = rel:GetKey()
- GetProportion ()
-
Proportion of this religion in the region as a normalized float (0.0 to 1.0).
Returns:
-
number
religion proportion (0.0 to 1.0)
Usage:
local pct = rel:GetProportion() * 100 -- e.g. 75.0 for 75%