Adding unit icon

Discussion in 'Modding' started by Francesco_Cavalli, May 29, 2017.

  1. Francesco_Cavalli

    Francesco_Cavalli Active Member

    I'm well aware of how easy this usually is, however having edited the mat.lib to include my new units, they still don't have an icon - has something changed with the way units are given icons in recent patches?
     
  2. Wralth

    Wralth Active Member

    Thats because the actual icons are applied in hud.mat, not mat.lib

    Mat.lib only makes you load additional texture images.
     
    Last edited: May 30, 2017
  3. Francesco_Cavalli

    Francesco_Cavalli Active Member

    So if I want a new Line Infantryman to have the same icon as the vanilla Musketeer18, I have to do more than just replicate the Musketeer18 index and replace the name with the new unit? Thanks for your help - it was really simple back in February but how things are allotted seems to have changed
     
  4. Wralth

    Wralth Active Member

    My bad i completely remembered the relevant filename wrong. I meant hud.mat

    Aside from that you just go to the section with musketeer18 and copypaste it and rename the musketeer18 part.
     
  5. Francesco_Cavalli

    Francesco_Cavalli Active Member

    Alas, that's what I have (Sorry I wrote the file extension wrong too!) - below is my addition. As I wrote earlier this used to work just fine so no idea why it ain't working now

    section.begin {refurl=.\data\hud\ref\reflibmat.mat}
    Material.Name = icons.unit.musketeer18
    Material.LibTextureName = iconsunits
    Material.TextureCoord.ImageW = 1024
    Material.TextureCoord.ImageH = 512
    Material.TextureCoord.CoordX = 0
    Material.TextureCoord.CoordY = 138
    Material.TextureCoord.CoordW = 46
    Material.TextureCoord.CoordH = 46
    section.end
    section.begin {refurl=.\data\hud\ref\reflibmat.mat}
    Material.Name = icons.unit.musketeer18fra
    Material.LibTextureName = iconsunits
    Material.TextureCoord.ImageW = 1024
    Material.TextureCoord.ImageH = 512
    Material.TextureCoord.CoordX = 0
    Material.TextureCoord.CoordY = 138
    Material.TextureCoord.CoordW = 46
    Material.TextureCoord.CoordH = 46
    section.end
    section.begin {refurl=.\data\hud\ref\reflibmat.mat}
    Material.Name = icons.unit.musketeer18eng
    Material.LibTextureName = iconsunits
    Material.TextureCoord.ImageW = 1024
    Material.TextureCoord.ImageH = 512
    Material.TextureCoord.CoordX = 0
    Material.TextureCoord.CoordY = 138
    Material.TextureCoord.CoordW = 46
    Material.TextureCoord.CoordH = 46
    section.end
    section.begin {refurl=.\data\hud\ref\reflibmat.mat}
    Material.Name = icons.unit.pandur
    Material.LibTextureName = iconsunits
    Material.TextureCoord.ImageW = 1024
    Material.TextureCoord.ImageH = 512
    Material.TextureCoord.CoordX = 46
    Material.TextureCoord.CoordY = 138
    Material.TextureCoord.CoordW = 46
    Material.TextureCoord.CoordH = 46
    section.end
     
  6. Wralth

    Wralth Active Member

    Yeah that looks awkward because it definitely should work properly. Either you got some other mod loading over it or your units arent loading with the correct names for their objects because i kind of have no other clue what it could be. Is this in the current version of your mod? If yes then ill download it and will take a look at the files to see whether or not i can make any sense of what might be causing the issue.
     
  7. Francesco_Cavalli

    Francesco_Cavalli Active Member

    Sorted - I've no idea how, but think something was overriding it! 20170601215408_1.jpg
     
    Burak Damgac─▒ likes this.
  8. Aistis1990

    Aistis1990 Active Member

    Cool musketeers so much life and almost immune to shrapnel. Are they implementedninto game?
     
  9. Francesco_Cavalli

    Francesco_Cavalli Active Member

    They're in my mod 'realism di francesco cavalli' on Steam - longer battles and realistic bullet physics, so they still die in one bullet but soldiers miss their target 50% of the time. All soldiers have longer life for more realistic melee
     
    Burak Damgac─▒ likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice