1. If you are going to register on XLNation, please make sure you do not use a proxy server.
    If you use a proxy server your registration will most likely get blocked due to spammers and hackers using proxy servers to hide their real IP address.

    If your using your home or work IP address and have not received your registration email, check your spam folder.
    PLEASE DO NOT ASK TO HAVE YOUR ACCOUNT DELETED IF YOU HAVE POSTED IN THE FORUM! If so we do not delete accounts due to the mess it can make on the forum.
    إستبعاد الملاحظة

Adding custom furniture

الموضوع في 'Modding Help Quarter' بواسطة Immort_al, بتاريخ ‏13 أكتوبر 2016.

الوسوم:
  1. Immort_al

    Immort_al Governor

    إنضم إلينا في:
    ‏9 أكتوبر 2014
    المشاركات:
    271
    الإعجابات المتلقاة:
    705
    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
    طاقم الإدارة

    إنضم إلينا في:
    ‏23 أغسطس 2014
    المشاركات:
    1,338
    الإعجابات المتلقاة:
    1,714
    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)
    كود:
    <?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:
    كود:
        <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
  3. secpol

    secpol Governor

    إنضم إلينا في:
    ‏11 أكتوبر 2014
    المشاركات:
    263
    الإعجابات المتلقاة:
    574
  4. Mr.X²

    Mr.X² Moderator
    طاقم الإدارة

    إنضم إلينا في:
    ‏23 أغسطس 2014
    المشاركات:
    1,338
    الإعجابات المتلقاة:
    1,714
    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
  5. secpol

    secpol Governor

    إنضم إلينا في:
    ‏11 أكتوبر 2014
    المشاركات:
    263
    الإعجابات المتلقاة:
    574
    More questions than answers, it is necessary to unify all:)
     
  6. secpol

    secpol Governor

    إنضم إلينا في:
    ‏11 أكتوبر 2014
    المشاركات:
    263
    الإعجابات المتلقاة:
    574
    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
    طاقم الإدارة

    إنضم إلينا في:
    ‏23 أغسطس 2014
    المشاركات:
    1,338
    الإعجابات المتلقاة:
    1,714
    nope, #furniture (or #furniture_transparent_v1)
    yes of course u can change the layout file
     
  8. secpol

    secpol Governor

    إنضم إلينا في:
    ‏11 أكتوبر 2014
    المشاركات:
    263
    الإعجابات المتلقاة:
    574
    How to do it? I need AO in furniture.
     

مشاركة هذه الصفحة