Tool Reference#
This is the documentation and tooling reference for great_asset.
SaveFile#
- class great_asset.SaveFile(data: bytes, /)[source]#
A Lethal Company save file.
- Parameters:
data (
bytes
) – The data read from the save file.
- classmethod resolve_from_file(save_file_number: Literal[1, 2, 3, '1', '2', '3'], /) SaveFile [source]#
A class method to find, open and return a save file from the default save file location (Windows) with the given file number.
- Parameters:
save_file_number (Literal[
1
,2
,3
]) – The numbered save to open.
- property elapsed_days: int#
Get the current amount of elapsed days within the save file.
- Return type:
- property raw_deadline: float#
Get the current deadline in time’s raw value within the save file.
- Return type:
- property profit_quota: int#
Get the current profit quota (value to reach) within the save file.
- Return type:
- property quotas_passed: int#
Get the current total quotas met from within the save file.
- Return type:
- property current_quota_progress: int#
Get the current quota progress from within the save file.
- Return type:
- update_credits(new_credits: int, /) None [source]#
Update the credits value within the save file.
- Parameters:
new_credits (
int
) – The new credits value.
- update_current_moon(moon: Moon, /) None [source]#
Update the current planet within the save file.
- Parameters:
planet (
Moon
) – The planet to update to.
- update_steps_taken(new_steps: int, /) None [source]#
Update the current amount of steps taken within the save file.
- Parameters:
new_steps (
int
) – The amount of steps to have taken.
- update_deaths(new_deaths: int, /) None [source]#
Update the current deaths within the save file.
- Parameters:
new_deaths (
int
) – The new value for total deaths.
- update_elapsed_days(new_elapsed_days: int, /) None [source]#
Update the elapsed days count within the save file.
- Parameters:
new_elapsed_days (
int
) – The elapsed days value.
- update_deadline(new_deadline: int | float, /) None [source]#
Update the deadline time within the save file.
- update_profit_quota(new_profit_quota: int, /) None [source]#
Update the target quota value within the save file.
- Parameters:
new_profit_quota (
int
) – The profit quota to set.
- update_quotas_met(new_quotas_met: int, /) None [source]#
Updates the quotas met within the save file.
- Parameters:
new_quotas_met (
int
) – The quotas met to set.
- update_current_quota_progress(new_quota_progress: int, /) None [source]#
Updates the current quota progress within the save file.
- Parameters:
new_quota_progress (
int
) – The quota progress to set.
- update_current_seed(new_seed: int | None = None, /) None [source]#
Updates the current seed within the save file.
- Parameters:
new_seed (
int
|None
) – The new seed to update to. IfNone
is passed or no value is given a random one will be generated.
- unlock_ship_upgrades(*items: ShipUnlock) None [source]#
Unlock upgrades for the ship.
- Parameters:
*items (
ShipUnlock
) – The items to unlock in the ship.
Note
The items unlocked will be added into storage, please access them from the terminal to place them.
- remove_ship_upgrades(*items: ShipUnlock) None [source]#
Remove upgrades from the ship.
- Parameters:
*items (
ShipUnlock
) – The items to remove from the ship.
- unlock_extras(*items: ExtraUnlock) None [source]#
Unlock other items within the ship or for the player(s).
- Parameters:
*items (
ExtraUnlock
) – The items to unlock.
- unlock_bestiary_entries(*entries: BestiaryEntry) None [source]#
Unlock bestiary entries on the ship terminal.
- Parameters:
*entries (
BestiaryEntry
) – The entries to unlock.
- spawn_items(*items: tuple[great_asset.enums.Item | great_asset.enums.Scrap, great_asset.vector.Vector | None], value_min: int = 30, value_max: int = 90) None [source]#
Spawn items within the world or ship.
- Parameters:
*items (tuple[
Item
|Scrap
,Vector
|None
]) – A series of tuples with the item and it’s position to spawn in. UsingNone
as the second value will spawn at a default area near the door of the ship internally.
- get_current_items() list[great_asset.enums.Item] [source]#
Get the current items that exist within the ship in the save file.
- Return type:
list[
Item
]
- get_current_scrap() list[great_asset.enums.Scrap] [source]#
Get the current scrap that exist within the ship in the save file.
- Return type:
list[
Scrap
]
- write(*, path: Path | None = None) None [source]#
A function to write the save file data to the internal data structure.
- Parameters:
dump_to_file (
bool
) – Whether to overwrite the passed file with the changes. Defaults toTrue
.overwrite (
bool
) – Whether to overwrite the existing save file with the changes. Defaults toTrue
. Irrelevant ifdump_to_file
isFalse
. Creates a file with the same name with the file extension of".over"
.
ConfigFile#
ChallengeFile#
Enumerations#
We provide some enumeration types to utilise within the (de)serialisation of the save file format.
- class great_asset.ShipUnlock[source]#
The items you can unlock within the ship.
- signal_translator#
The signal transmitter, as an alias.
- signal_transmitter#
The signal transmitter.
- teleporter#
The teleporter.
- television#
The television.
- tv#
The television, as an alias.
- shower#
The shower, stinky.
- table#
A table.
- loud_horn#
The loud horn addition to the ship.
- inverse_teleporter#
The teleporter for dropping you deep into mayhem.
- goldfish#
A goldfish within a glass fish tank.
- class great_asset.ExtraUnlock[source]#
Additional unlocks for within the ship or players directly.
- pyjama_suit#
A pyjama suit to wear when looting.
- class great_asset.Moon[source]#
The moons of Lethal Company
- experimentation#
The Experimentation moon.
- assurance#
The Assurance moon.
- vow#
The Vow moon.
- company_building#
The company building where you donate your loot for money and avoiding death.
- march#
The March moon.
- rend#
The Rend moon.
- dine#
The Dine moon.
- offense#
The Offense moon.
- titan#
The Titan moon.