Page 1 of 1

how can i change the current stock side to a custom side?

Posted: Mon Oct 15, 2012 5:41 pm
by Zapattack1234
Hello again, i have a quick question. How can i change the current stock CIS side of my map to be a custom jedi unit that i have?

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 6:04 pm
by Cleb
http://www.gametoast.com/forums/viewtop ... 27&t=12729

Something that I don't think it says is that you must have the common side from the assets in your sides folder and munged or your game will crash. :wink:

Wait, you also must have a new name for your side, just also copy a cis side from the assets and rename it something else and then create its side folder in the munged folder.

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 6:13 pm
by Zapattack1234
Wait, is there a way I could make a new side and implant it in the CIS sides place?

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 6:20 pm
by Cleb
Ummm... what do you mean by implant? :?

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 7:44 pm
by Zapattack1234
"Put in the place of"

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 8:07 pm
by Cleb
Ok heres how it is done in lua
Hidden/Spoiler:
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\cfd.lvl",
"cis_inf_bdroid",
"cis_inf_sprbdroid",
"cis_inf_scout",
"cis_inf_support",
"cis_inf_weapons",
"cis_inf_droid_commander",
"cis_inf_icedroid")

ReadDataFile("dc:SIDE\\327.lvl",
"rep_inf_327",
"rep_inf_commander")



ReadDataFile("dc:SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower",
"tur_bldg_beam",
"tur_bldg_chaingun_tripod",
"tur_bldg_recoilless_lg",
"tur_bldg_recoilless_fel_auto")

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_327",9, 25},
assault = { "rep_inf_commander",1, 4},

engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_bdroid",9, 18},
assault = { "cis_inf_scout",1, 6},
engineer = { "cis_inf_icedroid",1, 4},
sniper = { "cis_inf_droid_commander",1, 4},
officer = {"cis_inf_weapons",1, 4},
special = { "cis_inf_support",1, 4},

}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")
This is a really old piece of lua from my map I'm making, but it still works. The two custom sides I want to point out is the cis (blue, renamed cfd), and republic (red, called 327, but don't use all numbers as a side name, as I figured out it causes some problems). for a custom side, you must have odfs, reqs, and all other files needed(for starters, just copy/paste the cis folder from assets/sides and rename it cfd) in the side folder in sides called cfd. now, go into to your cfd folder and rename cis_inf_rifleman to cis_inf_riflemana. change its odf to your hearts content. also copy and repaste the file cis_inf_default_rifleman and rename it as cis_inf_default_riflemana. go back into cis_inf_riflemana and change the part at the top that says ClassParent from cis_inf_default_rifleman to cis_inf_default_riflemana Then go to _BUILD/Sides and make a new folder called CFD. then go to another side folder and copy the clean.bat and munge.bat into CFD. In your lua you must then make a line called,

Code: Select all

ReadDataFile("dc:SIDE\\cfd.lvl",
THe dc: means that you are loading a custom side and not a stoic one. Under that put,

Code: Select all

"cis_inf_riflemana")
This loads the sbd odf file called cis_inf_riflemana from the cfd folder you made. It should nap look like this:

Code: Select all

ReadDataFile("dc:SIDE\\cfd.lvl",
"cis_inf_riflemana")
Now go to this part:

Code: Select all

cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 18},
assault = { "cis_inf_rocketeer",1, 6},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
It should be right beneath that last part.

change it to:

Code: Select all

cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_riflemana",9, 18},
assault = { "cis_inf_rocketeer",1, 6},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
Now save and munge. :wink: I hope I didn't miss anything. :runaway:

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 8:19 pm
by Zapattack1234
Ok now I get it, thanks man :thumbs:

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 8:37 pm
by AceMastermind
Cleb wrote:http://www.gametoast.com/forums/viewtop ... 27&t=12729

Something that I don't think it says is that you must have the common side from the assets in your sides folder and munged or your game will crash. :wink:
It does mention it:
Custom Side: How To wrote:Lets take another trip to the assets.
Go to Assets/Sides, and copy the common side to your Data_ABC/Sides.
You don't need to munge the common folder, it only needs to exist in data_ABC/Sides.
Visual Munge pulls what it needs from there while munging the custom side.

Cleb wrote:Wait, you also must have a new name for your side, just also copy a cis side from the assets and rename it something else and then create its side folder in the munged folder.
A new name won't hurt, but you can leave it the same 3 character identifier. The dc in the LUA tells the game to look for the munged files from your map's addon folder, not from the retail files.

Re: how can i change the current stock side to a custom side

Posted: Mon Oct 15, 2012 8:43 pm
by Cleb
AceMastermind wrote: It does mention it:
Custom Side: How To wrote:Lets take another trip to the assets.
Go to Assets/Sides, and copy the common side to your Data_ABC/Sides.
You don't need to munge the common folder, it only needs to exist in data_ABC/Sides.
Visual Munge pulls what it needs from there while munging the custom side.
Wow. When I started modding I read that tutorial over like, 15 times and never once saw that. :oops:
AceMastermind wrote:
Cleb wrote:Wait, you also must have a new name for your side, just also copy a cis side from the assets and rename it something else and then create its side folder in the munged folder.
A new name won't hurt, but you can leave it the same 3 character identifier. The dc in the LUA tells the game to look for the munged files from your map's addon folder, not from the retail files.
Hmmm Once I did that and it crashed my game: forums/viewtopic.php?f=27&t=28343

It was somewhere in there...

Found it.
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open dc:SIDE\cis.lvl
It worked only when I mad a new side called cfd. :runaway:

Re: how can i change the current stock side to a custom side

Posted: Thu Oct 18, 2012 5:27 pm
by Zapattack1234
That might be my problem! :shock: there is no common folder in my sides folder, only tur

Nm my unit still won't appear in-game