Update signs, props, etc., to reflect road customisations
See original GitHub issueSee also: https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/124
Been pondering this for a while, I think the only way to achieve it would be mini “add-on mods” that tell TMPE, for a given road asset (or collection of assets), details about the road speed signs.
TMPE would come with a default list of vanilla speed signs; for any roads that aren’t part of a roadcollection
, TMPE will try vanilla sign.
However, any roads using custom signage will have to provide the definition file that tells TMPE about the custom signs.
A template mod would be provided for asset authors (or users who use roads by other authors and want to get the signs working), and all they have to do is change some values and fill in an XML file then publish as mod to workshop.
As a rough mockup of the xml:
<tmpe xmlver="1">
// name must be unique per author
<roadcollection name="UKRoadsRevived" author="authorname">
// adds this road to the group
<asset id="workshopid.prefabname">
...
</roadgroup>
// where do signs come from for this group?
<signsfor roadcollection="UKRoads">
// note: could be in separate asset pack
<speed value="30" assetname="workshopid.propname">
...
</signsfor>
</tmpe>
So, if user changes road speed, TMPE can find out what road group it’s in (eg. “UKRoadsRevived”) and from there work out the ids of speed signs for each speed.
It knows current speed and driving direction, so it can find existing speed sign on the relevant side of the road. It can then place a new speed sign (with height, rotation, etc of old sign) and hide/delete the old sign.
If no old sign is found, TMPE won’t add a new sign. This prevents unwanted signs appearing.
The XML structure above should facilitate different types of signs at a later date. For example, we could add in toggling of Parking signs (or relevant roadside props) that can be toggled on and off when parking restrictions are applied.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
Hi,
Quick question, is the envisioned end-state for this task supposed to include the addition of new props on a road, or just the replacement of existing props?
I guess bulk of grindy code is conversion of font to texture, so for UI that only needs doing once per choice of signage style.