240 PersistentStoragePool,
438typedef void AutolengthProc(
int);
474 virtual void Save()
const { NOT_REACHED(); }
495 virtual void LoadCheck(
size_t len = 0)
const;
503 return this->
id.AsString();
528 virtual void Save([[maybe_unused]]
void *
object)
const {}
534 virtual void Load([[maybe_unused]]
void *
object)
const {}
540 virtual void LoadCheck([[maybe_unused]]
void *
object)
const {}
580template <
class TImpl,
class TObject>
591 virtual void Save([[maybe_unused]] TObject *
object)
const {}
592 void Save(
void *
object)
const override { this->
Save(
static_cast<TObject *
>(
object)); }
598 virtual void Load([[maybe_unused]] TObject *
object)
const {}
599 void Load(
void *
object)
const override { this->
Load(
static_cast<TObject *
>(
object)); }
605 virtual void LoadCheck([[maybe_unused]] TObject *
object)
const {}
612 virtual void FixPointers([[maybe_unused]] TObject *
object)
const {}
761typedef void *SaveLoadAddrProc(
void *base,
size_t extra);
814 default: NOT_REACHED();
837 default: NOT_REACHED();
854#define SLE_GENERAL_NAME(cmd, name, base, variable, type, length, from, to, extra) \
855 SaveLoad {name, cmd, type, length, from, to, [] (void *b, size_t) -> void * { \
856 static_assert(SlCheckVarSize(cmd, type, length, sizeof(static_cast<base *>(b)->variable))); \
857 static_assert((VarType{type}.mem != VarMemType::LabelReverse && VarType{type}.mem != VarMemType::LabelForward) || std::is_base_of_v<BaseLabel, decltype(base::variable)>); \
858 assert(b != nullptr); \
859 return const_cast<void *>(static_cast<const void *>(std::addressof(static_cast<base *>(b)->variable))); \
874#define SLE_GENERAL(cmd, base, variable, type, length, from, to, extra) SLE_GENERAL_NAME(cmd, #variable, base, variable, type, length, from, to, extra)
884#define SLE_CONDVAR(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::Variable, base, variable, type, 0, from, to, 0)
895#define SLE_CONDVARNAME(base, variable, name, type, from, to) SLE_GENERAL_NAME(SaveLoadType::Variable, name, base, variable, type, 0, from, to, 0)
905#define SLE_CONDREF(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::Reference, base, variable, type, 0, from, to, 0)
916#define SLE_CONDARR(base, variable, type, length, from, to) SLE_GENERAL(SaveLoadType::Array, base, variable, type, length, from, to, 0)
928#define SLE_CONDARRNAME(base, variable, name, type, length, from, to) SLE_GENERAL_NAME(SaveLoadType::Array, name, base, variable, type, length, from, to, 0)
938#define SLE_CONDSSTR(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::String, base, variable, type, 0, from, to, 0)
949#define SLE_CONDSSTRNAME(base, variable, name, type, from, to) SLE_GENERAL_NAME(SaveLoadType::String, name, base, variable, type, 0, from, to, 0)
959#define SLE_CONDREFLIST(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::ReferenceList, base, variable, type, 0, from, to, 0)
969#define SLE_CONDREFVECTOR(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::ReferenceVector, base, variable, type, 0, from, to, 0)
979#define SLE_CONDVECTOR(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::Vector, base, variable, type, 0, from, to, 0)
989#define SLE_CONDVECTOR(base, variable, type, from, to) SLE_GENERAL(SaveLoadType::Vector, base, variable, type, 0, from, to, 0)
997#define SLE_VAR(base, variable, type) SLE_CONDVAR(base, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1006#define SLE_VARNAME(base, variable, name, type) SLE_CONDVARNAME(base, variable, name, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1014#define SLE_REF(base, variable, type) SLE_CONDREF(base, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1023#define SLE_ARR(base, variable, type, length) SLE_CONDARR(base, variable, type, length, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1033#define SLE_ARRNAME(base, variable, name, type, length) SLE_CONDARRNAME(base, variable, name, type, length, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1041#define SLE_SSTR(base, variable, type) SLE_CONDSSTR(base, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1050#define SLE_SSTRNAME(base, variable, name, type) SLE_CONDSSTRNAME(base, variable, name, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1058#define SLE_REFLIST(base, variable, type) SLE_CONDREFLIST(base, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1066#define SLE_REFVECTOR(base, variable, type) SLE_CONDREFVECTOR(base, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1078#define SLE_SAVEBYTE(base, variable) SLE_GENERAL(SaveLoadType::SaveByte, base, variable, {}, 0, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion, 0)
1091#define SLEG_GENERAL(name, cmd, variable, type, length, from, to, extra) \
1092 SaveLoad {name, cmd, type, length, from, to, [] (void *, size_t) -> void * { \
1093 static_assert(SlCheckVarSize(cmd, type, length, sizeof(variable))); \
1094 return static_cast<void *>(std::addressof(variable)); }, extra, nullptr}
1104#define SLEG_CONDVAR(name, variable, type, from, to) SLEG_GENERAL(name, SaveLoadType::Variable, variable, type, 0, from, to, 0)
1114#define SLEG_CONDREF(name, variable, type, from, to) SLEG_GENERAL(name, SaveLoadType::Reference, variable, type, 0, from, to, 0)
1125#define SLEG_CONDARR(name, variable, type, length, from, to) SLEG_GENERAL(name, SaveLoadType::Array, variable, type, length, from, to, 0)
1135#define SLEG_CONDSSTR(name, variable, type, from, to) SLEG_GENERAL(name, SaveLoadType::String, variable, type, 0, from, to, 0)
1144#define SLEG_CONDSTRUCT(name, handler, from, to) SaveLoad {name, SaveLoadType::Struct, {}, 0, from, to, nullptr, 0, std::make_shared<handler>()}
1154#define SLEG_CONDREFLIST(name, variable, type, from, to) SLEG_GENERAL(name, SaveLoadType::ReferenceList, variable, type, 0, from, to, 0)
1164#define SLEG_CONDVECTOR(name, variable, type, from, to) SLEG_GENERAL(name, SaveLoadType::Vector, variable, type, 0, from, to, 0)
1173#define SLEG_CONDSTRUCTLIST(name, handler, from, to) SaveLoad {name, SaveLoadType::StructList, {}, 0, from, to, nullptr, 0, std::make_shared<handler>()}
1181#define SLEG_VAR(name, variable, type) SLEG_CONDVAR(name, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1189#define SLEG_REF(name, variable, type) SLEG_CONDREF(name, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1198#define SLEG_ARR(name, variable, type, length) SLEG_CONDARR(name, variable, type, length, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1206#define SLEG_SSTR(name, variable, type) SLEG_CONDSSTR(name, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1213#define SLEG_STRUCT(name, handler) SLEG_CONDSTRUCT(name, handler, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1221#define SLEG_REFLIST(name, variable, type) SLEG_CONDREFLIST(name, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1229#define SLEG_VECTOR(name, variable, type) SLEG_CONDVECTOR(name, variable, type, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1236#define SLEG_STRUCTLIST(name, handler) SLEG_CONDSTRUCTLIST(name, handler, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion)
1242#define SLC_VAR(name) {name, 0, SaveLoadVersion::MinVersion, SaveLoadVersion::MaxVersion}
1250#define SLC_NULL(length, from, to) {{}, length, from, to}
1315void SlSetArrayIndex(uint index);
1325size_t SlCalcObjMemberLength(
const void *
object,
const SaveLoad &sld);
1359template <
class TImpl,
class TObject,
class TElementType,
size_t MAX_LENGTH = UINT32_MAX>
1367 virtual std::vector<TElementType> &
GetVector(TObject *
object)
const = 0;
1376 void Save(TObject *
object)
const override
1381 for (
auto &item : vector) {
1386 void Load(TObject *
object)
const override
1391 vector.reserve(count);
1392 while (count-- > 0) {
1393 auto &item = vector.emplace_back();
Pool< EngineRenew, EngineRenewID, 16 > EngineRenewPool
Memory pool for engine renew elements.
constexpr Timpl & Set()
Set all bits.
Action of reserving cargo from a station to be loaded onto a vehicle.
Default handler for saving/loading an object to/from disk.
void FixPointers(void *object) const override
A post-load callback to fix SaveLoadType::Reference integers into pointers.
virtual void Load(TObject *object) const
Load the object from disk.
void Save(void *object) const override
Save the object to disk.
virtual void FixPointers(TObject *object) const
A post-load callback to fix SaveLoadType::Reference integers into pointers.
SaveLoadTable GetDescription() const override
Get the description of the fields in the savegame.
void LoadCheck(void *object) const override
Similar to load, but used only to validate savegames.
SaveLoadCompatTable GetCompatDescription() const override
Get the pre-header description of the fields in the savegame.
virtual void LoadCheck(TObject *object) const
Similar to load, but used only to validate savegames.
void Load(void *object) const override
Load the object from disk.
virtual void Save(TObject *object) const
Save the object to disk.
Class for calculation jobs to be run on link graphs.
A connected component of a link graph.
Handler for saving/loading an object to/from disk.
virtual SaveLoadTable GetDescription() const =0
Get the description of the fields in the savegame.
virtual void Load(void *object) const
Load the object from disk.
virtual SaveLoadCompatTable GetCompatDescription() const =0
Get the pre-header description of the fields in the savegame.
std::optional< std::vector< SaveLoad > > load_description
Description derived from savegame being loaded.
virtual void FixPointers(void *object) const
A post-load callback to fix SaveLoadType::Reference integers into pointers.
virtual void Save(void *object) const
Save the object to disk.
virtual ~SaveLoadHandler()=default
Ensure the destructor of the sub classes are called as well.
SaveLoadTable GetLoadDescription() const
Get the description for how to load the chunk.
virtual void LoadCheck(void *object) const
Similar to load, but used only to validate savegames.
Default handler for saving/loading a vector to/from disk.
virtual std::vector< TElementType > & GetVector(TObject *object) const =0
Get instance of vector to load/save.
void Load(TObject *object) const override
Load the object from disk.
void Save(TObject *object) const override
Save the object to disk.
virtual size_t GetLength() const
Get number of elements to load into vector.
A type is considered 'convertible through base()' when it has a 'base()' function that returns someth...
Types for standard in/out file operations.
Declarations for savegames operations.
SaveLoadVersion _sl_version
the major savegame version identifier
uint8_t _sl_minor_version
the minor savegame version, DO NOT USE!
const SaveLoadVersion SAVEGAME_VERSION
current savegame version
A type for 4 character labels/tags/ids in files that should be read/shown as is.
EnumBitSet< PauseMode, uint8_t > PauseModes
Bitset of PauseMode elements.
EnumBitSet< RoadType, uint64_t > RoadTypes
Bitset of RoadType elements.
VarMemType
The types/structures of data we have in memory.
@ U64
A 64 bit unsigned int.
@ Name
old custom name to be converted to a string pointer
@ LabelForward
A 4 character Label, stored as-is.
@ U8
A 8 bit unsigned int.
@ LabelReverse
A 4 character Label, stored in reverse.
@ StrQ
string pointer enclosed in quotes
@ Null
useful to write zeros in savegame.
@ I16
A 16 bit signed int.
@ U32
A 32 bit unsigned int.
@ I32
A 32 bit signed int.
@ I64
A 64 bit signed int.
@ U16
A 16 bit unsigned int.
VarFileType
The types/structures of data that can be stored in the file.
@ U64
A 64 bit unsigned int.
@ U8
A 8 bit unsigned int.
@ Struct
An arbitrary structure.
@ I16
A 16 bit signed int.
@ U32
A 32 bit unsigned int.
@ StringID
StringID offset into strings-array.
@ I32
A 32 bit signed int.
@ I64
A 64 bit signed int.
@ U16
A 16 bit unsigned int.
constexpr VarType operator|(VarFileType file, VarMemType mem)
Transitional helper function to combine a file and memory storage configuration.
SavegameType
Types of save games.
@ TTDP1
TTDP savegame ( -//- ) (data at NW border).
@ TTD
TTD savegame (can be detected incorrectly).
@ TTDP2
TTDP savegame in new format (data at SE border).
@ Invalid
broken savegame (used internally)
std::vector< SaveLoad > SlCompatTableHeader(const SaveLoadTable &slt, const SaveLoadCompatTable &slct)
Load a table header in a savegame compatible way.
void SlWriteByte(uint8_t b)
Wrapper for writing a byte to the dumper.
size_t SlGetStructListLength(size_t limit)
Get the length of this list; if it exceeds the limit, error out.
int SlIterateArray()
Iterate through the elements of an array and read the whole thing.
void SlSkipBytes(size_t length)
Read in bytes from the file/data structure but don't do anything with them, discarding them in effect...
void SetSaveLoadError(StringID str)
Set the error message from outside of the actual loading/saving of the game (AfterLoadGame and friend...
void SlCopy(void *object, size_t length, VarType conv)
Copy a list of SaveLoadType::Variables to/from a savegame.
size_t SlGetFieldLength()
Get the length of the current object.
std::reference_wrapper< const ChunkHandler > ChunkHandlerRef
A reference to ChunkHandler.
SLRefType
Type of reference (SLE_REF, SLE_CONDREF).
@ OldVehicle
Load/save an old-style reference to a vehicle (for pre-4.4 savegames).
@ Storage
Load/save a reference to a persistent storage.
void * GetVariableAddress(const void *object, const SaveLoad &sld)
Get the address of the variable.
constexpr bool SlCheckVarSize(SaveLoadType cmd, VarType type, size_t length, size_t size)
Check if a saveload cmd/type/length entry matches the size of the variable.
std::span< const ChunkHandlerRef > ChunkHandlerTable
A table of ChunkHandler entries.
bool SlIsObjectCurrentlyValid(SaveLoadVersion version_from, SaveLoadVersion version_to)
Checks if some version from/to combination falls within the range of the active savegame version.
SaveLoadType
Type of data saved.
@ ReferenceList
Save/load a list of SaveLoadType::Reference elements.
@ String
Save/load a std::string.
@ Array
Save/load a fixed-size array of SaveLoadType::Variable elements.
@ Variable
Save/load a variable.
@ Vector
Save/load a vector of SaveLoadType::Variable elements.
@ Reference
Save/load a reference.
@ StructList
Save/load a list of structs.
@ SaveByte
Save (but not load) a byte.
@ ReferenceVector
Save/load a vector of SaveLoadType::Reference elements.
void WriteValue(void *ptr, VarMemType conv, int64_t val)
Write the value of a setting.
std::span< const struct SaveLoadCompat > SaveLoadCompatTable
A table of SaveLoadCompat entries.
void SlSetLength(size_t length)
Sets the length of either a RIFF object or the number of items in an array.
uint8_t SlReadByte()
Wrapper for reading a byte from the buffer.
bool IsSavegameVersionBefore(SaveLoadVersion major, uint8_t minor=0)
Checks whether the savegame is below major.
size_t SlCalcObjLength(const void *object, const SaveLoadTable &slt)
Calculate the size of an object.
void SlObject(void *object, const SaveLoadTable &slt)
Main SaveLoad function.
SaveLoadVersion
SaveLoad versions Previous savegame versions, the trunk revision where they were introduced and the r...
@ LastLoadingTick
Saveload version: 301, GitHub pull request: 9693 Store tick of last loading for vehicles.
@ LargerTownCargoStatistics
Saveload version: 9.0, SVN revision: 1909 Increase size of passenger/mail production of this and pre...
@ BigDates
Saveload version: 31, SVN revision: 5999 Change date from 1920 - 2090 to 0 - 5 000 000.
@ IncreaseHouseLimit
Saveload version: 348, GitHub pull request: 12288 Increase house limit to 4096.
@ BackupOrderState
Saveload version: 176, SVN revision: 24446 Put more of the state of a vehicle's orders (like latenes...
@ CargoTravelled
Saveload version: 319, GitHub pull request: 11283 CargoPacket now tracks how far it travelled inside...
@ CustomSeaLevel
Saveload version: 149, SVN revision: 20832 Setting to influence the sea level (amount of water).
@ StoreIndustryCargo
Saveload version: 78, SVN revision: 11176 Store an industry's cargo, so it can be customised upon bu...
@ StationRatingCheat
Saveload version: 320, GitHub pull request: 11346 Add cheat to fix station ratings at 100%.
@ MoreEngineTypes
Saveload version: 95, SVN revision: 12924 Allow more than the original 255 engine types.
@ OrdersOwnedByOrderlist
Saveload version: 354, GitHub pull request: 13948 Orders stored in OrderList, pool removed.
@ ExtendCargotypes
Saveload version: 199, GitHub pull request: 6802 Extend cargotypes to 64.
@ TrainSlopeSteepness
Saveload version: 133, SVN revision: 18674 Setting to increase steepness of slopes for trains under ...
@ FractionProfitRunningTicks
Saveload version: 88, SVN revision: 12134 Store vehicle profits as a (fixed point) fraction,...
@ UnifyWaypointAndStation
Saveload version: 123, SVN revision: 16909 Unify stations and waypoints.
@ InfrastructureMaintenanceCosts
Saveload version: 166, SVN revision: 23415 Infrastructure can now cost some periodic fee.
@ VehicleEconomyAge
Saveload version: 334, GitHub pull request: 12141, release: 14.0 Add vehicle age in economy year,...
@ GroupReplaceWagonRemoval
Saveload version: 291, GitHub pull request: 7441 Per-group wagon removal flag.
@ ImproveMultistop
Saveload version: 25, SVN revision: 4259 Improve the behaviour of RVs going to road stops.
@ MonthlyBankruptcyCheck
Saveload version: 177, SVN revision: 24619 Check for bankruptcy on a monthly cycle.
@ CompanyInauguratedPeriodV2
Saveload version: 349, GitHub pull request: 13448 Fix savegame storage for company inaugurated year ...
@ DigitGroupSeparator
Saveload version: 118, SVN revision: 16129 Configurable digit group separator.
@ GoalProgressPlaneAcceleration
Saveload version: 182, SVN revision: 25115, r25259, r25296 Goal status and plane acceleration fixes.
@ BigCurrency
Saveload version: 1.0, releases: 0.1.x, 0.2.x Change currency from 32 to 64 bits.
@ LiveryRefit
Saveload version: 35, SVN revision: 6602 NewGRF livery refits.
@ MergeOptsPats
Saveload version: 97, SVN revision: 13256 Merge the OPTS and PATS chunks, i.e. all settings in one c...
@ StringGamelog
Saveload version: 314, GitHub pull request: 10801 Use std::string in gamelog.
@ GroupHierarchy
Saveload version: 189, SVN revision: 26450 Hierarchical vehicle subgroups.
@ CountPaidForCargo
Saveload version: 45, SVN revision: 8501 Count the amount of cargo that was paid for.
@ UnifyCurrency
Saveload version: 65, SVN revision: 10210 Make all variables related to currency 64 bits.
@ DisasterVehState
Saveload version: 312, GitHub pull request: 10798 Explicit storage of disaster vehicle state.
@ EndingYear
Saveload version: 218, GitHub pull request: 7747, release: 1.10 Configurable ending year.
@ LinkgraphRestrictedFlow
Saveload version: 187, SVN revision: 25899 Linkgraph - restricted flows.
@ FreightWeight
Saveload version: 39, SVN revision: 7269 Setting to increase the weight of cargo on freight trains.
@ FifoLoading
Saveload version: 57, SVN revision: 9691 First-in-first-out loading of vehicles.
@ LargerTownIterator
Saveload version: 11.0, SVN revision: 2033 Increase size of the town iterator.
@ EndPatchpacks
Saveload version: 286 Last known patchpack to use a version just above ours.
@ TimetableStartTicksFix
Saveload version: 322, GitHub pull request: 11557 Fix for missing convert timetable start from a dat...
@ MoveSccEncoded
Saveload version: 169, SVN revision: 23816 Move SCC_ENCODED to the first StringControlCode.
@ LinkgraphEdges
Saveload version: 304, GitHub pull request: 10314 Explicitly store link graph edges destination,...
@ FairPlaySettings
Saveload version: 79, SVN revision: 11188 Add setting to disable exclusive rights in a town and givi...
@ DockDockingtiles
Saveload version: 298, GitHub pull request: 9578 All tiles around docks may be docking tiles.
@ FreeformEdges
Saveload version: 111, SVN revision: 15190 Allow terraforming along the edge of the map.
@ RoadWaypoints
Saveload version: 338, GitHub pull request: 12572 Road waypoints.
@ UnifyAnimationState
Saveload version: 43, SVN revision: 7642 Put all animation state information in same map bits.
@ LargerUnitNumber
Saveload version: 8.0, SVN revision: 1786 Increase size of (vehicle) unit numbers.
@ MoveSemaphoreBits
Saveload version: 15.0, SVN revision: 2499 Move rail signal bit for semaphores.
@ ReplaceCustomNameArray
Saveload version: 84, SVN revision: 11822 Replace single fixed size array of custom names,...
@ RemoveMinorVersion
Saveload version: 18, SVN revision: 3227 Remove the minor versions from savegames.
@ IncreaseStationTypeFieldSize
Saveload version: 337, GitHub pull request: 12572 Increase size of StationType field in map array.
@ LastVehicleType
Saveload version: 26, SVN revision: 4466 Store the last vehicle type at stations instead of the vehi...
@ SavePatches
Saveload version: 22, SVN revision: 3726 Save state of patches (precursor of settings) in the savega...
@ RoadLayoutPerTown
Saveload version: 113, SVN revision: 15340 Allow for different road layouts for each of the towns.
@ SplitStationTypeFromGfxid
Saveload version: 72, SVN revision: 10601 Splits the encoding of station type from the graphics iden...
@ NewGRFSuppliedStationName
Saveload version: 103, SVN revision: 14598 NewGRF industry supplying default names for nearby statio...
@ PathCacheFormat
Saveload version: 346, GitHub pull request: 12345 Vehicle path cache format changed.
@ IndustryText
Saveload version: 289, GitHub pull request: 8576, release: 1.11.0-RC1 Additional GS text for industr...
@ Yapf
Saveload version: 28, SVN revision: 4987 Yet another path finder.
@ MaxLengthAndReverseSignals
Saveload version: 159, SVN revision: 21962 Settings for reversing at signals, and maximum train,...
@ ObjectTypeToPool
Saveload version: 186, SVN revision: 25833 Move object type from map to pool object.
@ MultipleSignalTypes
Saveload version: 64, SVN revision: 10006 Multiple different signal types on the same (diagonal) til...
@ PeriodsInTransitRename
Saveload version: 316, GitHub pull request: 11112 Rename days in transit to (cargo) periods in trans...
@ SimplifyPlayerFace
Saveload version: 49, SVN revision: 8969 Simplify the storage of player face information.
@ VehicleCurrencyStationChanges
Saveload version: 2.0, release: 0.3.0 Adding vehicle state, larger currency size for statistics,...
@ TownTolerancePauseMode
Saveload version: 4.0, SVN revision: 1 Town council tolerance and pause mode.
@ AircraftSpeedHolding
Saveload version: 50, SVN revision: 8973 Aircraft speed in km-ish/h and reduced speed in holding pat...
@ SignTextColours
Saveload version: 363, GitHub pull request: 14743 Configurable sign text colors in scenario editor.
@ CountIndividualCargoes
Saveload version: 170, SVN revision: 23826 Store the count of individual cargo delivery for a period...
@ MaxLoanForCompany
Saveload version: 330, GitHub pull request: 11224 Separate max loan for each company.
@ TrackRealAndAutoOrders
Saveload version: 158, SVN revision: 21933 Track which real and auto order is the current order.
@ VehicleCentreAndZPos
Saveload version: 164, SVN revision: 23290 Vehicle centres are not fixed at 4/8 of the vehicle; chan...
@ VirtualFeederSharePayment
Saveload version: 134, SVN revision: 18703 Pay a part of the virtual profit during a transfer to the...
@ MaglevMonorailPaxWagonLivery
Saveload version: 85, SVN revision: 11874 Add livery for maglev/monorail passenger wagons.
@ ShipCurvePenalty
Saveload version: 209, GitHub pull request: 7289 Configurable ship curve penalties.
@ ScriptMemlimit
Saveload version: 215, GitHub pull request: 7516 Limit on AI/GS memory consumption.
@ SimplifyPathfinderSettings
Saveload version: 87, SVN revision: 12129 Make it easier to select the pathfinder to use.
@ RoadStopOccupancyPenalty
Saveload version: 130, SVN revision: 18404 Add configurable pathfinder penalty for an occupied road ...
@ RemoveTownCargoCache
Saveload version: 219, GitHub pull request: 8258 Remove town cargo acceptance and production caches.
@ NewGRFTownNames
Saveload version: 66, SVN revision: 10211 NewGRF provided town names.
@ EconomyModeTimekeepingUnits
Saveload version: 327, GitHub pull request: 11341 Mode to display economy measurements in wallclock ...
@ BigMap
Saveload version: 5.0, SVN revision: 1429 Making maps a different size than 256x256.
@ DriveBackwards
Saveload version: 365, GitHub pull request: 15379 Trains can drive backwards.
@ ProductionHistory
Saveload version: 343, GitHub pull request: 10541 Industry production history.
@ MultipleRoadTypes
Saveload version: 61, SVN revision: 9892 Multiple road types for the same tile.
@ MultitileDocks
Saveload version: 216, GitHub pull request: 7380 Multiple docks per station.
@ LargerCargoSource
Saveload version: 7.0, SVN revision: 1770 With more stations, the size of the cargo source needed to...
@ RailTrackTypeUnification
Saveload version: 48, SVN revision: 8935 Put all the rail track type information in same map bits.
@ AnimatedTileStateInMap
Saveload version: 347, GitHub pull request: 13082 Animated tile state saved for improved performance...
@ NewGRFIndustryRandomTriggers
Saveload version: 82, SVN revision: 11410 NewGRF random triggers for industries.
@ NewGRFLastService
Saveload version: 317, GitHub pull request: 11124 Added stable date_of_last_service to avoid NewGRF ...
@ LinkgraphSeconds
Saveload version: 308, GitHub pull request: 10610 Store linkgraph update intervals in seconds instea...
@ GroupLiveries
Saveload version: 205, GitHub pull request: 7108 Livery storage change and group liveries.
@ DisableTownLevelCrossing
Saveload version: 143, SVN revision: 20048 Setting to be able to disable building rail/road crossing...
@ ShipAcceleration
Saveload version: 329, GitHub pull request: 10734 Start using Vehicle's acceleration field for ships...
@ MaximumDepotPenalty
Saveload version: 131, SVN revision: 18481 Add configurable maximum pathfinder penalty for finding a...
@ GamelogEmergency
Saveload version: 116, SVN revision: 15893, release: 0.7.x Gamelog event for emergency/crash saves.
@ NewGRFPersistentStorage
Saveload version: 76, SVN revision: 11139 Persistently store some state of NewGRF objects/entities.
@ SaveYapfSettings
Saveload version: 33, SVN revision: 6440 Some YAPF settings were not saved properly.
@ TownAcceptance
Saveload version: 127, SVN revision: 17439 Store mask of cargos accepted by town houses and head qua...
@ Distinguish16
Saveload version: 195, SVN revision: 27572, release: 1.6.1 Convenience bump to distinguish 1....
@ MoreCargoPackets
Saveload version: 69, SVN revision: 10319 Allow more than ~65k cargo packets.
@ LinkgraphLocationDisasterStore
Saveload version: 191, SVN revision: 26636, 26646 Fix disaster vehicle storage, Linkgraph - store lo...
@ FixTreeGround
Saveload version: 81, SVN revision: 11244 Various fixes to improve the visuals of the ground under t...
@ DriveThroughRoadStops
Saveload version: 47, SVN revision: 8735 Drive through road stops.
@ U64TickCounter
Saveload version: 300, GitHub pull request: 10035 Make tick counter 64bit to avoid wrapping.
@ MoreWaypointsPerTown
Saveload version: 89, SVN revision: 12160 Support more than 64 waypoints per town.
@ TownGrowthControl
Saveload version: 54, SVN revision: 9613 Give the player control over the town growth.
@ TransferOrder
Saveload version: 14.0, SVN revision: 2441 Transfer orders for feeder systems.
@ SeparateOrderTravelWaitTime
Saveload version: 190, SVN revision: 26547 Separate order travel and wait times.
@ RobustEnginePreview
Saveload version: 179, SVN revision: 24810 Make engine preview offers robust when company ranking ch...
@ EncodedStringFormat
Saveload version: 350, GitHub pull request: 13499 Encoded String format changed.
@ CleanupUnconnectedRoads
Saveload version: 77, SVN revision: 11172 Option to remove unconnected roads during a town's road re...
@ AirportAnimationFrames
Saveload version: 137, SVN revision: 18912 Use animation frames instead of many airport tile ids for...
@ IndustryManagement
Saveload version: 152, SVN revision: 21171 Manage the amount of industries that ought to be spawned ...
@ FractionalCargoDelivery
Saveload version: 150, SVN revision: 20857 When spreading cargo over stations, spread fractional amo...
@ RemoveAutosaveInterval
Saveload version: 23, SVN revision: 3915 Store autosave interval locally, instead of in savegame.
@ RoadvehPathCache
Saveload version: 211, GitHub pull request: 7261 Add path cache for road vehicles.
@ LinkWaypointToTown
Saveload version: 12.1, SVN revision: 2046 Link waypoints to towns and remove some bit stuffing.
@ RemoveHouseCount
Saveload version: 92, SVN revision: 12381, release 0.6.x Remove number of houses in a town from the ...
@ NewGRFHouses
Saveload version: 53, SVN revision: 9316 NewGRF controlled houses.
@ FoundTown
Saveload version: 128, SVN revision: 18281 Founding of new towns.
@ NonfloodingWaterTiles
Saveload version: 345, GitHub pull request: 13013 Store water tile non-flooding state.
@ FixSccEncodedNegative
Saveload version: 353, GitHub pull request: 14049 Fix encoding of negative parameters.
@ RefitOrders
Saveload version: 36, SVN revision: 6624 Vehicles can be refitted as part of an order.
@ NewGRFRoadStops
Saveload version: 303, GitHub pull request: 10144 NewGRF road stops.
@ RemoveOldPathfinder
Saveload version: 212, GitHub pull request: 7245 Remove OPF.
@ ExtendIndustryCargoSlots
Saveload version: 202, GitHub pull request: 6867 Increase industry cargo slots to 16 in,...
@ Rivers
Saveload version: 163, SVN revision: 22767 Rivers.
@ UnifyGroundVehicles
Saveload version: 157, SVN revision: 21862 Unify the way ground vehicles are handled (articulated pa...
@ RemoveSubsidyStationBinding
Saveload version: 125, SVN revision: 17113 Awarded subsidies are not bound to stations,...
@ Autoslope
Saveload version: 75, SVN revision: 11107 Terraforming under buildings/track/anything that supports ...
@ ImprovedOrders
Saveload version: 93, SVN revision: 12648 Orders support all full load/non stop types at the same ti...
@ CargoSourceTile
Saveload version: 44, SVN revision: 8144 Store the source tile of the cargo, so accurate payment can...
@ UngroupedVehicles
Saveload version: 71, SVN revision: 10567 Add a group with vehicles that aren't in any other group.
@ Utf8
Saveload version: 37, SVN revision: 7182 UTF-8 strings.
@ DisableElrailSetting
Saveload version: 38, SVN revision: 7195 Add setting to disable electrified rails.
@ VehMotionCounter
Saveload version: 288, GitHub pull request: 8591 Desync safe motion counter.
@ TimetableStartTicks
Saveload version: 321, GitHub pull request: 11468 Convert timetable start from a date to ticks.
@ AIStartDate
Saveload version: 309, GitHub pull request: 10653 Removal of individual AI start dates and added a g...
@ StoreAirportSize
Saveload version: 140, SVN revision: 19382 Store the size of the airport in the station.
@ DepotsUnderBridges
Saveload version: 366, GitHub pull request: 15836 Allow depots under bridges.
@ ExtendEntityMapping
Saveload version: 311, GitHub pull request: 10672 Extend entity mapping range.
@ StoreWaypointIdInMap
Saveload version: 17.0, SVN revision: 3212 Store the ID of waypoints in m2 of the map.
@ BuoysAt0_0
Saveload version: 364, GitHub pull request: 14983 Allow to build buoys at (0x0).
@ PlatformStopLocation
Saveload version: 117, SVN revision: 16037 Set the platform stop location via train orders.
@ CurrentOrderMaxSpeed
Saveload version: 174, SVN revision: 23973, release: 1.2.x Save maximum speed of current order.
@ Distinguish17
Saveload version: 196, SVN revision: 27778, release: 1.7 Convenience bump to distinguish 1....
@ SeparateRoadOwners
Saveload version: 114, SVN revision: 15601 Separate owners for road bits, tram bits and the road sto...
@ TableChunks
Saveload version: 295, GitHub pull request: 9322 Introduction of ChunkType::Table and ChunkType::Spa...
@ MoreCompanies
Saveload version: 104, SVN revision: 14735 Increase maximum number of companies to 15.
@ NewGRFPalette
Saveload version: 101, SVN revision: 14233 Store palette used by each of the NewGRFs.
@ MultipleRoadStops
Saveload version: 6.0, SVN revision: 1721 Multi tile road stops, and some map size related fixes.
@ MoreCargoAge
Saveload version: 307, GitHub pull request: 10596 Track cargo age for a longer period.
@ SavegameId
Saveload version: 313, GitHub pull request: 10719 Add an unique ID to every savegame (used to dedupl...
@ VehicleGroups
Saveload version: 60, SVN revision: 9874 Arbitrary grouping, by the player, of vehicles.
@ UnifyAnimationFrame
Saveload version: 147, SVN revision: 20621 Unify location of animation frame.
@ ServiceIntervalPercent
Saveload version: 180, SVN revision: 24998, release: 1.3.x Service interval in percent or days store...
@ AutoreplaceWhenOldTreeLimit
Saveload version: 175, SVN revision: 24136 Autoreplace vehicle only when they are old,...
@ CargoPayments
Saveload version: 121, SVN revision: 16694 Perform payment of cargo after unloading.
@ MultitrackLevelCrossings
Saveload version: 302, GitHub pull request: 9931, release: 13.0 Multi-track level crossings.
@ CompanyAllowListV2
Saveload version: 341, GitHub pull request: 12908 Fixed savegame format for saving of list of client...
@ PlaneSpeedFactor
Saveload version: 90, SVN revision: 12293 Setting to increase aircraft speed to be on par with the o...
@ AILocalConfig
Saveload version: 332, GitHub pull request: 12003 Config of running AI is stored inside Company.
@ StationsUnderBridges
Saveload version: 359, GitHub pull request: 14477 Allow stations under bridges.
@ DisallowTreeBuilding
Saveload version: 132, SVN revision: 18522 Setting to partially disable building of trees.
@ CumulatedInflation
Saveload version: 126, SVN revision: 17433 Store cumulated inflation, and recalculate prices/payment...
@ TownCargogen
Saveload version: 208, GitHub pull request: 6965 New algorithms for town building cargo generation.
@ NewGRFCustomCargoAging
Saveload version: 162, SVN revision: 22713 NewGRF influence on aging of cargo in vehicles.
@ DisallowRoadReconstruction
Saveload version: 160, SVN revision: 21974, release: 1.1.x Setting to disallow road reconstruction.
@ NextCompetitorStartOverflow
Saveload version: 109, SVN revision: 15075 Prevent overflow in the next competitor start counter.
@ TimetableTicksType
Saveload version: 323, GitHub pull request: 11435 Convert timetable current order time to ticks.
@ NewGRFAircraftRange
Saveload version: 167, SVN revision: 23504 NewGRF provided maximum aircraft range.
@ LargerTownCounter
Saveload version: 10.0, SVN revision: 2030 Increase size of the town counter.
@ LinkgraphTravelTime
Saveload version: 297, GitHub pull request: 9457, release: 12.0-RC1 Store travel time in the linkgra...
@ Cargodist
Saveload version: 183, SVN revision: 25363 Cargodist.
@ Elrail
Saveload version: 24, SVN revision: 4150 Electrified railways.
@ TownSupplyHistory
Saveload version: 358, GitHub pull request: 14461 Town supply history.
@ FixCargoMonitor
Saveload version: 207, GitHub pull request: 7175, release: 1.9 Cargo monitor data packing fix to sup...
@ StoreMapVariety
Saveload version: 197, SVN revision: 27978, release: 1.8 Store map variety.
@ NewGRFIndustryLayout
Saveload version: 73, SVN revision: 10903 NewGRF provided layouts for industries.
@ RemoveOldAISettings
Saveload version: 110, SVN revision: 15148 Remove remnants of the old AI's configuration.
@ ExtendVehicleRandom
Saveload version: 310, GitHub pull request: 10701 Extend vehicle random bits.
@ CompanyServiceIntervals
Saveload version: 120, SVN revision: 16439 Make service intervals configurable per company.
@ EngineMultiRailtype
Saveload version: 362, GitHub pull request: 14357, release: 15.0 Train engines can have multiple rai...
@ MoreAirportBlocks
Saveload version: 46, SVN revision: 8705 Increase number of blocks an airport can have.
@ ReducePlaneCrashes
Saveload version: 138, SVN revision: 18942, release: 1.0.x Setting to reduce/disable crashing of pla...
@ RoadTypeLabelMap
Saveload version: 344, GitHub pull request: 13021 Add road type label map to allow upgrade/conversio...
@ RocksStayUnderSnow
Saveload version: 135, SVN revision: 18719 Rocks stay under snow, i.e. they return when the snow goe...
@ WaterRegions
Saveload version: 324, GitHub pull request: 10543 Water Regions for ship pathfinder.
@ MinVersion
First savegame version.
@ EconomyDate
Saveload version: 326, GitHub pull request: 10700 Split calendar and economy timers and dates.
@ IndustryAcceptedHistory
Saveload version: 357, GitHub pull request: 14321 Add per-industry history of cargo delivered and wa...
@ ScenarioDeitySigns
Saveload version: 171, SVN revision: 23835 Signs made in scenarios become of OWNER_DEITY,...
@ OrderMaxSpeed
Saveload version: 172, SVN revision: 23947 Set maximum speed for orders.
@ NewGRFSettings
Saveload version: 41, SVN revision: 7348, release: 0.5.x Save what NewGRFs are used in the game and ...
@ MoreUnderBridges
Saveload version: 29, SVN revision: 5070 Support crossings, fields and bridge/tunnel heads under bri...
@ MoreHouseAnimationFrames
Saveload version: 91, SVN revision: 12347 Increase number of animation frames for NewGRF houses.
@ TradingAge
Saveload version: 217, GitHub pull request: 7780 Configurable company trading age.
@ WaypointMoreLikeStation
Saveload version: 122, SVN revision: 16855 Make waypoint data look more like stations.
@ ExtendRailtypes
Saveload version: 200, GitHub pull request: 6805 Extend railtypes to 64, adding uint16_t to map arra...
@ RemoveLoadedAtXY
Saveload version: 318, GitHub pull request: 11276 Remove loaded_at_xy variable from CargoPacket.
@ StoreAIVersion
Saveload version: 108, SVN revision: 15045 Store the version of the AI script.
@ VeryLowTownIndustryNumber
Saveload version: 58, SVN revision: 9762 Difficulty settings for very low number of industries and t...
@ ProtectPlacedHouses
Saveload version: 351, GitHub pull request: 13270 Houses individually placed by players can be prote...
@ SplitLoadWaitCounters
Saveload version: 136, SVN revision: 18764 Split counters for (un)loading and signal waiting/turning...
@ Storybooks
Saveload version: 185, SVN revision: 25620 Storybooks.
@ LeaveRoadStopSeparately
Saveload version: 153, SVN revision: 21263 Fix issue where multiple vehicles could leave a road stop...
@ IndustryCargoReorganise
Saveload version: 315, GitHub pull request: 10853 Industry accepts/produced data reorganised.
@ StatueOwner
Saveload version: 52, SVN revision: 9066 Store the owner of the statue, so the town can be informed ...
@ CompanyAllowList
Saveload version: 335, GitHub pull request: 12337 Saving of list of client keys that are allowed to ...
@ SplitHQ
Saveload version: 112, SVN revision: 15290 Split the behaviour of headquarters from the other unmova...
@ UniqueDepotNames
Saveload version: 141, SVN revision: 19799 Give depots unique names.
@ DepotWaterOwners
Saveload version: 83, SVN revision: 11589 Store the owner of the water under depots,...
@ LargerAIStateCounter
Saveload version: 13.1, SVN revision: 2080, releases: 0.4.0, 0.4.0.1 AI state counter increased due ...
@ StoreNewGRFVersion
Saveload version: 151, SVN revision: 20918 Store the version of the used NewGRFs.
@ FeederShare
Saveload version: 51, SVN revision: 8978 Rewrite of transfers to retain knowledge about the already ...
@ TownGrowthInGameTicks
Saveload version: 198, GitHub pull request: 6763 Switch town growth rate and counter to actual game ...
@ NewGRFMoreAnimation
Saveload version: 80, SVN revision: 11228 Support more types of animation for NewGRF industries.
@ Tgp
Saveload version: 30, SVN revision: 5946 TerraGenesis Perlin.
@ DepotUnbunching
Saveload version: 331, GitHub pull request: 11945 Allow unbunching shared order vehicles at a depot.
@ ScriptInt64
Saveload version: 296, GitHub pull request: 9415 SQInteger is 64bit but was saved as 32bit.
@ ShipsStopInLocks
Saveload version: 206, GitHub pull request: 7150 Ship/lock movement changes.
@ IndustryTileWaterClass
Saveload version: 99, SVN revision: 13838 Add water classes to industry tiles.
@ ScriptRandomizer
Saveload version: 333, GitHub pull request: 12063, release: 14.0-RC1 Save script randomizers.
@ RepairObjectDockingTiles
Saveload version: 299, GitHub pull request: 9594, release: 12.0 Fixing issue with docking tiles over...
@ RemoveOldPbs
Saveload version: 21, SVN revision: 3472, release: 0.4.x Remove old implementation of path based sig...
@ IndustryNumValidHistory
Saveload version: 356, GitHub pull request: 14416 Store number of valid history records for industri...
@ NewGRFDepotBuildDate
Saveload version: 142, SVN revision: 20003 Depot build date for NewGRFs.
@ BiggerStationVariables
Saveload version: 3.0 Increase size of airport blocks/station build date.
@ NewGRFAirportSmoke
Saveload version: 145, SVN revision: 20376 NewGRF support for airport and configurable amount of smo...
@ CompanyInauguratedPeriod
Saveload version: 339, GitHub pull request: 12798 Companies show the period inaugurated in wallclock...
@ MapgenSettingsRevamp
Saveload version: 290, GitHub pull request: 8891, release: 1.11 Revamp of some mapgen settings (snow...
@ FixStationPickupAccounting
Saveload version: 74, SVN revision: 11030 Accounting of which cargos a station would pick up was don...
@ DistantStationJoining
Saveload version: 106, SVN revision: 14919 Distant joining of stations.
@ SaveloadListLength
Saveload version: 293, GitHub pull request: 9374 Consistency in list length with SaveLoadType::Struc...
@ CustomSubsidyDuration
Saveload version: 292, GitHub pull request: 9081 Configurable subsidy duration.
@ VelocityNautical
Saveload version: 305, GitHub pull request: 10594 Separation of land and nautical velocity (knots!...
@ CalendarSubDateFract
Saveload version: 328, GitHub pull request: 11428 Add sub_date_fract to measure calendar days.
@ ShipRotation
Saveload version: 204, GitHub pull request: 7065 Add extra rotation stages for ships.
@ CustomTownNumber
Saveload version: 115, SVN revision: 15695 Configuration for specific number of towns to build.
@ Liveries
Saveload version: 34, SVN revision: 6455 Liveries and two company colours (2cc).
@ Timetables
Saveload version: 67, SVN revision: 10236 Introduce timetables for vehicles.
@ DocksUnderBridges
Saveload version: 360, GitHub pull request: 14594 Allow docks under bridges.
@ WaterRegionEvalSimplified
Saveload version: 325, GitHub pull request: 11750 Simplified Water Region evaluation.
@ GroupNumbers
Saveload version: 336, GitHub pull request: 12297 Add per-company group numbers.
@ RvRealisticAcceleration
Saveload version: 139, SVN revision: 19346 Realistic acceleration of road vehicles.
@ ServeNeutralIndustries
Saveload version: 210, GitHub pull request: 7234 Company stations can serve industries with attached...
@ ReorderUnmovableRemoveReserved
Saveload version: 144, SVN revision: 20334 Reorder map bits of unmovable tiles and remove unused res...
@ Yapp
Saveload version: 100, SVN revision: 13952 New version of path based signals.
@ MultiTileWaypoints
Saveload version: 124, SVN revision: 16993 Waypoints can be bigger than a single tile.
@ FaceStyles
Saveload version: 355, GitHub pull request: 14319 Addition of face styles, replacing gender and ethn...
@ NewGRFCargo
Saveload version: 55, SVN revision: 9638 Increase number of cargos and NewGRF control of cargos.
@ CargoPackets
Saveload version: 68, SVN revision: 10266 Account for individual units of cargo, i....
@ TerraformLimits
Saveload version: 156, SVN revision: 21728 Introduce limits for terraforming and clearing times.
@ SeparateLocaleUnits
Saveload version: 184, SVN revision: 25508 Unit localisation split.
@ TreesWaterClass
Saveload version: 213, GitHub pull request: 7405 WaterClass update for tree tiles.
@ AdjacentStations
Saveload version: 62, SVN revision: 9905 Allow building multiple stations directly next to eachother...
@ UnifyRvTravelTime
Saveload version: 188, SVN revision: 26169, release: 1.4 Unify RV travel time.
@ MaxBridgeMapHeight
Saveload version: 194, SVN revision: 26881, release: 1.5 Setting for maximum bridge and map height.
@ TimetableStart
Saveload version: 129, SVN revision: 18292 Allow setting the start date of a timetable.
@ ScriptSaveInstances
Saveload version: 352, GitHub pull request: 13556 Scripts are allowed to save instances.
@ NewGRFObjectView
Saveload version: 155, SVN revision: 21453 Support for views in NewGRF objects.
@ MaxVersion
Highest possible saveload version.
@ NoMultiheadReference
Saveload version: 20, SVN revision: 3403 Remove reference from one multihead to the other one.
@ IndustryPlatform
Saveload version: 148, SVN revision: 20659 Setting to make a flat area around (new) industries.
@ ScriptTownGrowth
Saveload version: 165, SVN revision: 23304 Storage of cargo statistics for use by game scripts.
@ SpreadIndustryProductionChanges
Saveload version: 102, SVN revision: 14332 Spread the industry production changes over the month,...
@ PauseLevel
Saveload version: 154, SVN revision: 21426 Setting to determine what commands are allowed when pause...
@ FixCompanyCargoTypes
Saveload version: 94, SVN revision: 12816 The company's cargo types should have increased in since w...
@ GradualLoading
Saveload version: 40, SVN revision: 7326 Gradual (un)loading of cargo.
@ NewGRFStations
Saveload version: 27, SVN revision: 4757 NewGRF graphics for stations.
@ FixRoadOwnership
Saveload version: 173, SVN revision: 23967, release: 1.2.0-RC1 Seemingly unneeded bump supposed to f...
@ StartPatchpacks
Saveload version: 220 First known patchpack to use a version just above ours.
@ ExtendPersistentStorage
Saveload version: 201, GitHub pull request: 6885 Extend NewGRF persistent storages.
@ NoAI
Saveload version: 107, SVN revision: 15027 Replace built in cheating AI with framework for externall...
@ LocksUnderBridges
Saveload version: 361, GitHub pull request: 14595 Allow locks under bridges.
@ ScriptTownText
Saveload version: 168, SVN revision: 23637 Game scripts can put a text in the town window.
@ UnifyWaterClass
Saveload version: 146, SVN revision: 20446 Unify location for storing water class in the map.
@ Cities
Saveload version: 56, SVN revision: 9667 Cities that start bigger and grow faster.
@ AirportNoise
Saveload version: 96, SVN revision: 13226 Introduce noise for airports, to allow more than two airpo...
@ CargoPaymentOverflow
Saveload version: 70, SVN revision: 10541 Fix overflow of cargo payment rates, plus preparation for ...
@ RiffToArray
Saveload version: 294, GitHub pull request: 9375 Changed many ChunkType::Riff chunks to ChunkType::A...
@ FixOrderBackup
Saveload version: 192, SVN revision: 26700 Fix saving of order backups.
@ BridgeWormhole
Saveload version: 42, SVN revision: 7573 Bridges become wormholes, so more things can be built under...
@ TramLivery
Saveload version: 63, SVN revision: 9956 Add separate livery for trams.
@ GSIndustryControl
Saveload version: 287, GitHub pull request: 7912 and 8115 GS industry control.
@ LinkFarmFieldToIndustry
Saveload version: 32, SVN revision: 6001 Link farm fields to the industry, so it gets removed when t...
@ ConsistentPartialZ
Saveload version: 306, GitHub pull request: 10570 Conversion from an inconsistent partial Z calculat...
@ ScriptSettingsProfile
Saveload version: 178, SVN revision: 24789 Setting for the difficulty profile of AIs.
@ HideEnginesForCompany
Saveload version: 193, SVN revision: 26802 Hiding of engines for a company.
constexpr size_t SlVarSize(VarMemType type)
Return expect size in bytes of a VarType.
std::vector< SaveLoad > SlTableHeader(const SaveLoadTable &slt)
Save or Load a table header.
bool IsSavegameVersionBeforeOrAt(SaveLoadVersion major)
Checks whether the savegame is below or at major.
void SlGlobList(const SaveLoadTable &slt)
Save or Load (a list of) global variables.
ChunkType
Type of a chunk.
@ SparseTable
A SparseArray with a header describing the elements.
@ ReadOnly
Chunk is never saved.
@ Table
An Array with a header describing the elements.
@ FileTypeMask
All ChunkType values that are saved in the file have to be within this mask.
@ Riff
4 bits store the chunk type, 28 bits the number of bytes.
@ SparseArray
Array of elements with index for each element.
int64_t ReadValue(const void *ptr, VarMemType conv)
Return a signed-long version of the value of a setting.
void SlAutolength(AutolengthProc *proc, int arg)
Do something of which I have no idea what it is :P.
void SlReadString(std::string &str, size_t length)
Read the given amount of bytes from the buffer into the string.
void SlSetStructListLength(size_t length)
Set the length of this list.
Label< struct ChunkIdTag > ChunkId
Label/unique identifier for each of the chunks in the savegame.
Functions/types related to errors from savegames.
Functions related to saving and loading games.
Types often used outside the saveload code related to saving and loading games.
std::span< const struct SaveLoad > SaveLoadTable
A table of SaveLoad entries.
std::vector< Titem, ScriptStdAllocator< Titem > > Array
Definition of a simple array.
StringValidationSetting
Settings for the string validation.
EnumBitSet< StringValidationSetting, uint8_t > StringValidationSettings
Bitset of StringValidationSetting elements.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Base for a four character label/tag/id.
Container for cargo from the same location and time.
virtual void FixPointers() const
Fix the pointers.
ChunkType type
Type of the chunk.
virtual void LoadCheck(size_t len=0) const
Load the chunk for game preview.
ChunkHandler(ChunkId id, ChunkType type)
Create this ChunkHandler.
ChunkId id
Unique ID (4 letters).
std::string GetName() const
Get the name of this chunk.
virtual void Load() const =0
Load the chunk.
virtual ~ChunkHandler()=default
Ensure the destructor of the sub classes are called as well.
virtual void Save() const
Save the chunk.
Struct to store engine replacements.
A four character label/tag/id.
Shared order list linking together the linked list of orders and the list of vehicles sharing this or...
A Stop for a Road Vehicle.
SaveLoad information for backwards compatibility.
std::string_view name
Name of the field.
SaveLoadVersion version_to
Save/load the variable before this savegame version.
SaveLoadVersion version_from
Save/load the variable starting from this savegame version.
uint16_t null_length
Length of the NULL field.
uint16_t length
(Conditional) length of the variable (eg. arrays) (max array size is 65536 elements).
std::shared_ptr< SaveLoadHandler > handler
Custom handler for Save/Load procs.
SaveLoadAddrProc * address_proc
Callback proc the get the actual variable address in memory.
SaveLoadVersion version_to
Save/load the variable before this savegame version.
SaveLoadType cmd
The action to take with the saved/loaded type, All types need different action.
std::string name
Name of this field (optional, used for tables).
VarType conv
Type of the variable to be saved; this field combines both FileVarType and MemVarType.
size_t extra_data
Extra data for the callback proc.
SaveLoadVersion version_from
Save/load the variable starting from this savegame version.
Container of a variable's characteristics about a variable's storage.
constexpr VarType()
Create an empty VarType.
SLRefType ref
The reference type.
VarMemType mem
The way of storing data in memory.
StringValidationSettings string_validation_settings
Any settings related to validation of the strings.
constexpr bool operator==(const VarType &other) const =default
Equality operator.
VarFileType file
The way of storing data in the file.
constexpr VarType operator|(StringValidationSetting string_validation_setting) const
Transitional helper function to add a SaveLoadFlag to this type.
constexpr VarType(VarFileType file, VarMemType mem)
Create a VarType with the given file and memory configurations.
constexpr VarType(SLRefType ref)
Create a VarType linking to a reference.
Container for holding some default VarType instances.
static constexpr VarType U16
Store a 16 bits unsigned int.
static constexpr VarType STRQ
Store a string with quotes.
static constexpr VarType U8
Store a 8 bits unsigned int.
static constexpr VarType STR
Store string.
static constexpr VarType LABEL_REVERSE
Store a Label in reverse.
static constexpr VarType I16
Store a 16 bits signed int.
static constexpr VarType NAME
A string stored in the custom string array.
static constexpr VarType I64
Store a 64 bits signed int.
static constexpr VarType U64
Store a 64 bits unsigned int.
static constexpr VarType I8
Store a 8 bits signed int.
static constexpr VarType U32
Store a 32 bits unsigned int.
static constexpr VarType STRINGID
Store a StringID.
static constexpr VarType LABEL_FORWARD
Store a Label as-is.
static constexpr VarType I32
Store a 32 bits signed int.
static constexpr VarType BOOL
Store a boolean (as int8).
WaterClass
classes of water (for WaterTileType::Clear water tile type).
WaterTileType
Available water tile types.