SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: wsa30h on November 20, 2019, 09:49:02 AM

Title: how to change local command post colour to white ?
Post by: wsa30h on November 20, 2019, 09:49:02 AM
how do i change the locals command post colour to be white ?
Title: Re: how to change local command post colour to white ?
Post by: Dark_Phantom on November 20, 2019, 10:35:00 AM
Command post colors in BF1 are hard-coded.
The "aligned" property defined for Holograms determines the color, which is in the exe.
Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 20, 2019, 11:09:04 AM
so i cant use a hard coded colour by renaming the com_bldg_controlzone to com_bldg_controlzone2 and the holo to 2 and changing the locals colour to white in the holo ? i know the colours were hard coded just trying to do what the maker of rumble conquest for battlefront2 did he has yellow command posts for team 4 and white command posts for team 3.
Title: Re: how to change local command post colour to white ?
Post by: Dark_Phantom on November 20, 2019, 11:28:33 AM
I don't know how they did it in BF2, only what I know about BF1 (and I've never tried it, only what I know from digging into the theory)-
You can put whatever color you want in the com_holo_controlzone1/2/3/4.odf, however, it will only work the way you want if you take "aligned" out and swap it with "build" which if I remember correctly is the only other option.  However, when you do this, you lose the changing command post colors when they swap sides.  The icons would still be ok I think.

The options NeutralColor/FriendlyColor/EnemyColor/LocalsColor do nothing, they aren't mentioned in the BF1 (or 2) case hex lists.  All of that functionality is in the exe, and thus would need changed there.  I've hunted for it in Cheat Engine, but haven't found it.

Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 20, 2019, 12:27:40 PM
how do i make team 3 and 4 have different icons i have cis and imperials as local teams cis are team 3 and imps are team 4 i named cis locals two in the lua to match the modified controlzone colours and changed the names like so HoloImageGeometry    = "locals com_icon_republic"
HoloImageGeometry    = "locals2 com_icon_CIS"
HoloImageGeometry    = "locals3 com_icon_imperial"
named imps as locals 3 in my luas but the command post always shows the imperial icon even if the seperatists capture it is there a way to have both icons ?
Title: Re: how to change local command post colour to white ?
Post by: Dark_Phantom on November 20, 2019, 03:18:12 PM
I know you're not going to like this, but here's your team choices:
BF1 Case hex lines - From SecretSociety
Team.cpp(84): case 0x8c4b1ad8: /* "neutral" */
Team.cpp(85): case 0x269992eb: /* "neu" */
Team.cpp(88): case 0x1d083cc0: /* "alliance" */
Team.cpp(89): case 0x13254bc4: /* "all" */
Team.cpp(92): case 0x2c5f5065: /* "empire" */
Team.cpp(93): case 0x93e73ca1: /* "imp" */
Team.cpp(96): case 0xc7836fe1: /* "republic" */
Team.cpp(97): case 0x2cf46160: /* "rep" */
Team.cpp(100): case 0xf387c5d6: /* "cis" */
Team.cpp(104): case 0x791be6a1: /* "locals" */


Your hard-coded choices are right there.  What does this mean?  Anything else will be ignored by the game- and I don't even know if icons will work for locals because I haven't tried. 
BF1 is not very forgiving in a lot of aspects.
edit: Neutral is team 0, for those keeping score at home.  Only team 0 can have white cps, but team 0 has no code to be able to spawn in.  Source: Actually have tried this.
Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 20, 2019, 03:25:19 PM
thanks dark icons seem to work to some extent  but only one local faction
Title: Re: how to change local command post colour to white ?
Post by: Dark_Phantom on November 20, 2019, 08:13:38 PM
Ok, well that's better than I expected - That's probably all it will take, unless you can trick the game into taking another one using one of the teams listed.
Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 21, 2019, 01:05:21 AM
yes team 4 name changed to imps lets say for example will give their icon to them but thye will appear red if only there was a way to turn them yellow and retain the team name and icon
Title: Re: how to change local command post colour to white ?
Post by: Ascertes on November 22, 2019, 11:31:29 AM
An alternative solution that I found while I was working on my Kashyyyk: Village map is that, in your LUA files, if you change the relationship between 2 factions to where one is neutral, the CP will appear white.

So let's say you have teams X and Y. In your LUA you could set SetTeamAsNeutral(X, Y) so then, when playing as team X, command posts held by team Y will appear as white.

I don't really think this solves your problem but it is one way to get CP's to appear as white. In my experimentation the icons also held and looked fine. Hope this helps in some way.
Title: Re: how to change local command post colour to white ?
Post by: Teancum on November 22, 2019, 12:17:47 PM
In SWBF2 Team 0 gets a white CP if I recall (early deathmatch mod had it, but DM was ultimately scrapped as it was terribly hacky)

Try setting to team 0? SWBF1 is much, much weaker LUA-code-wise.
Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 22, 2019, 01:10:01 PM
thanks guys i will test it and report back
Title: Re: how to change local command post colour to white ?
Post by: Dark_Phantom on November 22, 2019, 06:18:35 PM
Team 0 can't spawn in.  There's no code to back it up, for player or AI.
If you hack yourself onto team 0, you can see the units, but they can't spawn.
Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 23, 2019, 02:59:04 AM
thanks guess they will both have to be yellow just wish there was a way to have mutiple local faction icons
Title: Re: how to change local command post colour to white ?
Post by: Ty294 on November 23, 2019, 02:10:16 PM
Kind of related to this topic, but I assume the fact that there are no more colors than just yellow also means that it is still impossible to localize more than just one local faction? Meaning if say I wanted to have two local factions and call one "Geonosians" and one "Wookiees", I'd still be limited to only having one name or the other?

I'd been meaning to look into this again, but since this topic is right along those lines I figured I'd bring it up here.
Title: Re: how to change local command post colour to white ?
Post by: wsa30h on November 23, 2019, 02:48:41 PM
tried to have two local factions with different names exactly what you specified it doesent work
EhPortal 1.34 © 2024, WebDev