WC4 Mod For Homeworld 2 In The Works (June 5, 2006)

Awfully expensive bomb though...
Yeah. This morning was... exciting. I wanted to uninstall the Toolkit that allows me to upload the mods since it's always posting corrupted data and Steam... deleted the entire Homeworld folder, including all my work data. The whole 50 GB. Looks like one of the data recovery files is working, though, so it should be alright but I got ten years older today.

Edit: recovery in progress. Of the 150 GB (I underestimated the size of my stuff when I wrote the post).
 
Last edited:
Awfully expensive bomb though...

It'll be worth it, I think that I would need to turn down the graphics setting in fear of my graphics card going up as well.

I'm crossing my fingers that you haven't lost anything L.I.F. the last time I reformatted my computer I lost wedding photos/videos, I managed to get about 90 % back, thankfully the wife is not aware of it yet, and I hope that it will stay that way.
 
It'll be worth it, I think that I would need to turn down the graphics setting in fear of my graphics card going up as well.
Meh, don't worry about that yet, I haven't tinkered the game well enough for graphics settings to actually matter. :-P
I'm crossing my fingers that you haven't lost anything L.I.F. the last time I reformatted my computer I lost wedding photos/videos, I managed to get about 90 % back, thankfully the wife is not aware of it yet, and I hope that it will stay that way.
Heh, I'm pretty sure I got everything back. Just need to redownload some game files, test the mod to be sure the files are uncorrupted and then try to upload it again.

BTW, the software I used to recover everything is called Piriform Recuva. Free and did the job well, no question asked.
 
I'll probably work on them this week-end, but right now, I'm fixing the bugs in the current release as the testers report them. The goal is to have something cool for the birthday.
 
Oi! Small present in time for the CIC's birthday: the single player demo mission is back in the mod, as well as some improvements to the fuel code. Escorting the two transports to their jump point is going to be even more... fun. Remember, though, that saving them is not mission-critical, just a nice optional objective for those of you who enjoy a challenge. Small tip in spoilers about the scripts in the mission:

If the enemy detects your capital ships, the Kilrathi cruisers will jump into action, and given everyone's position, the transports are very likely to be in range of their guns. So you can try to do a pure fighter cover or to keep the ships out of range, but with the fuel issues to consider now, rotating the squadrons might be necessary. :)

Edit: I will update today the mod with a new feature, the anti-missile stance. When the new update is online, you will be able to select any Confederation or Kilrathi unit and, by pressing F6, order it to prioritize above any other target or even order incoming enemy missiles (except for bombers, they will not be affected by this for obvious reasons). This stance remains compatible with the guard order, meaning you can have in a fleet or convoy some ships escorting the main ones and whose job will be to target the enemy shipkillers. As a balancing measure to compensate the better defensive capabilities this offers, turret fire will go from 20% to 10% hit chance against torpedoes and missiles.

Fighters under this stance will also reroute some of their gun power to engines so they can get a better chance to catch up with the incoming warheads. Also, as an interesting point, it makes the Confederation destroyer a much more interesting escort unit, since it has a potent VLS missile system that will now start targeting enemy projectiles at medium to long ranges. This way, I think it starts negating the Kilrathi advantage with their long range missiles, while Confed short range torpedo barrages will remain a devastating option for the ballsy admiral.

Edit 2: it's uploaded on Steam.

0C69AA07669AFFFC56A56A0492BE729218425D72


3D4F26DD603E8783291FD166541C2434D74FC83B


6D884AA79449E4B0F672C7B40DDB57170DD80223


8AD4D667F1014192C0F3D1C1B17365E076E4D013
 
Last edited:
Nice update, I like the missle priority command, if only we had that in WC3 we might have been able to save the Behemoth :p. Do you mind me asking what are you using to create the missions ?
 
Nice update, I like the missle priority command, if only we had that in WC3 we might have been able to save the Behemoth :p. Do you mind me asking what are you using to create the missions ?
Glad you like it! As for creating the missions, it's entirely text-based. Here are the main files for the mission (keep in mind the code has not been cleaned and some of the legacy attempts of mine to work stuff with the ammunition limits).

Code:
--  hw2 level exporter generated file
--=============================================================================
--  Name  : M01.level
--  Purpose : Automatically generated level file by the level exporter.
--  Created Tuesday, July 29, 2003 by the level exporter.
--  Copyright Relic Entertainment, Inc.  All rights reserved.
--=============================================================================

function DetermChunk()
   addSquadron("Victory", "Cfd_Victory",   {-21614, 141, 5229},   0, {0.000, 90.000, 0.000},0,0)
  addSquadron("Ajax", "Cfd_Ajax", {-20814,-141,5829}, 0, {0,90,0}, 0, 0)
  addSquadron("Sheffield", "Cfd_Sheffield", {-21814,722.8,4900}, 0, {0,90,0}, 0, 0)
  addSquadron("Coventry", "Cfd_Coventry", {-20693.5,-400,4900}, 0, {0,90,0}, 0, 0)
  addSquadron("Light Cruiser", "Klr_Fralath", {25282.2,0,-4900}, 1, {0,0,0}, 0, 0)
  addSquadron("Heavy Cruiser", "Klr_Fralthi_ii", {22282.2,0,-4900}, 1, {0,0,0}, 0, 0)
  addSquadron("Darket 1", "Klr_darket_campaign", {15882.2,22.8,-4900}, 1, {0,0,0}, 0, 0)
  addSquadron("Darket 2", "Klr_darket_campaign", {16282.2,822.8,-4900}, 1, {0,180,0}, 0, 0)
  addSquadron("Darket 3", "Klr_darket_campaign", {16882.2,22.8,-4900}, 1, {0,0,0}, 0, 0)
  addSquadron("Darket 4", "Klr_darket_campaign", {17282.2,822.8,-4900}, 1, {0,180,0}, 0, 0)
  addSquadron("Dralthi 1", "Klr_dralthi_campaign", {25882.2,22.8,-4900}, 1, {0,0,0}, 0, 0)
  addSquadron("Dralthi 2", "Klr_dralthi_campaign", {26282.2,822.8,-4900}, 1, {0,180,0}, 0, 0)
  addSquadron("Arrow 1", "Cfd_scout_campaign", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Arrow 2", "Cfd_scout_campaign", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Hellcat 1", "Cfd_interceptor_campaign", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Hellcat 2", "Cfd_interceptor_campaign", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Hellcat 3", "Cfd_interceptor_campaign", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Hellcat 4", "Cfd_interceptor_campaign", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Hellcat 5", "Cfd_interceptor_campaign", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Hellcat 6", "Cfd_interceptor_campaign", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Thunderbolt 1", "Cfd_attackbomber", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Thunderbolt 2", "Cfd_attackbomber", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Thunderbolt 3", "Cfd_attackbomber", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Thunderbolt 4", "Cfd_attackbomber", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Thunderbolt 5", "Cfd_attackbomber", {-15882.2,22.8,-4900}, 0, {0,0,0}, 0, 0)
  addSquadron("Thunderbolt 6", "Cfd_attackbomber", {-16282.2,822.8,-4900}, 0, {0,180,0}, 0, 0)
  addSquadron("Corvette 1", "Klr_kamrani", {20882.2,22.8,-4900}, 1, {0,0,0}, 0, 0)
  addSquadron("Corvette 2", "Klr_kamrani", {20282.2,822.8,-4900}, 1, {0,180,0}, 0, 0)
  addSquadron("Convoy 1", "Cfd_Mercy", {-10882.2,22.8,4900}, 2, {0,0,0}, 0, 0)
  addSquadron("Convoy 2", "Cfd_Caduceus", {-11282.2,822.8,4900}, 2, {0,180,0}, 0, 0)
  addSquadron("Escort 1", "Cfd_interceptor", {-11882.2,22.8,4900}, 2, {0,0,0}, 0, 0)
  addSquadron("Escort 2", "Cfd_interceptor", {-12282.2,822.8,4900}, 2, {0,180,0}, 0, 0)
  addSquadron("Jump Buoy", "Cfd_jump_buoy", {16282.2,822.8,4900}, 2, {0,180,0}, 0, 0)
createSOBGroup("Victory")
createSOBGroup("VictoryEscort")
addToSOBGroup("Victory", "Victory")
addToSOBGroup("Ajax", "VictoryEscort")
addToSOBGroup("Sheffield", "VictoryEscort")
addToSOBGroup("Coventry", "VictoryEscort")
createSOBGroup("Victory_Group")
addToSOBGroup("Victory", "Victory_Group")
addToSOBGroup("Ajax", "Victory_Group")
addToSOBGroup("Sheffield", "Victory_Group")
addToSOBGroup("Coventry", "Victory_Group")
createSOBGroup("Thunderbolt A")
createSOBGroup("Thunderbolt B")
addToSOBGroup("Thunderbolt 1", "Thunderbolt A")
addToSOBGroup("Thunderbolt 2", "Thunderbolt B")
createSOBGroup("Thunderbolt C")
createSOBGroup("Thunderbolt D")
addToSOBGroup("Thunderbolt 3", "Thunderbolt C")
addToSOBGroup("Thunderbolt 4", "Thunderbolt D")
createSOBGroup("Thunderbolt E")
createSOBGroup("Thunderbolt F")
addToSOBGroup("Thunderbolt 5", "Thunderbolt E")
addToSOBGroup("Thunderbolt 6", "Thunderbolt F")
createSOBGroup("VFighters")
createSOBGroup("CAP")
addToSOBGroup("Arrow 1", "CAP")
addToSOBGroup("Arrow 2", "CAP")
addToSOBGroup("Arrow 1", "VFighters")
addToSOBGroup("Arrow 2", "VFighters")
addToSOBGroup("Hellcat 1", "VFighters")
addToSOBGroup("Hellcat 2", "VFighters")
addToSOBGroup("Hellcat 3", "VFighters")
addToSOBGroup("Hellcat 4", "VFighters")
addToSOBGroup("Hellcat 5", "VFighters")
addToSOBGroup("Hellcat 6", "VFighters")
addToSOBGroup("Thunderbolt 1", "VFighters")
addToSOBGroup("Thunderbolt 2", "VFighters")
addToSOBGroup("Thunderbolt 3", "VFighters")
addToSOBGroup("Thunderbolt 4", "VFighters")
addToSOBGroup("Thunderbolt 5", "VFighters")
addToSOBGroup("Thunderbolt 6", "VFighters")
createSOBGroup("KCruisers")
createSOBGroup("KCorvettes")
createSOBGroup("KCapitals")
addToSOBGroup("Light Cruiser", "KCruisers")
addToSOBGroup("Heavy Cruiser", "KCruisers")
addToSOBGroup("Corvette 1", "KCorvettes")
addToSOBGroup("Corvette 2", "KCorvettes")
addToSOBGroup("Light Cruiser", "KCapitals")
addToSOBGroup("Heavy Cruiser", "KCapitals")
addToSOBGroup("Corvette 1", "KCapitals")
addToSOBGroup("Corvette 2", "KCapitals")
createSOBGroup("Dralthi")
createSOBGroup("Darket_A")
createSOBGroup("Darket_B")
createSOBGroup("Darket_C")
createSOBGroup("Darket_D")
addToSOBGroup("Dralthi 1", "Dralthi")
addToSOBGroup("Dralthi 2", "Dralthi")
addToSOBGroup("Darket 1", "Darket_A")
addToSOBGroup("Darket 2", "Darket_B")
addToSOBGroup("Darket 3", "Darket_C")
addToSOBGroup("Darket 4", "Darket_D")
createSOBGroup("Darket")
addToSOBGroup("Darket 1", "Darket")
addToSOBGroup("Darket 2", "Darket")
addToSOBGroup("Darket 3", "Darket")
addToSOBGroup("Darket 4", "Darket")
createSOBGroup("Raiders")
addToSOBGroup("Darket 1", "Raiders")
addToSOBGroup("Darket 2", "Raiders")
addToSOBGroup("Darket 3", "Raiders")
addToSOBGroup("Darket 4", "Raiders")
addToSOBGroup("Corvette 1", "Raiders")
addToSOBGroup("Corvette 2", "Raiders")
createSOBGroup("Convoy")
createSOBGroup("ConvoyEscort")
addToSOBGroup("Convoy 1", "Convoy")
addToSOBGroup("Convoy 2", "Convoy")
addToSOBGroup("Escort 1", "ConvoyEscort")
addToSOBGroup("Escort 2", "ConvoyEscort")
createSOBGroup("JumpBuoy")
addToSOBGroup("Jump Buoy", "JumpBuoy")
addPoint("NavA",{15882.2,22.8,-4900},{0,0,0})
addPoint("NavB",{5882.2,4022.8,-900},{0,0,0})
addPoint("NavC",{-10882.2,1522.8,2800},{0,0,0})
addPoint("NavD",{-10882.2,-1522.8,2800},{0,0,0})
addPoint("NavE",{5882.2,-4022.8,-900},{0,0,0})
addPoint("NavF",{15882.2,22.8,-4900},{0,0,0})
addPoint("NavG",{-10882.2,-4022.8,8900},{0,0,0})
addPoint("NavH",{15882.2,22.8,-4900},{0,0,0})
addPoint("NavI",{-10882.2,4022.8,8900},{0,0,0})
addPath("Patrol_Darket_A","NavA","NavB","NavC","NavD","NavE")
addPath("Patrol_Darket_B","NavE","NavD","NavC","NavB","NavA")
addPath("Patrol_Darket_C","NavF","NavG")
addPath("Patrol_Darket_D","NavH","NavI")

   addSphere("Asteroid_Volume",   {5429, 6, -3229}, 4000.877)
   addSphere("AsteroidFocus_Volume",   {4172, 0, -3093}, 488.991)
   addSphere("Carrier_EnterVolume",   {1641, 101, 5231}, 488.991)
   addSphere("MoveHere",   {10853, 4824, 9904}, 3881.762)
   addSphere("AsteroidPtr_Volume",   {5868, 27, -3023}, 1220.408)

   addCamera("camera1",   {1617.764, -176.950, 5221.494},   {2980.118, 726.802, 5173.691})
   addCamera("camera1",   {1617.764, -176.950, 5221.494},   {2980.118, 726.802, 5173.691})


  fogSetActive(0)

  setGlareIntensity(0.0)

  setLevelShadowColour(0, 0, 0, 1)

  loadBackground("ez02")

  setSensorsManagerCameraDistances(10500,87500)

   setDefaultMusic("Data:sound/music/AMBIENT/a05_mission6and12")
   setBattleMusic("Data:sound/music/STAGING/STAGING_01")



end -- end of nondeterm function



--HeaderInfo: max number of players allowed on this level
maxPlayers = 3;

--PlayerInfo: info on each possible player in this level
player = {};
player[0] = {
  id = 0,
  name = "TCS Victory Battlegroup",
  resources = 0,
  raceName = "Confederation",
  startPos = 0,
}

player[1] = {
  id = 1,
  name = "Kilrathi Forces",
  resources = 999999,
  raceName = "Kilrathi",
  startPos = 0,
}

player[2] = {
  id = 2,
  name = "Confederation Forces",
  resources = 999999,
  raceName = "Confederation",
  startPos = 0,
}

-- **** Object Counts **** --


--Pebbles: 835
--Asteroids: 62
--Dustclouds: 48
--DustcloudMeshes: 2
--NebulaBranches: 0
--NebulaMeshes - Total number of points: 0
--NebulaNexii 0
The file above covers the contents of the mission in terms of ships, map, factions available. As you can see, I defined the ships that would be present at the beginning of the mission, with the reference to their type (cfd_victory is a ship that uses the same model as the cfd_carrier, the carrier you get in Skirmish, but with its name changed to fit the story, same for the escort ships of its battlegroup). Same for specific points on the map I will use later in the scripts. Then there are the SOB Groups. These groups are the most important tool of the scripter, as they are the objects I will play with to define triggers, checks, objectives and the such in the second file. After that, I call the actual map and the soundtrack, then I define the factions in play. The first one, that you play, is the one of the Victory, then there are the Kilrathi raiders and finally the helpless convoy. Each unit has its coordinates defined, as well as its orientation, status as being in or out of hyperspace, that kind of thing.
Code:
GUID = { 110, 91, 157, 190, 18, 23, 250, 78, 144, 20, 41, 246, 181, 128, 214, 12, }


dofilepath("data:leveldata/multiplayer/sgconfiguration/divers.lua")
dofilepath("data:leveldata/multiplayer/sgconfiguration/hyperspace.lua")
dofilepath("data:scripts/scar/scar_util.lua")
dofilepath("data:leveldata/multiplayer/sgconfiguration/music.lua")
-- dofilepath("data:leveldata/campaign/Demo_SSC/Mission_Demo_00/Restrict_Demo_M00.lua")
dofilepath("locale:language.lua")
dofilepath("data:script/Actor.lua")

-- --- --- TAGS HERE  --- --- --

-- Level_Pass_Tags = "demo_ssc,birth_demo"
-- Race_Pass_Tags = "race_cfd,race_klr"


-- --- --- Objectif  Area --- --- --

Obj_build1_id = 0
Obj_build1 = "$60010"
Obj_build2_id = 0
Obj_build2 = "$60010"
Obj_build3_id = 0
Obj_build3 = "$60010"
Obj_UseHyperspace_id = 0
Obj_UseHyperspace = "$60012"

Obj_Convoy_id = 0
Obj_Convoy = "Escort the convoy to the Jump Point."
Obj_Convoy_desc = "A medical convoy carrying supplies to a neighbouring starbase is in-system. Both ships must reach the Jump Buoy in one piece if we do not want to lose hundreds of wounded."
Obj_ConvoyWin_desc = "The convoy has jumped out safely. Not a glamorous job, but these crews save as many lives as our best pilots."
Obj_ConvoyMid_desc = "One of the transports has been destroyed, but the other jumped to safety. No doubt that the medical crews at the starbase are going to have a nightmarish week to come, having to work with half the supplies and reinforcements."
Obj_ConvoyFail_desc = "The Kilrathi managed to destroy the convoy. The starbase has been notified of the impending humanitarian disaster and has already started triaging those of the wounded who will have to be left to die."
Obj_Patrol_id = 0
Obj_Patrol = "Ensure the safety of the TCS Victory."
Obj_Patrol_desc = "The Old Lady might not be the mightiest carrier of the fleet, but it's our home, so protect it well."
Obj_Locate_id = 0
Obj_Locate = "Locate the enemy task force."
Obj_Locate_desc = "We have multiple reports of Kilrathi capital ships being present in the area. They need to be located and identified before any further action."
Obj_KillForce_id = 0
Obj_KillForce = "Destroy the enemy task force."
Obj_KillForce_desc = "Such a combat force cannot be allowed to further threaten our supply lines."


-- --- --- End of O. Area --- --- --

-- --- --- Ping Area --- --- --


-- --- --- End of P. A. --- --

------------------------------------
saveID = 0
g_time = 0
LANG = ""
------- SobGroup General manipulation -----
   SobGroup_Create("allship")
   SobGroup_Create("temp0")
   SobGroup_Create("temp1")
   SobGroup_Create("temp2")
   -- sobgroup for cpudocking--
   SobGroup_Create("temp")
   SobGroup_Create("tempa")
------------------------------------

-- --- --- Function Area --- --- --
function OnInit()
   Rule_Add("Rule_Init")
--   Rule_Add("MusicInit")
--   Rule_Add("myinit")
end


function Rule_Init()
   Obj_Convoy_id = Objective_Add (Obj_Convoy, OT_Primary)
   print("Test 0")
   SetAlliance(0,2)
   SetAlliance(2,0)
   Objective_AddDescription (Obj_Convoy_id , Obj_Convoy_desc)
   Objective_AddDescription (Obj_Patrol_id , Obj_Patrol_desc)
   Objective_AddDescription (Obj_Locate_id , Obj_Locate_desc)
   Player_GrantResearchOption(1, "FralathTorpedo")
   Player_GrantResearchOption(1, "FralthiTorpedo")
   Player_GrantResearchOption(1, "KamraniTorpedo")
   print("Test A")
   CPU_EnableAll(0)
   Rule_Add("Rule_Convoy_Move")
   Rule_Add("Rule_Initial_Landing")
   Rule_Add("Rule_Darket_Patrol")
   Rule_Add("Rule_Convoy_Jump")
   Rule_Add("Rule_Transport_Destroyed")
   Rule_Add("Rule_Kilrathi_Fighter_Detected")
   Rule_Add("Rule_Convoy_Detected")
   Rule_Add("Rule_Kilrathi_Corvette_Detected")
   Rule_Add("Rule_Kilrathi_Cruiser_Detected")
   Rule_Add("Rule_Enemy_Close_To_Convoy")
   Rule_Add("Rule_Victory_Group_Detected")
   Rule_Add("Rule_Cruisers_Destroyed")
   --Rule_Add("Rule_Torpedo_Fired_A")
   --Rule_Add("Rule_Torpedo_Fired_B")
   --Rule_Add("Rule_Torpedo_Fired_C")
   --Rule_Add("Rule_Torpedo_Fired_D")
   --Rule_Add("Rule_Torpedo_Fired_E")
   --Rule_Add("Rule_Torpedo_Fired_F")
   --Rule_Add("Rule_Ajax_Destroyed")
   --Rule_Add("Rule_Coventry_Destroyed")
   --Rule_Add("Rule_Sheffield_Destroyed")
   Rule_Add("Rule_Victory_Destroyed")
   print("Test B")
   Rule_Remove("Rule_Init")
end

function Rule_Convoy_Move()
   print("Test Convoy Move")
   SobGroup_GuardSobGroup("ConvoyEscort","Convoy")
   SobGroup_MoveToSobGroup("Convoy","JumpBuoy")
   Rule_Add("Rule_Speech_A")
   Rule_Remove("Rule_Convoy_Move")
end

function Rule_Speech_A()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Cambria System, Vega Sector, near the Krieger Jump Point, two months after the Battle of Earth",30)
   Rule_Add("Rule_Speech_B")
   Rule_Remove("Rule_Speech_A")
end
end

function Rule_Speech_B()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("TCS Victory Battlegroup",10)
   Rule_Add("Rule_Speech_C")
   Rule_Remove("Rule_Speech_B")
end
end

function Rule_Speech_C()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Cambria System, Vega Sector, near the Krieger Jump Point, two months after the Battle of Earth",30)
   Rule_Remove("Rule_Speech_C")
end
end


function Rule_Darket_Patrol()
   print("Test Darket Patrol")
   SobGroup_FollowPath("Darket_A","Patrol_Darket_A",1,1,1)
   SobGroup_FollowPath("Darket_B","Patrol_Darket_B",1,1,1)
   SobGroup_FollowPath("Darket_C","Patrol_Darket_C",1,1,1)
   SobGroup_FollowPath("Darket_D","Patrol_Darket_D",1,1,1)
   Rule_Remove("Rule_Darket_Patrol")
end

function Rule_Convoy_Jump()
if SobGroup_FillProximitySobGroup("temp0", "Convoy", "JumpBuoy", 1000) == 1 then
   print("Test Convoy Jump")
   Objective_SetState(Obj_Convoy_id , OS_Complete)
   Objective_AddDescription (Obj_Convoy_id , Obj_ConvoyWin_desc)
   Subtitle_Message("TCS Mercy: Thanks for the escort! These supplies will save a lot of lives out there. Our escort will now go back to your carrier. Out.",10)
   SobGroup_EnterHyperSpaceOffMap("Convoy")
   SobGroup_SwitchOwner("ConvoyEscort",0)
   Rule_Remove("Rule_Convoy_Jump")
end

end

function Rule_Initial_Landing()
   print("Test Initial Landing")
   SobGroup_DockSobGroupInstant("VFighters","Victory")
   Rule_Remove("Rule_Initial_Landing")

end


function Rule_Transport_Destroyed()
if SobGroup_Count("Convoy") == 1 then
   print("Test Transport Destroyed")
   Subtitle_Message("Mayday! Mayday! We have sustained critical damage, hull integrity is...",10)
   Rule_Remove("Rule_Convoy_Jump")
   Rule_Add("Rule_Damaged_Convoy_Jump")
   Rule_Add("Rule_Convoy_Destroyed")
   Rule_Remove("Rule_Transport_Destroyed")
end

end

function Rule_Damaged_Convoy_Jump()
if SobGroup_FillProximitySobGroup("temp0", "Convoy", "JumpBuoy", 1000) == 1 then
   print("Test Damaged Convoy Jump")
   Objective_SetState(Obj_Convoy_id , OS_Complete)
   Objective_AddDescription (Obj_Convoy_id , Obj_ConvoyMid_desc)
   Subtitle_Message("We're jumping out. Too bad they couldn't make it. Let's hope these supplies will be enough for them in Krieger. Our escort will now go back to your carrier. Out.",15)
   SobGroup_EnterHyperSpaceOffMap("Convoy")
   SobGroup_SwitchOwner("ConvoyEscort",0)
   Rule_Remove("Rule_Damaged_Convoy_Jump")
end

end

function Rule_Convoy_Destroyed()
if SobGroup_Count("Convoy") == 0 then
   print("Test Convoy Destroyed")
   Rule_Remove("Rule_Damaged_Convoy_Jump")
   Objective_SetState(Obj_Convoy_id , OS_Failed)
   Objective_AddDescription (Obj_Convoy_id , Obj_ConvoyFail_desc)
   Subtitle_Message("Direct hit! The reactor is breaking up, we're going to...",10)
   Subtitle_Message("The medical convoy has been annihilated...",10)
   Subtitle_Message("This is a disaster...",10)
   SobGroup_SwitchOwner("ConvoyEscort",0)
   Rule_Remove("Rule_Convoy_Destroyed")
end

end

function Rule_Convoy_Detected()
if SobGroup_PlayerIsInSensorRange("Convoy", 1) == 1 then
   print("Test Convoy Detected")
   SobGroup_Attack(1,"KCorvettes","Convoy")
   Rule_Remove("Rule_Convoy_Detected")
end

end

function Rule_Kilrathi_Fighter_Detected()
if SobGroup_PlayerIsInSensorRange("Darket", 0) == 1 then
   print("Test Kilrathi Fighter Detected")
   Subtitle_Message("We've made contact with the enemy. Darket light fighters.",10)
   SobGroup_Attack(1,"Darket","VFighters")
   Rule_Remove("Rule_Kilrathi_Fighter_Detected")
end

end

function Rule_Kilrathi_Corvette_Detected()
if SobGroup_PlayerIsInSensorRange("KCorvettes", 0) == 1 then
   print("Test Kilrathi Corvette Detected")
   Subtitle_Message("Watch out, there, this is a pair of corvettes. Bring in the T-Bolts!",10)
   Rule_Remove("Rule_Kilrathi_Corvette_Detected")
end

end

function Rule_Kilrathi_Cruiser_Detected()
if SobGroup_PlayerIsInSensorRange("KCruisers", 0) == 1 then
   print("Test Kilrathi Cruiser Detected")
   Objective_SetState(Obj_Locate_id , OS_Complete)
   Subtitle_Message("Victory, we've located the Kilrathi task force, it's a pair of cruisers. We're going to need a lot of firepower to bring those down. Wish we had some Broadswords or Longbows...",15)
   Rule_Remove("Rule_Kilrathi_Cruiser_Detected")
end

end

function Rule_Enemy_Close_To_Convoy()
if SobGroup_PlayerIsInSensorRange("Raiders", 2) == 1 then
   print("Test Enemy Close To Convoy")
     Sound_MusicPlay( "Data:sound/music/STAGING/STAGING_01" )
   Subtitle_Message("TCS Mercy: We have detected Kilrathi forces and request immediate assistance!",5)
   Rule_Add("Rule_Speech_2")
   Rule_Remove("Rule_Enemy_Close_To_Convoy")
end

function Rule_Speech_1()

if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Rollins: That medical convoy is inbound for the Krieger jump point. If the Cats destroy it, it's going to be a disaster...",10)
   Rule_Add("Rule_Speech_2")
   Rule_Remove("Rule_Speech_1")
end
end

function Rule_Speech_2()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Eisen: Launch all fighters! This is not a drill!",10)
   Rule_Add("Rule_Launch")
   Rule_Remove("Rule_Speech_2")
end
end

function Rule_Launch()
if Subtitle_IsMessageDone() == 1 then
   SobGroup_Launch("VFighters","Victory")
   Rule_Add("Rule_Speech_3")
   Rule_Remove("Rule_Launch")
end
end

function Rule_Speech_3()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Rollins: Sir, we just received a report from Intel indicating the presence of a Kilrathi task force of unknown strength in the vicinity.",10)
   Rule_Add("Rule_Speech_4")
   Rule_Remove("Rule_Speech_3")
end
end

function Rule_Speech_4()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Eisen: Better late than never... In any case, we must protect the convoy from attack, find the Kilrathi group and destroy it.",10)
   Rule_Add("Rule_Speech_5")
   Rule_Remove("Rule_Speech_4")
end
end

function Rule_Speech_5()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("Eisen: Arrow flights, this is a direct order, you are to cover us against enemy missiles and ignore any other target. Eisen out.",10)
   Rule_Add("Rule_Speech_6")
   Rule_Remove("Rule_Speech_5")
end
end

function Rule_Speech_6()
if Subtitle_IsMessageDone() == 1 then
   Subtitle_Message("TIP: All military units except for bombers can be ordered to prioritize missiles over any other target or order. Press F6 with a unit selected to tell it to do so. Fighters will also reroute power from guns to engines.",30)
   Rule_Remove("Rule_Speech_6")
end
end

end

function Rule_Victory_Group_Detected()
if SobGroup_PlayerIsInSensorRange("Victory_Group", 1) == 1 then
   print("Test Victory Group Detected")
   SobGroup_Attack(1,"KCruisers","Victory_Group")
   SobGroup_Attack(1,"Dralthi","VFighters")
   Rule_Remove("Rule_Victory_Group_Detected")
end

end


function Rule_Cruisers_Destroyed()
if SobGroup_Count("KCruisers") == 0 then
   print("Test Cruisers Destroyed")
   Objective_SetState(Obj_KillForce_id , OS_Complete)
   Objective_SetState(Obj_Patrol_id , OS_Complete)
   Subtitle_Message("Rollins: The bigger they are, the harder they fall! That's a wrap, people. Captain Eisen sends his compliments.",10)
   Rule_Add("Rule_Mission_Complete")
   Rule_Remove("Rule_Cruisers_Destroyed")
end

end

function Rule_Mission_Complete()
   if Subtitle_IsMessageDone() == 1 then
     Rule_Remove("Rule_Mission_Complete")
     setMissionComplete(1)
   end
end

function Rule_Victory_Destroyed()
if SobGroup_Count("Victory") == 0 then
   print("Test Victory Destroyed")
   Objective_SetState(Obj_KillForce_id , OS_Failed)
   Objective_SetState(Obj_Patrol_id , OS_Failed)
   Subtitle_Message("This is TCS Victory. We have sustained heavy damage, we are...",10)
   setMissionComplete(0)
   Rule_Remove("Rule_Cruisers_Destroyed")
end

end

function Rule_Torpedo_Fired_A()

SobGroup_Clear("temp0")

Player_FillProximitySobGroup("temp0",0,"Thunderbolt A",500)
print(temp0)
if SobGroup_AreAnyFromTheseAttackFamilies("temp0","Munition")==1 then

   print("Torpedo Fired!")

   Rule_Remove("Rule_Torpedo_Fired_A")

end

if SobGroup_AreAnyFromTheseAttackFamilies("temp0","Munition")==0 then

   print("Torpedo Not Fired!")

end

if SobGroup_HasFiredAtSobGroup("Thunderbolt A","KCapitals","kpr_sajuukheavycannon") == 1 then
   print("Test Torpedo Launched")
   SobGroup_ChangePower("Thunderbolt A","Weapon_Missile",0)
   Subtitle_Message("Torpedoes running",10)
   Rule_Add("Rule_Torpedo_Reload_A")
   Rule_Remove("Rule_Torpedo_Fired_A")
end







end

function Rule_Torpedo_Fired_B()


if SobGroup_HasFiredAtSobGroup("Thunderbolt B","KCapitals","kpr_sajuukheavycannon") == 1 then
   print("Test Torpedo Launched")
   SobGroup_ChangePower("Thunderbolt B","Weapon_Missile",0)
   Rule_Add("Rule_Torpedo_Reload_B")
   Rule_Remove("Rule_Torpedo_Fired_B")
end

end

function Rule_Torpedo_Reload_A()

if SobGroup_IsDockedSobGroup("Thunderbolt A","Victory") == 1 then
   print("Test Torpedo Reloaded")
   SobGroup_ChangePower("Thunderbolt A","Weapon_Missile",1)
   Rule_Add("Rule_Torpedo_Fired_A")
   Rule_Remove("Rule_Torpedo_Reload_A")
end

end

function Rule_Torpedo_Reload_B()

if SobGroup_HasFiredAtSobGroup("Thunderbolt B","Victory") == 1 then
   print("Test Torpedo Reloaded")
   SobGroup_ChangePower("Thunderbolt B","Weapon_Missile",1)
   Rule_Add("Rule_Torpedo_Fired_B")
   Rule_Remove("Rule_Torpedo_Reload_B")
end

end

function Rule_Torpedo_Fired_C()

if SobGroup_HasFiredAtSobGroup("Thunderbolt C","KCapitals","kpr_sajuukheavycannon") == 1 then
   print("Test Torpedo Launched")
   SobGroup_ChangePower("Thunderbolt C","Weapon_Missile",0)
   Subtitle_Message("Torpedoes running",10)
   Rule_Add("Rule_Torpedo_Reload_C")
   Rule_Remove("Rule_Torpedo_Fired_C")
end

end

function Rule_Torpedo_Fired_D()

if SobGroup_HasFiredAtSobGroup("Thunderbolt D","KCapitals","kpr_sajuukheavycannon") == 1 then
   print("Test Torpedo Launched")
   SobGroup_ChangePower("Thunderbolt D","Weapon_Missile",0)
   Rule_Add("Rule_Torpedo_Reload_D")
   Rule_Remove("Rule_Torpedo_Fired_D")
end

end

function Rule_Torpedo_Reload_C()

if SobGroup_IsDockedSobGroup("Thunderbolt C","Victory") == 1 then
   print("Test Torpedo Reloaded")
   SobGroup_ChangePower("Thunderbolt C","Weapon_Missile",1)
   Rule_Add("Rule_Torpedo_Fired_C")
   Rule_Remove("Rule_Torpedo_Reload_C")
end

end

function Rule_Torpedo_Reload_D()

if SobGroup_HasFiredAtSobGroup("Thunderbolt D","Victory") == 1 then
   print("Test Torpedo Reloaded")
   SobGroup_ChangePower("Thunderbolt D","Weapon_Missile",1)
   Rule_Add("Rule_Torpedo_Fired_D")
   Rule_Remove("Rule_Torpedo_Reload_D")
end

end

function Rule_Torpedo_Fired_E()

if SobGroup_HasFiredAtSobGroup("Thunderbolt E","KCapitals","kpr_sajuukheavycannon") == 1 then
   print("Test Torpedo Launched")
   SobGroup_ChangePower("Thunderbolt E","Weapon_Missile",0)
   Subtitle_Message("Torpedoes running!",10)
   Rule_Add("Rule_Torpedo_Reload_E")
   Rule_Remove("Rule_Torpedo_Fired_E")
end

end

function Rule_Torpedo_Fired_F()

if SobGroup_HasFiredAtSobGroup("Thunderbolt F","KCapitals","kpr_sajuukheavycannon") == 1 then
   print("Test Torpedo Launched")
   SobGroup_ChangePower("Thunderbolt F","Weapon_Missile",0)
   Rule_Add("Rule_Torpedo_Reload_F")
   Rule_Remove("Rule_Torpedo_Fired_F")
end

end

function Rule_Torpedo_Reload_E()

if SobGroup_IsDockedSobGroup("Thunderbolt E","Victory") == 1 then
   print("Test Torpedo Reloaded")
   SobGroup_ChangePower("Thunderbolt E","Weapon_Missile",1)
   Rule_Add("Rule_Torpedo_Fired_E")
   Rule_Remove("Rule_Torpedo_Reload_E")
end

end

function Rule_Torpedo_Reload_F()

if SobGroup_HasFiredAtSobGroup("Thunderbolt F","Victory") == 1 then
   print("Test Torpedo Reloaded")
   SobGroup_ChangePower("Thunderbolt F","Weapon_Missile",1)
   Rule_Add("Rule_Torpedo_Fired_F")
   Rule_Remove("Rule_Torpedo_Reload_F")
end

end


-- --- --- End of Function Aera --

-- --- --- Event Aera --- --- --

Events = {}

Events.Briefing = {
   {
     { "Universe_EnableSkip(0)", "" },
     { "Universe_AllowPlayerOrders(0)", "" },
     { "Camera_AllowControl(1)", "" },
     { "Sensors_EnableCameraZoom(0)", "" },
     { "Sound_EnableAllSpeech( 1 )",""},
     { "Sound_EnterIntelEvent()","" },
     HW2_Letterbox(1),
     HW2_Wait(1),
   },
   {
     {"Camera_FocusSobGroupWithBuffer('sg_playershipyard_1', 1500, 1500, 3 )", ""},
   },
   {
     HW2_Wait(1),
   },
   {
     HW2_SubTitleEvent(26, "$60000", 13),  -- Test audio -- OK
   },
   {
     HW2_Wait(1),
   },
   {
     HW2_SubTitleEvent(26, "$60001", 7),
   },
   {
     HW2_Wait(1),
   },
   {
     HW2_SubTitleEvent(27, "$60002", 2.5),  
   },
   {
     HW2_Wait(1),
   },
   {
     HW2_SubTitleEvent(29, "$60003", 3),  
   },
   {
     HW2_Wait(1),
   },
   {
     HW2_SubTitleEvent(26, "$60004", 6),  
   },
   {
     { "Obj_build1_id = Objective_Add( Obj_build1, OT_Primary )", "" },
     { "Objective_AddDescription( Obj_build1_id, '$60011')", "" },
   },
   {
     HW2_Wait(0.8),
     HW2_Letterbox(0),
     { "Rule_Add('Rule_Buildship')",""},
     { "Sound_ExitIntelEvent()","" },   
     { "Sound_SetMuteActor('')", ""},
     { "Universe_AllowPlayerOrders(1)", "" },
     { "Camera_AllowControl(1)", "" },
     { "Sensors_EnableCameraZoom(1)", "" },
     { "Universe_EnableSkip(0)", "", },
   },
}

Events.END = {
   {
     { "Universe_EnableSkip(0)", "" },
     { "Universe_AllowPlayerOrders(0)", "" },
     { "Camera_AllowControl(1)", "" },
     { "Sensors_EnableCameraZoom(0)", "" },
     { "Sound_EnableAllSpeech( 1 )",""},
     { "Sound_EnterIntelEvent()","" },
     HW2_Letterbox(1),
     HW2_Wait(1),
   },
   {
     HW2_Wait(1),
   },
   {
     HW2_LocationCardEvent( "$60014", 2),  
   },

   {
     HW2_Wait(0.8),
     HW2_Letterbox(0),
     { "Rule_AddInterval('Rule_END2' , 7)",""},
     { "Sound_ExitIntelEvent()","" },   
     { "Sound_SetMuteActor('')", ""},
     { "Universe_AllowPlayerOrders(1)", "" },
     { "Camera_AllowControl(1)", "" },
     { "Sensors_EnableCameraZoom(1)", "" },
     { "Universe_EnableSkip(0)", "", },
   },
}
The second file is the hardest of the two, and contains all the logic that will be applied in the mission, with the groups being used to trigger each scenarized part and simulate an AI to do exactly what I want, when I want it. For example, when the convoy first sees the Darket, it triggers some text-based exchanges that conclude with the automatic scramble of the fighters of the Victory while the Darket attack the fighters and the corvettes attack the convoy. It also allows me to give a small tutorial for the players on the matter of anti-missile defence. I think that I'll continue doing some missions for tutorial purposes on specific units, my idea being to write a second mission as an attack of the Victory on some Kilrathi convoys, with the twist being that they are covered by an Electronic Warfare frigate that will, if I manage to get it to work, will simply prevent any attack on ships close enough to her, forcing the player to target it first in degraded conditions (an EW field that reduces Confed craft performance).

In any case, if you or anyone else are interested into writing your own missions for the game, I'd be glad to test them and possibly integrate them in future releases. If you are not sure what the ship references are (like the cfd_interceptor, cfd_victory and the such), just leave notes telling me which ship you are thinking about (please use those that are in-game already) and what, if any, specific differences, names or such you want to add them. I suggest you to also plan on paper or in Word a proper "storyline" for the mission, describing very precisely what event you are going to look for and what reaction they are supposed to trigger. For one of the most complete "libraries" on the game's instructions, for the second file, here is the most useful link I ever had in modding:

http://hw2bsg.org/wiki.hw2.info/FunctionReference.html

http://hw2bsg.org/wiki.hw2.info/FunctionReference.html
 
Thanks for letting us know. I have tried to find a good mission programs but cannot get the really highly rated ones to work on my computer.

When I start studying again I shall have to try and get them working again. I thought that missions or rather a campaign would be something nice to slowly work on over winter as something to take my mind off studying.
 
Thanks for letting us know. I have tried to find a good mission programs but cannot get the really highly rated ones to work on my computer.

When I start studying again I shall have to try and get them working again. I thought that missions or rather a campaign would be something nice to slowly work on over winter as something to take my mind off studying.
I don't know about any mission program, just wrote the stuff the hard way after defining what I wanted to see happening in the mission. It's annoying, but it works.
 
Yeah there seams to be no easy way, just the hard way or the really long and hard way :p
Pretty much so, AFAIK. And even then, I have some workarounds that would make the official devs twitch and yell at me when it comes to integrating the ships in-game, particularly the big ones, which are, AFAIK, the biggest models anyone put in a mod, except maybe for the Star Wars one, but evillejedi is crazy awesome.
 
No promises, but if I can find the time to do it, there miiiiight be a campaign idea involving this girl and her shenanigans in the kitty litter:

957B6F29AFF2EDACCB7D4F3539C7E3FC434AD1D0


In other news, I'm trying to get Klavs' models to work ingame, but still have quite the issues:

68A80BBF3880DB83884F94B49D46E9690A5BEF23


(Hint: even if I got the textures to look as good as he does, this would still not be in normal MP games given the unholy amount of polys involved for a single fighter, let alone his capital ships, but if anyone had better luck working with his stuff, I'd be happy to get some advice!)
 
Hahaha, yes! Like I said during the party, I think this mod has the unique ability to create an End Run campaign because of the mechanics and story. It would be a blast!
 
Hahaha, yes! Like I said during the party, I think this mod has the unique ability to create an End Run campaign because of the mechanics and story. It would be a blast!
Indeed, indeed, with the point of view of the two sides of the operation, Concordia and Tarawa. Just a bit disappointed I cannot get @Klavs81 ships to work, because he has modelled and textured already everything needed for such a campaign, in glorious HD.
 
Back
Top