Jump to content

17 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

A while ago I mentioned that the game also supports sub-meshes along with sub-buildings.

Sub-Meshes are a bit like sub-buildings, just not completely separate with their own AI or lot. They have their own mesh and texture, and they can use a different shader than the main building. Like sub-buildings, sub-meshes can be re-used multiple times.

The special thing is that these meshes are only rendered when certain "flags" are set (or not set) on the building. Flags can be either be true or false and carry no further information.

Here is a list of available flags:

Created
Deleted
Original
CustomName > player set a custom name for this building
Untouchable
FixedHeight
Incoming > only relevant for outside connections
Outgoing
IncomingOutgoing
CapacityStep1 > relevant for garbage dumps, graveyards
CapacityStep2
CapacityFull
RateReduced > when there are not enough raw materials or goods
HighDensity
LevelUpEducation
LevelUpLandValue
Completed
Active > when the building is activated
Abandoned > self-explaining
Demolishing
ZonesUpdated
Downgrading
BurnedDown
Upgrading > when the building is currently upgrading
Loading1 > cargo train stations, harbours
Loading2 > cargo train stations, harbours
SecondaryLoading > cargo train stations, harbours

The flag system is currently used by landfills to display a different mesh depending on the used capacity. It could also be used to have one mesh with normal shader (e.g. a building) and one mesh that follows the terrain (e.g. modelled garden). It might also be interesting to display an additional mesh when a building is disabled.

The serialization of sub-meshes is supported by the game, that means players need no additional mods to see them. Also, all of these meshes and textures are put into the same crp as the main building, so it should not affect loading times too much.

  • Like 7

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    5 minutes ago, Cool_Z said:

    This is hugely interesting. The modeled garden part is what is the most interesting for me.

    Could it be trigerred by events outside the building itself ? (like weather, or the time of the year) ??

    Everything that changes a flag. There are still a few unused flag bits that could be used for custom flags, though it would be better to wait until CO stops the development of the game before we use these bits (the total number of flags is limited to 31). With a few detours it would also be possible to add other triggers, like seasons, time of day, crime rate...

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    @AJ3D It's in the parent prefab.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Sounds great,
    do you know, if these submeshes are also limited to ploppables, like the sub buildings?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    27 minutes ago, Feindbold said:

    Sounds great,
    do you know, if these submeshes are also limited to ploppables, like the sub buildings?

    Growables can also have sub-meshes. Note though that those meshes are not meant to be used to increase the plot size.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    That sounds really promising! So we could use submeshes to combine growables to bigger lots (if we change the pivot for one of them, so it has a Lot big enough for both), thats really great.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    now that we have proper serialization in the new patch for sub building is it an achievable thing to mod a way to create them? (coz there's no UI for it inside the editor currently)

    • Like 1

    Come follow me on Twitter @CS_badpeanut 🥜 or Facebook!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    52 minutes ago, Bad Peanut said:

    now that we have proper serialization in the new patch for sub building is it an achievable thing to mod a way to create them? (coz there's no UI for it inside the editor currently)

    According to BloodyPenguin the sub-building feature is still not ready because of the load order of assets. A visual editor could be made, I think BloodyPenguin was working on it, even if it just generated SBE xml files.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Ooooh I was wondering if this was doable yet,  To me this means a ton of cool things, even early on its prop-free assets with good details.  These could be animated on those flags too, working drawbridges, locks, landing pads, garage doors, roller coasters & rides, etc etc.  so exciting, Im looking forward to learning how to properly craft the assets with multiple meshes :D

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    So this is/will be done similarly to sub-buildings?  We pose them all together in blender and note the coordinates to an xml file & the rest of the process?  Seems like the main difference is flags will have to be set in asset editor, or via mods. Will it need a separate mod like Sub-buildings enabler to craft them, or is it that mod already/nearly capable of it, not required? 

    I am curious about this because the Biltmore im working on has a some detailed parts that are repeated a lot, it might be best they have their own texture.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    All you need is a mod that imports the fbx files + textures as sub meshes and sets up the data structure. No extra xml file or mod is required to use the assets.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    21 hours ago, boformer said:

    All you need is a mod that imports the fbx files + textures as sub meshes and sets up the data structure. No extra xml file or mod is required to use the assets.

    wow, I was mentally complicating that a bit then! hahaa!  Thanks that seems doable, at least this simpler usage of it. 

    Triggering various flags on/off in game for different effects is where it gets a bit more complex then, that will require a mod... That is unless an asset type already has the full/empty or other such flags already, then we could include those sub-meshes and make our assets that type and it would work on the vanilla flag change?? :D

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    22 minutes ago, Macronomicus said:

    make our assets that type and it would work on the vanilla flag change??

    yes. Like the capacity flags and the active flag.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    do you have a script that allows you to add sub meshes to buildings that don't contain any? I can copy sub meshes from the landfill but it never seems to work right - either corrupts the save, i can't edit it's position, or it stops landfill from showing up in game. 


    Come follow me on Twitter @CS_badpeanut 🥜 or Facebook!

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections