site_report
Generate a scored hab-site Excel workbook from a save file.
tiargus.commands.site_report
Excel site-report generator.
Reads a Terra Invicta save file and writes a scored hab-site workbook with two sheets:
-
Sites — one row per prospected hab site (or all sites with
--all-sites), with columns for name, body, max hab tier, location, daily resource income (Water, Vols, Metal, Nobles, Fissiles), a weighted score, the dominant resource, and faction. The Score and Most columns are live Excel formulas that update when the Weights sheet is edited. -
Weights — a single editable row of multipliers (one per resource) that drive the score formula. Changing a weight instantly re-ranks all sites without re-running the tool.
The main entry point is generate_site_report, which can be called
programmatically, or via the tiargus site-report CLI subcommand.
Resource income figures are monthly by default (daily figures ×
_DAYS_PER_MONTH); pass monthly=False to generate_site_report
or --daily on the CLI for per-day values.
add_parser(subparsers)
Register the site-report subcommand on subparsers.
Source code in src/tiargus/commands/site_report.py
262 263 264 265 266 267 268 269 270 271 | |
generate_site_report(save, output_path, default_weights=None, monthly=True, all_sites=False, reset_weights=False, config=None)
Write a scored hab-site Excel workbook from a parsed save file.
Creates a two-sheet workbook:
- Sites — one row per hab site with name, body, max hab tier, location,
resource income, a
SUMPRODUCTscore formula, the dominant resource, and owning faction. - Weights — editable multipliers (one per resource) referenced by the Score and Most formulas. Editing a weight cell instantly re-ranks all sites without re-running this function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
save
|
TerraInvictaSave
|
A TerraInvictaSave constructed with at least HabSiteModule. |
required |
output_path
|
str | Path
|
Destination path for the |
required |
default_weights
|
Optional[dict[str, float]]
|
Resource weight overrides. Any key absent from this
dict falls back to the config weights
(DEFAULT_WEIGHTS by default).
Pass |
None
|
monthly
|
bool
|
When |
True
|
all_sites
|
bool
|
When |
False
|
reset_weights
|
bool
|
When |
False
|
config
|
Optional[Config]
|
App-wide Config supplying the base
resource weights. Defaults to the cached
get_config when |
None
|
Source code in src/tiargus/commands/site_report.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
main()
Standalone entry point for python -m tiargus.commands.site_report.
Source code in src/tiargus/commands/site_report.py
274 275 276 277 278 279 280 281 | |