Add dark trooper as a CIS unit.

Started by 1ИCΘ6И17Θ, February 09, 2016, 03:05:20 AM

Previous topic - Next topic
Hello there !
So I am posting this here because I have a problem.

How am I supposed to do to Add the Dark trooper as a CIS unit ?
I know I have to sacrifice one unit because of the 5 limit,
I followed that tutorial :
http://www.swbfgamers.com/index.php?topic=4074.0
But it doesn't work.
Also, check out my total conversion for BF1: Ferocious Battlefront
http://www.moddb.com/mods/ferocious-battlefront

RELEASE INCOMING

February 09, 2016, 04:36:17 AM #1 Last Edit: February 09, 2016, 04:44:50 AM by Phobos
This requires editing the mission lua for whichever map you're adding the dark trooper to. For example cloud city, you need to modify bes2r.lua using code from bes2a.lua

This code is pasted below the section for ReadDataFile("SIDE\\cis.lvl",

    ReadDataFile("SIDE\\cis.lvl",
        "cis_inf_basic",
        "cis_inf_countdooku",
        "cis_inf_droideka");

   ReadDataFile("SIDE\\imp.lvl",
        "imp_inf_dark_trooper);


That loads the imp.lvl into the game memory for that mission, but only the darktrooper subreq (inf_basic is for nonspecial units). The next code to add is replace a unit class, such as droideka. Change the ODF reference under addunitclass to the dark trooper
--  CIS Stats
    SetTeamName(CIS, "CIS");
    SetTeamIcon(CIS, "cis_icon");
    AddUnitClass(CIS, "cis_inf_battledroid",11)
    AddUnitClass(CIS, "cis_inf_assault",3)
    AddUnitClass(CIS, "cis_inf_pilotdroid",4)
    AddUnitClass(CIS, "cis_inf_assassindroid",4)
    AddUnitClass(CIS, "imp_inf_dark_trooper",3)
    SetHeroClass(CIS, "cis_inf_countdooku")


GCW sound should also be called on or else weapons won't have sound for the dark trooper. add this to the sound section
OpenAudioStream("sound\\gcw.lvl",  "gcw_vo");
    OpenAudioStream("sound\\gcw.lvl",  "gcw_tac_vo");


If this is for a stock map you should back up the original mission.lvl before adding this since the mod isn't online compatible unless others have the modded script.

There is another method which adds the unit to the CIS side.lvl but this requires even more modding. This method only changes the mission lua not the sides.

Thanks a lot for the answer, without that I would type like crazy  on my keyboard.
Also, check out my total conversion for BF1: Ferocious Battlefront
http://www.moddb.com/mods/ferocious-battlefront

RELEASE INCOMING