Skip to content

Conversation

@FlufflesTheMicrosaur
Copy link
Contributor

@FlufflesTheMicrosaur FlufflesTheMicrosaur commented Jan 15, 2026

As of PR creation time, this contains just the foundational code for separating out item volume from item mass, and switching cargo space to actually match its name and convey volume rather than density

Mass is still used for calculating maneuverability, armor class, and stuff like that

Volume is now used for calculating cargo limits

Things to do:

  • Update the UI to refer to volume instead of mass
  • Add engine options to allow an adventure to interpret legacy mass->volume conversion in its own way
  • Add more tlisp properties for getting volume from items (already implemented for ships)
  • Check if anything needs to be done for stations
  • Update tlisp documentation with property changes (Some were deprecated, some new ones are added)
  • Update at least 1 item in the XML (probably the barrels of water because thats easy) as a demo of how to set this so that anyone working on rebalance can refer to it when converting them over
  • Switch armor to size classes since size is now the primary balance factor for items with mass being a secondary soft factor
  • Add item criteria to filter by volume
  • Convert legacy cargo capacities from mass to volume by engine options for ships if API<59
  • Add item field for density to override legacy mass, making items with known density easier to specify (ex, volume=1 density=1.11 for heavy water instead of volume=1 and mass=1110)

…me. Properties, documentation, and some tlisp is not yet updated for this. XML is definitely not updated yet (this is currently just assumes a 1:1 water-density conversion. This should be adventure configurable)
@FlufflesTheMicrosaur FlufflesTheMicrosaur changed the base branch from master to integration/API59 January 15, 2026 02:50
@FlufflesTheMicrosaur FlufflesTheMicrosaur marked this pull request as draft January 15, 2026 02:50
@FlufflesTheMicrosaur
Copy link
Contributor Author

Turns out we also need to support an early version of armor size classes, and relevant criteria for item volumes as well.

… of XML mass to volume, and to compute actual mass from the computed volume (This supports alternative balance system that do not make the same item/cargo density assumptions as legacy SotP
@FlufflesTheMicrosaur
Copy link
Contributor Author

Also we might need to have a legacy cargo conversion system for older ships (this one can just be based on API)

…holds to the new volume system using the same engine options for item mass to volume conversion
…m because item size is now the primary balancing factor and it makes sense to have different density armor within the same size class, add in compatibility conversions to new system, add aliased names for mass classes (so that chronicles can still support dreadnought armor properly while using its own custom name: supermassive)
…and unitless cases. Also supports NaN and infinities.
…y only supports Metrics, but can be expanded in the future)
…tyle syntax and @:a-b style syntax (the latter is missing from a bunch of other range types, will deal with that in a different PR)
@FlufflesTheMicrosaur
Copy link
Contributor Author

I am going to tentatively switch this to using CBM (the standard name for cubic meters in the world of shipping and logistics) because of the following factors:

  • Transcendence's string system cannot support superscript for the actual SI unit
  • m3 and m^3 have a problem when expressing them using SI prefixes: 123k m3 or 123k m^3 could be misread as 123km3 or 123km^3 which is very different in scale. Same in the other direction: 500m m3 is very different from 500mm3
  • liters are too strongly associated with liquids in parts of the world that have a lot of our userbase & contributors so they look weird here
  • cubic meters is too long
  • TEU is a container size and too big to nicely scale for the individual pieces of cargo that go in, and annoying to measure out in the models due to its dimension-range
  • making up something like "SCU" (from star citizen) is silly when theres a perfectly good industry standard unit to use already in use in the real world for exactly the same purpose
  • cu. meters is also too long, and I am pre-emptively vetoing the abbreviation of it as being 'too unfortunate/silly' to use.

CBM solves ALL of these issues:

  • it doesnt need superscript
  • it plays nicely with prefixes (Your 2 liter soda in your cargo takes 2mCBM, a rom or ID card could be 1uCBM, freighters can express their cargo using kCBM or even MCBM for hyperfreighters like the Anadconda and Tide from TSB, etc)
  • its only 3 characters long and doesnt require pluralization (so it fits even better than the current tons system)
  • its a real standard unit name being applied in a realistic context

…ents too, add TODO warnings on tons of ore player stat code which assume SotP tons of ore items not VotG krels of ore or Chronicles ore chunks
@FlufflesTheMicrosaur
Copy link
Contributor Author

In order to make formatting numbers easier, I'm just going to merge #317 into this branch - merge that PR first (it has its own PR to merge before that though)

…date and does not handle failures properly, uses strtod instead which also eliminates the need for checking for hexadecimal. Will be cherrypicked to its own branch as well.
…ng because it was redundant with the inventory UI, and not useful when the armor class string was there instead. Also updated the variable name for armor class string.
…assDesc, deprecate unidArmorMass (to be added to a compat library in the future)
Atof is horrifically out of date and does not handle failures properly, uses strtod instead which also eliminates the need for checking for hexadecimal
@FlufflesTheMicrosaur
Copy link
Contributor Author

Also now includes #325 - merge that one first

@FlufflesTheMicrosaur FlufflesTheMicrosaur marked this pull request as ready for review January 19, 2026 09:53
@FlufflesTheMicrosaur
Copy link
Contributor Author

Also contains #329 - merge that one first too

…105927-fmtNumber_metric

# Conflicts:
#	Mammoth/Include/TSELanguage.h
#	Mammoth/Include/TSEVersions.h
#	Mammoth/TSE/CLanguage.cpp
…bic_meters_cargo

# Conflicts:
#	Mammoth/Include/TSEVersions.h
…105767-cubic_meters_cargo

# Conflicts:
#	Mammoth/Include/TSEVersions.h
#	Mammoth/TSE/LanguageDefs.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant