
Pricing and the market · TCG Card Shop Simulator · read from a local copy
How a price tag is drawn
A price tag is a UI element with its own group and instanced renderer.
A price tag in TCG Card Shop Simulator is drawn from an atlas rather than typed: the game keeps an index for every digit, for the punctuation and the currency marks, for a barcode and a zero, and for each item and object type, and it places each part with its own anchor and colour.
What the game establishes
- A price tag is a UI element with its own group and instanced renderer. (checked against the game's own files)
- The characters come from a map holding an index for each digit, for a period, a comma, a minus and a space, and for the dollar, euro, yen, pound and cent marks. (checked against the game's own files)
- The same map holds cells for the letters p, r, m, s, e and n, a barcode cell and a cell for a price of zero. (checked against the game's own files)
- The map gives a cell advance and pairs item and object types with cell indices. (checked against the game's own files)
- A tag carries a background colour, an icon-background colour, a price-background colour, a brightness colour and a brightness multiplier. (checked against the game's own files)
- Showing a price, an icon, an amount and a barcode is switched by separate flags. (checked against the game's own files)
- The amount and the price have anchor offsets, the price and the background have half sizes, and the icon is chosen by a cell index. (checked against the game's own files)
- A tag caches the price as text and the amount as a value, and knows when the price is zero, with a warning indicator for that case. (checked against the game's own files)
- A tag can be set to ignore culling. (checked against the game's own files)
- A tag holds a reference to the atlas it draws from. (checked against the game's own files)
- The game ships an atlas for price tags with the digits, punctuation, currency marks, barcode and item and object pictures on it. (checked against the game's own files)
In play
A price tag in this shop is drawn rather than written. It is a world interface element with a group and an instanced renderer of its own, which is why a shelf full of tags can be redrawn quickly while you change prices.
Its characters come from an atlas, not from a font. The game keeps a map with an index for each digit, for the period, the comma and a minus, for a space, and for the currency marks it supports: the dollar, the euro, the yen, the pound and the cent.
The same map holds the letters a tag can use. There are cells for p, r, m, s, e and n, a cell for a barcode and a cell for a price of zero, so even the small print on a tag is part of the same sheet.
The map also says how far to advance from one cell to the next, and it pairs item types and object types with their cells. That is why the little picture on a tag can be chosen by what is being tagged rather than being a fixed image.
Colour is part of the tag. It carries a background colour, a colour for the icon background and a colour for the price background, along with a brightness colour and a multiplier for how bright it is.
What appears is switched rather than always drawn. A price, an icon, an amount and a barcode each have a flag of their own, and there is a separate flag for whether a barcode is shown on an instanced tag.
Each part is placed by an offset. The amount and the price each have an anchor offset, the price and the background each have a half size, and the icon is chosen by a cell index, which is how one element can carry a differently shaped tag.
The tag keeps a little state as well. It remembers the price as text and the amount as a value, knows when the price is zero, and has a warning indicator for exactly that case, so a tag reading nothing can look different from a tag showing a real price.
It can also be taken out of culling. A tag that ignores culling is drawn even when the game would otherwise have skipped it, which is a choice the object makes rather than one forced on it.
The image beside this entry is the game's own: the atlas sheet with the digits, the punctuation, the currency marks, the barcode and the rows of item and object pictures that a tag is drawn from.
What this entry does not tell you: how many item or object cells the atlas holds, how a price is worked out, or how often prices move. We have not verified those numbers, so we do not print them.
Related
Pricing and the marketPrice tags for every contextPrice tags are spawned from a set of prefabs rather than one tag being reused everywhere.
Pricing and the marketPrices and price tagsPrice tags are their own objects attached to goods.Version and sources
A local copy of the game, read only. The grounding for each fact is listed on the technical reference pages; nothing here is estimated. Documented build: no version stated by this build.