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:
    464
    Likes Received:
    339
    (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:
    871
    Likes Received:
    1,369
    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:
    69
    Likes Received:
    15
    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
  7. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    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:
    69
    Likes Received:
    15
    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,274
    Likes Received:
    11,936
    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
  10. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    69
    Likes Received:
    15
    Oh well, that's where they are.

    Yes, exactly, so I already use the RE Configs, which I modify a little and then came across this “Device” material.

    But that's more of a complete description than a simple object name ? Or are there different writing that allow the name to be given separately or alone?

    I'll add the line from the Localization.csv as a spoiler.

    bkiSVHVSmallSolarPanel1x2,Small Solarpanel 1x2\n[c][4F79D1]Small solar panel for HV+SV reduces power consumption by 20 watts[-][66dbe3] Requires Re 2 beta build 15+ UnEd.[/c],Kleines Solarpanel 1x2\n[c][4F79D1]Kleines Solar Panel für HV+SV senkt den Stromverbrauch um 20 Watt.[-][66dbe3] Benötigt Re 2 beta build 15+ UnEd.[/c],,,,,,,,,,,,,,,
     
    #210
  11. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    The name is also set in the localization file.
     
    #211
  12. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    69
    Likes Received:
    15
    Ok but do I have to do the name separately or as I have already done?
     
    #212
  13. {SWP}Cosmic-senpai™

    {SWP}Cosmic-senpai™ Ensign

    Joined:
    Jul 22, 2022
    Messages:
    3
    Likes Received:
    1
    XRefActivate is missing from the project files.
     
    #213
  14. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    69
    Likes Received:
    15
    Ok, now I've got the whole thing figured out, but it's not easy to see.
    Item or block name,name english,,,,,,,,,,,,,,,,
    bkiXYZInfoEntry,Description English,,,,,,,,,,,,,,,,

    Thank you for your help
     
    #214
  15. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    69
    Likes Received:
    15
    The EmpShader does not want to work at all with emission. Not even pure white works, while the standard shader even reproduces different colors without any problems. The standard shader works well but is unfortunately a little weak in terms of glow. Does anyone have a tip for the EmpShader or is there a way to increase the glow of the standard shader?

    I took a screenshot of the model's emission. Can I use the comparison to the medical station or is the block possibly illuminated differently and therefore glowing more strongly?

    [​IMG]
     
    #215
  16. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    I've never had luck with the empyrion colored shader being able to make strong emissive glows. I've always just used the xrefactivate script to enable and disable a "glowy" part of the model instead but there very well may be some shader settings I have missed.

    If you didn't already know, the Empyrion xrefactivate script (or whatever it's called, I don't have Unity open atm) allows you to enable or disable certain child objects in your prefab based on the power state of your block. With this for example you can even set up particle effects that only show up when the block is powered.

    Not sure if that will be helpful in your case, or if someone has a better solution by using the default empyrion colored shader.
     
    #216
    {SWP}Cosmic-senpai™ likes this.
  17. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    69
    Likes Received:
    15
    I would find the xrefactivate script interesting regardless of the emission effect problem, but it is no longer available in the example project.
     
    #217
  18. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,274
    Likes Received:
    11,936
    It's not? Maybe something for @Taelyn to look at when he has the time then.
    I have not had to download the project for some time myself.
     
    #218
  19. Taelyn

    Taelyn Administrator Staff Member Community Manager

    • Developer
    • Administrator
    Joined:
    Oct 4, 2021
    Messages:
    871
    Likes Received:
    1,369
    Pretty sure ive added it back a while ago, but I will check
     
    #219
    {SWP}Cosmic-senpai™ likes this.
  20. Daimonicon

    Daimonicon Lieutenant

    Joined:
    Nov 4, 2019
    Messages:
    69
    Likes Received:
    15
    The script is definitely missing or did the check reveal something else @Taelyn ?
     
    #220

Share This Page