![]() |
![]() |
|
#1
|
|||
|
|||
|
Right basically what I want to do is change the perk colours within Marco's ServerPerks (my own version). I have found where to change them which I changed the values to:
Code:
static function byte PreDrawPerk( Canvas C, byte Level, out Material PerkIcon, out Material StarIcon )
{
if ( Level>10 )
{
PerkIcon = Default.OnHUDGoldIcon;
StarIcon = Class'HUDKillingFloor'.Default.VetStarGoldMaterial;
Level-=10;
C.SetDrawColor(250, 220, 0, C.DrawColor.A);
}
else if ( Level>5 )
{
PerkIcon = Default.OnHUDGoldIcon;
StarIcon = Class'HUDKillingFloor'.Default.VetStarGoldMaterial;
Level-=5;
C.SetDrawColor(200, 200, 200, C.DrawColor.A);
}
else
{
PerkIcon = Default.OnHUDIcon;
StarIcon = Class'HUDKillingFloor'.Default.VetStarMaterial;
C.SetDrawColor(220, 130, 0, C.DrawColor.A);
}
return Min(Level,15);
}
Here is what is seems to do: Levels 0 - 5 = Casual red colour (standard only but changes brightness) Levels 6 - 10 = Whity gold standard colour (standard only but changes brightness) Levels 11 + = Custom set colour (works customed). Why is is the third perk colour works but the other two don't? Both second and third colour share the same picture so it's not the picture itself. Last edited by FluX; 05-29-2011 at 03:49 AM. |
|
#2
|
||||
|
||||
|
I have no idea what you're asking.
__________________
Quote:
|
|
#3
|
|||
|
|||
|
Basically what im trying to do is change the perk picture (the perks that go ontop of your character and bottom left of the screen) to custom colours. I have changed the perks to go bronze, silver and then gold BUT for some reason the first two perks (Red Perk - levels 0 - 5 and Gold Perk - levels 6 - 10) doesn't want to change colour but changes brightness of the colour.
The past part of the code can change colour to whatever RGB code I change it to (originally green). I have checked the code but it's exactly the same for all three parts of the perks. The texture picture is not the answer either as the code is saying they are using the same texture. How can I get the other two perk sections to work with my specific colour? |
|
#4
|
|||
|
|||
|
*Bump*
Please someone help me get this working, I can't change colour of the perk but only the saturation/brightness of it. |
|
#5
|
|||
|
|||
|
Not sure if this is what you're asking about but... red perk icon only consists of color Red, so you can only scale the color value between black and red.
Yellow perk icon consists of colors Red and Green, thus allowing you to only use red, green, yellow and black color scales (not blue). If you want to modify blue color of the icons you need to import new white perk icon textures. |
|
#6
|
|||
|
|||
|
Right i've made my own picture perks to replace them. I can get this working but I can't get the stars to work at all. Anyone know how to edit the stars in-game (next to the perk symbol) that represents perk level?
I've seen that there is a SRHUDKillingFloor.uc file but don't want to touch (plus I can't find the picture names there). ----------------------Got above working--------------------- Found and changed the perk stars but im having a problem with a custom picture set im doing. I can change the "OnHUDIcon" and "OnHUDGoldIcon" to my custom pictures but I can't get my other custom pictures to work at the same time. (Located at bottom of every perk in defaultproperties: Code:
OnHUDIcon=Texture'FluXiPerksTex.BBerserker' OnHUDGoldIcon=Texture'FluXiPerksTex.GBerserker' How could I make a "OnHUDSilverIcon" so I can edit all perks and add my silver version to it? I've tried to do what I found in the ServerPerksV3 HUD addon had but I can only get stars to work and not the perks itself. They still show up as a gold perk (original). Last edited by FluX; 06-01-2011 at 04:54 AM. |
|
#7
|
|||
|
|||
|
Code:
static function byte PreDrawPerk( Canvas C, byte Level, out Material PerkIcon, out Material StarIcon )
{
PerkIcon = Material'YourNewPerkIconNameHere';
StarIcon = Material'YourNewStarIconNameHere';
if ( Level>10 )
{
Level-=10;
C.SetDrawColor(250, 220, 0, C.DrawColor.A);
}
else if ( Level>5 )
{
Level-=5;
C.SetDrawColor(200, 200, 200, C.DrawColor.A);
}
else C.SetDrawColor(220, 130, 0, C.DrawColor.A);
return Min(Level,15);
}
|
|
#8
|
|||
|
|||
|
That makes my perks and stars not show at all.
Right I think im getting somewhere with this. I have got a compiling error though: Code:
SRHUDKillingFloor.uc<58> : Error, Unknown Property 'OnHUDSilverIcon' in 'Class KFMod.KFVeterancyTypes' Code:
else if ( KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkillLevel > 5 )
{
TempMaterial = KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkill.default.OnHUDSilverIcon;
TempStarMaterial = VetStarSilverMaterial;
TempLevel = KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkillLevel - 5;
}
Code:
var() texture OnHUDSilverIcon; This should answer the whole perk changing as it will give me the setting inside the perk.uc to say what perk texture is OnHUDSilverIcon instead of just OnHUDIcon and OnHUDGold. Last edited by FluX; 06-01-2011 at 05:52 PM. |
|
#9
|
|||
|
|||
|
*Bump*
Really need help as whatever I do it comes up with an error. I thought the error above would be the best to stay on but when I try other code in, it says "bad member" etc. |
|
#10
|
||||
|
||||
|
hum, try to see the code of Advenced Per Server Perk: http://forums.tripwireinteractive.co...ad.php?t=47547
you can see that: Quote:
Good luck |
|
#11
|
|||
|
|||
|
I actually originally was looking at this BUT because Marco changed the way the perks were read (sorta), this wasn't needed at all. All I want to do is add an extra section to each of the perks OnHUDSilver="perk texture here" exactly the same as the red and gold perk is set-up. This will make my life so much easier as I only have to edit the perks itself instead of 2-3 different files.
Cheers for trying though. Anyone else can help me? I don't want to let this down as this is the main part of the next update of my version and I need this part done before I can continue. What I really was asking if anyone can try get the coloured line to read a different file instead of the default file it extends: Code:
else if ( KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkillLevel > 5 )
{
TempMaterial = KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkill.default.OnHUDSilverIcon;
TempStarMaterial = VetStarSilverMaterial;
TempLevel = KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkillLevel - 5;
}
Last edited by FluX; 06-04-2011 at 09:29 AM. |
|
#12
|
||||
|
||||
|
How about instead of
Code:
TempMaterial = KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkill.default.OnHUDSilverIcon; Code:
TempMaterial = class<SRVeterancyTypes>(KFPlayerReplicationInfo(P.PlayerReplicationInfo).ClientVeteranSkill).default.OnHUDSilverIcon; (That's funny though, Marco. That's what I keep telling people asking me for coding advice !)
__________________
Quote:
Last edited by Excalibolg; 06-06-2011 at 11:30 PM. |
|
#13
|
|||
|
|||
|
Quote:
|
|
#14
|
|||
|
|||
|
@Excalibolg: Use the code tag, it's much easier to read.
__________________
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|