From e715fd4e70f04edb212b4ae1ed383ad63fabc3d3 Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Fri, 24 Oct 2014 21:57:05 +0200 Subject: [PATCH] Krakatoa: new goal and intro sequence --- planet/Worlds.ocf/AcidRift.ocs/Scenario.txt | 2 +- planet/Worlds.ocf/Chine.ocs/Script.c | 2 - planet/Worlds.ocf/Info.txt | 12 +- planet/Worlds.ocf/Krakatoa.ocs/DescDE.rtf | Bin 1286 -> 3709 bytes planet/Worlds.ocf/Krakatoa.ocs/DescUS.rtf | Bin 1174 -> 3521 bytes planet/Worlds.ocf/Krakatoa.ocs/Map.c | 6 +- planet/Worlds.ocf/Krakatoa.ocs/Scenario.txt | 3 +- planet/Worlds.ocf/Krakatoa.ocs/Script.c | 99 ++++----- .../Worlds.ocf/Krakatoa.ocs/StringTblDE.txt | 4 + .../Worlds.ocf/Krakatoa.ocs/StringTblUS.txt | 4 + .../Krakatoa.ocs/System.ocg/Airplane.c | 41 ++++ .../Krakatoa.ocs/System.ocg/SeqIntro.c | 192 ++++++++++++++++++ .../Krakatoa.ocs/System.ocg/StringTblDE.txt | 8 + .../Krakatoa.ocs/System.ocg/StringTblUS.txt | 8 + .../Krakatoa.ocs/System.ocg/WallKit.c | 12 ++ planet/Worlds.ocf/Krakatoa.ocs/Title.txt | 4 +- 16 files changed, 324 insertions(+), 73 deletions(-) create mode 100644 planet/Worlds.ocf/Krakatoa.ocs/System.ocg/Airplane.c create mode 100644 planet/Worlds.ocf/Krakatoa.ocs/System.ocg/SeqIntro.c create mode 100644 planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblDE.txt create mode 100644 planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblUS.txt create mode 100644 planet/Worlds.ocf/Krakatoa.ocs/System.ocg/WallKit.c diff --git a/planet/Worlds.ocf/AcidRift.ocs/Scenario.txt b/planet/Worlds.ocf/AcidRift.ocs/Scenario.txt index db574b5b1..f12dc61a1 100644 --- a/planet/Worlds.ocf/AcidRift.ocs/Scenario.txt +++ b/planet/Worlds.ocf/AcidRift.ocs/Scenario.txt @@ -2,7 +2,7 @@ Icon=36 Title=AcidRift Version=5,4,0,0 -Difficulty=50 +Difficulty=60 [Definitions] Definition1=Objects.ocd diff --git a/planet/Worlds.ocf/Chine.ocs/Script.c b/planet/Worlds.ocf/Chine.ocs/Script.c index 653518520..49d181b85 100644 --- a/planet/Worlds.ocf/Chine.ocs/Script.c +++ b/planet/Worlds.ocf/Chine.ocs/Script.c @@ -41,8 +41,6 @@ protected func OnGoalsFulfilled() return false; } -public func UpdatePicture() { Log("bla"); } - /*-- Player Initialization --*/ diff --git a/planet/Worlds.ocf/Info.txt b/planet/Worlds.ocf/Info.txt index 10f4753bd..4f974070c 100644 --- a/planet/Worlds.ocf/Info.txt +++ b/planet/Worlds.ocf/Info.txt @@ -37,15 +37,15 @@ Difficulty: Medium (40) Duration: 60 - 90 minutes Description: Players have to transport a cannon up a chine carved out by a waterfall. -[Acid Rift] -Difficulty: Medium (50) -Duration: 60 - 100 minutes -Description: A rift is slowly filled by acid rain, gems need to be mined from an acid lake. - [Conquest of Krakatoa] +Difficulty: Medium (50) +Duration: 60 - 120 minutes +Description: A large volcano needs to be conquered and gold needs to be extracted from its core. + +[Acid Rift] Difficulty: Medium (60) Duration: 60 - 100 minutes -Description: A large volcano needs to be conquered and gold needs to be extracted from its core. +Description: A rift is slowly filled by acid rain, gems need to be mined from an acid lake. [Gem Grabbers] Difficulty: Hard (80) diff --git a/planet/Worlds.ocf/Krakatoa.ocs/DescDE.rtf b/planet/Worlds.ocf/Krakatoa.ocs/DescDE.rtf index 8a156e8acbb18720e0ac09005e0ccb8446270b78..313f3b308cabe7f0a094b8819a761d6706e11365 100644 GIT binary patch literal 3709 zcmd^BO>^5e5WV|Xpr^DMkA|cqO0G|7Z6|HgG-IbdWN-n=C5Z?GRRFYXdGz1=mZW4S zb~Eiv4w>me!eX)5&$kQSNf*jkD(kf@s4S;aVKK^9ag@xD?qu285HbTIlBH`KWo5Z` ze>dxU5G2#5EsgrOy#RyeDSpSg(G6&US|2w`%gW%m)oIMd23pSVx3AyMI}<^alyoYjDkEV8_os!Sy#s-z^ECwtxke4osu8o;)UrD-7y1orHKJDrNRt!o$! z>}EWdK2x5G7IF1n#wj?-3_BGkY?#(|Zz0_igQ?|cfWd&`y+R1^aa7D|9w|1-aw)xO zIul}?_eN&GJF+8wYKz;Eao#o!*}y&P==ZYJIYH$$Fp@5kSv*_JcRL91ql0(K6>@Eqwt|PpH!(G2xS6LZ{^NK$azo-aTH@^aM+qOj%31jHY)o!&_NgCS2}FzSag7fm(-aTOFX3S?8{x z$z&qlyEbeEzC){j+2vFIH_yf_vSI4u?ibmzNhaa6N2#=k>SpfSA0_?uf zjX+l+j){0-yeRY#jo5bk_(VpPwiY=U^lDh`6_y7-(6-RPAx*?N=G9Ar5p8`oI&s}P zXm%pwB+t^pb;2tES+@8_U8`fEI#eZtmKAFf8|@016vzp}F&)=z!m9InqmeDA%5sd1 z#Z_1KNn9D?vfzX{ea!X2Y7KoA8GUISF{-~*t=@fl4xAKdQ`E~qwe zm5awV3bIywqyj8H30%4%KPASY0iZRs|BCN7BqGBH5Z8O#apo9aoK7fFp6d&VbCgDf z?Xfs>_u#HH@hmXJfs4IU1Yu5}k$t qQFLf1abZ*ioHCLG%E6Q53KKv%-6Fl)j-jfFYcS=8BKyOb@!j8?r7vIr delta 397 zcmXYt&q~8U5XOaGY-*to(8Kg%{R3?h+Dhq7kRHT~2wvv0$?hhxn`znIw9r!Uq&Gow z@a}W?Al|+E27;R?Ec1Q4GxLLQf4WcJaEIE;02!IAF7YY}!f}XPNa^oTF3H+RIpd?G zOubIKvwhp!;Ta}^gl2ZB;l@ZScxGWd7zKmSopIpL_PEZ(W|0veVG#$oVw#u3!@GOM zC<&$*)l3uma4EK%jFN&9;KIPQW(#InVKDNmt+t2K1e1STVbHM9_tB{EV&ZCEC>uce z(mZbT#i;yfKAt$GL}hU*a=0zh9C%^3g1CUW!oG~-g?Yeg*m$Pl?&Y_4?sQW2T2$*> zYg)rTTYlZ|9KFw7pGXjFiyW@BT&e_Q1xvMi+z8DD4dBW^T9GNSz?5=%)=L7OX<$*W U&QN}}pF4dn1)ct7avyr|3;XkhcK`qY diff --git a/planet/Worlds.ocf/Krakatoa.ocs/DescUS.rtf b/planet/Worlds.ocf/Krakatoa.ocs/DescUS.rtf index dccfb724006f5f22c0b622fbfaa26d34660b35e6..f8105b928d56fdac478ef5b6537da5967df848b7 100644 GIT binary patch literal 3521 zcmd^COK;pZ5Wf3Yu&1=ab|Gn>u1`&aq(zIgsB{6scQr=w~```PGv}?Pu z8|08ffL_GmaNaYVq3&czbuN{QMpjhUGpVpx#QjNv7&ZYGrMgX6BXVdF9o z1-kjfX%~$9#Ig2mOD^%94fK0m8%+>-gBn?`ig`X?EsjTSK1r3UBD;_`hIUaaOGTa` z>n~-usiH<*V>5u+xb%_ciyZJS?p&r@OYDWGe41)=glDA zq4>pXsul7suK8+Q9gi32grSWM+T*=R&ZFKt)lq0hl>@vRO&Qcb=)Q;2gVq6xq*H~I zZJkGsdDlDKge_I<8uFySsE2iO<=+zDm{dSn0}3%|ba@7y3R01)Dz8yv4@V527#MWH z>Wh2pRH$TUm2rZb$5+uc9$O*Pez9EQo9D9`FDukT+84!g#mjm&$1hF_l;zlCwkie8B} zM&CEROBA9=9>Pt8g*e%m8@2~6L(^3J<$KYpEo2!qA`ugHQDB}h2MLWw9tH4KibYiu zQT9pfjMLByxgZ&wI5|aeirFUcP{q7~9S7e}gc6-0&|@FaSRu2A|9Gqc>daYVAIyLrGQcoZH?J5fu(8#|HjZ(2!6mY zWe>n9O4^`bf}HlG`$S{xQP>f|s0il>6g4nuD&9jHv1JZ1!CRZztdBHd1dka=0=1wJ zd>GwO?jVpx4km(y)Rvs9r0i6@Lj2eQ1(|63wW)YEr$!CvAS$Yi9$wZHQ3Z2@I3q4` z%TfkWfg%sa*lSIZoW-?iAwVKd{2}8vp-~;$h zCR>H!-OI(nbXHj(;ds=0Jor} zm7YcC(Nj=S3KLPitjLn4s`08j!mE+v)>u)&zzOV`7pHFa{FcdN1#3u$RG=8$JNq)o z5Rp^p(X(xWGFVT|DzBAAnj_7h%^a|9G=j%I1qh5{456oOlXN%qk)Q`@gG9>d1q$4G dzA;v#jbw3wzJBKKmsb<)bXShW8JnKE_yzhdUeN#m diff --git a/planet/Worlds.ocf/Krakatoa.ocs/Map.c b/planet/Worlds.ocf/Krakatoa.ocs/Map.c index 544145204..80e9f219e 100644 --- a/planet/Worlds.ocf/Krakatoa.ocs/Map.c +++ b/planet/Worlds.ocf/Krakatoa.ocs/Map.c @@ -1,8 +1,6 @@ /** - Krakatoa - A Volcano with lot's of small islands and chasms. - - TODO: Scaling with mapsize. + Krakatoa's Krach + A Volcano with one main chasm and a few side chasms. @author Maikel */ diff --git a/planet/Worlds.ocf/Krakatoa.ocs/Scenario.txt b/planet/Worlds.ocf/Krakatoa.ocs/Scenario.txt index 75dbd5bff..abec6a0cd 100644 --- a/planet/Worlds.ocf/Krakatoa.ocs/Scenario.txt +++ b/planet/Worlds.ocf/Krakatoa.ocs/Scenario.txt @@ -2,10 +2,11 @@ Icon=23 Title=Krakatoa Version=5,4,0,0 -Difficulty=60 +Difficulty=50 [Definitions] Definition1=Objects.ocd +Definition2=Decoration.ocd\Misc.ocd\AltMaterials.ocd [Player1] Crew=Clonk=2 diff --git a/planet/Worlds.ocf/Krakatoa.ocs/Script.c b/planet/Worlds.ocf/Krakatoa.ocs/Script.c index 1d16e8eff..1e811c05e 100644 --- a/planet/Worlds.ocf/Krakatoa.ocs/Script.c +++ b/planet/Worlds.ocf/Krakatoa.ocs/Script.c @@ -1,23 +1,29 @@ /** - Krakatoa - Players are challenged to build up a settlement on top of an active volcano. - The goal is to expand your reign by building flags to cover the landscape. - Also you need to gather some gold to show your skills of entering a volcano. + Krakatoa's Krach + Players are challenged to build up a settlement on top of an active volcano + after their airplane crashed. They need to gather gold from the core of the + volcano to show your skills of entering a volcano. The gold bars need to be + transported out by a newly constructed airplane. @author Maikel */ -static volcano_location; -static plr_init; +// Whether the intro has been initialized. +static intro_init; protected func Initialize() { - // Create expansion and wealth goal. - var goal = CreateObject(Goal_Wealth); - goal->SetWealthGoal(100 + 100 * SCENPAR_Difficulty); - goal = CreateObject(Goal_Expansion); - goal->SetExpansionGoal(200 + 50 * SCENPAR_Difficulty); + // Goal: construct an airplane and fill it with gold bars. + var goal = CreateObject(Goal_Script); + // Add an effect to check whether the goal is fulfilled. + var effect = AddEffect("GoalCheck", nil, 100, 2, nil); + effect.goal = goal; + effect.barcnt = 8 * SCENPAR_Difficulty; + // Set goal name and description. + goal.Name = "$GoalName$"; + goal.Description = Format("$GoalDesc$", effect.barcnt); + // Some rules. CreateObject(Rule_TeamAccount); @@ -43,16 +49,10 @@ protected func Initialize() protected func InitializePlayer(int plr) { - // Move all crew to start position. - var index = 0, crew; - while (crew = GetCrew(plr, index++)) - crew->SetPosition(volcano_location[0] + RandomX(-5, 5), volcano_location[1]); - // Give only the first joined player some wealth. - if (!plr_init) - { - SetWealth(plr, 50); - plr_init = true; - } + // Set zoom range. + SetPlayerZoomByViewRange(plr, 500, nil, PLRZOOM_Direct | PLRZOOM_LimitMax); + SetPlayerViewLock(plr, true); + // Give the player its knowledge and base materials. GivePlayerBasicKnowledge(plr); GivePlayerPumpingKnowledge(plr); @@ -64,7 +64,7 @@ protected func InitializePlayer(int plr) GivePlayerElementaryBaseMaterial(plr); // Give crew some equipment. - var index = 0; + var index = 0, crew; while (crew = GetCrew(plr, index++)) { if (index == 1) @@ -73,38 +73,34 @@ protected func InitializePlayer(int plr) crew->CreateContents(Axe); crew->CreateContents(Shovel); } - // Harsh zoom range. - SetPlayerZoomByViewRange(plr, 5000, nil, PLRZOOM_Direct | PLRZOOM_LimitMax); - SetPlayerViewLock(plr, true); + + // Initialize the intro sequence if not yet started. + if (!intro_init) + { + StartSequence("Intro", 0, SCENPAR_Difficulty); + intro_init = true; + // Give only the first joined player some wealth. + SetWealth(plr, 75 - 25 * SCENPAR_Difficulty); + } return; } -// Returns a suitable location to start the conquest. -private func FindVolcanoLocation() + +/*-- Goal Check --*/ + +global func FxGoalCheckTimer(object target, proplist effect) { - // Default to the middle of the map. - var wdt = LandscapeWidth(); - var hgt = LandscapeHeight(); - volcano_location = [wdt / 2, hgt / 2]; - var x, y, cnt = 1000; - for (var i = cnt; i > 0; i--) + // Complete goal if there is an airplane with the required amount of gold bars. + for (var plane in FindObjects(Find_ID(Plane), Find_Not(Find_Func("IsBroken")))) { - // Random x coordinate, biased to the middle of the map. - var var_wdt = wdt * (300 - 200 * i / cnt) / 400; - var x = wdt / 2 + RandomX(-var_wdt, var_wdt); - var y = 0; - // Find corresponding y coordinate. - while (!GBackSolid(x, y) && y < 9 * hgt / 10) - y += 2; - // Check if surface is relatively flat (check for flatter surfaces first). - var d = i / 150 + 1; - if (!GBackSolid(x+d, y-4) && !GBackSolid(x-d, y-4) && GBackSolid(x+d, y+4) && GBackSolid(x-d, y+4)) + if (plane->ContentsCount(GoldBar) >= effect.barcnt) { - volcano_location = [x, y - 10]; - break; + if (effect.goal) + effect.goal->Fulfill(); + return -1; } } - return; + return 1; } @@ -182,17 +178,6 @@ private func InitAnimals() private func InitMaterial(int amount) { - // Find start location and place lorry plus extras there. - FindVolcanoLocation(); - var lorry = CreateObject(Lorry); - lorry->SetPosition(volcano_location[0], volcano_location[1]); - lorry->CreateContents(Loam, 5); - lorry->CreateContents(Bread, 5); - lorry->CreateContents(Wood, 8); - lorry->CreateContents(Rock, 4); - lorry->CreateContents(Metal, 4); - for (var i = 0; i < 5; i++) - lorry->CreateContents(Barrel)->PutLiquid("Water", 300); return; } diff --git a/planet/Worlds.ocf/Krakatoa.ocs/StringTblDE.txt b/planet/Worlds.ocf/Krakatoa.ocs/StringTblDE.txt index cd3997b94..ff91b904f 100644 --- a/planet/Worlds.ocf/Krakatoa.ocs/StringTblDE.txt +++ b/planet/Worlds.ocf/Krakatoa.ocs/StringTblDE.txt @@ -1,3 +1,7 @@ +# Goal name and description +GoalName=Gold Transport +GoalDesc=Construct an airplane and load it with %d gold bars to transport them to a safe location. + # Scenario parameters: difficulty Difficulty=Schwierigkeit DescDifficulty=Setzt die Schwierigkeit dieser Runde. diff --git a/planet/Worlds.ocf/Krakatoa.ocs/StringTblUS.txt b/planet/Worlds.ocf/Krakatoa.ocs/StringTblUS.txt index ec0653e17..58a4c5555 100644 --- a/planet/Worlds.ocf/Krakatoa.ocs/StringTblUS.txt +++ b/planet/Worlds.ocf/Krakatoa.ocs/StringTblUS.txt @@ -1,3 +1,7 @@ +# Goal name and description +GoalName=Gold Transport +GoalDesc=Construct an airplane and load it with %d gold bars to transport them to a safe location. + # Scenario parameters: difficulty Difficulty=Difficulty DescDifficulty=Sets this round's difficulty. diff --git a/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/Airplane.c b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/Airplane.c new file mode 100644 index 000000000..81b44c443 --- /dev/null +++ b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/Airplane.c @@ -0,0 +1,41 @@ +// The airplane acts as a container for gold bars and starting material. + +#appendto Plane + + +public func IsContainer() { return true; } + +private func MaxContentsCount() +{ + return 25; +} + +protected func RejectCollect(id object_id, object obj) +{ + // Objects can collected if gold bar and not above max contents count. + if (ContentsCount() < MaxContentsCount() && object_id == GoldBar) + return false; + return true; +} + +// The plane may be broken, which prevents entering it. +local broken; + +public func MakeBroken() +{ + broken = true; + SetEntrance(false); + return; +} + +public func IsBroken() +{ + return broken; +} + +public func ActivateEntrance(object clonk) +{ + if (IsBroken()) + return; + return _inherited(clonk, ...); +} \ No newline at end of file diff --git a/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/SeqIntro.c b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/SeqIntro.c new file mode 100644 index 000000000..5bf5a8b60 --- /dev/null +++ b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/SeqIntro.c @@ -0,0 +1,192 @@ +// Intro sequence for Krakatoa: Players crash with an airplane on the slope of the volcano. + +#appendto Sequence + +public func Intro_Init(int difficulty) +{ + // Set wind to the left, so that less lava is on the starting place. + SetWind(-50 - Random(50)); + + // Determine crater lava height. + var lava_y = 0; + while (!GBackLiquid(LandscapeWidth() / 2, lava_y) && lava_y < LandscapeHeight()) + lava_y++; + + // Create an airplane with pilot and fly it towards the peak. + this.airplane = CreateObject(Plane, LandscapeWidth() / 2 - 564, lava_y - 176); + this.pilot = CreateObject(Clonk, LandscapeWidth() / 2 - 564, lava_y - 176); + this.pilot->SetName("$PilotName$"); + this.pilot->SetSkin(2); + this.pilot->Enter(this.airplane); + this.pilot->SetAction("Walk"); + this.pilot->SetDir(DIR_Right); + this.pilot->SetColor(0xff0000aa); + this.airplane->FaceRight(); + this.airplane->StartInstantFlight(90, 15); + this.airplane->SetXDir(12); + this.airplane->SetYDir(-1); + this.airplane->MakeInvincible(); + this.airplane.intro_seq = this; + // Fill the airplane with some materials. + this.difficulty = difficulty; + if (difficulty <= 2) + { + this.airplane->CreateContents(Loam, 5); + this.airplane->CreateContents(Bread, 5); + this.airplane->CreateContents(Wood, 8); + this.airplane->CreateContents(Rock, 4); + this.airplane->CreateContents(Metal, 4); + if (difficulty <= 1) + { + this.airplane->CreateContents(Pickaxe, 2); + for (var i = 0; i < 5; i++) + this.airplane->CreateContents(Barrel)->PutLiquid("Water", 300); + } + } + return; +} + +public func Intro_Start() +{ + return ScheduleNext(4); +} + +public func Intro_JoinPlayer(int plr) +{ + // Move player's crew into the plane. + var j = 0, crew; + while (crew = GetCrew(plr, j++)) + { + crew->Enter(this.airplane); + crew->SetAction("Walk"); + } + // Increase zoom. + SetPlayerZoomByViewRange(plr, 700, nil, PLRZOOM_Set | PLRZOOM_LimitMax); + SetViewTarget(this.pilot); + return; +} + +public func Intro_1() +{ + // Prepare players for drop. + MessageBoxAll("$MsgNearVolcano$", this.pilot, true); + return ScheduleNext(108); +} + +public func Intro_2() +{ + // Determine crater lava height. + var lava_y = 0; + while (!GBackLiquid(LandscapeWidth() / 2, lava_y) && lava_y < LandscapeHeight()) + lava_y++; + // Launch a big eruption from this location. + AddEffect("BigEruption", nil, 100, 1, nil, nil, LandscapeWidth() / 2, lava_y - 2); + return ScheduleNext(12); +} + +public func Intro_3() +{ + // Message about volcano eruption. + MessageBoxAll("$MsgEruption$", this.pilot, true); + return ScheduleNext(23); +} + +public func Intro_4() +{ + // Determine crater lava height. + var lava_y = 0; + while (!GBackLiquid(LandscapeWidth() / 2, lava_y) && lava_y < LandscapeHeight()) + lava_y++; + // Launch the killing chunk. + this.chunk = CreateObject(LavaChunk, LandscapeWidth() / 2, lava_y); + this.chunk->SetSpeed(36, -100); + return ScheduleNext(28); +} + +public func Intro_5() +{ + // Explide lava chunk at plane location. + this.chunk->Explode(36); + // Destroy and fling the plane. + this.airplane->SetMeshMaterial("CrashedAirplane"); + this.airplane->MakeBroken(); + this.airplane->CancelFlight(); + RemoveEffect("IntPlane", this.airplane); + this.airplane->SetRDir(10); + this.airplane->SetSpeed(46, -56); + // Forward plane hit call to sequence. + this.plane_hitcall = this.airplane.Hit; + this.airplane.Hit = this.Intro_PlaneHit; + // Eject message. + MessageBoxAll("$MsgEject$", this.pilot, true); + SetViewTarget(this.airplane); + return ScheduleNext(24); +} + +public func Intro_6() +{ + // Let pilot get away in boompack. + this.pilot->Exit(); + var boompack = this.pilot->CreateObject(Boompack); + boompack->SetFuel(1000); + boompack->SetDirectionDeviation(8); + boompack->SetControllable(false); + boompack->Launch(40, this.pilot); + ScheduleCall(boompack, "RemoveObject", 100); + ScheduleCall(this.pilot, "RemoveObject", 100); + // Rest of intro will be triggered on plane hit. + return true; +} + +public func Intro_PlaneHit() +{ + // Plane hit ground! Continue sequence. + Sound("PlaneCrash", true); + var particles = Particles_Smoke(true); + particles.Size = PV_Linear(PV_Random(20, 60), PV_Random(50, 100)); + CreateParticle("Smoke", PV_Random(-30,30), PV_Random(-30,30), PV_Random(-60, 60), PV_Random(-20,0), PV_Random(200, 500), particles, 20); + particles.Size = PV_Linear(PV_Random(50, 80), PV_Random(100, 200)); + CreateParticle("Smoke", PV_Random(-30,30), PV_Random(-30,30), PV_Random(-20, 20), PV_Random(-20,0), PV_Random(100, 200), particles, 20); + for (var i = 0; i < GetPlayerCount(C4PT_User); ++i) + { + var plr = GetPlayerByIndex(i, C4PT_User); + var icrew = 0, crew; + while (crew = GetCrew(plr, icrew++)) + { + crew->Exit(0,-5, 0, 1 + Random(2), Random(3) - 5); + crew->SetAction("Tumble"); + crew->ClearInvincible(); + crew->DoEnergy(-this.intro_seq.difficulty * RandomX(5, 8)); + crew->MakeInvincible(); + } + } + // Stop plane movement and rotate for crash effect. + SetXDir(0); + this.Hit = this.intro_seq.plane_hit; + this.MeshTransformation=Trans_Mul(Trans_Rotate(10,0,2,1), Plane.MeshTransformation); + this.intro_seq->ScheduleNext(50); + return true; +} + +public func Intro_7() +{ + // Message from first clonk to other crew members. + for (var i = 0; i < GetPlayerCount(C4PT_User); ++i) + { + var plr = GetPlayerByIndex(i, C4PT_User); + MessageBox("$MsgConstructPlane$", GetCrew(plr, 0), GetCrew(plr, 0), plr, true); + } + return ScheduleNext(12); +} + +public func Intro_8() +{ + return Stop(); +} + +public func Intro_Stop() +{ + // Reset player zoom. + SetPlayerZoomByViewRange(NO_OWNER, 500, nil, PLRZOOM_Set | PLRZOOM_LimitMax); + return true; +} \ No newline at end of file diff --git a/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblDE.txt b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblDE.txt new file mode 100644 index 000000000..443bcc80c --- /dev/null +++ b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblDE.txt @@ -0,0 +1,8 @@ +# Pilot Name +PilotName=Kapit�n Wilbur + +# Intro sequence messages +MsgNearVolcano=We are almost at the volcano's crater, did you know its core is made out of gold? +MsgEruption=Oh no! The volcano erupts, prepare for emergency landing. +MsgEject=We have been hit ... eject! eject! +MsgConstructPlane=Seems our pilot is gone and the plane is broken. Let's construct a new plane, fill it with gold bars and get out of here. diff --git a/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblUS.txt b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblUS.txt new file mode 100644 index 000000000..6cd9be7e0 --- /dev/null +++ b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/StringTblUS.txt @@ -0,0 +1,8 @@ +# Pilot Name +PilotName=Captain Wilbur + +# Intro sequence messages +MsgNearVolcano=We are almost at the volcano's crater, did you know its core is made out of gold? +MsgEruption=Oh no! The volcano erupts, prepare for emergency landing. +MsgEject=We have been hit ... eject! eject! +MsgConstructPlane=Seems our pilot is gone and the plane is broken. Let's construct a new plane, fill it with gold bars and get out of here. \ No newline at end of file diff --git a/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/WallKit.c b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/WallKit.c new file mode 100644 index 000000000..58fabf04f --- /dev/null +++ b/planet/Worlds.ocf/Krakatoa.ocs/System.ocg/WallKit.c @@ -0,0 +1,12 @@ +// The wall kit produces rock walls, because granite is indestructible. + +#appendto WallKit + +private func CreateBridge(object clonk, int x, int y) +{ + var c = Offset2BridgeCoords(clonk, x, y); + x=clonk->GetX(); y=clonk->GetY(); + DrawMaterialQuad("Rock-rock", x+c.x1-c.dx,y+c.y1-c.dy, x+c.x1+c.dx,y+c.y1+c.dy, x+c.x2+c.dx,y+c.y2+c.dy, x+c.x2-c.dx,y+c.y2-c.dy, DMQ_Bridge); + clonk->Sound("WallKitLock"); + return true; +} \ No newline at end of file diff --git a/planet/Worlds.ocf/Krakatoa.ocs/Title.txt b/planet/Worlds.ocf/Krakatoa.ocs/Title.txt index dfc550229..fc562939d 100644 --- a/planet/Worlds.ocf/Krakatoa.ocs/Title.txt +++ b/planet/Worlds.ocf/Krakatoa.ocs/Title.txt @@ -1,2 +1,2 @@ -DE:Bezwingung des Krakataus -US:Conquest of Krakatoa \ No newline at end of file +DE:Krakatau's Krach +US:Krakatoa's Krach \ No newline at end of file