Adding new heroes to stock maps: Localization issues

Started by vonfrank, March 02, 2024, 08:45:18 PM

Previous topic - Next topic
I'm trying to add variety to the heroes present on stock maps. For example, one of either Windu, Obiwan, or Anakin for the Republic depending on the map (instead of always Windu).

I'm copying the assets from BF2. I know how to add the new unit as well as adding them to the mission.lvl for each stock map, but I'm having trouble with the unit names. On the kill messages, instead of "MACE WINDU KILLED UNIT 123", replacing with my custom Obiwan hero instead gives "(random clone name) KILLED UNIT 123". The player list at the end of the battle also doesnt correctly display his name.

Obviously this is because Obiwan is not localized in the stock game's localization files, so how do I go about adding him and other heroes I intend to bring over?

Thanks!

I'm not sure if it's possible for a single unit, but I guess you'll have to look for its related localization key. IIRC there was a file/post with all localizations.

The random clone tags appear because these are set up by default for all the playable units in the side you're putting them (except for the hero ones, which I suppose these have a single localization key for each side).

I recommend using the Core LVL builder for the stock files so you can modify the desired localization key.
AR Clan Discord: https://discord.gg/gmmSm5e | Star Wars: Battlefront - 20th Anniversary (2004-2024)

Quote from: Red04SWBF on March 03, 2024, 04:40:13 AMI'm not sure if it's possible for a single unit, but I guess you'll have to look for its related localization key. IIRC there was a file/post with all localizations.

The random clone tags appear because these are set up by default for all the playable units in the side you're putting them (except for the hero ones, which I suppose these have a single localization key for each side).

I recommend using the Core LVL builder for the stock files so you can modify the desired localization key.

That's fair. I'll have to look into editing Core.lvl.

On a similar topic, I was testing the hero modification in multipalyer with a friend (I sent him my SIDE folder and mission.lvl, so we have identical installs). Despite the fact that these new heroes work perfectly in Singleplayer, they crash his client in Multiplayer, and sometimes my client too.

Is there something else I need to modify to get this to work in MP?

make sure your friend installed it correctly
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Quote from: vonfrank on March 03, 2024, 08:39:35 PMThat's fair. I'll have to look into editing Core.lvl.

On a similar topic, I was testing the hero modification in multipalyer with a friend (I sent him my SIDE folder and mission.lvl, so we have identical installs). Despite the fact that these new heroes work perfectly in Singleplayer, they crash his client in Multiplayer, and sometimes my client too.

Is there something else I need to modify to get this to work in MP?

It should work correctly as long as you have the same files. By the way, are you using PC Dedicated software or you run the server directly ingame?
AR Clan Discord: https://discord.gg/gmmSm5e | Star Wars: Battlefront - 20th Anniversary (2004-2024)

Quote from: Led on March 04, 2024, 12:09:44 AMmake sure your friend installed it correctly

I'll double check his installation. The strange thing is though, despite many modifications to the stock game's side files, only heroes caused a crash. We played for hours on various stock and modded maps with heroes turned off with no issues.

Quote from: Red04SWBF on March 04, 2024, 07:12:16 AMIt should work correctly as long as you have the same files. By the way, are you using PC Dedicated software or you run the server directly ingame?

We both have the steam version. I am hosting by running the game directly from the Galaxy Multi-player menu.

Oh okay then.

Did you find the way to modify the names? Not long ago I was interested in doing something similar to you (using the stock Mace Windu as a playable unit, and then showing his respective tag).
AR Clan Discord: https://discord.gg/gmmSm5e | Star Wars: Battlefront - 20th Anniversary (2004-2024)

Quote from: Red04SWBF on March 04, 2024, 08:30:24 AMOh okay then.

Did you find the way to modify the names? Not long ago I was interested in doing something similar to you (using the stock Mace Windu as a playable unit, and then showing his respective tag).

So, slow reply... but No, I still haven't figured out how to modify the names of the custom heroes.

Also, I double checked my friend's installation. It is completely correct. And on top of that, the new heroes work perfectly for him in SinglePlayer, but we both have crashes the second the heroes attempt to spawn in MP.

There's gotta be some additional modification required specifically in the MP environment that I'm missing.

After a while I've figured out how you could do it. You just need to use Localization tool (which comes with SWBF Modding Tools) and create the following scopes/keys:

entity -> <side> -> inf_<heroUnitName>
After creating these you have to write the name you want to show up in-game and save it.

Note that entity and side are scopes, but inf_<heroUnitName> is a key, which refers to the ODF file you included in your mod.

I also recommend you to have a look here if you want to know more about how localization works.

(Sorry for the late post)
AR Clan Discord: https://discord.gg/gmmSm5e | Star Wars: Battlefront - 20th Anniversary (2004-2024)