• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help I'm trying to overhaul the portrait system in the game

Myth

Freebooter
Good day! I'm trying to overhaul the portrait system in the game. I would like it to be similar to the system with item icons. Several portraits per sheet. And I'm stuck on lines similar to these two.

GameInterface.CHARACTERS_SCROLL.(attributeName).img1 = GetFacePicName(pchar);
GameInterface.CHARACTERS_SCROLL.(attributeName).tex1 = FindFaceGroupNum("CHARACTERS_SCROLL.ImagesGroup","FACE128_" + pchar.FaceID);

As I understand it, the first line indicates which piece of texture to show, and the second which texture to take. But when you edit these lines, the portrait simply disappears.
 
Does CoAS have a file "RESOURCE\INI\interfaces\pictures.ini"? PoTC does, and it has sections like this:
Code:
[FACE128_1]
sTextureName   = portraits\128\face_1.tga
wTextureWidth   = 128
wTextureHeight   = 128
picture = face,0,0,128,128
There is one such block for every portrait. If you create a new 128x128 portrait, you need to add a similar block, otherwise the 128x128 picture won't show up.

For items, it has sections like this:
Code:
[ITEMS_1]
sTextureName   = items1.tga
wTextureWidth   = 512
wTextureHeight   = 512

picture = itm1,0,0,128,128
picture = itm2,128,0,256,128
picture = itm3,256,0,384,128
picture = itm4,384,0,512,128
picture = itm5,0,128,128,256
picture = itm6,128,128,256,256
picture = itm7,256,128,384,256
picture = itm8,384,128,512,256
picture = itm9,0,256,128,384
picture = itm10,128,256,256,384
picture = itm11,256,256,384,384
picture = itm12,384,256,512,384
picture = itm13,0,384,128,512
picture = itm14,128,384,256,512
picture = itm15,256,384,384,512
picture = itm16,384,384,512,512

If CoAS does the same, and if you now have a single file with several portraits, then you'll probably now need a block in "pictures.ini" which defines all the portraits in that file. See if you can find how icons for items or weapons are defined, then do something similar for your portraits file.
 
Good day! I'm trying to overhaul the portrait system in the game. I would like it to be similar to the system with item icons. Several portraits per sheet. And I'm stuck on lines similar to these two.

GameInterface.CHARACTERS_SCROLL.(attributeName).img1 = GetFacePicName(pchar);
GameInterface.CHARACTERS_SCROLL.(attributeName).tex1 = FindFaceGroupNum("CHARACTERS_SCROLL.ImagesGroup","FACE128_" + pchar.FaceID);

As I understand it, the first line indicates which piece of texture to show, and the second which texture to take. But when you edit these lines, the portrait simply disappears.

Can you share your changes? I'm not sure what exactly you mean by "edit these lines", so I have no idea what might be going wrong.

Does CoAS have a file "RESOURCE\INI\interfaces\pictures.ini"?

It does, and I think it works exactly the same way.
 
Can you share your changes? I'm not sure what exactly you mean by "edit these lines", so I have no idea what might be going wrong.



It does, and I think it works exactly the same way.

GameInterface.CHARACTERS_SCROLL.(attributeName).img1 = "itm1";
GameInterface.CHARACTERS_SCROLL.(attributeName).tex1 = FindFaceGroupNum("CHARACTERS_SCROLL.ImagesGroup","ITEMS_1");
 
Back
Top