• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

How I can add custom icon to new buff in my modlet?

Survager

Tester
Hey.
I'm doing modlet which adds several new buffs.

Here is a tree of modlets folders:

[ mod_modlet ]

- [ Config ]

- - buffs.xml

- - items.xml

- [ UIAtlases ]

- - [ ItemIconAtlas ]

- ModInfo.xml

New icons for the buffs are located in the folder [ItemIconAtlas].

The file buffs. xml buff is described as follows:

<?xml version="1.0" encoding="utf-8"?>
<survager>
<append xpath="/buffs">
<buff name="newBuff" icon="UIAtlases/ItemIconAtlas/iconForNewBuff.png">
</buff>
</append>
</survager>




Buff applied correctly, but a buff icon is not displayed either in the lower left corner of the screen or in the description of the buff. There are only a dark background in the lower left corner of the screen.

What am I doing wrong?
Thanks for the help.

 
if the buff icons are located in the catalog:

....\7 Days To Die\Mods\Mymod\UIAtlases\UIAtlas

 then they can be referred to usually, as if they are already in the Atlas:

<buff name="My buff" icon="ui_game_symbol_MyIcon" >

without specifying the path.

если иконки значков баффов находятся в каталоге: 

....\7 Days To Die\Mods\Mymod\UIAtlases\UIAtlas

 то они на них можно ссылаться обычно, как будто они уже есть в атласе: 

<buff name="My buff" icon="ui_game_symbol_MyIcon" >

без указания пути.

(но как это делать с хпатч - хз)

 
Last edited by a moderator:
Может что то с самим файлом иконки (формат), пришли ее мне - я проверю.

Can something with the icon file itself (format), send it to me - i will check.

 
Last edited by a moderator:
there are no secrets here, just two things that I described the first time. Send all files that are involved in this, we will find some syntax error.

тут никаких секретов нет, только две вещи которые я описал первый раз. Все должно работать на раз-два. Ну пришли все файлы которые в этом участвуют, найдем какую нибудь синтаксическую ошибку.

 
https://yadi.sk/d/4HEHqbXlXspOsg

Просто перепутал атлас(название директории). 

Ты создал директорию для иконок, а не для символов УИ. 

(проверь еще соответствие иконок тому что ты задумал, а то может я исправил не все)

Just got the Atlas(directory name) mixed up.

You created a directory for icons, not for UI-symbols.

(check if the icons match what you have in mind, or maybe I haven't fixed everything)

 
Last edited by a moderator:
Back
Top