Tutorial: Localize Tool

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

Moderator: Moderators

Sith
User avatar
Posts: 1278
Joined: Fri Oct 15, 2004 6:34 pm
Location: Germany

Tutorial: Localize Tool

Postby Rends » Fri Jun 03, 2005 7:43 am

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

Old School Staff
User avatar
Posts: 1232
Joined: Mon Feb 21, 2005 4:54 am
Location: Heartland, Texas

RE: Tutorial: Localize Tool

Postby ShadowHawk » Fri Jun 03, 2005 9:22 am

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

Postby Kyross » Thu Jul 28, 2005 1:41 am

Actually I only have level and weaps, no entity.

Emperor's Hand
User avatar
Posts: 488
Joined: Sun Dec 26, 2004 12:11 pm

RE: Tutorial: Localize Tool

Postby Saturn_V » Thu Jul 28, 2005 2:40 am


Jedi
User avatar
Posts: 1188
Joined: Fri Jun 10, 2005 2:46 pm

RE: Tutorial: Localize Tool

Postby Delta_57_Dash » Mon Aug 29, 2005 3:40 pm

how do you localize vehicles?

Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm

Postby Leviathan » Fri Sep 02, 2005 12:54 pm

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:

Groove Walrus
User avatar
Posts: 1603
Joined: Wed Aug 31, 2005 11:33 pm
Location: An Igloo High Upon a Mountain Top

Postby SBF_Dann_Boeing » Thu Nov 03, 2005 5:46 pm

Where do you get that tool that u showed in the pic?

Commander Randomtoast
User avatar
Posts: 948
Joined: Sun Oct 23, 2005 9:17 pm
Location: Wherever there is shenanigannery.
Projects :: No Mod project currently.
Games I'm Playing :: Overwatch
xbox live or psn: No gamertag set

Postby Karnage » Thu Nov 03, 2005 6:11 pm

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?

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

Postby Teancum » Thu Nov 03, 2005 6:32 pm

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.

Groove Walrus
User avatar
Posts: 1603
Joined: Wed Aug 31, 2005 11:33 pm
Location: An Igloo High Upon a Mountain Top

Postby SBF_Dann_Boeing » Fri Nov 04, 2005 12:09 pm

Nvm I found it!

Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm

Postby Leviathan » Fri Nov 04, 2005 2:31 pm

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

Postby Tohron » Mon May 22, 2006 9:07 am

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...

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

Postby Teancum » Mon May 22, 2006 9:12 am

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

Postby Tohron » Mon May 22, 2006 9:34 am

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.

Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm

Postby Leviathan » Mon May 22, 2006 12:40 pm

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

Postby Tohron » Wed May 24, 2006 9:11 am

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.

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

Postby Teancum » Wed May 24, 2006 9:14 am

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).

Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm

Postby Leviathan » Thu May 25, 2006 10:23 am

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

Postby Luke » Sat Apr 28, 2007 12:45 am

This isnt for BF2 is it?

- :vader:

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

Postby Teancum » Sat Apr 28, 2007 9:50 am

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.

Next

Return to All things SWBF1

Who is online

Users browsing this forum: No registered users and 2 guests