Page 1 of 1

switching troopers?

Posted: Fri Feb 27, 2009 10:37 pm
by JawaTrooper
erm, how do i switch ALL units to CIS units? I've tried doing that in ABC_cmn.lua but the game crashes when i play.


help? :runaway:

Re: switching troopers?

Posted: Fri Feb 27, 2009 11:03 pm
by Commander_Fett
So is this for a space map?

Re: switching troopers?

Posted: Fri Feb 27, 2009 11:07 pm
by JawaTrooper
Commander_Fett wrote:So is this for a space map?
yes

Re: switching troopers?

Posted: Sat Feb 28, 2009 3:47 am
by AQT
What did you do exactly? Post any error logs you may have.

Re: switching troopers?

Posted: Sat Feb 28, 2009 1:30 pm
by [RDH]Zerted
1) Edit the ReadDataFile section of your lua to only read in the units you plan to use.
2) Change the SetupTeams section of your lua to only use the units you want.

Re: switching troopers?

Posted: Sat Feb 28, 2009 1:40 pm
by Fiodis
If you do what Zerted said, it will work but I think it's worth mentioning that the sounds would be off. You'd have to take some sound lines from a CW script for the CIS side and paste them over your ALL sound lines.

I think.

Re: switching troopers?

Posted: Sat Feb 28, 2009 6:12 pm
by JawaTrooper
[RDH]Zerted wrote:1) Edit the ReadDataFile section of your lua to only read in the units you plan to use.
2) Change the SetupTeams section of your lua to only use the units you want.
sorry, where are those scripts located? I can't find them :(

Re: switching troopers?

Posted: Sat Feb 28, 2009 6:15 pm
by Fiodis
data***/Common/Scripts/***, then pick ***c_con.LUA or ***g_con.LUA. Con stands for conquest, c and g for the two eras, pick which one you want to modify.

Re: switching troopers?

Posted: Sat Feb 28, 2009 6:20 pm
by JawaTrooper
ok here's what I did...
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPA9 - Naboo
-- Common script that shares all setup information
--

ScriptCB_DoFile("setup_teams")

-- Republic Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

function SetupUnits()
ReadDataFile("SIDE\\all.lvl",
"all_inf_pilot",
"all_inf_marine",
"all_fly_xwing_sc",
"all_fly_ywing_sc",
"all_fly_awing",
"cis_fly_droidfighter_sc",
"all_fly_gunship_sc",
"all_veh_remote_terminal")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_all_beam",
"tur_bldg_spa_all_recoilless",
"tur_bldg_spa_all_chaingun",
"tur_bldg_spa_imp_beam",
"tur_bldg_spa_imp_recoilless",
"tur_bldg_spa_imp_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
all = {
team = ALL,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},
},

imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",26},
marine = { "imp_inf_marine",6},
}
}
is this right?

Re: switching troopers?

Posted: Sat Feb 28, 2009 6:30 pm
by Fiodis
Possibly; there are elements that I don't recognize. What is this "MyTeamConfig = {" code for? Otherwise it looks ok, except for the sounds. Does it work in-game? The MyTeamConfig thing might throw it off.

Re: switching troopers?

Posted: Sat Feb 28, 2009 6:36 pm
by JawaTrooper
Fiodis wrote:Possibly; there are elements that I don't recognize. What is this "MyTeamConfig = {" code for? Otherwise it looks ok, except for the sounds. Does it work in-game? The MyTeamConfig thing might throw it off.
the myteamconfig was there from the start

Re: switching troopers?

Posted: Sat Feb 28, 2009 6:55 pm
by Fiodis
Seriously? I have SetupTeams { instead.

Re: switching troopers?

Posted: Sat Feb 28, 2009 7:12 pm
by JawaTrooper
Fiodis wrote:Seriously? I have SetupTeams { instead.
no it only says setupteams in a ground map. Space maps say myteamconfig

Re: switching troopers?

Posted: Sat Feb 28, 2009 7:37 pm
by -_-
The game is trying to find game files "cis_inf_pilot" & "cis_inf_marine". It is referenced in the .lua file but not loaded in the script.

Edit -- As far as I know, "cis_fly_droidfighter_sc" does not exist in all.lvl either.

Re: switching troopers?

Posted: Sat Feb 28, 2009 7:57 pm
by JawaTrooper
okay should it look like this then?
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPA9 - Naboo
-- Common script that shares all setup information
--

ScriptCB_DoFile("setup_teams")

-- Republic Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

function SetupUnits()
ReadDataFile("SIDE\\all.lvl",
"cis_inf_pilot",
"cis_inf_marine",
"all_fly_xwing_sc",
"all_fly_ywing_sc",
"all_fly_awing",
"cis_fly_droidfighter_sc",
"all_fly_gunship_sc",
"all_veh_remote_terminal")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_all_beam",
"tur_bldg_spa_all_recoilless",
"tur_bldg_spa_all_chaingun",
"tur_bldg_spa_imp_beam",
"tur_bldg_spa_imp_recoilless",
"tur_bldg_spa_imp_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
all = {
team = ALL,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},
},
imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",26},
marine = { "imp_inf_marine",6},
}
}

Re: switching troopers?

Posted: Sat Feb 28, 2009 8:59 pm
by AQT
"cis_inf_pilot" and "cis_inf_marine" don't exist in all.lvl but rather cis.lvl.

Re: switching troopers?

Posted: Sat Feb 28, 2009 11:18 pm
by JawaTrooper
AQT wrote:"cis_inf_pilot" and "cis_inf_marine" don't exist in all.lvl but rather cis.lvl.
so your saying i should just switch the all.lvl with cis.lvl?

Re: switching troopers?

Posted: Sun Mar 01, 2009 1:15 am
by Commander_Fett
@-_-Yes, cis_fly_droidfighter_sc is the correct name.
You'd set up the LUA like this:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPA9 - Naboo
-- Common script that shares all setup information
--

ScriptCB_DoFile("setup_teams")

-- Republic Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

function SetupUnits()

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_pilot",
"cis_inf_marine",
"cis_fly_droidfighter_sc")


ReadDataFile("SIDE\\all.lvl",
"all_fly_xwing_sc",
"all_fly_ywing_sc",
"all_fly_awing",
"all_fly_gunship_sc",
"all_veh_remote_terminal")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_pilot",
"imp_inf_marine",
"imp_fly_tiefighter_sc",
"imp_fly_tiebomber_sc",
"imp_fly_tieinterceptor",
"imp_fly_trooptrans",
"imp_veh_remote_terminal")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_all_beam",
"tur_bldg_spa_all_recoilless",
"tur_bldg_spa_all_chaingun",
"tur_bldg_spa_imp_beam",
"tur_bldg_spa_imp_recoilless",
"tur_bldg_spa_imp_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
all = {
team = ALL,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},
},
imp = {
team = IMP,
units = 32,
reinforcements = -1,
pilot = { "imp_inf_pilot",26},
marine = { "imp_inf_marine",6},
}
}
Also, you'd have to edit the vehicle spawns in the map to read cis_fly_droidfighter_sc instead of the xwing/whatever.
Hidden/Spoiler:
note about sides-
sides .lvl files contain everything in the side, units, vehicles, etc. You just have to read these like
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_rifleman",
"rep_inf_engineer)
in the LUA, then set the teams up down below with the correct units. You HAVE to read the unit from the correct side file in order to use it. [/end tip]