Localize unit? , Add a weapon?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Localize unit? , Add a weapon?

Post by Fiodis »

My first map is nearing completion. I've gotten great tips from you guys here aat gametoast. I've learned how to skin and sky. How to add units and objects and textures and heights and whatnot.

Now, by my count, there's only 2 more major areas I still need help with before I can finish it.

For the first, it's changing names/labels. Before you reference me to some tutorial, please keep in mind that I'm not able to understand all of them. The first time I asked about this, Tourny gave me a quick runthrough which I listened to politely, even understood a bit, but was unable to replicate. Tourny corrected me, telling me to check the "localize" box when I munge, and I did so, and it failed. Is there anything else you have to munge at the same time, like a specific side or anything?

The second time I asked about it, Maveritchell kindly refered me to a couple of tutorials. I tried to follow them to the letter, but it didn't work in-game, and I got this message while munging:
ERROR[localizemunge Comments.cfg]:Text file syntax error. (No matching bracket)ERROR[localizemunge Comments.cfg]:Text file syntax error. (No matching bracket) [continuing]
2 Errors 0 Warnings
Here's a picture of my localization tool, maybe something's wrong there although it seems good to me.

Image

Also, after I made the changes above and hit save, the program "stopped responding."

Could the problem be that the assassin's odf is rep_inf_clone_assassin instead of assassin_inf_clone_assassin?

To put the assassin in-game in the first place, I added him to a new team folder called assassin and put that into the c_con.lua. So I added him to the "assassin" team but his odf I kept as rep_inf_clone_assassin. Should I change the odf name, as well?

Did I type that in a confusing fasion?

--------

My second major question mark is how to add weapons to units. Take the clone assassin as an example. He's got two vibroblades, but I want to add stealth and grenades as secondary weapons. I'm pretty sure I can, I just don't know how. I did look through the FAQ section, but didn't find anything. Could be that I was looking for the wrong things, though. Maybe there's an excellent tutorial for this that I dismissed because the name made it sound like something else. I don't know. I'm only a beginner. Can anyone help me?

Topic renamed to help the search engine -Staff
User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 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: Crifton
Contact:

Re: Localize unit? , Add a weapon?

Post by Tourny »

It looks like you forgot to check Localize in the munge box... That would make a syntax error.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Localize unit? , Add a weapon?

Post by Deviss »

Hidden/Spoiler:
[quote="Fiodis"]My first map is nearing completion. I've gotten great tips from you guys here aat gametoast. I've learned how to skin and sky. How to add units and objects and textures and heights and whatnot.

Now, by my count, there's only 2 more major areas I still need help with before I can finish it.

For the first, it's changing names/labels. Before you reference me to some tutorial, please keep in mind that I'm not able to understand all of them. The first time I asked about this, Tourny gave me a quick runthrough which I listened to politely, even understood a bit, but was unable to replicate. Tourny corrected me, telling me to check the "localize" box when I munge, and I did so, and it failed. Is there anything else you have to munge at the same time, like a specific side or anything?

The second time I asked about it, Maveritchell kindly refered me to a couple of tutorials. I tried to follow them to the letter, but it didn't work in-game, and I got this message while munging:

[quote]ERROR[localizemunge Comments.cfg]:Text file syntax error. (No matching bracket)ERROR[localizemunge Comments.cfg]:Text file syntax error. (No matching bracket) [continuing]
2 Errors 0 Warnings

[/quote]

Here's a picture of my localization tool, maybe something's wrong there although it seems good to me.

Image

Also, after I made the changes above and hit save, the program "stopped responding."

Could the problem be that the assassin's odf is rep_inf_clone_assassin instead of assassin_inf_clone_assassin?

To put the assassin in-game in the first place, I added him to a new team folder called assassin and put that into the c_con.lua. So I added him to the "assassin" team but his odf I kept as rep_inf_clone_assassin. Should I change the odf name, as well?

Did I type that in a confusing fasion?

--------

My second major question mark is how to add weapons to units. Take the clone assassin as an example. He's got two vibroblades, but I want to add stealth and grenades as secondary weapons. I'm pretty sure I can, I just don't know how. I did look through the FAQ section, but didn't find anything. Could be that I was looking for the wrong things, though. Maybe there's an excellent tutorial for this that I dismissed because the name made it sound like something else. I don't know. I'm only a beginner. Can anyone help me?

Topic renamed to help the search engine -Staff[/quote]
did you try adding the assassin on the rep??
User avatar
Super_Clone
High General
High General
Posts: 803
Joined: Sat Jul 12, 2008 7:58 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: Florida

Re: Localize unit? , Add a weapon?

Post by Super_Clone »

The program isn't freezing Fiodis, its saving, give it a minute and it will go back to normal
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Localize unit? , Add a weapon?

Post by Fiodis »

Thanks for the rename, staff!

And Tourny, I did check Localize in the munge box. The sides was set as "nothing." Should I set it to "assassin," "everything," or what?

Rex, what do you mean by adding it on the reps? You mean just putting it on the rep's side in the c_con.lua? I did try that, I don't think it worked out; I don't remember for sure.... In any case, putting it as its own team in the c_con.lua works fine, I'd rather not change that if it can be avoided.

And I thought it would still respond if it was saving. Guess I was wrong, I'll re-try.

Anything on giving units more weapons?
User avatar
Super_Clone
High General
High General
Posts: 803
Joined: Sat Jul 12, 2008 7:58 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: Florida

Re: Localize unit? , Add a weapon?

Post by Super_Clone »

[offtopic] You should get a xfire Fiodis, there great for asking people for help with modding, you can get it at http://www.xfire.com [/offtopic]

And you can add new weapons in a units Odf.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Localize unit? , Add a weapon?

Post by Fiodis »

I have an x-fire, but somehow I can't use it. I don't know what the problem is, unfortunately. I've pretty much given up on it.

I had a hunch it would be in the ODF, but where?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Localize unit? , Add a weapon?

Post by Maveritchell »

Weapons are set in a unit's .odf with the WeaponName, WeaponAmmo, and WeaponChannel parameters. Look at stock .odfs for guides or read one of the multiple .odf tutorials we have in the FAQ.

And yes, the reason why your unit won't localize is because you gave it an incorrect key. When you look up at the top and see "entity.assassin.inf clone assassin" that's what it thinks your localize key is (minus the entity, ignore that) - it sees the key as "assassin_inf_clone_assassin."
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Localize unit? , Add a weapon?

Post by Deviss »

Fiodis wrote:Thanks for the rename, staff!

And Tourny, I did check Localize in the munge box. The sides was set as "nothing." Should I set it to "assassin," "everything," or what?

Rex, what do you mean by adding it on the reps? You mean just putting it on the rep's side in the c_con.lua? I did try that, I don't think it worked out; I don't remember for sure.... In any case, putting it as its own team in the c_con.lua works fine, I'd rather not change that if it can be avoided.

And I thought it would still respond if it was saving. Guess I was wrong, I'll re-try.

Anything on giving units more weapons?
i said add the assassin on the rep army: rep_inf_clone_assassin
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Localize unit? , Add a weapon?

Post by Fiodis »

I try, but whenever I do so it just deletes him from the char list. For instance:
Hidden/Spoiler:
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi",
"all_hero_hansolo_tat",
"all_hero_leia",
"all_hero_chewbacca")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader",
"imp_hero_emperor",
"imp_hero_bobafett")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_yoda",
"rep_hero_macewindu",
"rep_hero_anakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\assassin.lvl",
"rep_inf_clone_assassin")

--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "rep_inf_clone_assassin", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "rep_hero_yoda", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)
That's my hero assault lua. I tried to put him in place of Chewie, and it just skips his spot on the character list altogether.

I have his source files put in: data***/_BUILD/Sides/assassin. I don't know what could be wrong.

I kept his odf as rep_inf_clone_assassin so that I could rename him once he's in-game. But I can't get him in-game in the first place now.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Localize unit? , Add a weapon?

Post by Maveritchell »

Like I keep saying, use the FAQ thread. From the FAQ:
Custom Side: How to

You're not setting the side up correctly in the first place.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Localize unit? , Add a weapon?

Post by Fiodis »

Well, now I've followed the tutorial's instructions to the letter (except for the part with the lua, since that was a conquest lua and I wanted him in hero assault in place of chewie) and all it does is make my game crash.

Is there a way to fix this; to add him to hero assault? Or is he confined to conquest?

Edit ~ the problem of putting renaming him is solved, hooray! But, the problem of putting him into hero assault isn't. I still don't know how, and I'm still trying to put him in; and I'm still welcoming any form of help.

Just a thought - should the topic be renamed to "Add a unit to Hero Assault?, change weapon?"?
Post Reply