Thread: [Gcblue-commits] gcb_data/scenario CarrierTest.py,NONE,1.1 HighPolyShips.py,NONE,1.1 SurfAir.py,1.1,
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@us...> - 2004-01-05 02:50:37
|
Update of /cvsroot/gcblue/gcb_data/scenario In directory sc8-pr-cvs1:/tmp/cvs-serv13171/scenario Modified Files: SurfAir.py Added Files: CarrierTest.py HighPolyShips.py Log Message: --- NEW FILE: CarrierTest.py --- # SM is ScenarioManager object def CreateScenario(SM): SM.CreateAlliance(1, 'Friendly') SM.CreateAlliance(2, 'OPFOR') SM.SetUserAlliance(1) SM.SetScenarioDescription('Test scenario, aircraft carrier vs. ragtag forces') SM.SetScenarioLoaded(1) SM.SetScenarioName('CarrierTest') SM.SetDateTime(2004, 6, 15, 16, 0, 0) unit = SM.GetDefaultUnit() order = SM.GetDefaultOrder() order.SetOrderName('Patrol') unit.AddOrder(order) ### Alliance 2 (enemy) units unit.className = 'Mig25' unit.unitName = 'Bear 72' unit.SetPosition(-5.5, 49.6, 1500) # lon, lat, alt unit.heading = 90 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 2) unit.className = 'Mig25' unit.unitName = 'Bear 73' unit.SetPosition(-5.5, 49.7, 1500) # lon, lat, alt unit.heading = 90 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 2) unit.className = 'Mig25' unit.unitName = 'Bear 74' unit.SetPosition(-5.7, 49.4, 1500) # lon, lat, alt unit.heading = 90 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 2) unit.className = 'Mig25' unit.unitName = 'Bear 75' unit.SetPosition(-5.7, 49.5, 1500) # lon, lat, alt unit.heading = 90 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 2) unit.className = 'Cruiser' unit.unitName = 'Bigfish 1' unit.SetPosition(-5.6, 49.8, 0) unit.heading = 95 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 2) unit.className = 'Destroyer' unit.unitName = 'Bigfish 2' unit.SetPosition(-5.6, 49.65, 0) unit.heading = 95 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 2) ### Alliance 1 units (friendly) unit.ClearOrders() unit.className = 'Mig25' unit.unitName = 'Laser 1' unit.SetPosition(-4.4, 49.8, 1500) unit.heading = 270 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 1) unit.className = 'Harrier GR3a' unit.unitName = 'Striker 1' unit.SetPosition(-4.25, 49.7, 1200) unit.heading = 340 unit.speed = 0.5 SM.AddUnitToAlliance(unit, 1) unit.className = 'Patrol Boat' unit.unitName = 'Picket 1' unit.SetPosition(-4.25, 49.65, 0) unit.heading = 270 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 1) unit.className = 'Hermes' unit.unitName = 'HMS Questionable' unit.SetPosition(-4.3, 49.7, 0) unit.heading = 260 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 1) nAir = 7 for n in range(0, nAir): unitName = 'Hammer %d' % (n + 1) # AddUnitToFlightDeck(<carrier name>,<unit class>,<name>, <location>) # <location>: 1 = HANGAR, 2 = DECK, 3 = CATAPULT SM.AddUnitToFlightDeck('HMS Questionable','Harrier GR3a',unitName, 3) SM.AddUnitToFlightDeck('HMS Questionable','AEW aircraft','Goose 1', 3) SM.AddUnitToFlightDeck('HMS Questionable','Mig25','Laser 2', 1) SM.AddUnitToFlightDeck('HMS Questionable','Mig25','Laser 3', 1) SM.AddUnitToFlightDeck('HMS Questionable','Mig25','Laser 4', 1) AddGoals(SM) def AddGoals(SM): # alliance 1 goals goal_1a = SM.DestroyGoal('Bigfish 1') goal_1b = SM.DestroyGoal('Bigfish 2') goal_1 = SM.CompoundGoal(0) # 0 - AND, 1 - OR goal_1.AddGoal(goal_1a) goal_1.AddGoal(goal_1b) SM.SetAllianceGoal(1, goal_1) # alliance 2 goals goal_2 = SM.DestroyGoal('HMS Questionable') SM.SetAllianceGoal(2, goal_2) # BM is BriefingManager (same as ScenarioManager for now) object def CreateBriefing(BM): BM.SetEventTime(0) BM.Pause() BM.PauseAudio() BM.SetBriefingMode(1) # 0 - normal tactical display, 1 - briefing disp BM.Set3DMode(0) # 0 - off, 1 - small, 2 - med, 3 - full screen BM.ConsoleText('Briefing follows...') BM.SetEventTime(4) BM.ConsoleText('') # a blank line BM.ConsoleText('Destroy the forces to the West') BM.ConsoleText('Protect your forces') BM.ConsoleText('') BM.SetEventTime(7) BM.ChangeMapView(-5.5, 50.1, 4.0) # (lon, lat, lon span) in degrees BM.SetEventTime(8) BM.ConsoleText('') BM.ConsoleText('Enemy consists of ragtag rebel forces') BM.ConsoleText('') BM.ConsoleText('Destroy at will.') BM.ConsoleText('The two enemy surface ships are your high priority targets') BM.SetEventTime(9) # text, lon, lat, duration in seconds, 0 - no effect, 1 - blend effect BM.MapText('Approx location of OPFOR', -5.5, 49.9, 12, 1) BM.SetEventTime(12) BM.Set3DMode(2) # large 3D, console still visible # unit, duration, az1, az2, el1, el2, range1, range2 BM.ConsoleText('You have command of the aircraft carrier, ') BM.ConsoleText(' HMS Questionable to assist you in your mission') BM.ConsoleText('') BM.ConsoleText('Hit the "F" key after hooking your carrier to'); BM.ConsoleText(' raise the flight deck control panel'); BM.TrackCamera('HMS Questionable', 10.0, 100.0, -100.0, 1500.0, -50.0, 150.0, 100.0) BM.Text3D('HMS Questionable', 10.0, 0.5, 0.2, 24.0, 1) BM.SetEventTime(22) BM.Set3DMode(1) BM.ConsoleText('') BM.ConsoleText('On to the mission, Good hunting.') BM.SetEventTime(28) BM.Set3DMode(1) BM.SetBriefingMode(0) # leave briefing mode BM.PlayAudio('tension1',0) # name, seek time from beginning of song BM.Resume() # resumes game --- NEW FILE: HighPolyShips.py --- # SM is ScenarioManager object def CreateScenario(SM): SM.CreateAlliance(1, 'Friendly') SM.CreateAlliance(2, 'OPFOR') SM.SetUserAlliance(1) SM.SetScenarioDescription('Test scenario with high poly count Type82 Bristol') SM.SetScenarioLoaded(1) SM.SetScenarioName('High poly count test') SM.SetDateTime(2004, 4, 15, 14, 0, 0) unit = SM.GetDefaultUnit() order = SM.GetDefaultOrder() order.SetOrderName('Patrol') unit.AddOrder(order) ### Alliance 2 (enemy) units unit.className = 'Mig25' unit.unitName = 'Bear 72' unit.SetPosition(-5.5, 49.9, 1500) # lon, lat, alt unit.heading = 90 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 2) unit.className = 'Mig25' unit.unitName = 'Bear 73' unit.SetPosition(-5.5, 49.85, 1500) # lon, lat, alt unit.heading = 90 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 2) unit.className = 'Destroyer' unit.unitName = 'Plate 12' unit.SetPosition(-5.6, 49.9, 0) unit.heading = 95 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 2) ### Alliance 1 units (friendly) unit.ClearOrders() unit.className = 'Mig25' unit.unitName = 'Laser 1' unit.SetPosition(-4.4, 49.8, 1500) unit.heading = 270 unit.speed = 0.7 SM.AddUnitToAlliance(unit, 1) unit.className = 'Harrier GR3a' unit.unitName = 'Striker 1' unit.SetPosition(-4.25, 49.7, 1200) unit.heading = 340 unit.speed = 0.5 SM.AddUnitToAlliance(unit, 1) unit.className = 'Type82' unit.unitName = 'Bristol 1' unit.SetPosition(-4.30, 49.7, 0) unit.heading = 260 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 1) unit.className = 'Type82' unit.unitName = 'Bristol 2' unit.SetPosition(-4.31, 49.7, 0) unit.heading = 260 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 1) unit.className = 'Type82' unit.unitName = 'Bristol 3' unit.SetPosition(-4.32, 49.7, 0) unit.heading = 260 unit.speed = 1.0 SM.AddUnitToAlliance(unit, 1) AddGoals(SM) def AddGoals(SM): # alliance 1 goals goal_1a = SM.DestroyGoal('Plate 12') goal_1b = SM.DestroyGoal('Bear 72') goal_1 = SM.CompoundGoal(0) # 0 - AND, 1 - OR goal_1.AddGoal(goal_1a) goal_1.AddGoal(goal_1b) SM.SetAllianceGoal(1, goal_1) # alliance 2 goals goal_2 = SM.DestroyGoal('Laser 1') SM.SetAllianceGoal(2, goal_2) # BM is BriefingManager (same as ScenarioManager for now) object def CreateBriefing(BM): BM.SetEventTime(0) BM.Pause() BM.PauseAudio() BM.SetBriefingMode(1) # 0 - normal tactical display, 1 - briefing disp BM.Set3DMode(0) # 0 - off, 1 - small, 2 - med, 3 - full screen BM.ConsoleText('Briefing follows...') BM.SetEventTime(4) BM.ConsoleText('') # a blank line BM.ConsoleText('This is a version of SurfAir that uses') BM.ConsoleText('a high poly count Type82 Bristol model for') BM.ConsoleText('graphics performance test.') BM.ConsoleText('') BM.SetEventTime(7) BM.ChangeMapView(-5.5, 50.1, 4.0) # (lon, lat, lon span) in degrees BM.SetEventTime(8) BM.ConsoleText('') BM.ConsoleText('Enemy consists of one Destroyer and two Mig25s') BM.SetEventTime(9) # text, lon, lat, duration in seconds, 0 - no effect, 1 - blend effect BM.MapText('Approx location of OPFOR', -5.5, 49.9, 12, 1) BM.SetEventTime(12) BM.Set3DMode(2) # large 3D, console still visible # unit, duration, az1, az2, el1, el2, range1, range2 BM.ConsoleText('') BM.ConsoleText('Your destroyers are armed with SAMs and SSMs'); BM.TrackCamera('Bristol 3', 13.0, 2000.0, 200.0, 50.0, 0.0, 120.0, 50.0) BM.Text3D('Type 82 Bristol Destroyers', 12.0, 0.5, 0.2, 24.0, 1) BM.SetEventTime(25) BM.TrackCamera('Bristol 3', 8.0, 200.0, -200.0, 0.0, -50.0, 50.0, 40.0) BM.SetEventTime(33) BM.ConsoleText('') BM.ConsoleText('Your Harrier provides strike support to take out the destroyer.') BM.FlybyCamera('Striker 1', 5.0, 80, 120, 15, 5, 50, 65) BM.Text3D('HARRIER', 5.0, 0.5, 0.2, 24.0, 1) BM.SetEventTime(38) BM.Set3DMode(1) BM.ConsoleText('') BM.ConsoleText('On to the mission, Good hunting.') BM.SetEventTime(40) BM.Set3DMode(1) BM.SetBriefingMode(0) # leave briefing mode BM.PlayAudio('tension1',0) # name, seek time from beginning of song BM.Resume() # resumes game Index: SurfAir.py =================================================================== RCS file: /cvsroot/gcblue/gcb_data/scenario/SurfAir.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SurfAir.py 1 Jan 2004 23:40:34 -0000 1.1 --- SurfAir.py 5 Jan 2004 02:50:33 -0000 1.2 *************** *** 107,111 **** BM.ConsoleText('Your cruiser is armed with SAMs and SSMs'); BM.TrackCamera('Grizzly 1', 10.0, 100.0, -100.0, 1500.0, -50.0, 150.0, 100.0) ! BM.Text3D('CRUISER', 10.0, 0.7, 0.5, 24.0, 1) BM.SetEventTime(22) --- 107,111 ---- BM.ConsoleText('Your cruiser is armed with SAMs and SSMs'); BM.TrackCamera('Grizzly 1', 10.0, 100.0, -100.0, 1500.0, -50.0, 150.0, 100.0) ! BM.Text3D('CRUISER', 10.0, 0.5, 0.2, 24.0, 1) BM.SetEventTime(22) *************** *** 114,118 **** BM.ConsoleText('The 4 key will active afterburners') BM.FlybyCamera('Laser 1', 4.0, 80, 120, 15, 5, 50, 65) ! BM.Text3D('MIG25', 4.0, 0.7, 0.5, 24.0, 1) BM.SetEventTime(26) --- 114,118 ---- BM.ConsoleText('The 4 key will active afterburners') BM.FlybyCamera('Laser 1', 4.0, 80, 120, 15, 5, 50, 65) ! BM.Text3D('MIG25', 4.0, 0.5, 0.2, 24.0, 1) BM.SetEventTime(26) *************** *** 120,124 **** BM.ConsoleText('Your Harrier provides strike support to take out the destroyer.') BM.FlybyCamera('Striker 1', 5.0, 80, 120, 15, 5, 50, 65) ! BM.Text3D('HARRIER', 5.0, 0.7, 0.5, 24.0, 1) BM.SetEventTime(31) --- 120,124 ---- BM.ConsoleText('Your Harrier provides strike support to take out the destroyer.') BM.FlybyCamera('Striker 1', 5.0, 80, 120, 15, 5, 50, 65) ! BM.Text3D('HARRIER', 5.0, 0.5, 0.2, 24.0, 1) BM.SetEventTime(31) |