Jump to content

6 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Have been trying to build a blacksmith mod for banished, started off with a model from turbosquid .... see here for a picture of it

https://community.simtropolis.com/forums/topic/762782-creating-mods-in-banished/

But I'm not a 3d modeller so eventually give up trying to use it for a blacksmith mod (called it a wheelwright), and borrowed a mushroom from kid1293, so far I've got all the menus sorted, including creating my own menu button

Screenshot from 2023-12-28 22-09-36.png

But its refusing to make tools, the actual mod program is made of the following folders

Screenshot from 2023-12-28 22-17-29.png

and has 240 files in it, most of which have been created in the Bin and Build folders which is generated every time you run a build.bat

Screenshot from 2023-12-28 22-18-05.png

I think the issue is in this part of the code

Spoiler

// layout of the entity
ComponentDescription resource
{
    // how often to update
    UpdatePriority _updatePriority = Fourth;
    
    // declare types that will be used
    Description _descriptions
    [
        "ui",
        
        "map",
        "zone",
        "toolbar",
        "createplaced",
        "decal",
        "model",
        "picking",
        "highlight",
        "interact",
        "particle",
        "storage",
        "work",    
        "statusicon",    
        "tracker",    
        "ambientemitter",
        "Common.rsc:fireStoneHouse",

        "statemachine",
        "cleararea",
        "workplace",        
        "build",
        "destroy",
        "consumeproduce",
    ]
}

AmbientEmitterDescription ambientemitter
{
    bool _addOnCreate = false;
    SoundEffect _soundEffects [ "Audio/Effects/FireEffect.rsc" ]
}

TrackerDescription tracker { }
ClearAreaDescription cleararea { }
StateMachineDescription statemachine { }
ZoneDescription zone { }

DestroyDescription destroy
{
    int _damagedSkin = 1;
    int _damagedDecal = 1;
}

StatusIconDescription statusicon
{
    SpriteSheet _spriteSheet = "StatusIcons\BuildingIconSpriteSheet.rsc";
    bool _fixedSize = true;
    float _size = 0.04;
    float _zoffset = 1.33;
}

ToolbarDescription toolbar
{
    SpriteSheet _spriteSheet = "UI/wheelwrightSpriteSheet.rsc";
    String _spriteName = "Buildwheelwright";

    StringTable _stringTable = "UI/wheelwrightStringTable.rsc";
    String _stringName = "wheelwright";
    String _stringNameLwr = "wheelwrightLwr";
    String _toolTip = "wheelwrightTip";

    String _statusStrings
    [
        "CreateOk",
        "CreateBlocked",        
    ]

    int _group = 2;
}

CreatePlacedDescription createplaced
{
    PathBits _placeBits = Normal | Obstacle;

    int _width = 5;
    int _height = 5;
    int _footprintRotation = 0;
    
    PathBits _placeBitArray
    [
        Normal | Obstacle,
        Normal | Obstacle | Fast | Faster,
    ]
    String _placeBitmap =
        "00000
         00000
         00000
         00000
         11111";

    ComponentDescription _allowAndRemove = "Template/Clear.rsc";
}

MapDescription map
{
    PathType _pathType = Immovable;
    String _pathBitmap =
        "#####
         #####  
         __###
         __###
         .....";

    bool _addToOverhead = true;
    Color _mapColor = 0xFF545454;
}

DecalDescription decal
{
    MaterialInstance _materials
    [
        "Models/MaterialInstance/DummyFootprintMaterial.rsc"
        "Models/MaterialInstance/DummyFootprintDamageMaterial.rsc"
    ]
    bool _tiled = false;
    float _initialAlpha = 0.5;
    
    float _mapWidth = 2048.0;

    DecalLocation _decalLocations
    [
        {
            float _x0 = 448.0;
            float _y0 = 896.0;
            float _x1 = 896.0;
            float _y1 = 1216.0;    
        }
    ]
}

PickingDescription picking
{
    MaterialInstance _selectMaterial = "Material/SelectionMask/SelectionMask.rsc";
    PickingGroup _meshes
    [
        {
            PickingMesh _mesh
            [
                "Models/Shroom01Picking.rsc",
                "Models/Shroom02Picking.rsc",
                "Models/Shroom03Picking.rsc"
            ]
        }
    ]
}

ModelDescription model
{
    MeshGroup _meshes
    [
        {
            GraphicsMesh _mesh
            [
                "Models/Shroom01Mesh.rsc",
                "Models/Shroom02Mesh.rsc",
                "Models/Shroom03Mesh.rsc"
            ]
        }
    ]
    int _displayIndex = 0;
    int _subIndex = 0;    
    bool _randomIndex = false;
}


HighlightDescription highlight
{
    EdgeGroup _meshes
    [
        {
            EdgeMesh _mesh
            [
                "/Models/Shroom01Mesh.rsc:edge",
                "/Models/Shroom02Mesh.rsc:edge",
                "/Models/Shroom03Mesh.rsc:edge"
            ]
        }
    ]

    // materials for drawing selection with no mesh
    MaterialInstance _maskMaterial = "Material/SelectionMask/SelectionMask.rsc";
    MaterialInstance _edgeMaterial = "Material/SelectionEdge/SelectionEdge.rsc";
}


InteractDescription interact
{
    PointList _pointList = "/Models/ShroomPoints.rsc";
}

ParticleDescription particle
{
    PointList _pointList = "/Models/ShroomPoints.rsc";

    ParticleAttachment _systems
    [
        {
            Time _fadeInOutTime = 2.0;
            bool _addOnCreate = false;
            bool _addOnNotify = false;
            Particle _particle = "ParticleSystems\Fire\FireMedium.rsc";
        }
        {
            bool _addOnCreate = false;
            Particle _particle = "ParticleSystems\ChimneySmoke\ChimneySmoke.rsc";
            String _attachNode = "smoke1";
        }
    ]
}

StorageDescription storage
{
    RawMaterialFlags _storageFlags = Fuel | Wood | Iron;
    bool _areaBasedLimit = false;
    bool _available = false;
    int _volumeLimit = 1000;
}

WorkDescription work
{
    int _defaultWorkers = 1;
}

WorkPlaceDescription workplace
{
    Profession _profession = "Profession/Profession.rsc:wheelwright";
    Profession _pickupProfession = "Profession/Profession.rsc:wheelwright";
}

ConsumeProduceDescription consumeproduce
{
    Product _products
    [
        {
            ConsumeRawMaterial _consumeMaterials
            [
                {
                    ComponentDescription _material = "Template/RawMaterialIron.rsc";
                    int _count = 1;
                }
                {
                    ComponentDescription _material = "Template/RawMaterialWood.rsc";
                    int _count = 1;
                }
            ]
            ComponentDescription _produceMaterial = "Template/RawMaterialTool.rsc";
            ResourceLimit _resourceLimit = Tools;
            String _requirements = "ToolRequire";
        }
        {
            ConsumeRawMaterial _consumeMaterials
            [
                {
                    ComponentDescription _material = "Template/RawMaterialCoal.rsc";
                    int _count = 1;
                }
                {
                    ComponentDescription _material = "Template/RawMaterialIron.rsc";
                    int _count = 1;
                }
                {
                    ComponentDescription _material = "Template/RawMaterialWood.rsc";
                    int _count = 1;
                }
            ]
            ComponentDescription _produceMaterial = "Template/RawMaterialSteelTool.rsc";
            ResourceLimit _resourceLimit = Tools;
            String _requirements = "SteelToolRequire";
        }
    ]
    StringTable _stringTable = "Dialog/StringTable.rsc:rawMaterial";
    int _workRequired = 5;
    ToolType _toolType = Anvil;
    float _workTime = 4.0;
    
}

BuildDescription build
{
    int _workRequired = 90;

    BuildRequirement _buildRequirement
    [
        {
            ComponentDescription _rawMaterial = "Template/RawMaterialWood.rsc";
            int _count = 32;
        }
        {
            ComponentDescription _rawMaterial = "Template/RawMaterialStone.rsc";
            int _count = 55;
        }    
        {
            ComponentDescription _rawMaterial = "Template/RawMaterialIron.rsc";
            int _count = 32;
        }    
    ]
}

UIDescription ui
{
    Dialog _dialog = "Dialog/StandardDialog.rsc:entity";

    ElementController _controllers
    [
        {
            ObjectType _type = ControlUI;
            ElementDescription _element = "enablewheelwrightWorkButton";
            String _insertAt = "userButton0";
            DialogControllerConfig _config = "workButtonConfig";    
        }
        {
            ObjectType _type = StorageUI;
            ElementDescription _element = "inventoryTab2";
            String _insertAt = "userButton1";
        }
        {
            ObjectType _type = ProductionUI;
            ElementDescription _element = "Dialog/Production.rsc:production";
            String _insertAt = "pageUser";
        }
        {
            ObjectType _type = PageToggleUI;
            ElementDescription _element = "Dialog/Production.rsc:checkProduction";
            String _insertAt = "userTitle0";
        }
        {
            ObjectType _type = WorkPlaceUI;
            ElementDescription _element = "Dialog/Work.rsc:workPlace";
            String _insertAt = "userTitle1";
        }
        {
            ObjectType _type = StatusIconUI;
            ElementDescription _element = "Dialog/Building.rsc:icons";
            String _insertAt = "userTitle2";
        }
        {
            ObjectType _type = ResourceLimitUI;
            ElementDescription _element = "resourceLimit";
            String _insertAt = "userButton1";
            DialogControllerConfig _config = "resourceLimitConfig";    
        }
        {
            ObjectType _type = ConsumeProduceUI;
            ElementDescription _element = "Dialog/ConsumeProduce.rsc";
            String _insertAt = "userGroup0";
        }
        {
            ObjectType _type = BuildUI;
            ElementDescription _element = "Dialog/Build.rsc:build";
            String _insertAt = "pageBuild";
        }
        {
            ObjectType _type = DestroyUI;
            ElementDescription _element = "Dialog/Destroy.rsc:destroy";
            String _insertAt = "pageDestroy";
        }
    ]
}

ControlUIConfig workButtonConfig
{
    ObjectType _type = ConsumeProduceComponent;
    int _controlId = 0;
}

CheckDescription enablewheelwrightWorkButton : "Dialog/Work.rsc:enableWorkCheck"
{
    ElementDescription _content = "labelwheelwrightWorkUncheck";    
    ElementDescription _check = "labelwheelwrightWorkCheck";    
}

LabelDescription labelwheelwrightWorkCheck : "Dialog/Work.rsc:labelEnableWork"
{
    String _spriteName = "wheelwrightWork";    
}

LabelDescription labelwheelwrightWorkUncheck : "labelwheelwrightWorkCheck"
{
    Color _color = 0xFF2E2B28;
}

TabDescription inventoryTab
{
    int _topPad = 4;

    ElementDescription _outerBorderTop = "Dialog/SharedElements.rsc:tabBorderTop";
    ElementDescription _outerBorderBottom = "Dialog/SharedElements.rsc:tabBorderBottom";
    ElementDescription _innerBorder = "Dialog/SharedElements.rsc:raisedBorder";

    SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
    String _connectStart = "TabStart";
    String _connectMid = "TabMid";
    String _connectEnd = "TabEnd";

    int _elementPad = 4;

    Tab _tabs
    [
        {
            ElementDescription _button = "Dialog/Storage.rsc:buttonTabStorage";    
            ElementDescription _content = "Dialog/Storage.rsc:storageTiny";
        }
    ]
}

TabDescription inventoryTab2 : "inventoryTab"
{
    Tab _tabs
    [
        {
            ElementDescription _button = "Dialog/Storage.rsc:buttonTabStorage";    
            ElementDescription _content = "Dialog/Storage.rsc:storageTiny4";
        }
    ]
}


ResourceLimitUIConfig resourceLimitConfig
{
    ResourceLimit _resourceLimit = Tools;
}

RibbonDescription resourceLimit
{
    Alignment _alignment = TopRight;
    bool vertical = false;
    int _topPad = 8;
    int _cellPad = 8;

    ElementDescription _elements
    [
        "labelLimit",
        "editLimit",
    ]

    Dialog _toolTipDialog = "Dialog/ToolTip.rsc";
    StringTable _toolTipStringTable = "Dialog/StringTable.rsc:gameDialogs";
    String _toolTipText = "ToolLimitTip";
}

LabelDescription labelLimit
{
    Alignment _alignment = MidLeft;

    Font _font = "Font\FontSmall.rsc";
    int _imageWidth = 20;
    int _imageHeight = 20;
    int _spacing = 4;
    LabelPosition _labelPosition = TextRight;
    Alignment _textAlignment = MidLeft;

    StringTable _stringTable = "Dialog/StringTable.rsc:gameDialogs";
    String _text = "ToolLimit";
    SpriteSheet _spriteSheet = "Dialog/SpriteSheet.rsc";
    String _spriteName = "Tool";
}

SpinnerDescription editLimit : "Dialog/SharedElements.rsc:spinnerSmall6"
{
    int _increment = 100;
    ElementDescription _border = "Dialog/SharedElements.rsc:flatButtonEnabledBorder";
}

 

EDIT: Have worked out why this isn't working and have posted an explanation over here

:read:


  Edited by catty-cb  

updated post to imclude link to explanation of why this wasn't working
  • Like 2

Share this post


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

    so now I've got the mushroom working as a blacksmith its time to go back to my original turbosquid model

    model.jpg

    still got a far way to go as its a tad on the tiny side and also have got the landscape setting wrong

    Screenshot from 2024-01-04 07-56-48.png

    • Like 2

    Share this post


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

    OTTD Nostalgic gameplay this month !

    Something different on a back offline system with a very old version of OTTD ! I enjoy play these old versions of OTTD as it´s most close to Transport tycoon deluxe with some extra comfort . This is a small island nation with a variety of land and see based transport. Just a little starter to get back in the hang off this nice transpor builder !

    Pamt5NE.jpg

    stjcIM8.jpg

    Central island area with most industries ! What started with a coal ship supply of a local power station ended with a complete network of freight transport !

    zlnhmct.jpg

    Lucky, maybe the map random generated suited my purpose perfectly !

    Enjoy !

     

    • Like 2

    Share this post


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

    OTTD Nostaligic gameplay II Sedingworth crazy networks !

    This gameplay I played over a decade ago on my DotNet book ! Very limit of posibilities explored, straight forward A to B play nothing special . Yet you see this at the end of 2050 it´s nothing like sophisticate gameplay of today !VX9k4EJ.jpg

    U4dUaaj.jpg

    You see the cities completely evolved beyond their borders. Network construction totaly imposible up to the inch !

    HL4gKaz.jpg

    Airports last era only squeezed in as Int come available !

    cIHmfHZ.jpg

    Enjoy !

    • Like 2

    Share this post


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

    OTTD Nostalgic gameplay III Frunberg !

    Little more recent OTTD gameplay Frunberg Islands ! This sound little like the first, I love islands !

    eyt7ogK.jpg

    3NliUhf.jpg

    So developed only two airport could meet local transport needs !

    zX9HoNH.jpg

    Enjoy !

    • Like 2

    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