SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF2 Modding => Topic started by: i2Bros on October 31, 2016, 12:17:19 PM

Title: How do I make Tridroid work on a map?
Post by: i2Bros on October 31, 2016, 12:17:19 PM
Guys I've downloaded ForceMaster's Tridroid and I tried to to put him on Coruscant: Modern Warfare, but it doesn't work. ForceMaster stated that he needs two legs, I tried both 2 and 3 but nothing works in game. What can I do?
this is the map lua:
[spoiler]
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("LinkedDestroyables")
ScriptCB_DoFile("LinkedTurrets")
ScriptCB_DoFile("LinkedShields")
 
   
   --  REP Attacking (attacker is always #1)
        REP = 1;
    CIS = 2;
    --  These variables do not change
    ATT = REP;
    DEF = CIS;


function ScriptPostLoad()   
   
      SetupShields()
   SetupDestroyables()
   SetupTurrets()

    --This defines the CPs.  These need to happen first
    cp1 = CommandPost:New{name = "cp1"}
    cp2 = CommandPost:New{name = "cp2"}
    cp3 = CommandPost:New{name = "cp3"}
    cp4 = CommandPost:New{name = "cp4"}
    cp6 = CommandPost:New{name = "cp6"}
    cp7 = CommandPost:New{name = "cp7"}
    cp8 = CommandPost:New{name = "cp8"}
    cp9 = CommandPost:New{name = "cp9"}



    --This sets up the actual objective.  This needs to happen after cp's are defined
    conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
                                     textATT = "game.modes.con",
                                     textDEF = "game.modes.con2",
                                     multiplayerRules = true}
   
    --This adds the CPs to the objective.  This needs to happen after the objective is set up
    conquest:AddCommandPost(cp1)
    conquest:AddCommandPost(cp2)
    conquest:AddCommandPost(cp3)
    conquest:AddCommandPost(cp4)
    conquest:AddCommandPost(cp6)
    conquest:AddCommandPost(cp7)
    conquest:AddCommandPost(cp8)   
    conquest:AddCommandPost(cp9)

   
    conquest:Start()
SetUberMode(1);
    EnableSPHeroRules()
        AddDeathRegion("deathregion_1")
AddDeathRegion("deathregion_2")
EnableFlyerPath(flyers,1)
end

function SetupDestroyables()
    --CIS destroyables
    lifeSupportLinkageCIS = LinkedDestroyables:New{ objectSets = {{"fedcoreship_generator"}, {"fedcoreship","fc_tur1","fc_tur2","fc_tur3","fc_tur4","fc_tur5","fc_tur6","fc_tur7","fc_tur8","fc_tur9","fc_tur10"}} }
    lifeSupportLinkageCIS:Init()

    --Coruscant Adverts
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s1"}, {"ad1","ad2"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s2"}, {"ad3","ad4","ad5"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s3"}, {"ad6"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s4"}, {"ad7"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s5"}, {"ad8"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s6"}, {"ad9"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s7"}, {"ad10"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s8"}, {"ad11"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s9"}, {"ad12","ad13"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s10"}, {"ad14","ad15"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s11"}, {"ad16","ad17"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s12"}, {"ad18"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s13"}, {"ad19","ad20","ad21"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s14"}, {"ad22","ad23","ad24"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s15"}, {"ad25"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s16"}, {"ad26"}} }
    lifeSupportLinkageREP:Init()
    lifeSupportLinkageREP = LinkedDestroyables:New{ objectSets = {{"s17"}, {"ad27"}} }
    lifeSupportLinkageREP:Init()



end

function SetupShields()
   -- Coruscant Shield Turret
   local linkedShieldObjectsREP = { "turret_console_mili"}
   shieldStuffREP = LinkedShields:New{objs = linkedShieldObjectsREP, controllerObject = "Coruscant_Prop_Generator"}
   shieldStuffREP:Init()
   
   function shieldStuffREP:OnAllShieldsDown()
      ShowMessageText("level.spa.hangar.shields.atk.down", REP)
      ShowMessageText("level.spa.hangar.shields.def.down", CIS)
   end

   function shieldStuffREP:OnAllShieldsUp()
      ShowMessageText("level.spa.hangar.shields.atk.up", REP)
      ShowMessageText("level.spa.hangar.shields.def.up", CIS)
   end
end


--Coruscant Turrets

function SetupTurrets()
     turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "turret_console_mili",
        turrets = {"auto_turret_1", "auto_turret_2", "auto_turret_3", "auto_turret_4", "auto_turret_5", "auto_turret_6", "auto_turret_7", "auto_turret_8", "auto_turret_9", "roofgun_1", "roofgun_2", "roofgun_3", "roofgun_4", "roofgun_5", "roofgun_6", "roofgun_7", "roofgun_8", "roofgun_9"} }
    turretLinkageREP:Init()
   
    function turretLinkageREP:OnDisableMainframe()
        ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
        ShowMessageText("level.spa.hangar.mainframe.def.down", CIS)

    end

  --RepublicTurrets
    turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "rep_defense",
        turrets = {"rep_tur1","rep_tur2","rep_tur3","rep_tur4","rep_tur5","rep_tur6"} }
    turretLinkageREP:Init()
   
    function turretLinkageREP:OnDisableMainframe()
        ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
        ShowMessageText("level.spa.hangar.mainframe.def.down", CIS)
    end

  --CIS Turrets
    turretLinkageCIS = LinkedTurrets:New{ team = CIS, mainframe = "cis_defense",
        turrets = {"CIS_tur1","CIS_tur2","CIS_tur3","CIS_tur4","CIS_tur5","CIS_tur6"} }
    turretLinkageCIS:Init()
   
    function turretLinkageCIS:OnDisableMainframe()
        ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
        ShowMessageText("level.spa.hangar.mainframe.def.down", CIS)
    end
end


---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("dc:Load\\common.lvl")
    ReadDataFile("ingame.lvl")
   
   
    SetMaxFlyHeight(1100)
    SetMaxPlayerFlyHeight (1100)
    SetMinFlyHeight(-500)
    SetMinPlayerFlyHeight (-500)

   
    SetMemoryPoolSize ("ClothData",20)
    SetMemoryPoolSize ("Combo",50)              -- should be ~ 2x number of jedi classes
    SetMemoryPoolSize ("Combo::State",650)      -- should be ~12x #Combo
    SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Condition",650)  -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Attack",550)     -- should be ~8-12x #Combo
    SetMemoryPoolSize ("Combo::DamageSample",6000)  -- should be ~8-12x #Combo::Attack
    SetMemoryPoolSize ("Combo::Deflect",100)     -- should be ~1x #combo 


ReadDataFile("dc:sound\\bon.lvl;boncw")
ReadDataFile("dc:sound\\cmw.lvl;cmwcw")
ReadDataFile("sound\\spa.lvl;spa2cw")

    ReadDataFile("SIDE\\63rd.lvl",
                "rep_inf_ep3_rifleman",
                "rep_inf_ep3_rocketeer",
                "rep_inf_ep3_engineer",
                "rep_inf_ep3_sniper",
                "rep_inf_ep3_officer",
                "rep_inf_hound",
                "rep_inf_thorn",
                "rep_inf_fox",
                "rep_inf_ep3_jettrooper",
                             "rep_hover_fightertank",
                             "rep_hero_macewindu",
                             "rep_fly_anakinstarfighter",
   "rep_fly_vwing",
   "rep_fly_arc170fighter",
   "rep_fly_gunship")

    ReadDataFile("SIDE\\cis.lvl",
                "cis_inf_rifleman",
      "cis_inf_rocketeer",
                "cis_inf_engineer",
                "cis_inf_commander",
                "cis_inf_MG",
                "cis_inf_tactical",
                "cis_inf_officer",
                "cis_inf_sniper",
                "cis_inf_droideka",
                             "cis_hero_countdooku",
                             "cis_hover_aat",
   "cis_walk_tridroid",
   "cis_fly_tridroidfighter",
   "cis_fly_greviousfighter",
   "cis_fly_droidfighter",
   "cis_fly_droidgunship")
                             
                             
    ReadDataFile("dc:SIDE\\tur.lvl",
         "tur_bldg_spa_rep_chaingun",
         "tur_bldg_spa_cis_chaingun",
         "tur_bldg_chaingun_roof",
         "tur_bldg_chaingun_roof_heavy",
         "tur_bldg_predator_turret",
         "tur_bldg_laser" )         
                             
   SetupTeams{
      rep = {
         team = REP,
         units = 50,
         reinforcements = 500,
                    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},
           
        }
    }
    SetupTeams{
        cis = {
            team = CIS,
            units = 50,
            reinforcements = 500,
            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},
      }
   }
   
      AddUnitClass(CIS, "cis_inf_commander",1,2)
      AddUnitClass(CIS, "cis_inf_MG",1,2)
      AddUnitClass(CIS, "cis_inf_tactical",1,1)
      AddUnitClass(REP, "rep_inf_hound",1,1)
      AddUnitClass(REP, "rep_inf_thorn",1,1)
     AddUnitClass(REP, "rep_inf_fox",1,1)     

   SetHeroClass(CIS, "cis_hero_countdooku")
   SetHeroClass(REP, "rep_hero_macewindu")
   


    --  Level Stats
    --  ClearWalkers()
    AddWalkerType(1, 10) -- special -> droidekas
    AddWalkerType(1, 3) -- 1x2 (1 pair of legs)
    AddWalkerType(2, 3) -- 2x2 (2 pairs of legs)
    AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
    local weaponCnt = 1024
    SetMemoryPoolSize("Aimer", 75)
    SetMemoryPoolSize("AmmoCounter", weaponCnt)
    SetMemoryPoolSize("BaseHint", 1024)
    SetMemoryPoolSize("EnergyBar", weaponCnt)
   SetMemoryPoolSize("EntityCloth", 32)
   SetMemoryPoolSize("EntityFlyer", 50)
    SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityWalker", 2)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("CommandFlyer", 4)
    SetMemoryPoolSize("EntityLight", 200)
    SetMemoryPoolSize("EntitySoundStream", 4)
    SetMemoryPoolSize("EntityRemoteTerminal",18)
    SetMemoryPoolSize("EntitySoundStatic", 32)
    SetMemoryPoolSize("MountedTurret", 32)
   SetMemoryPoolSize("Navigator", 128)
    SetMemoryPoolSize("Obstacle", 1024)
   SetMemoryPoolSize("PathNode", 1024)
    SetMemoryPoolSize("SoundSpaceRegion", 64)
    SetMemoryPoolSize("TreeGridStack", 1024)
   SetMemoryPoolSize("UnitAgent", 128)
   SetMemoryPoolSize("UnitController", 128)
   SetMemoryPoolSize("Weapon", weaponCnt)

   

    SetSpawnDelay(10.0, 0.25)
    --ReadDataFile("dc:CMW\\CMW.lvl", "CMW_conquest")
    ReadDataFile("dc:CMW\\CMW.lvl", "CMW_conquest","CMW_CW")
    SetDenseEnvironment("false")





   
    --  Sound
   
    SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin")
    SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

    voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
    AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
    AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
   
    voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
    AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

   
    OpenAudioStream("dc:sound\\cmw.lvl",  "cmwcw_music")
    OpenAudioStream("sound\\global.lvl",  "cw_music")
    -- OpenAudioStream("sound\\global.lvl",  "global_vo_quick")
    -- OpenAudioStream("sound\\global.lvl",  "global_vo_slow")
    OpenAudioStream("sound\\spa.lvl",  "spa")
    OpenAudioStream("sound\\spa.lvl",  "spa")
    OpenAudioStream("sound\\spa.lvl",  "spa3_emt")

    SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
    SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing",   1)
    SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing",   1)
    SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

    SetOutOfBoundsVoiceOver(2, "cisleaving")
    SetOutOfBoundsVoiceOver(1, "repleaving")

   SetAmbientMusic(REP, 1.0, "rep_spa_amb_start",  0,1)
       SetAmbientMusic(REP, 0.9, "rep_spa_amb_middle", 1,1)
       SetAmbientMusic(REP, 0.1,"rep_spa_amb_end",    2,1)
       SetAmbientMusic(CIS, 1.0, "cis_spa_amb_start",  0,1)
       SetAmbientMusic(CIS, 0.9, "cis_spa_amb_middle", 1,1)
       SetAmbientMusic(CIS, 0.1,"cis_spa_amb_end",    2,1)
   
       SetVictoryMusic(REP, "rep_spa_amb_victory")
       SetDefeatMusic (REP, "rep_spa_amb_defeat")
       SetVictoryMusic(CIS, "cis_spa_amb_victory")
       SetDefeatMusic (CIS, "cis_spa_amb_defeat")

    SetSoundEffect("ScopeDisplayZoomIn",      "binocularzoomin")
    SetSoundEffect("ScopeDisplayZoomOut",     "binocularzoomout")
    --SetSoundEffect("BirdScatter",             "birdsFlySeq1")
    --SetSoundEffect("WeaponUnableSelect",      "com_weap_inf_weaponchange_null")
    --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null")
    SetSoundEffect("SpawnDisplayUnitChange",       "shell_select_unit")
    SetSoundEffect("SpawnDisplayUnitAccept",       "shell_menu_enter")
    SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
    SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
    SetSoundEffect("SpawnDisplayBack",             "shell_menu_exit")


--OpeningSateliteShot
    AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

    AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
    AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
    AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
    AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
    AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
    AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
    AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
    AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
    AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end


[/spoiler]
Title: Re: How do I make Tridroid work on a map?
Post by: Delta327 on October 31, 2016, 12:54:30 PM
Can i see the odf?
EDIT: http://www.gametoast.com/viewtopic.php?f=64&t=24601

Note by Anyder: Do not double post. Use the edit button instead.
Title: Re: How do I make Tridroid work on a map?
Post by: i2Bros on November 01, 2016, 06:09:42 AM
Walkertype 2 doesn't work to me...
Title: Re: How do I make Tridroid work on a map?
Post by: Delta327 on November 01, 2016, 07:03:45 AM
You need to put dc: on the under the stock side

Example-ReadDataFile("dc:SIDE\\cis.lvl",
"cis_walk_tridroid")
[glow]
Title: Re: How do I make Tridroid work on a map?
Post by: i2Bros on November 01, 2016, 07:32:25 AM
Why? It's not enough to have the vehicles in the cis stock side?
Title: Re: How do I make Tridroid work on a map?
Post by: Delta327 on November 01, 2016, 04:31:19 PM
Quote from: i2Bros on November 01, 2016, 07:32:25 AM
Why? It's not enough to have the vehicles in the cis stock side?

Well if you using coustom tanks i suggest you put dc: if it crashes
Title: Re: How do I make Tridroid work on a map?
Post by: i2Bros on November 01, 2016, 11:58:19 PM
Quote from: Delta327 on November 01, 2016, 04:31:19 PM
Well if you using coustom tanks i suggest you put dc: if it crashes
Actually it doesnt crash, simply no tridroid appears on map
Title: Re: How do I make Tridroid work on a map?
Post by: asky902 on November 02, 2016, 03:08:31 AM
did you include the model to the req folder and CIS.lua script.

example:
cis_walk_tridroid.req
Title: Re: How do I make Tridroid work on a map?
Post by: Cdt Fox on November 02, 2016, 05:20:03 AM
You need to modify the map's spwan point in ZE, and modify the map's layer  ;)
Title: Re: How do I make Tridroid work on a map?
Post by: i2Bros on November 03, 2016, 03:24:53 PM
Wow...
I'll need some good guys to do that for me, my PC doesn't want me to open Zeroeditor.
EhPortal 1.34 © 2024, WebDev