Tutorial: Localize Tool

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

User avatar
Rends
Sith
Sith
Posts: 1278
Joined: Fri Oct 15, 2004 6:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Germany
Contact:

Tutorial: Localize Tool

Post by Rends »

It seems that some guys have problems using the localize Tool correctly.

You can find the localize tool in:
DataMod1\edit_pc_addon_localize.bat (if using the SWBF1 tools)
or
data_ABC\editlocalize.bat (if using the SWBF2 tools)
Your project name may vary from the examples above.

So here is a short tutorial about how to use it.
As example i will use the localization from the Bounty Hunters Team. So you need to know how to add a new Side to your map!

First have a look at the localize screenshot:
Image
In the left window you see a data tree with 3 root level scopes called "level", "weapons" and "entity".
If you run your localize tool you will see the 2 entries "level" and "weapons". We will add "entity" later.

Now let's localize!
First we want to name Command Posts.
Under level you find a scope named after your mapID in this case "Bounty1". If you run localize the first time you will notice that you already have 2 keys called "CP1Label" and "CP2Label". Make sure that the keys match the same name you typed for your CPs in the label box in ZeroEditor (You can also rename CP1label and CP2Label if needed).
Select "CP1Label" and give your command post a proper name. To do this write the name of the command post in the middle window below "Level.Bounty1.CP1Label". By default it is called "Barracks". Rename it.
Do it again with the second "CP2Label". If you need more command posts just right click on your modID "Bounty1" in the left window and choose "add key".

Now we want to add and name weapons.
In this example we will add the "imp_weap_inf_grapplinghook" as a new weapon.
Select root level scope "weapons" you find in the left window and add a new scope called "imp". To do this right click on "weapons" and choose "add scope" from the context menu. Add another scope called "weap" under "imp". Now add a key under "weap" called " inf_grapplinghook". Name it in the middle window the same way you did with the Command posts.

at last we will name a new unit from our new side.
In this example we will name the IG-88 Droid which is called "cis_Inf_ig88" (the ODF name) in the class *.req file.
First right click in an empty place in the left window and choose "Add Root Level Scope".
Name it "entity".
Next add a scope called "cis". At last add a key called "inf_ig88". Now give the unit a proper name in the middle window below entity.cis.inf_ig88 (See screenshot)

Now you know how to add and name CPs, weapons and new units.
Hope this helps.

For more information have a look at Psych0fred's board at http://www.secretsociety.com/forum/disp ... .asp?fid=4
User avatar
ShadowHawk
Old School Staff
Posts: 1232
Joined: Mon Feb 21, 2005 4:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Heartland, Texas
Contact:

RE: Tutorial: Localize Tool

Post by ShadowHawk »

I think rends posted this before, but was lost in the pits of hell somewhere in the bottom of the forum.:) This is definately a sticky. :) thanks rends.
Kyross

RE: Tutorial: Localize Tool

Post by Kyross »

Actually I only have level and weaps, no entity.
Saturn_V
Emperor's Hand
Posts: 487
Joined: Sun Dec 26, 2004 12:11 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

RE: Tutorial: Localize Tool

Post by Saturn_V »

Delta_57_Dash
Jedi
Jedi
Posts: 1187
Joined: Fri Jun 10, 2005 2:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Tutorial: Localize Tool

Post by Delta_57_Dash »

how do you localize vehicles?
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

Delta', copy all *.CFG files present into "BFBuilder\Data\Localize" to "[modid]\_SOURCE_PC\Common\Localize", and then, launch your mod's "edit_pc_addon_localize.bat" file. Fianlly, you'll just have to explore all scopes to find how to localize anything... :wink:
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Post by SBF_Dann_Boeing »

Where do you get that tool that u showed in the pic?
User avatar
Karnage
Commander Randomtoast
Posts: 947
Joined: Sun Oct 23, 2005 9:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: Overwatch
xbox live or psn: No gamertag set
Location: Wherever there is shenanigannery.

Post by Karnage »

Okay, say if i wanted to make a downloadable modded side, lets say a modded imp.lvl to replace the original imp.lvl. Could i somehow rename the units and weapons without the localization tool, and the new name of the units and weapons show up on every map, instead of just one modded map?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

As far as I know, no. I think the main localization key is in common.lvl -- I'm not 100% on that, but pretty sure.
User avatar
SBF_Dann_Boeing
Groove Walrus
Groove Walrus
Posts: 1529
Joined: Wed Aug 31, 2005 11:33 pm
xbox live or psn: No gamertag set
Location: An Igloo High Upon a Mountain Top

Post by SBF_Dann_Boeing »

Nvm I found it!
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

Karnage wrote:Okay, say if i wanted to make a downloadable modded side, lets say a modded imp.lvl to replace the original imp.lvl. Could i somehow rename the units and weapons without the localization tool, and the new name of the units and weapons show up on every map, instead of just one modded map?
In that case, hex-editing is the only way to realize what you requested...
Tohron

Post by Tohron »

I'd like to use that tutorial but I have a problem. When I run the Localize tool, my map name dosn't show up under the list of "levels". (Note: in the game the map name shows up as ROK%s_%s) Any help?

Also, did anyone else notice the list of cheats up at the top? :D Now we just have to find out how to upen the cheat window...
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

That's probably a regional issue. The localize tool was set up for the US version. Rends seems to know how to get it working for other languages.
Tohron

Post by Tohron »

Teancum wrote:That's probably a regional issue. The localize tool was set up for the US version. Rends seems to know how to get it working for other languages.
Nope, I'm from the US and I use English. The list of levels does show all the maps that are in the game (and a few that arn't, like Bespin). I don't know why.
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

Tohron, might I know if you have attempted to Localize your custom Star Wars Battlefront level using an updated version of Star Wars Battlefront "World Builder", amongst all those available on the web-site administrated by the GameToast member named "psych0fred" ?
Furtermore, would you mind posting the whole content of the "addme.lua" file easily findable inside the "BFBuilder\Data[Mod_ID]\addme" directory ?

Thanks in advance !...
Tohron

Post by Tohron »

What is the World Builder? Is that another name for Zero Editor?

Here is the addme.lua:
Hidden/Spoiler:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "ROK%s_%s", era_g = 1, era_c = 1, mode_ctf_g = 1, mode_ctf_c = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("ROK","ROKg_ctf",4)
AddDownloadableContent("ROK","ROKc_ctf",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\ROK\\data\\_LVL_PC\\core.lvl")

IMPORTANT NOTE: Any attempts I have made to change my map name in the addme.lua have shown up in-game, but attempts to load those maps have caused a freeze on the level-select screen.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

I was checking out the munge.bat for localization -- looks like it munges in whatever languages you originall set it to. Can't be 100% sure though. Can anyone confirm whether or not names worked in other languages for BF1 (custom maps).
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

Off-topic : Alright, the content of the "addme.lua" file you have provided to us above is much more complex than any other one shipping with Star Wars Battlefront level, which implies that you must have wished to make a level intended to this LucasArts video-game's sequel working properly, and that's why I guess you would obtain many more Support thanks to the "SWBF2 Modding" GameToast Section than inside the current one, Tohron...
On the other hand, would you mind submitting me all the *.CFG files contained inside both the "Data_[ModID]\Common\Localize" directory and the "Data_[ModID]\Common\Localize\PC" one, so that I could determine whether your current problem is caused by the Source Files associated to "core.lvl" ?
Luke

Post by Luke »

This isnt for BF2 is it?

- :vader:
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11079
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

The same principles apply, but the strings themselves are BF1 specific. This Tut can show you basically what needs to be done though.

And don't let anyone get on you about the bump. This one is okay.
Post Reply