Is it possible to make all the shipped sides into one, so that you can use units from different factions in one side? Would it be possible to hex kas2g_xl SIDE\all to SIDE\abc
all_inf_rifleman cis_inf_sniper and so on?
I think its possible to make an unit belong to many sides, like jawas,
they belong to DES and TAT.
How would I have to make the Side? Should I just put all the Side stuff from the assets into one side and munge it? Please tell if you know.
Question about modding Sides
Moderator: Moderators
- Jawaraider
- Rebel Sergeant

- Posts: 196
- Joined: Thu Nov 30, 2006 3:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Unknown
-
Rikino
If I understand the question correctly, I think there's an easier way to accomplish what you need (something like having a droid and clone on the same team, right?). In the .lua for your map (data_xxx -> common -> scripts -> xxx -> xxxc_con) (c_con is just one example; the others are there for different modes/eras), you can change what units you use and which side they're on.
To be able to use a unit on a map, you have to load it in the .lua. Open up whatever one you want in a text editor, I'm going to use the cw sides for the example.
Somewhere in the .lua, there's a 'ReadDataFile("SIDE\\rep.lvl",' with a bunch of '"rep_inf_ep3_rifleman",' and the like under it.
To load a unit from the rep.lvl, you need to put the odf name of the unit you want under it. If you want to load a unit from a different side, make a new 'ReadDataFile("SIDE\\xxx.lvl",' and then the name of the unit you want, following the same form as the others.
Now, to put the units on a side, go further down in the .lua to the part with 'SetupTeams{'. Under that it, fittingly, sets up the teams.
Now, here's the part you needed: you'll see
'soldier = { "rep_inf_ep3_rifleman",16, 24},'
and stuff. You can change the 'rep_inf_ep3_rifleman' to ANY unit that you've loaded, regardless from which side you loaded it from. You can mix and match which units are on which teams.
I hope that was what you needed. There might be a better explination somewhere else, but I dunno where it is.
To be able to use a unit on a map, you have to load it in the .lua. Open up whatever one you want in a text editor, I'm going to use the cw sides for the example.
Somewhere in the .lua, there's a 'ReadDataFile("SIDE\\rep.lvl",' with a bunch of '"rep_inf_ep3_rifleman",' and the like under it.
To load a unit from the rep.lvl, you need to put the odf name of the unit you want under it. If you want to load a unit from a different side, make a new 'ReadDataFile("SIDE\\xxx.lvl",' and then the name of the unit you want, following the same form as the others.
Now, to put the units on a side, go further down in the .lua to the part with 'SetupTeams{'. Under that it, fittingly, sets up the teams.
Now, here's the part you needed: you'll see
'soldier = { "rep_inf_ep3_rifleman",16, 24},'
and stuff. You can change the 'rep_inf_ep3_rifleman' to ANY unit that you've loaded, regardless from which side you loaded it from. You can mix and match which units are on which teams.
I hope that was what you needed. There might be a better explination somewhere else, but I dunno where it is.
-
fat_walrus
- Jawaraider
- Rebel Sergeant

- Posts: 196
- Joined: Thu Nov 30, 2006 3:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Unknown
-
Rikino
You can't with hex editing, but you shouldn't need to even touch a hex editing thing. I think might not understand your question; the thing I told you how to do was get units you want from any side onto the same teams in a map of your own. You'd open the .luas in Notepad or something, not a hex editor.
Or did you want to change the default sides to have different units on them (you would need to hexedit for that)?
Sorry, I somtimes answer a question I wasn't asked instead of the one I was.
Or did you want to change the default sides to have different units on them (you would need to hexedit for that)?
Sorry, I somtimes answer a question I wasn't asked instead of the one I was.
- Jawaraider
- Rebel Sergeant

- Posts: 196
- Joined: Thu Nov 30, 2006 3:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Unknown
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\gar.lvl",
"gar_inf_soldier",
"gar_inf_temple_soldier",
"gar_inf_vanguard",
ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier",
"gun_inf_defender",
ReadDataFile("SIDE\\jed.lvl",
"jed_knight_03",
ReadDataFile("SIDE\\rep.lvl",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
SetupTeams{
rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "gar_inf_soldier",9, 25},
assault = { "gar_inf_temple_soldier",1, 4},
engineer = { "gar_inf_vanguard",1, 4},
sniper = { "gun_inf_soldier",1, 4},
officer = {"gun_inf_defender",1, 4},
special = { "jed_knight_03",1, 4},
I tried with notepad, and its much easier.
Could this work then? I tried to munge and play, but the units stayed the same for some reason.
ReadDataFile("SIDE\\gar.lvl",
"gar_inf_soldier",
"gar_inf_temple_soldier",
"gar_inf_vanguard",
ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier",
"gun_inf_defender",
ReadDataFile("SIDE\\jed.lvl",
"jed_knight_03",
ReadDataFile("SIDE\\rep.lvl",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
SetupTeams{
rep = {
team = REP,
units = 50,
reinforcements = 150,
soldier = { "gar_inf_soldier",9, 25},
assault = { "gar_inf_temple_soldier",1, 4},
engineer = { "gar_inf_vanguard",1, 4},
sniper = { "gun_inf_soldier",1, 4},
officer = {"gun_inf_defender",1, 4},
special = { "jed_knight_03",1, 4},
I tried with notepad, and its much easier.
Could this work then? I tried to munge and play, but the units stayed the same for some reason.
-
Rikino
Exactly!
Tidbits, though: you need to end the 'ReadDataFile(' with a ')' on all of them. Like so:
ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier",
"gun_inf_defender")
ReadDataFile("SIDE\\jed.lvl",
"jed_knight_03")
Same thing with the 'SetupTeams{', make sure for every '{' there's a '}'.
I dunno why it wouldn't work. You have the common box checked when you munge, right? Does it say that there are any errors in the notepad thingy that pops up when it munges?
Try doing a clean (in the same place where you munge) if it seems that what you're doing has no effect.
Tidbits, though: you need to end the 'ReadDataFile(' with a ')' on all of them. Like so:
ReadDataFile("SIDE\\gun.lvl",
"gun_inf_soldier",
"gun_inf_defender")
ReadDataFile("SIDE\\jed.lvl",
"jed_knight_03")
Same thing with the 'SetupTeams{', make sure for every '{' there's a '}'.
I dunno why it wouldn't work. You have the common box checked when you munge, right? Does it say that there are any errors in the notepad thingy that pops up when it munges?
Try doing a clean (in the same place where you munge) if it seems that what you're doing has no effect.
- Jawaraider
- Rebel Sergeant

- Posts: 196
- Joined: Thu Nov 30, 2006 3:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Unknown
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\ABC\ABCc_con.lua:77: unexpected symbol near `)'
ERROR[scriptmunge scripts\ABC\ABCc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\ABC\ABCc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
I got this when I cleaned and munged, but Ill try anyway
edit: The game crashed when I played the map and I got this:
"Could not open MISSION\ABCc_con.lvl"
edit2: it said UNEXPECTED SYMPOL NEAR )
so I looked in the file and found that you werent supposed to have , between " and )
Iremoved them and the map worked great.
Thanks for the tip
ERROR[scriptmunge scripts\ABC\ABCc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\ABC\ABCc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
I got this when I cleaned and munged, but Ill try anyway
edit: The game crashed when I played the map and I got this:
"Could not open MISSION\ABCc_con.lvl"
edit2: it said UNEXPECTED SYMPOL NEAR )
so I looked in the file and found that you werent supposed to have , between " and )
Iremoved them and the map worked great.
Thanks for the tip
