[question]Manually modifying PLAYERCFG.LUA(HW2)

I would like to manually modify the PLAYERCFG.LUA that is used for your profile in HW2(HW2 non remastered version) with regards to being able to reset the base colour and stripe colour and team colour and stripe colour for players 2,3,4,5,6.

I can reset player one’s base\team colour and stripe colour but I can’t do the same for the other players.

Does anyone know the team base colours and stripe colours for the Vaygr as seen in the campaign? I checked the teamcolour.lua file that comes with each of the HW2 campaign missions and there it gives team\base colours and stripe colours for the Vaygr so I can assume that the base\team colours and the stripe colours given in the teamcolour.lua files for the Vaygr is the correct values.

Thanks.

hello old B5 comrade, Snake here from relic forums ^^

I could help you on this (I had to check them for my “rainbow UI” mod), but my main pc is currently under heavy revamp. Give me a few days and I will reconnect my hard-drive to give you the info :wink:

By reset do you mean reset back to default, or do you mean you want to change the defaults? For the former problem, there’s a button next to ‘start game’ in the Skirmish menu which resets all players to default colors. For the latter problem, I imagine the defaults are defined somewhere in the Homeworld2.big.

Vaygr teamcolour : 230,230,230
Vaygr stripecolour : 22,22,22

Those should be ok, but the best way to verify it is to open “UI\NewUI\PlayerSetup\preset_vaygr.tga”, as my values are derivated from hsl values and there could be some smal differences because of the rgb-to-hsl-to-rgb conversion

Well most of the teamcolor.lua files for the campaign missions have the following code for the Vaygr:

1 = { { 0.9, 0.9, 0.9, }, { 0.1, 0.1, 0.1, }, "DATA:Badges/Vaygr.tga", { 0.921, 0.75, 0.419, }, "data:/effect/trails/vgr_trail_clr.tga", },

That appears to be the standard team\base colours for the Vaygr in the campaign but they cannot be used in the PLAYERCFG.LUA.There are some slight differences ie. for some of the Vaygr have different team colours listed in the teamcolor.lua but the only way I can get the default colours for each player in mp is to create a new profile as to find the entries in the default PLAYERCFG.LUA and copy those values even for the colour swatches.

Here is a copy of the code for each of the 5 ai players that is used for the base\team colours and stripe colour:

emblem = "PROFILES:badges/Vaygr.TGA", stripecolour = { 149, 129, 182, }, teamcolour = { 104, 152, 34, }, },

The code for your base\team and stripe colours is the same but found further down in the .lua and I don’t want to “reset” my profile as it contains all the campaign info plus it has the entries from the various custom game types from the mods I have used for HW2.

some of the values are not in 0-255 format, but in 0-1 format, which explain the “{ 0.9, 0.9, 0.9, }, { 0.1, 0.1, 0.1, }”, which is equivalent to “{ 230, 230, 230, }, { 26, 26, 26, }” (you just have to multiply or divide by 255, the first one being for the teamcolour, and second one the stripecolour)

edit : now I’m confused as to what you want exactly. Could you not (as you said), create a second profile and copy from one PLAYERCFG.LUA to another ? :confused:

Will create a third profile to get the default values. Did not know about the 0-1 format in which I have to multiply or divide by 255 to get the right values for use in the PLAYERCFG.LUA. I would like to know the actual values for the Kushan and Taiidan so I can manually change the values to those if I want to when I play the HW2 mod HW: Remastered?

I would have thought it would be a quicker way of doing that than having to manually find and change the values in the PLAYERCFG.LUA.

Thanks.

you want to reset your colours ? You know you can click on the top left team/stripe/badge images in the player config screen right ? Or did I misunderstood something ?

Yes. For ai players 2,3,4,5,6 as you can’t reset player 2,3,4,5,6 colours and fleet badge for ai mp games. Only player 1’s team\base and stripe colours and fleet badge.

ah, ok, I understand now !
And no, I don’t know of any other method to reset the ai players to their original colours. Wouldn’t even be easy with a mod because we would have to rewrite the PLAYERCFG.LUA file, which is possible with some specific code, but the player config screen would at least need to be closed and reloaded to read the new values (and I’m not even sure if it would work properly as some parts of this screen are hardcoded)