How to fix the backward space icons, vo, & text (FAQ)

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

xwingguy

How to fix the backward space icons, vo, & text (FAQ)

Postby xwingguy » Fri Jul 28, 2006 3:46 pm

Open ObjectiveSpaceAssault.lua found in data_@#$\Common\Scripts folder

Scroll down until you find where it says SetReinforcementCount(self.teamATT, -1)

Code: Select all
ScriptCB_DoFile("Objective")

--NOTE: ObjectiveSpaceAssault is a special case objective that is designed for multiplayer only
ObjectiveSpaceAssault = Objective:New
{
   --external values that must be supplied when creating a new objective
   shipBitmapATT = nil,
   shipBitmapDEF = nil,
   shieldBitmapATT = nil,
   shieldBitmapDEF = nil,
   criticalSystemBitmapATT = nil,
   criticalSystemBitmapDEF = nil,
   
   systemsList = {},
}

function ObjectiveSpaceAssault:OnCriticalSystemDestroyed(name, pointValue)
   --designers, override me as necessary!
   print("TEST - critical system destroyd:", name, "pointValue:", pointValue)      --TODO: remove this line
end

-- name: the name of the object in the level (duh)
-- pointValue: how many points the object is worth when it's destroyed
-- hudPosX, hudPosY: texture coordinates for placing the hud health indicator for the critical system
--                (should be in the range of 0.0 to 1.0)
function ObjectiveSpaceAssault:AddCriticalSystem(name, pointValue, hudPosX, hudPosY)
   if hudPosX and hudPosY then
      --add the critical system as normal
      SpaceAssaultAddCriticalSystem(name, pointValue, hudPosX, hudPosY)
   else
      --add the critical system, but tell C++ not to display a HUD marker
      SpaceAssaultAddCriticalSystem(name, pointValue, -1.0, -1.0, false)
   end
   
   OnObjectKillName(
      function (objectPtr, killer)
         self:OnCriticalSystemDestroyed(name, pointValue)
         AddSpaceAssaultDestroyPoints(killer, GetEntityName(objectPtr))
         SetProperty(objectPtr, "MaxHealth", 99999999999.0)      --effectively makes the object un-repairable
         self:UpdateObjectiveMessage(name)
      end,
      name
      )
end


function ObjectiveSpaceAssault:Start()
   --=======================================
    -- Initialization logic
    --=======================================   
   assert(self.multiplayerRules == true, "ObjectiveSpaceAssault is intended for multiplayer gametypes only! (i.e. set multiplayerRules = true)")   
   self.showTeamPoints = true
   
   --initialize the base objective data
   Objective.Start(self)
   
   --notify C++ that we're running space assault now
   --(so it can do team scoring with critical systems and whatnot)
   SpaceAssaultEnable(true)   
   SpaceAssaultSetupBitmaps(self.shipBitmapATT, self.shipBitmapDEF,
                      self.shieldBitmapATT, self.shieldBitmapDEF,
                      self.criticalSystemBitmapATT, self.criticalSystemBitmapDEF)
                     
   SetReinforcementCount(self.teamATT, -1)
   SetReinforcementCount(self.teamDEF, -1)




Just above that you'll find this:

Code: Select all
   SpaceAssaultSetupBitmaps(self.shipBitmapATT, self.shipBitmapDEF,
                      self.shieldBitmapATT, self.shieldBitmapDEF,
                      self.criticalSystemBitmapATT, self.criticalSystemBitmapDEF)
                     


Change it to this:

Code: Select all
   SpaceAssaultSetupBitmaps(self.shipBitmapDEF, self.shipBitmapATT,
                      self.shieldBitmapDEF, self.shieldBitmapATT,
                      self.criticalSystemBitmapATT, self.criticalSystemBitmapDEF)
                     


Save and close and munge the Common. It should be fixed

I've added how the fix the other messed up stuff.
Last edited by xwingguy on Sat Jul 29, 2006 10:58 am, edited 1 time in total.

xwingguy

Postby xwingguy » Sat Jul 29, 2006 10:56 am

Now How to fix the win/lose voiceovers and a little bit of the objective text that's messed up (they are also backwards).

Open up the same ObjectiveSpaceAssault.lua again and scroll down to the bottom and section:



Code: Select all
gSpaceAssaultSystems_template = {
   imp = {
      objTxt      = "level.spa.objectives.imp.0",
      fighterTxt   = "level.spa.fighters.atk",
      winVO      =  "IOSMP_obj_24",
      loseVO      = "IOSMP_obj_25",
      engines      = {
         pts = 3, u = 0.5, v = 0.95,
         objTxt = "level.spa.objectives.imp.3", attVO = "IOSMP_obj_05", defVO = "AOSMP_obj_06",
      },
      lifesupport   = {
         pts = 18, u = 0.5, v = 0.11,
         objTxt = "level.spa.objectives.imp.2", attVO = "IOSMP_obj_08", defVO = "AOSMP_obj_09",
      },
      bridge      = {
         pts = 18, u = 0.5, v = 0.23,
         objTxt = "level.spa.objectives.imp.4", attVO = "IOSMP_obj_10", defVO = "AOSMP_obj_11",
      },
      comm      = {
         pts = 18, u = 0.5, v = 0.5,
         objTxt = "level.spa.objectives.imp.5", attVO = "IOSMP_obj_12", defVO = "AOSMP_obj_13",
      },
      sensors      = {
         pts = 18, u = 0.5, v = 0.85,
         objTxt = "level.spa.objectives.imp.6", attVO = "IOSMP_obj_14", defVO = "AOSMP_obj_15",
      },
      frigates   = {
         pts = 18,
         objTxt = "level.spa.objectives.imp.7", attVO = "IOSMP_obj_03", defVO = "AOSMP_obj_04",
         bShowInSplitscreen = true
      }
   },
   all = {
      objTxt      = "level.spa.objectives.all.0",
      fighterTxt   = "level.spa.fighters.def",
      winVO      = "AOSMP_obj_24",
      loseVO      = "AOSMP_obj_25",
      engines      = {
         pts = 6, u = 0.5, v = 0.92,
         objTxt = "level.spa.objectives.all.3", defVO = "IOSMP_obj_06", attVO = "AOSMP_obj_05",
      },
      lifesupport   = {
         pts = 18, u = 0.5, v = 0.65,
         objTxt = "level.spa.objectives.all.2", defVO = "IOSMP_obj_09", attVO = "AOSMP_obj_08",
      },
      bridge      = {
         pts = 18, u = 0.5, v = 0.85,
         objTxt = "level.spa.objectives.all.4", defVO = "IOSMP_obj_11", attVO = "AOSMP_obj_10",
      },
      comm      = {
         pts = 18, u = 0.5, v = 0.75,
         objTxt = "level.spa.objectives.all.5", defVO = "IOSMP_obj_13", attVO = "AOSMP_obj_12",
      },
      sensors      = {
         pts = 18, u = 0.5, v = 0.32,
         objTxt = "level.spa.objectives.all.6", defVO = "IOSMP_obj_15", attVO = "AOSMP_obj_14",
      },
      frigates   = {
         pts = 18,
         objTxt = "level.spa.objectives.all.7", defVO = "IOSMP_obj_04", attVO = "AOSMP_obj_03",
         bShowInSplitscreen = true,
      }
   },
   
   rep = {
      objTxt      = "level.spa.objectives.rep.0",
      fighterTxt   = "level.spa.fighters.atk",
      winVO      = "ROSMP_obj_24",
      loseVO      = "ROSMP_obj_25",
      engines      = {
         pts = 9, u = 0.5, v = 0.92,
         objTxt = "level.spa.objectives.rep.3", defVO = "COSMP_obj_06", attVO = "ROSMP_obj_05",
      },
      lifesupport   = {
         pts = 18, u = 0.5, v = 0.16,
         objTxt = "level.spa.objectives.rep.2", defVO = "COSMP_obj_09", attVO = "ROSMP_obj_08",
      },
      bridge      = {
         pts = 18, u = 0.5, v = 0.54,
         objTxt = "level.spa.objectives.rep.4", defVO = "COSMP_obj_11", attVO = "ROSMP_obj_10",
      },
      comm      = {
         pts = 18, u = 0.5, v = 0.40,
         objTxt = "level.spa.objectives.rep.5", defVO = "COSMP_obj_13", attVO = "ROSMP_obj_12",
      },
      sensors      = {
         pts = 18, u = 0.5, v = 0.78,
         objTxt = "level.spa.objectives.rep.6", defVO = "COSMP_obj_15", attVO = "ROSMP_obj_14",
      },
      frigates   = {
         pts = 18,
         objTxt = "level.spa.objectives.rep.7", defVO = "COSMP_obj_04", attVO = "ROSMP_obj_03",
         bShowInSplitscreen = true,
      }
   },   
   cis = {
      objTxt      = "level.spa.objectives.cis.0",
      fighterTxt   = "level.spa.fighters.def",
      winVO      = "COSMP_obj_24",
      loseVO      = "COSMP_obj_25",
      engines      = {
         pts = 18, u = 0.5, v = 0.92,
         objTxt = "level.spa.objectives.cis.3", defVO = "ROSMP_obj_06", attVO = "COSMP_obj_05",
      },
      lifesupport   = {
         pts = 18, u = 0.5, v = 0.20,
         objTxt = "level.spa.objectives.cis.2", defVO = "ROSMP_obj_09", attVO = "COSMP_obj_08",
      },
      bridge      = {
         pts = 18, u = 0.5, v = 0.66,
         objTxt = "level.spa.objectives.cis.4", defVO = "ROSMP_obj_11", attVO = "COSMP_obj_10",
      },
      comm      = {
         pts = 18, u = 0.5, v = 0.52,
         objTxt = "level.spa.objectives.cis.5", defVO = "ROSMP_obj_13", attVO = "COSMP_obj_12",
      },
      sensors      = {
         pts = 18, u = 0.5, v = 0.78,
         objTxt = "level.spa.objectives.cis.6", defVO = "ROSMP_obj_15", attVO = "COSMP_obj_14",
      },
      frigates   = {
         pts = 18,
         objTxt = "level.spa.objectives.cis.7", defVO = "ROSMP_obj_04", attVO = "COSMP_obj_03",
         bShowInSplitscreen = true,
      }
   },      
}


Find these 2 sections:

imps
Code: Select all
   imp = {
      objTxt      = "level.spa.objectives.imp.0",
      fighterTxt   = "level.spa.fighters.atk",
      winVO      =  "IOSMP_obj_24",
      loseVO      = "IOSMP_obj_25",


and all
Code: Select all
   all = {
      objTxt      = "level.spa.objectives.all.0",
      fighterTxt   = "level.spa.fighters.def",
      winVO      = "AOSMP_obj_24",
      loseVO      = "AOSMP_obj_25",


This may seem really weird but you must swap the winVO, loseVO, and objTxt from the opposing teams. So it should end up looking like this:

for imps
Code: Select all
imp = {
      objTxt      = "level.spa.objectives.all.0",
      fighterTxt   = "level.spa.fighters.atk",
      winVO      =  "AOSMP_obj_24",
      loseVO      = "AOSMP_obj_25", 


and for all
Code: Select all
   all = {
      objTxt   = "level.spa.objectives.imp.0",
      fighterTxt   = "level.spa.fighters.def",
      winVO      =  "IOSMP_obj_24",
      loseVO      =  "IOSMP_obj_25", 


Now you can do the same to republic and cis if you want to.

note: fighterTxt DOES NOT CHANGE

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 4 guests