FEATURE INFO Modding models for blocks

Discussion in 'FAQ & Feedback' started by Pantera, Dec 17, 2020.

  1. Lanthanum

    Lanthanum Ensign

    Joined:
    Nov 2, 2017
    Messages:
    12
    Likes Received:
    1
    idk I cant get the link to work at all, tried a few different browsers.
     
    #201
  2. Lanthanum

    Lanthanum Ensign

    Joined:
    Nov 2, 2017
    Messages:
    12
    Likes Received:
    1
    For anyone unable to download the project file, I was able to download it with brave browser.

    Update: I tested it again and it is not working for me this morning. "DNS address could not be found. "
    I tried setting the individual site settings in brave to allow most things and turned off the brave shield.
     
    #202
    Last edited: Mar 29, 2024
  3. imlarry425

    imlarry425 Captain

    Joined:
    Jan 10, 2019
    Messages:
    461
    Likes Received:
    338
    (heads up to @Taelyn) These link errors are happening because of issues with DNS related to registration of taelynshome.com through godaddy ... the domain currently has the Domain Status: clientRenewProhibited (https://icann.org/epp#clientRenewProhibited) which could indicate an "issue with your domain that needs resolution" but it may be a default for the domain provider. Right now, none of the standard DNS providers are propagating the name>IP link so there is something that needs to get fixed on their end by the domain admin.
     
    #203
  4. Taelyn

    Taelyn Administrator Staff Member Community Manager

    • Developer
    • Administrator
    Joined:
    Oct 4, 2021
    Messages:
    808
    Likes Received:
    1,326
    Fixed it
     
    #204
  5. Guccio Gucci

    Guccio Gucci Ensign

    Joined:
    Jul 27, 2020
    Messages:
    2
    Likes Received:
    1
    Just wanted to share this information in case someone is looking for it. I also posted it on Discord. I don’t have a background in programming or Unity, but these are the steps I took to get the assets into the game. I followed the instructions from the first page of this post. If you don’t have Discord, you can find the same information here.

    Thank you all for your help! I’m finally able to add an asset from the Unity store into the game. As a bit of history, I’d like to share my process in case someone searches for ‘How to add an asset from Unity.’ Here’s what I did:

    Purchased the asset from the Unity store.
    Checked the Unity version it supports.
    Looked for prefab packs that other modders had bought, as well as cool-looking packs. You can find these by examining textures and browsing pictures on the store.
    Imported the asset, including sounds and shaders.
    Note that HDRP (High Definition Render Pipeline) might not work with Empyrion, as I encountered pink textures. If anyone has better information, feel free to correct me!"

    After purchasing the assets, I visited the Empyrion forum post on adding custom blocks. I downloaded the correct version of Unity as stated on the first page, along with the examples pack, and followed the instructions provided. Next, I added the local folder where I had unzipped the examples pack and opened it from the HUB. I clicked on ‘Window’ and accessed the Packet Manager, which listed all the asset packets I had purchased. I downloaded and imported the packages I needed. While you have the option to select specific components to import into your project, I imported the entire package for now.

    After that, I navigated the project window until I found the prefab I liked and dragged it over to the hierarchy window. I then renamed the asset to my desired name and zeroed out its position in the inspector window under the ‘Transform’ section. Since my prefab had clones as child entities, I could resize them all at once by selecting all the children and adjusting their scale. Additionally, I made collider adjustments in the inspector window. After spending a couple of hours testing the resizing and relocating in the game, I successfully placed and sized the asset where I wanted it.
     
    #205
    Peter Conway likes this.
  6. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    51
    Likes Received:
    14
    The model itself is loaded but a missing material is criticized. Out of necessity, I used “Material: Legacy” this is working, “Device” the game does not accept.

    26-11:25:29.877 13_25 -EXC- System.Exception: Block -1 references a not existing material 'device'
    at Assembly-CSharp.OptionsQueue.QuoteNetwork (DynamicPropertiesCollection+Element ) [0x0024d] in <2387ce0822d24ebcbe181874328d5d92>:0
    at Assembly-CSharp.OptionsQueue.ReduceAddin (DynamicPropertiesCollection , System.Boolean ) [0x00025] in <2387ce0822d24ebcbe181874328d5d92>:0

    If I then place the model, which has worked before, it can no longer be removed (with Multitool).
    Edit: Ok, I managed to do the non-removable block with -> Collide: "movement,bullet,rocket,melee,sight" However, I do not get the name in focus with the multitool ?
    These are solar panels with which I had experimented Size: 1,1,2 + 1,1,1

    [​IMG]


    [​IMG]


    [​IMG]

    # ======== Test Small Solar Panels SV+HV=========
    { Block Name: SVHVSmallSolarPanel1x1
    IndexName: SolarPanel
    Group: cpgSolar
    MarketPrice: 2377, display: true
    #Material: solar_panel
    Material: Legacy
    Shape: ModelEntity
    Place: Free
    CustomIcon: SolarPanelSmallBlocks
    Model: @blockmodels/UnEd_Solar_Panel_1x1
    #Model: @BlockModels/SolarPanel/SolarPanel1x2/UnEd_Solar_Panel_1x2
    Collide: "movement"
    DropMeshfile: Entities/Misc/BagSmallPrefab
    SizeInBlocks: "1,1,1", display: true
    #SizeInBlocks: "1,1,2", display: true
    AllowPlacingAt: "SS,GV", display: true
    Category: Devices
    HitPoints: 50, type: int, display: true
    Mass: 750, type: float, display: true, formatter: Kilogram
    Volume: 400, type: float, display: true, formatter: Liter
    EnergyOut: 25, type: int, display: true, formatter: Watt
    StackSize: 1000
    MaxCount: 12, type: int, display: true
    ForceMaxCount: true
    CPUIn: 20, type: int, display: true
    #ChildBlocks: "SVSmallSolarPanelSloped1, SVSmallSolarPanelSloped2, SVSmallSolarPanelFlat"
    Info: bkiCVSmallSolarPanel, display: true
    IsOxygenTight: true, display: true
    UnlockCost: 6, display: true
    UnlockLevel: 5, display: true
    TechTreeParent: UnEdMenu
    TechTreeNames: UnEd
    }

    Can anyone help with either the material or the problem of non-removability?
    Supplement: How do I get the panel to be placed flat on the lower block (Ingame Images:Ingame 2) ?

    Ingame 1
    [​IMG]

    Ingame 2
    [​IMG]
     
    #206
    Last edited: Jul 26, 2024 at 3:07 PM
  7. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,243
    Likes Received:
    11,894
    To adjust the location of your model, you need your model to be a child in your unity prefab.
    Leave the parent as an empty game object and then you can adjust the model location and sizing.
    Make sure your parent object has a location of 0 and a scaling of 1, you'll use your child objects to do any scaling or moving as needed.
    Make sure your collider is on the PARENT however otherwise it won't work properly.

    Hint: 1 unit in Unity is equal to one BLOCK in game.
    If you place a default cube object, set it's size to 1x1x1 and set it's Y height to -1 you can see where the "floor" of your block will be for placement. Works as a quick and dirty "preview" for lining your model up with the floor while in unity.

    I am not sure if custom solar panel models are supported however, they might not properly calculate solar power output but give it a try.
     
    #207
  8. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    51
    Likes Received:
    14
    I finally got it right - the scale of the empty gameobject was somehow set to 2, which must have caused some inconsistencies.

    I created the model in 3ds max and started with 1m² and then had to set the whole thing to 0.5 scale - I'll probably make it smaller next time. The hint with the preview is a very good tip

    Yes that has strange result values, I think RE has taken the approach in the past with EnergyIn -X that seems to work quite well.

    I was therefore able to clarify some of the points in my initial post. The only thing I'm missing is something about the material - original material from Solar Panels seems to be “Device”, so why can't I use that and have to try out what works. And the second would be - Why do I only see the life points of my solar panel and not the title as with other blocks.
     
    #208
  9. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,243
    Likes Received:
    11,894
    The materials needs to exist in the MaterialConfig.ecf file for the scenario you're using. Device is a material from the RE2 scenario and not one from vanilla, so if you're using vanilla configs you'll need to set it to a material from vanilla.
    Likewise you need to add your block name to your scenario's localization file for the name to be localized in-game.
     
    #209

Share This Page