Jump to content

Open Community  ·  46 members

Valheim

how do shield variants work?


Ggwppino

Recommended Posts

Hi! I'm trying to figure out how shield variants work, but I just can't figure it out. I think I found the code where the correct item is spawned:

GetComponent<Renderer>().material.SetFloat("_Style", style); //in ItemStyle.cs

and

base.gameObject.GetComponentInChildren<IEquipmentVisual>()?.Setup(m_itemData.m_variant); //in ItemDrop.Start()

`m_variant` is an integer that can be modified in Inspector in ItemDrop.
Now: if what i found is actually the application of the shield variant, how does it handle the materials? If I search for the BlackMetalShield prefab and its materials in Unity, I cannot find variants of materials, textures or other prefabs.

I'm definitely missing something, and being new to c # and unity doesn't help me. I was hoping it was as simple as adding DamageModPair to weapons. but I've been banging my head for days.

Ty dudes

EDIT: nvm, I just had to create a custom shader

Edited by Ggwppino
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...