Page 1 of 1
Question about modding Sides
Posted: Thu Nov 30, 2006 3:33 pm
by Jawaraider
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.
Posted: Thu Nov 30, 2006 4:09 pm
by 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.
Posted: Thu Nov 30, 2006 8:48 pm
by fat_walrus
Or you can replace the .rep lvl with your own and have rep_inf_ep3_rifleman your unit's name.
Posted: Fri Dec 01, 2006 9:53 am
by Jawaraider
Thanks, I think I understand now. Ill try it.
edit: I dont understand, how am I supposed to change rep_inf_ep3_rifleman to something with a longer name in the TeamSetup Part?
Posted: Fri Dec 01, 2006 12:22 pm
by 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.
Posted: Fri Dec 01, 2006 4:42 pm
by Jawaraider
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.
Posted: Fri Dec 01, 2006 5:03 pm
by 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.
Posted: Sat Dec 02, 2006 6:20 am
by Jawaraider
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