Imperial Side Mod problem

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

Post Reply
tehShocktroopa
Private
Posts: 37
Joined: Mon May 22, 2017 11:21 am
Projects :: Imperial Stormtrooper Skins
Games I'm Playing :: SWBF2 KOTOR TSL
xbox live or psn: No gamertag set
Location: Coruscant

Imperial Side Mod problem

Post by tehShocktroopa »

So I've made an imperial side mod and gave the shock trooper the rebel soldier's blaster rifle, the odd thing is, the blaster rifle itself is not showing up in the "Imperial Diplomacy", "Tying Up Loose Ends" and "Preventative measures" campaign missions, why is that? and how can I fix it?
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Imperial Side Mod problem

Post by ARCTroopaNate »

If you're loading the blaster rifle from the rebel side, it won't show up on those missions because the rebel soldier isn't loaded in these missions. You need to either add the rebel blaster rifle to the imperial side (it's odf and msh files) or call for the rebel soldier in the lua's for those missions.
tehShocktroopa
Private
Posts: 37
Joined: Mon May 22, 2017 11:21 am
Projects :: Imperial Stormtrooper Skins
Games I'm Playing :: SWBF2 KOTOR TSL
xbox live or psn: No gamertag set
Location: Coruscant

Re: Imperial Side Mod problem

Post by tehShocktroopa »

ARCTroopaNate wrote:If you're loading the blaster rifle from the rebel side, it won't show up on those missions because the rebel soldier isn't loaded in these missions. You need to either add the rebel blaster rifle to the imperial side (it's odf and msh files) or call for the rebel soldier in the lua's for those missions.
Where can I find the .lua files for those missions?
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Imperial Side Mod problem

Post by ARCTroopaNate »

modtools/assets/scripts, the campaign scripts are the one with the "_c" suffix.
tehShocktroopa
Private
Posts: 37
Joined: Mon May 22, 2017 11:21 am
Projects :: Imperial Stormtrooper Skins
Games I'm Playing :: SWBF2 KOTOR TSL
xbox live or psn: No gamertag set
Location: Coruscant

Re: Imperial Side Mod problem

Post by tehShocktroopa »

ARCTroopaNate wrote:modtools/assets/scripts, the campaign scripts are the one with the "_c" suffix.
How would I be able to call the Rebel Soldier? what do I need to edit?
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Imperial Side Mod problem

Post by ARCTroopaNate »

something like

ReadDataFile...all.lvl...
“all_inf_rifleman_jungle”)

For the top line copy one from one of the other sides and change it from whatever that three letter abbreviation is to “all” (no quotations)
tehShocktroopa
Private
Posts: 37
Joined: Mon May 22, 2017 11:21 am
Projects :: Imperial Stormtrooper Skins
Games I'm Playing :: SWBF2 KOTOR TSL
xbox live or psn: No gamertag set
Location: Coruscant

Re: Imperial Side Mod problem

Post by tehShocktroopa »

ARCTroopaNate wrote:something like

ReadDataFile...all.lvl...
“all_inf_rifleman_jungle”)

For the top line copy one from one of the other sides and change it from whatever that three letter abbreviation is to “all” (no quotations)
since I've edited that file do I have to copy that to my created data_ABC world folder?
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Imperial Side Mod problem

Post by ARCTroopaNate »

http://www.gametoast.com/viewtopic.php? ... 96#p287596

You will need to do this if you're editing mission scripts.
tehShocktroopa
Private
Posts: 37
Joined: Mon May 22, 2017 11:21 am
Projects :: Imperial Stormtrooper Skins
Games I'm Playing :: SWBF2 KOTOR TSL
xbox live or psn: No gamertag set
Location: Coruscant

Re: Imperial Side Mod problem

Post by tehShocktroopa »

ARCTroopaNate wrote:http://www.gametoast.com/viewtopic.php? ... 96#p287596

You will need to do this if you're editing mission scripts.
I understand the localization stuff and how it works and all, but how do I make an edited name appear on all stock maps? I mean I replaced the Dark Trooper, and changed the name to shadow trooper via localization, but it only appears in the munged mod how do I make the name "Shadow Trooper" appear on all stock maps?
User avatar
EasyOvenOperator
Private Recruit
Posts: 23
Joined: Thu Nov 16, 2017 12:03 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBFII
xbox live or psn: No gamertag set

Re: Imperial Side Mod problem

Post by EasyOvenOperator »

tehShocktroopa wrote:
ARCTroopaNate wrote:http://www.gametoast.com/viewtopic.php? ... 96#p287596

You will need to do this if you're editing mission scripts.
I understand the localization stuff and how it works and all, but how do I make an edited name appear on all stock maps? I mean I replaced the Dark Trooper, and changed the name to shadow trooper via localization, but it only appears in the munged mod how do I make the name "Shadow Trooper" appear on all stock maps?
not sure if this is what you mean/need.

you will need to copy all of the maps' lua files (dag1g_con, end1g_con, kas2g_con etc) to your bf2modtools/data_abc/common/scripts/abc folder, then add them to your mission req (bfsmodtools/data_abc/common)
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
"AIHeroSupport"
}

REQN
{
"lvl"
"ABCg_con"
"ABCc_con"
"bes2g_con"
"cor1g_con"
"dag1g_con"
"dea1g_con"
"end1g_con"
"fel1g_con"
"hot1g_con"
"KAM1g_con"
"kas2g_con"
"mus1g_con"
"myg1g_con"
"pol1g_con"
"rhn1g_con"
"rhn2g_con"
"tan1g_con"
"tat2g_con"
"tat3g_con"
"uta1g_con"
"yav1g_con"
"yav2g_con"
}
}
and addme lua (bf2modtools/data_abc/addme)
Hidden/Spoiler:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "ABC%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("ABC","ABCg_con",4)
AddDownloadableContent("ABC","ABCc_con",4)
AddDownloadableContent("bes2","bes2g_con",4)
AddDownloadableContent("cor1","cor1g_con",4)
AddDownloadableContent("dag1","dag1g_con",4)
AddDownloadableContent("dea1","dea1g_con",4)
AddDownloadableContent("end1","end1g_con",4)
AddDownloadableContent("fel1","fel1g_con",4)
AddDownloadableContent("hot1","hot1g_con",4)
AddDownloadableContent("KAM1","KAM1g_con",4)
AddDownloadableContent("kas2","kas2g_con",4)
AddDownloadableContent("mus1","mus1g_con",4)
AddDownloadableContent("myg1","myg1g_con",4)
AddDownloadableContent("pol1","pol1g_con",4)
AddDownloadableContent("rhn1","rhn1g_con",4)
AddDownloadableContent("rhn2","rhn2g_con",4)
AddDownloadableContent("tan1","tan1g_con",4)
AddDownloadableContent("tat2","tat2g_con",4)
AddDownloadableContent("tat3","tat3g_con",4)
AddDownloadableContent("uta1","uta1g_con",4)
AddDownloadableContent("yav1","yav1g_con",4)
AddDownloadableContent("yav2","yav2g_con",4)
-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\ABC\\data\\_LVL_PC\\core.lvl")
be sure to change the info in all mission scripts the same way you did in your own map's mission script. (dc:side)
Post Reply