How to replace sides?

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

BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

How to replace sides?

Post by BobTheHunted »

Ok, first off, I hope it's ok that I have been posting so many questions and stuff in this section. My question now is how do you replace stock sides? I have just been creating a sides mod and I decided to replace the CIS with Empire(imp). How does one go about doing this?
CreatorOfThings
Private
Posts: 32
Joined: Wed Oct 17, 2012 10:45 am
Projects :: Battlefront 2013
Games I'm Playing :: Battlefront2 StarCry

Re: How to replace sides?

Post by CreatorOfThings »

BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

CreatorOfThings wrote:Here's a good guide http://www.gametoast.com/forums/viewtop ... 27&t=12729 :)
that didn't work unfortunately
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: How to replace sides?

Post by CressAlbane »

This would be a LUA change. Where the game loads the units for the CIS, just replace that with the section that loads the IMP units from a different LUA file.
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

CressAlbane wrote:This would be a LUA change. Where the game loads the units for the CIS, just replace that with the section that loads the IMP units from a different LUA file.
That didn't work but thanks anyways
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: How to replace sides?

Post by CressAlbane »

Really? I've done this before myself, and I can say with confidence that this method will work.

Make sure that you also change the part where units are assigned to teams (I had assumed you would do that.)
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

CressAlbane wrote:Really? I've done this before myself, and I can say with confidence that this method will work.

Make sure that you also change the part where units are assigned to teams (I had assumed you would do that.)
hmmm that's interesting... what lua files did you change? I replaced all of the units in the c_con file...
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: How to replace sides?

Post by CressAlbane »

Replace this:

Code: Select all

    ReadDataFile("SIDE\\cis.lvl",
                             "cis_inf_rifleman",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat")
With this:

Code: Select all

    ReadDataFile("SIDE\\imp.lvl",
                    "imp_inf_rifleman",
                    "imp_inf_rocketeer",
                    "imp_inf_engineer",
                    "imp_inf_sniper",
                    "imp_inf_officer",
                    "imp_inf_dark_trooper",
                    "imp_hero_bobafett",
                    "imp_fly_destroyer_dome" )
Then replace this:

Code: Select all

soldier  = { "cis_inf_rifleman",9, 25},
			assault  = { "cis_inf_rocketeer",1, 4},
			engineer = { "cis_inf_engineer",1, 4},
			sniper   = { "cis_inf_sniper",1, 4},
			officer = {"cis_inf_officer",1, 4},
			special = { "cis_inf_droideka",1, 4},
With this:

Code: Select all

               soldier = { "imp_inf_rifleman",9, 25},
                        assault = { "imp_inf_rocketeer",4, 8},
                        engineer = { "imp_inf_engineer",4, 8},
                        sniper = { "imp_inf_sniper",4, 8},
                        officer = { "imp_inf_officer",4, 8},
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

CressAlbane wrote:Replace this:

Code: Select all

    ReadDataFile("SIDE\\cis.lvl",
                             "cis_inf_rifleman",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat")
With this:

Code: Select all

    ReadDataFile("SIDE\\imp.lvl",
                    "imp_inf_rifleman",
                    "imp_inf_rocketeer",
                    "imp_inf_engineer",
                    "imp_inf_sniper",
                    "imp_inf_officer",
                    "imp_inf_dark_trooper",
                    "imp_hero_bobafett",
                    "imp_fly_destroyer_dome" )
Then replace this:

Code: Select all

soldier  = { "cis_inf_rifleman",9, 25},
			assault  = { "cis_inf_rocketeer",1, 4},
			engineer = { "cis_inf_engineer",1, 4},
			sniper   = { "cis_inf_sniper",1, 4},
			officer = {"cis_inf_officer",1, 4},
			special = { "cis_inf_droideka",1, 4},
With this:

Code: Select all

               soldier = { "imp_inf_rifleman",9, 25},
                        assault = { "imp_inf_rocketeer",4, 8},
                        engineer = { "imp_inf_engineer",4, 8},
                        sniper = { "imp_inf_sniper",4, 8},
                        officer = { "imp_inf_officer",4, 8},
it must not be munging correctly... I had some custom textures applied to cis and i got a clean version from the assets folder, and they still had the retextures in the game...
User avatar
Cleb
Lieutenant General
Lieutenant General
Posts: 711
Joined: Sun Jun 17, 2012 10:12 pm
Projects :: Learning how to use 3DS Max
Games I'm Playing :: BF2 CIV4 MC
xbox live or psn: ˙. ˙. ˙. ˙. ˙. ˙
Location: Somewhere
Contact:

Re: How to replace sides?

Post by Cleb »

Did you try a clean? Or a manual clean? That would help...
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

does the side replacement have to be on a custom map? or can I just copy the .lvl files so it applies to all maps?
User avatar
Cleb
Lieutenant General
Lieutenant General
Posts: 711
Joined: Sun Jun 17, 2012 10:12 pm
Projects :: Learning how to use 3DS Max
Games I'm Playing :: BF2 CIV4 MC
xbox live or psn: ˙. ˙. ˙. ˙. ˙. ˙
Location: Somewhere
Contact:

Re: How to replace sides?

Post by Cleb »

Not entirely sure, never tried something like that, my maybe guess would be that if your side had the same odf names as say, the republic side, (like one of your units odf names was rep_inf_ep3_trooper but had your odf) and you renamed your sides .lvl to rep.lvl, then replaced the rep side, it might work. Make sure you back up your side you're replacing and if it worked then that side would be replaced on all levels. Not sure you're even allowed to do that. :?
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Error when replacing sides?

Post by BobTheHunted »

Cleb wrote:Not entirely sure, never tried something like that, my maybe guess would be that if your side had the same odf names as say, the republic side, (like one of your units odf names was rep_inf_ep3_trooper but had your odf) and you renamed your sides .lvl to rep.lvl, then replaced the rep side, it might work. Make sure you back up your side you're replacing and if it worked then that side would be replaced on all levels. Not sure you're even allowed to do that. :?
um... what? that didn't make much sense but ill try and see what i get out of it...

EDIT
I replaced the CIS with the Empire on my map, but the empire has no sounds. How can I fix this? I have searched but found no solutions...
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How to replace sides?

Post by AQT »

The CW era subsections of the stock sound .lvl files do not contain the sounds necessary for the Empire. To have sound for both the Republic and Empire at the same time, one option is to use the stock kam.lvl file with subsection kam1cross. From the stock Kamino campaign script:
kam1c_c wrote:

Code: Select all

    ReadDataFile("sound\\kam.lvl;kam1cross")
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

I have just started trying to make a clone vs clone map. I used the same process but renamed the folder and made a .lvl with the same name. It didn't work. How could I make a clone vs clone map where I can customize the units specific to each side?

I just got it to do clone vs clone but they have the same textures... any help?

EDIT
Cleb wrote:Not entirely sure, never tried something like that, my maybe guess would be that if your side had the same odf names as say, the republic side, (like one of your units odf names was rep_inf_ep3_trooper but had your odf) and you renamed your sides .lvl to rep.lvl, then replaced the rep side, it might work. Make sure you back up your side you're replacing and if it worked then that side would be replaced on all levels. Not sure you're even allowed to do that. :?
No one seems to want to reply to this topic anymore, but, is there a way to make it so there is custom units in the team setup thing? Like this
Hidden/Spoiler:
SetupTeams{
rep = {
team = REP,
units = 28,
reinforcements = 150,
soldier = { "dc:rep_inf_ep3_rifleman",9, 25},
assault = { "dc:rep_inf_ep3_rocketeer",1,4},
engineer = { "dc:rep_inf_ep3_engineer",1,4},
sniper = { "dc:rep_inf_ep3_sniper",1,4},
officer = {"dc:rep_inf_ep3_officer",1,4},
special = { "dc:rep_inf_ep3_jettrooper",1,4},
So it reads the individual textures and such? I'm trying to make a clone vs clone map, but no matter what I do, each side has the same clones, not ones with different textures that I made. I want to have textures specific to each side

Double posting is against the RULES; please EDIT your post instead -Staff
User avatar
Cleb
Lieutenant General
Lieutenant General
Posts: 711
Joined: Sun Jun 17, 2012 10:12 pm
Projects :: Learning how to use 3DS Max
Games I'm Playing :: BF2 CIV4 MC
xbox live or psn: ˙. ˙. ˙. ˙. ˙. ˙
Location: Somewhere
Contact:

Re: How to replace sides?

Post by Cleb »

If you want your custom side for one map, not all of the maps, see this topic:
http://www.gametoast.com/forums/viewtop ... 27&t=28535
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

Cleb wrote:If you want your custom side for one map, not all of the maps, see this topic:
http://www.gametoast.com/forums/viewtop ... 27&t=28535
Ok, maybe you didn't understand what I said. What I mean is, how do I have it take the units out of custom sides if the units have the exact same name, but are in different side folders? Heres my lua:
Hidden/Spoiler:
SetTeamAggressiveness(REP, 0.95)
SetTeamAggressiveness(CIS, 0.95)

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)

ReadDataFile("sound\\tat.lvl;tat2cw")
ReadDataFile("dc:SIDE\\ret.lvl",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_sniper",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_officer",
"rep_hero_obiwan")

ReadDataFile("dc:SIDE\\red.lvl",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_sniper",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_officer",
"rep_hero_obiwan")

ReadDataFile("SIDE\\des.lvl",
"tat_inf_jawa")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")

SetAttackingTeam(ATT)

SetupTeams{
rep = {
team = REP,
units = 28,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",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 = 28,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",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},
}
}
ret and red are both the same as republic except for the custom textures... each side has different textures, but ingame, they have the same textures...
User avatar
Cleb
Lieutenant General
Lieutenant General
Posts: 711
Joined: Sun Jun 17, 2012 10:12 pm
Projects :: Learning how to use 3DS Max
Games I'm Playing :: BF2 CIV4 MC
xbox live or psn: ˙. ˙. ˙. ˙. ˙. ˙
Location: Somewhere
Contact:

Re: How to replace sides?

Post by Cleb »

Ok now I get what you mean... One side has to have each unit have a different odf name because now the game doesn't know which side to load from. So you could do this:
Hidden/Spoiler:
SetTeamAggressiveness(REP, 0.95)
SetTeamAggressiveness(CIS, 0.95)

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)

ReadDataFile("sound\\tat.lvl;tat2cw")
ReadDataFile("dc:SIDE\\ret.lvl",
"rep_inf_ep3_rocketeerr",
"rep_inf_ep3_riflemanr",
"rep_inf_ep3_sniperr",
"rep_inf_ep3_engineerr",
"rep_inf_ep3_jettrooperr",
"rep_inf_ep3_officerr",
"rep_hero_obiwanr")


ReadDataFile("dc:SIDE\\red.lvl",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_sniper",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_officer",
"rep_hero_obiwan")

ReadDataFile("SIDE\\des.lvl",
"tat_inf_jawa")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")

SetAttackingTeam(ATT)

SetupTeams{
rep = {
team = REP,
units = 28,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",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 = 28,
reinforcements = 150,
soldier = { "rep_inf_ep3_riflemanr",9, 25},
assault = { "rep_inf_ep3_rocketeerr",1,4},
engineer = { "rep_inf_ep3_engineerr",1,4},
sniper = { "rep_inf_ep3_sniperr",1,4},
officer = {"rep_inf_ep3_officerr",1,4},
special = { "rep_inf_ep3_jettrooperr",1,4},

}
}
Just make sure you change the names of the files and their contents (so for req you would change the name and the contents to correspond with the new odf name) in the sides file that is changed (ret in this example)
BobTheHunted
3rd Warning
3rd Warning
Posts: 33
Joined: Fri Oct 19, 2012 11:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: none yet
xbox live or psn: No gamertag set

Re: How to replace sides?

Post by BobTheHunted »

Cleb wrote:Just make sure you change the names of the files and their contents (so for req you would change the name and the contents to correspond with the new odf name) in the sides file that is changed (ret in this example)
This is what happened when I did that
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_inf_ep3_rocketeerr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_inf_ep3_riflemanr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_inf_ep3_sniperr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_inf_ep3_engineerr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_inf_ep3_jettrooperr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_inf_ep3_officerr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk rep_hero_obiwanr in C:\Program Files (x86)\Star wars Battlefront II\GameData\AddOn\TA4\Data\_lvl_pc\SIDE\ret.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1019)
Unable to find level chunk in dc:SIDE\ret.lvl
i'm not sure if i forgot to rename something or what, but that happened
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How to replace sides?

Post by AQT »

BobTheHunted wrote:No one seems to want to reply to this topic anymore
Off-topic: :? It hasn't even been 24 hours yet since the last post, and no one is obligated to reply, so you have no excuse to be that impatient.
Post Reply