1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Thanks for the donations everyone. That's another month covered :)
    Dismiss Notice

Adding custom furniture

Discussion in 'Modding Help Quarter' started by Immort_al, Oct 13, 2016.

  1. Immort_al

    Immort_al Governor

    Joined:
    Oct 9, 2014
    Messages:
    261
    Likes Received:
    680
    Hi guys!
    How to make a custom furniture on a building visible the same as the default furniture?
    Here is tags from layout:

    <LayoutEntry>
    <ID>Furniture006</ID>
    <Type>FURNITURE</Type>
    <PrototypeFile>data/design/decoration/furniture/suit/f_admiralteystvo01.class</PrototypeFile>
    <Position>2.74219,-15.1932,33.978</Position>
    <Rotation>0.0,0.0,-0.999992,0.00394336</Rotation>
    <Scale>1.0,1.0,1.0</Scale>
    <Furniture>
    <PresenceProbability>1.0</PresenceProbability>
    </Furniture>
    </LayoutEntry>
    And here is a class file of my furniture:

    <Entity>
    <Type>EDITORELEMENT</Type>
    </Entity>
    <Display>
    <Model>Data/Gfx/Editor/dummy.sgbin</Model>
    <Placeholder>Data/Gfx/Placeholder/Building40.mesh</Placeholder>
    </Display>
    <Placement>
    <Type>EDITORELEMENT</Type>
    </Placement>
    <LayoutEntry>
    <ID>Furniture</ID>
    <Type>FURNITURE</Type>
    <Furniture>
    <PresenceProbability>1</PresenceProbability>
    <ResourceFile>
    Data/Gfx/Furnitures/f_admiralteystvo01.sgbin
    </ResourceFile>
    </Furniture>
    </LayoutEntry>
    The sgbin file has 2 lod with the same number of triangles (about 200).
     
  2. Mr.X²

    Mr.X² Moderator
    Staff Member

    Joined:
    Aug 23, 2014
    Messages:
    1,237
    Likes Received:
    1,571
    create your custom furniture in 3dsmax using the furniture shader (or furniture transparent, but transparency wont work in xxl)
    ull find the specifications like namings and stuff in cxl modding guide Tutorial - Cities XL Complete Technical Guide and export the sgbin like usual

    then create a class file in data/design/decoration/furniture/...
    it looks like this (u can use this one as template or use one from your unpacked cxl)
    Code:
    <?xml version="1.0" encoding="Windows-1252"?>
    
    <Entity>
        <Type>EDITORELEMENT</Type>
    </Entity>
    <Display>
        <Model>Data/Gfx/furnitures/f_allianzarenafield_t3.sgbin</Model>
        <Placeholder>Data/Gfx/Placeholder/Building40.mesh</Placeholder>
    </Display>
    <Placement>
        <Type>EDITORELEMENT</Type>
    </Placement>
    <LayoutEntry>
        <ID>Furniture</ID>
        <Type>FURNITURE</Type>
        <Positioning>
                <OrientationType>ADJUST_VERTICAL</OrientationType>
        </Positioning>
        <Furniture>
            <PresenceProbability>1</PresenceProbability>
        <Visibility>Always</Visibility>
    <trulyalwaysvisible>1</trulyalwaysvisible>
            <ResourceFile>
          Data/Gfx/Furnitures/f_allianzarenafield_t3.sgbin
        </ResourceFile>
        </Furniture>
    </LayoutEntry>
    
    (trulyalwaysvisible makes your furniture visible at all times, only needed for large furniture like the field for allianzarena, dont do this for small things ;) )

    then open your main-mods layout file and add it like this:
    Code:
        <LayoutEntry>
            <ID>Field</ID>
            <Type>FURNITURE</Type>
            <PrototypeFile>data/design/decoration/furniture/packs/medieval/f_allianzarenafield_t3.class</PrototypeFile>
            <Position>0,0,0.1</Position>
            <Rotation>0.0,0.0,0.0,0.0</Rotation>
            <trulyalwaysvisible>1</trulyalwaysvisible>
        </LayoutEntry>
    remember, the furnitures position is taken from 0,0,0 in your max scene with pivot position of your main-model

    pack it together with your main mod - done
     
    Drazicdesign likes this.
  3. secpol

    secpol Governor

    Joined:
    Oct 11, 2014
    Messages:
    249
    Likes Received:
    526
  4. Mr.X²

    Mr.X² Moderator
    Staff Member

    Joined:
    Aug 23, 2014
    Messages:
    1,237
    Likes Received:
    1,571
    the shaders in community mod are updated for directx (11?) dunno, a newer version^^ ask @Altiris or maybe @Monty about this (i only know the very basics about usage of shaders)
    thats why they are not compatible with xl game version. but the xl shaders still work with xxl game version.

    yeah furniture_transparent shader has not been updated for xxl, thats why it can cause some troubles in xxl game (and transparency wont work in xxl anyway). should work fine in xl tho (it does for me). but if you want to make it work correctly in both versions i suggest to just use the standard furniture shader ;)
    and yes the ones from shader pack for modders are the correct ones and you can use an illumination map (y)
     
    secpol likes this.
  5. secpol

    secpol Governor

    Joined:
    Oct 11, 2014
    Messages:
    249
    Likes Received:
    526
    More questions than answers, it is necessary to unify all:)
     
  6. secpol

    secpol Governor

    Joined:
    Oct 11, 2014
    Messages:
    249
    Likes Received:
    526
    How to use as furniture, object a shader #Buiding? Is it possible to change the code in .layout file?
     
  7. Mr.X²

    Mr.X² Moderator
    Staff Member

    Joined:
    Aug 23, 2014
    Messages:
    1,237
    Likes Received:
    1,571
    nope, #furniture (or #furniture_transparent_v1)
    yes of course u can change the layout file
     
  8. secpol

    secpol Governor

    Joined:
    Oct 11, 2014
    Messages:
    249
    Likes Received:
    526
    How to do it? I need AO in furniture.
     

Share This Page