tutorial 8: explains pump, wallkit, liquids

shapetextures
Maikel de Vries 2015-12-20 16:41:50 +01:00
parent 414d1c4e3a
commit aee8a5f20f
15 changed files with 910 additions and 0 deletions

View File

@ -0,0 +1,31 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq0\fcharset128 Arial;}{\f5\froman\fprq0\fcharset128 Liberation Serif{\*\falt Times New Roman};}{\f6\fswiss\fprq0\fcharset128 Liberation Sans{\*\falt Arial};}{\f7\fnil\fprq0\fcharset128 Liberation Serif{\*\falt Times New Roman};}{\f8\fnil\fprq0\fcharset128 FreeSans;}{\f9\fnil\fprq2\fcharset0 FreeSans;}{\f10\fswiss\fprq0\fcharset128 FreeSans;}{\f11\fnil\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033 Normal;}
{\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af9\afs28\alang1081\loch\f6\fs28\lang1033 Heading;}
{\s16\sbasedon0\snext16\sl288\slmult1\ql\nowidctlpar\sb0\sa140\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033 Text Body;}
{\s17\sbasedon16\snext17\sl288\slmult1\ql\nowidctlpar\sb0\sa140\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1033 List;}
{\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\cf1\i\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\ai\loch\f5\fs24\lang1033 Caption;}
{\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1033 Index;}
}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67241986}}\deftab720
\viewscale120
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}}
\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033{\cf1\b\rtlch \ltrch\loch\fs20\loch\f4
Wasserwerk}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033\cf1\b\rtlch \ltrch\loch\fs20\loch\f4
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033{\cf1\b0\rtlch \ltrch\loch\fs16\loch\f4
You were sent to the mine where the villagers of Wipfville get their metal supplies. Unfortunately the mine got flooded as a dike broke during a recent disaster. The chief of the mining operation tells you the mine is still in operation, but they have trouble getting the metal out of the mine. This is where you come in: help the miners salvage their lorries filled with metal.}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033{\cf1\b0\rtlch \ltrch\loch\fs16\loch\f4
Goal: Salvage the lorry from the flooded mine.}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033{\cf1\b0\rtlch \ltrch\loch\fs16\loch\f4
Tutorial explains: Pump and liquids, elevator, wall kits}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1033\rtlch \ltrch\loch
\par }

View File

@ -0,0 +1,31 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq0\fcharset128 Arial;}{\f5\froman\fprq0\fcharset128 Times New Roman;}{\f6\fswiss\fprq0\fcharset128 Arial;}{\f7\fnil\fprq0\fcharset128 Liberation Serif{\*\falt Times New Roman};}{\f8\fnil\fprq0\fcharset128 FreeSans;}{\f9\fnil\fprq2\fcharset0 FreeSans;}{\f10\fswiss\fprq0\fcharset128 FreeSans;}{\f11\fnil\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043 Normal;}
{\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af9\afs28\alang1081\loch\f6\fs28\lang1043 Heading;}
{\s16\sbasedon0\snext16\sl288\slmult1\ql\nowidctlpar\sb0\sa120\ltrpar\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043 Text Body;}
{\s17\sbasedon16\snext17\sl288\slmult1\ql\nowidctlpar\sb0\sa120\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043 List;}
{\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\cf1\i\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\ai\loch\f5\fs24\lang1043 Caption;}
{\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\cf1\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang1043 Index;}
}{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67241986}}\deftab720
\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}}
\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043{{\*\bkmkstart __DdeLink__20_1625228384}{\*\bkmkend __DdeLink__20_1625228384}\cf1\b\rtlch \ltrch\loch\fs20\lang1033\loch\f4
Waterworks}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043\cf1\b\rtlch \ltrch\loch\fs20\lang1033\loch\f4
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
You were sent to the mine where the villagers of Wipfville get their metal supplies. Unfortunately the mine got flooded as a dike broke during a recent disaster. The chief of the mining operation tells you the mine is still in operation, but they have trouble getting the metal out of the mine. This is where you come in: help the miners salvage their lorries filled with metal.}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043{\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Goal: Salvage the lorry from the flooded mine.}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043\cf1\rtlch \ltrch\loch
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043{{\*\bkmkstart __DdeLink__20_16252283841}{\*\bkmkend __DdeLink__20_16252283841}\cf1\b0\rtlch \ltrch\loch\fs16\lang1033\loch\f4
Tutorial explains: Pump and liquids, elevator, wall kits}
\par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf1\kerning1\dbch\af7\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang1043\rtlch \ltrch\loch
\par }

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,23 @@
[Head]
Icon=9
Title=Tutorial08
Version=6,0
MaxPlayer=1
Difficulty=8
[Definitions]
Definition1=Objects.ocd
[Player1]
Crew=Clonk=1
[Landscape]
BottomOpen=1
Sky=Clouds1
SkyScrollMode=2
[Weather]
Climate=0,0,0,100
StartSeason=0,0,0,100
YearSpeed=0,0,0,100
Wind=60,20,40,80

View File

@ -0,0 +1,482 @@
/**
Tutorial 08: Waterworks
Author: Maikel
Rescue the lorry filled with metal from the flooded mine.
Following controls and concepts are explained:
* Pump and liquid system
* Elevator
* Wallkits
*/
static guide; // guide object
protected func Initialize()
{
// Tutorial goal.
var goal = CreateObject(Goal_Tutorial);
goal.Name = "$MsgGoalName$";
goal.Description = "$MsgGoalDescription$";
// Place objects in different sections.
InitVillage();
InitMines();
InitVegetation();
InitAnimals();
InitAI();
// Dialogue options -> repeat round.
SetNextMission("Tutorials.ocf\\Tutorial08.ocs", "$MsgRepeatRound$", "$MsgRepeatRoundDesc$");
return;
}
// Gamecall from goals, set next mission.
protected func OnGoalsFulfilled()
{
// Achievement: Tutorial completed.
GainScenarioAchievement("TutorialCompleted", 3);
// Dialogue options -> next round.
SetNextMission("Tutorials.ocf\\Tutorial09.ocs", "$MsgNextTutorial$", "$MsgNextTutorialDesc$");
// Normal scenario ending by goal library.
return false;
}
private func InitVillage()
{
// A small forest for decoration.
Grass->Place(85, Rectangle(0, 160, 200, 100));
Tree_Deciduous->Place(12, Rectangle(0, 160, 200, 100));
Flower->Place(5, Rectangle(0, 160, 200, 100));
// Windgenerators, a flag, a pump and an elevator.
CreateObjectAbove(WindGenerator, 156, 192)->MakeInvincible();
CreateObjectAbove(WindGenerator, 180, 192)->MakeInvincible();
CreateObjectAbove(Flagpole, 206, 192)->MakeInvincible();
CreateObjectAbove(Pump, 228, 192)->MakeInvincible();
var elevator = CreateObjectAbove(Elevator, 274, 192);
elevator->CreateShaft(15);
elevator->MakeInvincible();
elevator->GetCase()->MakeInvincible();
// A chest with two pipes.
var chest = CreateObjectAbove(Chest, 206, 192);
chest->CreateContents(Pipe, 2);
chest.Plane = chest.Plane + 1;
chest->MakeInvincible();
return;
}
private func InitMines()
{
// First platform with elevator, workshop and chemical lab for explosives.
var elevator = CreateObjectAbove(Elevator, 538, 816);
elevator->CreateShaft(159);
elevator->MakeInvincible();
elevator->GetCase()->MakeInvincible();
var chemlab = CreateObjectAbove(ChemicalLab, 596, 816);
chemlab->CreateContents(Dynamite, 8);
chemlab->CreateContents(DynamiteBox, 4);
chemlab->MakeInvincible();
var lantern = chemlab->CreateContents(Lantern);
lantern->TurnOn();
var workshop = CreateObjectAbove(ToolsWorkshop, 652, 816);
workshop->CreateContents(Metal, 8);
workshop->CreateContents(Wood, 6);
workshop->MakeInvincible();
// Second platform with steam engine and foundry with metal lorry.
var engine = CreateObjectAbove(SteamEngine, 676, 888);
engine->CreateContents(Coal, 10);
engine->MakeInvincible();
var foundry = CreateObjectAbove(Foundry, 616, 888);
foundry->CreateContents(Ore, 12);
foundry->CreateContents(Coal, 12);
foundry->MakeInvincible();
var lantern = foundry->CreateContents(Lantern);
lantern->TurnOn();
var lorry = CreateObjectAbove(Lorry, 596, 886);
lorry->CreateContents(Metal, 32);
// Another lorry with coal and ore in the lower part of the mines.
var lorry = CreateObjectAbove(Lorry, 592, 974);
lorry->CreateContents(Ore, 8);
lorry->CreateContents(Coal, 16);
// Place some scattered coal and ore in the bottom mine shaft.
for (var cnt = 0; cnt < 6; cnt++)
{
CreateObjectAbove(Ore, RandomX(66, 92), 972);
CreateObjectAbove(Coal, RandomX(120, 198), 972);
CreateObjectAbove(Ore, RandomX(338, 474), 972);
}
return;
}
private func InitVegetation()
{
// Vegetation throughout the scenario.
PlaceObjects(Firestone, 25 + Random(5), "Earth");
PlaceObjects(Loam, 15 + Random(5), "Earth");
Mushroom->Place(10);
Branch->Place(14);
Trunk->Place(4);
// Some vegetation in the lake and flooded mine shaft.
Seaweed->Place(20);
Coral->Place(24);
return;
}
private func InitAnimals()
{
// Some fish in the lake and flooded mine shaft.
Fish->Place(25);
// Some small animals in the forest.
Butterfly->Place(12, Rectangle(0, 160, 200, 100));
Zaphive->Place(2, Rectangle(0, 160, 200, 100));
return;
}
// Initializes the AI: which is all defined in System.ocg
private func InitAI()
{
// A chief miner npc for requesting help.
var npc_chief = CreateObjectAbove(Clonk, 218, 192);
npc_chief->SetColor(0x999900);
npc_chief->SetName("Bill");
npc_chief->SetObjectLayer(npc_chief);
npc_chief->SetDir(DIR_Left);
npc_chief->SetDialogue("Chief", true);
// A miner npc for random conversation.
var npc_miner = CreateObjectAbove(Clonk, 360, 974);
npc_miner->SetColor(0x990099);
npc_miner->SetName("Demi");
npc_miner->SetObjectLayer(npc_miner);
npc_miner->SetSkin(1);
npc_miner->SetDir(DIR_Right);
npc_miner->SetDialogue("Miner");
// An explosive expert for hints on dynamite.
var npc_expert = CreateObjectAbove(Clonk, 604, 816);
npc_expert->SetColor(0x990000);
npc_expert->SetName("Deto");
npc_expert->SetObjectLayer(npc_expert);
npc_expert->SetSkin(2);
npc_expert->SetDir(DIR_Left);
npc_expert->SetDialogue("Expert");
return;
}
/*-- Player Handling --*/
protected func InitializePlayer(int plr)
{
// Position player's clonk.
var clonk = GetCrew(plr, 0);
clonk->SetPosition(40, 182);
clonk->SetDir(DIR_Right);
var effect = AddEffect("ClonkRestore", clonk, 100, 10);
effect.to_x = 40;
effect.to_y = 182;
// Items for the clonk.
clonk->CreateContents(Shovel);
// Take ownership of the flags.
for (var flag in FindObjects(Find_Or(Find_Func("IsFlagpole"), Find_ID(WindGenerator), Find_ID(SteamEngine))))
flag->SetOwner(plr);
// Knowledge to construct bow and arrow.
SetPlrKnowledge(plr, Pipe);
SetPlrKnowledge(plr, WallKit);
// Standard player zoom for tutorials, player is not allowed to zoom in/out.
SetPlayerViewLock(plr, true);
SetPlayerZoomByViewRange(plr, 400, nil, PLRZOOM_Direct | PLRZOOM_LimitMax);
// Create tutorial guide, add messages, show first.
guide = CreateObject(TutorialGuide, 0, 0, plr);
guide->AddGuideMessage("$MsgTutorialFloodedMines$");
guide->ShowGuideMessage(0);
var effect = AddEffect("TutorialTalkedToMineChief", nil, 100, 5);
effect.plr = plr;
return;
}
/*-- Intro, Tutorial Goal & Outro --*/
public func OnGoalCompleted(int plr)
{
var outro = AddEffect("GoalOutro", nil, 100, 5);
outro.plr = plr;
return;
}
global func FxGoalOutroStart(object target, proplist effect, int temp)
{
if (temp)
return FX_OK;
// Show guide message congratulating.
guide->AddGuideMessage("$MsgTutorialCompleted$");
guide->ShowGuideMessage(10);
return FX_OK;
}
global func FxGoalOutroTimer(object target, proplist effect, int time)
{
if (time >= 60)
{
var goal = FindObject(Find_ID(Goal_Tutorial));
goal->Fulfill();
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxGoalOutroStop(object target, proplist effect, int reason, bool temp)
{
if (temp)
return FX_OK;
return FX_OK;
}
/*-- Guide Messages --*/
// Finds when the Clonk has done 'X', and changes the message.
public func OnHasTalkedMineChief()
{
RemoveEffect("TutorialTalkedToMineChief");
return;
}
global func FxTutorialTalkedToMineChiefTimer()
{
return FX_OK;
}
global func FxTutorialTalkedToMineChiefStop(object target, proplist effect, int reason, bool temp)
{
if (temp)
return FX_OK;
guide->AddGuideMessage("$MsgTutorialConnectPipe$");
guide->ShowGuideMessage(1);
var new_effect = AddEffect("TutorialConnectedSourcePipe", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_OK;
}
global func FxTutorialConnectedSourcePipeTimer(object target, proplist effect)
{
var connected_source = false;
var pump = FindObject(Find_ID(Pump));
for (var pipe in FindObjects(Find_ID(Pipe)))
for (var line in FindObjects(Find_Func("IsConnectedTo", pump)))
if (line->IsConnectedTo(pipe))
connected_source = true;
if (connected_source)
{
guide->AddGuideMessage("$MsgTutorialFindMetalLorry$");
guide->ShowGuideMessage(2);
var new_effect = AddEffect("TutorialFoundMetalLorry", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialFoundMetalLorryTimer(object target, proplist effect)
{
if (FindObject(Find_OCF(OCF_CrewMember), Find_Owner(effect.plr), Find_AtRect(586, 866, 40, 24)))
{
guide->AddGuideMessage("$MsgTutorialMoveLorry$");
guide->ShowGuideMessage(3);
var new_effect = AddEffect("TutorialShovedMetalLorry", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialShovedMetalLorryTimer(object target, proplist effect)
{
if (FindObject(Find_ID(Lorry), Find_AtRect(360, 840, 20, 20)))
{
var interact = GetPlayerControlAssignment(effect.plr, CON_Interact, true, true);
guide->AddGuideMessage(Format("$MsgTutorialCallElevator$", interact));
guide->ShowGuideMessage(4);
var new_effect = AddEffect("TutorialTalkedToExplosiveExpert", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
public func OnHasTalkedExplosiveExpert()
{
var effect = GetEffect("TutorialTalkedToExplosiveExpert");
if (effect)
effect.has_talked = true;
return;
}
global func FxTutorialTalkedToExplosiveExpertTimer(object target, proplist effect)
{
if (effect.has_talked && FindObject(Find_ID(ElevatorCase), Find_AtRect(282, 816, 20, 48)))
{
guide->AddGuideMessage("$MsgTutorialProduceWallKit$");
guide->ShowGuideMessage(5);
var new_effect = AddEffect("TutorialProducedWallKit", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialProducedWallKitTimer(object target, proplist effect)
{
var workshop = FindObject(Find_ID(ToolsWorkshop));
if (FindObject(Find_ID(WallKit), Find_Container(workshop)))
{
guide->AddGuideMessage("$MsgTutorialCloseMineShaft$");
guide->ShowGuideMessage(6);
var new_effect = AddEffect("TutorialHasClosedShaft", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialHasClosedShaftTimer(object target, proplist effect)
{
var pathlength1 = GetPathLength(280, 856, 280, 748);
var pathlength2 = GetPathLength(320, 856, 320, 748);
if (pathlength1 == nil && pathlength2 == nil)
{
guide->AddGuideMessage("$MsgTutorialWaitAndMoveLorry$");
guide->ShowGuideMessage(7);
var new_effect = AddEffect("TutorialHasPlacedLorryInCase", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialHasPlacedLorryInCaseTimer(object target, proplist effect)
{
var elevator_case = FindObject(Find_ID(ElevatorCase), Find_AtRect(282, 800, 20, 64));
if (!elevator_case)
return FX_OK;
if (elevator_case->FindObject(Find_ID(Lorry), Find_AtPoint()))
{
guide->AddGuideMessage("$MsgTutorialBlastWall$");
guide->ShowGuideMessage(8);
var new_effect = AddEffect("TutorialHasBlastedWall", nil, 100, 5);
new_effect.plr = effect.plr;
return FX_Execute_Kill;
}
return FX_OK;
}
global func FxTutorialHasBlastedWallTimer(object target, proplist effect)
{
var blasted_free = true;
for (var x = 280; x <= 304; x += 2)
{
if (!PathFree(x, 848, x, 732))
{
blasted_free = false;
break;
}
}
if (blasted_free)
{
guide->AddGuideMessage("$MsgTutorialSwimUp$");
guide->ShowGuideMessage(9);
return FX_Execute_Kill;
}
return FX_OK;
}
protected func OnGuideMessageShown(int plr, int index)
{
if (index == 0)
{
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(218, 182)));
}
if (index == 2)
{
TutArrowShowPos(302, 270, 180);
}
if (index == 3)
{
TutArrowShowPos(556, 830, 0);
TutArrowShowPos(426, 820, 225);
}
if (index == 4)
{
TutArrowShowPos(292, 850, 180);
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(604, 806)));
}
if (index == 6)
{
TutArrowShowPos(282, 786, 0);
TutArrowShowPos(312, 786, 0);
}
if (index == 8)
{
TutArrowShowPos(292, 786, 0);
}
if (index == 9)
{
TutArrowShowTarget(FindObject(Find_ID(Clonk), Find_AtPoint(218, 182)));
}
return;
}
protected func OnGuideMessageRemoved(int plr, int index)
{
TutArrowClear();
return;
}
/*-- Clonk restoring --*/
global func FxClonkRestoreTimer(object target, proplist effect, int time)
{
// Respawn clonk to new location if reached certain position.
if (FindObject(Find_OCF(OCF_CrewMember), Find_InRect(448, 752, 40, 64)))
{
effect.to_x = 468;
effect.to_y = 806;
}
return FX_OK;
}
// Relaunches the clonk, from death or removal.
global func FxClonkRestoreStop(object target, effect, int reason, bool temporary)
{
if (reason == 3 || reason == 4)
{
var restorer = CreateObject(ObjectRestorer, 0, 0, NO_OWNER);
var x = BoundBy(target->GetX(), 0, LandscapeWidth());
var y = BoundBy(target->GetY(), 0, LandscapeHeight());
restorer->SetPosition(x, y);
var to_x = effect.to_x;
var to_y = effect.to_y;
// Respawn new clonk.
var plr = target->GetOwner();
var clonk = CreateObject(Clonk, 0, 0, plr);
clonk->GrabObjectInfo(target);
Rule_BaseRespawn->TransferInventory(target, clonk);
SetCursor(plr, clonk);
clonk->DoEnergy(100000);
restorer->SetRestoreObject(clonk, nil, to_x, to_y, 0, "ClonkRestore");
}
return FX_OK;
}

View File

@ -0,0 +1,22 @@
# Goal description
MsgGoalName=Salvage lorry
MsgGoalDescription=Locate the lorry with metal and transport it back to the surface.
# Dialogue options
MsgNextTutorial=&Next tutorial
MsgNextTutorialDesc=Start the next tutorial scenario.
MsgRepeatRound=&Repeat this round
MsgRepeatRoundDesc=Restart this scenario.
# Tutorial messages
MsgTutorialFloodedMines=You are right in front of the mine entrance. Talk to the mine operator standing in front of the pump to find out how you can help.
MsgTutorialConnectPipe=Get a pipe from the chest. Pipes can be connected to the pump by using them in front of the pump, the first pipe will be the source and the second pipe will be the drain. Connect the pipe to the pump. More options for the pump are found in the interaction menu.
MsgTutorialFindMetalLorry=Good, this way the pump will take water from the pipe and drop it right in front of itself since no drain pipe is connected. You can then keep the pipe in your inventory and use it to pump water from the mine. Now enter the mine by following the path of the elevator and locate the lorry with the metal. Remember to catch your breath every once in a while.
MsgTutorialMoveLorry=Okay, let's move the lorry out of the mine to the flooded elevator shaft. Push it into the water, maybe it will make its way to where the elevator case would touch the shaft's ground.
MsgTutorialCallElevator=Hm, that did not work. Swim to the place where the elevator case would reach the ground and call it by pressing [%s]. It will take a few seconds for it to make its way down. In the meanwhile talk to the NPC standing in front of the chemical lab, maybe he has some idea.
MsgTutorialProduceWallKit=That was not very helpful. The problem seems to be getting the lorry onto the elevator case. If one could somehow close of a small part around the elevator case to remove the water with the pump. Wait a second... One could use a wall kit for this. Produce one in the workshop.
MsgTutorialCloseMineShaft=Take the wall kit and a dynamite box from the chemical lab. Then make sure the elevator is at the bottom of the flooded shaft and close off the gap above the elevator with wall kits. To place a wall kit, select it in the inventory and hold the left mouse button. Then position the wall kit by moving the mouse cursor and place it by releasing the button.
MsgTutorialWaitAndMoveLorry=Perfect, now place the pipe in near the elevator case and wait for the lower part of the shaft to be drained, then move the lorry into the case.
MsgTutorialBlastWall=Good, now that the lorry is in the elevator case we can blast the the wall again to allow the elevator to move up to the surface. Take a dynamite box from the chemical lab and place all five dynamite sticks at the indicated location, then move a way and use the igniter to blast it.
MsgTutorialSwimUp=Now you can swim back up to the surface again and call the elevator case when you are at the top. Then move the metal lorry to the chief of the mine and talk to him.
MsgTutorialCompleted=Well done, you see that in this game you sometimes need nifty tricks to solve difficult problems! Now the villagers have enough metal to produce weapons and you are one step closer to mounting an attack against the evil fraction.

View File

@ -0,0 +1,22 @@
# Goal description
MsgGoalName=Salvage lorry
MsgGoalDescription=Locate the lorry with metal and transport it back to the surface.
# Dialogue options
MsgNextTutorial=&Next tutorial
MsgNextTutorialDesc=Start the next tutorial scenario.
MsgRepeatRound=&Repeat this round
MsgRepeatRoundDesc=Restart this scenario.
# Tutorial messages
MsgTutorialFloodedMines=You are right in front of the mine entrance. Talk to the mine operator standing in front of the pump to find out how you can help.
MsgTutorialConnectPipe=Get a pipe from the chest. Pipes can be connected to the pump by using them in front of the pump, the first pipe will be the source and the second pipe will be the drain. Connect the pipe to the pump. More options for the pump are found in the interaction menu.
MsgTutorialFindMetalLorry=Good, this way the pump will take water from the pipe and drop it right in front of itself since no drain pipe is connected. You can then keep the pipe in your inventory and use it to pump water from the mine. Now enter the mine by following the path of the elevator and locate the lorry with the metal. Remember to catch your breath every once in a while.
MsgTutorialMoveLorry=Okay, let's move the lorry out of the mine to the flooded elevator shaft. Push it into the water, maybe it will make its way to where the elevator case would touch the shaft's ground.
MsgTutorialCallElevator=Hm, that did not work. Swim to the place where the elevator case would reach the ground and call it by pressing [%s]. It will take a few seconds for it to make its way down. In the meanwhile talk to the NPC standing in front of the chemical lab, maybe he has some idea.
MsgTutorialProduceWallKit=That was not very helpful. The problem seems to be getting the lorry onto the elevator case. If one could somehow close of a small part around the elevator case to remove the water with the pump. Wait a second... One could use a wall kit for this. Produce one in the workshop.
MsgTutorialCloseMineShaft=Take the wall kit and a dynamite box from the chemical lab. Then make sure the elevator is at the bottom of the flooded shaft and close off the gap above the elevator with wall kits. To place a wall kit, select it in the inventory and hold the left mouse button. Then position the wall kit by moving the mouse cursor and place it by releasing the button.
MsgTutorialWaitAndMoveLorry=Perfect, now place the pipe in near the elevator case and wait for the lower part of the shaft to be drained, then move the lorry into the case.
MsgTutorialBlastWall=Good, now that the lorry is in the elevator case we can blast the the wall again to allow the elevator to move up to the surface. Take a dynamite box from the chemical lab and place all five dynamite sticks at the indicated location, then move a way and use the igniter to blast it.
MsgTutorialSwimUp=Now you can swim back up to the surface again and call the elevator case when you are at the top. Then move the metal lorry to the chief of the mine and talk to him.
MsgTutorialCompleted=Well done, you see that in this game you sometimes need nifty tricks to solve difficult problems! Now the villagers have enough metal to produce weapons and you are one step closer to mounting an attack against the evil fraction.

View File

@ -0,0 +1,101 @@
// A chief which tells you about the flood and the pump.
#appendto Dialogue
public func Dlg_Chief_Init(object clonk)
{
AddEffect("IntChief", clonk, 100, 5, this);
return true;
}
public func Dlg_Chief_1(object clonk)
{
var found_lorry = false;
for (var lorry in FindObjects(Find_ID(Lorry), Find_InRect(AbsX(0), AbsY(160), 280, 40)))
if (ObjectCount(Find_ID(Metal), Find_Container(lorry)) >= 32)
found_lorry = true;
if (found_lorry)
{
MessageBox("$DlgChiefLorry$", clonk, clonk);
SetDialogueProgress(8);
}
else
{
MessageBox("$DlgChiefHello$", clonk, dlg_target);
}
return true;
}
public func Dlg_Chief_2(object clonk)
{
MessageBox("$DlgChiefReply$", clonk, clonk);
return true;
}
public func Dlg_Chief_3(object clonk)
{
MessageBox("$DlgChiefNoMetal$", clonk, dlg_target);
return true;
}
public func Dlg_Chief_4(object clonk)
{
MessageBox("$DlgChiefHelp$", clonk, clonk);
return true;
}
public func Dlg_Chief_5(object clonk)
{
MessageBox("$DlgChiefAppreciation$", clonk, dlg_target);
return true;
}
public func Dlg_Chief_6(object clonk)
{
MessageBox("$DlgChiefReward$", clonk, clonk);
return true;
}
public func Dlg_Chief_7(object clonk)
{
MessageBox("$DlgChiefMetal$", clonk, dlg_target);
StopDialogue();
SetDialogueProgress(1);
return true;
}
public func Dlg_Chief_8(object clonk)
{
MessageBox("$DlgChiefKeepLorry$", clonk, dlg_target);
StopDialogue();
SetDialogueProgress(9);
GameCall("OnGoalCompleted", clonk->GetOwner());
return true;
}
public func Dlg_Chief_9(object clonk)
{
MessageBox("$DlgChiefReally$", clonk, dlg_target);
StopDialogue();
SetDialogueProgress(9);
return true;
}
public func Dlg_Chief_Closed(object clonk)
{
GameCall("OnHasTalkedMineChief", clonk);
return true;
}
public func FxIntChiefStart(object target, proplist effect, int temp)
{
if (temp)
return FX_OK;
return FX_OK;
}
public func FxIntChiefTimer(object target, proplist effect, int time)
{
return FX_OK;
}

View File

@ -0,0 +1,60 @@
// An explosive expert who tells about dynamite.
#appendto Dialogue
public func Dlg_Expert_Init(object clonk)
{
AddEffect("IntExpert", clonk, 100, 5, this);
clonk->CreateContents(DynamiteBox);
return true;
}
public func Dlg_Expert_1(object clonk)
{
MessageBox("$DlgExpertHello$", clonk, clonk);
return true;
}
public func Dlg_Expert_2(object clonk)
{
MessageBox("$DlgExpertNoHelp$", clonk, dlg_target);
return true;
}
public func Dlg_Expert_3(object clonk)
{
MessageBox("$DlgExpertWhatExplosives$", clonk, clonk);
return true;
}
public func Dlg_Expert_4(object clonk)
{
MessageBox("$DlgExpertUseExplosives$", clonk, dlg_target);
return true;
}
public func Dlg_Expert_5(object clonk)
{
MessageBox("$DlgExpertThanks$", clonk, clonk);
StopDialogue();
SetDialogueProgress(1);
return true;
}
public func Dlg_Expert_Closed(object clonk)
{
GameCall("OnHasTalkedExplosiveExpert", clonk);
return true;
}
public func FxIntExpertStart(object target, proplist effect, int temp)
{
if (temp)
return FX_OK;
return FX_OK;
}
public func FxIntExpertTimer(object target, proplist effect, int time)
{
return FX_OK;
}

View File

@ -0,0 +1,75 @@
// A miner who just wants some food.
#appendto Dialogue
public func Dlg_Miner_Init(object clonk)
{
AddEffect("IntMiner", clonk, 100, 5, this);
var lamp = clonk->CreateContents(Lantern);
lamp->TurnOn();
clonk->CreateContents(Pickaxe);
return true;
}
public func Dlg_Miner_1(object clonk)
{
MessageBox(Format("$DlgMinerGreeting$", clonk->GetName()), clonk, clonk);
return true;
}
public func Dlg_Miner_2(object clonk)
{
MessageBox(Format("$DlgMinerYes$", dlg_target->GetName()), clonk, dlg_target);
return true;
}
public func Dlg_Miner_3(object clonk)
{
var food = FindObject(Find_Container(clonk), Find_Func("NutritionalValue"));
if (food)
{
MessageBox(Format("$DlgMinerYesFood$", food.Name), clonk, clonk);
food->Enter(dlg_target);
}
else
{
MessageBox("$DlgMinerNoFood$", clonk, clonk);
StopDialogue();
SetDialogueProgress(1);
}
return true;
}
public func Dlg_Miner_4(object clonk)
{
var food = FindObject(Find_Container(dlg_target), Find_Func("NutritionalValue"));
if (food)
dlg_target->Eat(food);
MessageBox("$DlgMinerEatFood$", clonk, dlg_target);
return true;
}
public func Dlg_Miner_5(object clonk)
{
MessageBox("$DlgMinerWayOut$", clonk, clonk);
StopDialogue();
SetDialogueProgress(4);
return true;
}
public func Dlg_Miner_Closed(object clonk)
{
return true;
}
public func FxIntMinerStart(object target, proplist effect, int temp)
{
if (temp)
return FX_OK;
return FX_OK;
}
public func FxIntMinerTimer(object target, proplist effect, int time)
{
return FX_OK;
}

View File

@ -0,0 +1,9 @@
// Make the pump a bit faster.
#appendto Pump
public func GetPumpSpeed()
{
// Four times faster.
return 4 * _inherited(...);
}

View File

@ -0,0 +1,26 @@
# Dialogue: Chief
DlgChiefHello=Hello I am chief of operations of the mines below. But we had a disaster and our dike protecting us from the sea broke, and now the mine is flooded.
DlgChiefReply=Oh that is terrible, I came here to buy some metal from you.
DlgChiefNoMetal=Well, we don't have any metal available as we can't transport it out of the mine. My miners are even stuck below.
DlgChiefHelp=Well, what if I help you get the metal out of the mine?
DlgChiefAppreciation=That would be wonderful! You can use this pump I have just built, unfortunately it is not strong enough to empty the sea here, but it may be of help.
DlgChiefReward=Can I get some reward for this?
DlgChiefMetal=Yes, of course. The metal you can get to the surface you may keep, if you tell me how you did it!
DlgChiefLorry=I got the lorry with metal up to the surface!
DlgChiefKeepLorry=That's great, now we can use your method to keep excavating the mine! You may keep the lorry and its contents.
DlgChiefReally=You can really keep the lorry and the metal.
# Dialogue: Miner
DlgMinerGreeting=Hi, I am %s, are you one of the miners?
DlgMinerYes=Yes, I am %s. I have been locked down here for more than a day now. Do you have some food?
DlgMinerNoFood=No, I am sorry. If I find something I'll be back.
DlgMinerYesFood=Yes, I have a %s, you can have it.
DlgMinerEatFood=Thank you for the food. How did you get in here? Do you know a way out?
DlgMinerWayOut=Yes, you can just swim up, along the original path of the elevator.
# Dialogue: Explosive Expert
DlgExpertHello=Hi I am looking for a way to get lorries out of this mine. Can you help?
DlgExpertNoHelp=I have no clue how to achieve that. I only know about explosives.
DlgExpertWhatExplosives=Oh explosives! What kind do you have and can I use them?
DlgExpertUseExplosives=I have dynamite. Please use whatever you can find in the chemical lab or the workshop for your endeavour.
DlgExpertThanks=Thanks a lot.

View File

@ -0,0 +1,26 @@
# Dialogue: Chief
DlgChiefHello=Hello I am chief of operations of the mines below. But we had a disaster and our dike protecting us from the sea broke, and now the mine is flooded.
DlgChiefReply=Oh that is terrible, I came here to buy some metal from you.
DlgChiefNoMetal=Well, we don't have any metal available as we can't transport it out of the mine. My miners are even stuck below.
DlgChiefHelp=Well, what if I help you get the metal out of the mine?
DlgChiefAppreciation=That would be wonderful! You can use this pump I have just built, unfortunately it is not strong enough to empty the sea here, but it may be of help.
DlgChiefReward=Can I get some reward for this?
DlgChiefMetal=Yes, of course. The metal you can get to the surface you may keep, if you tell me how you did it!
DlgChiefLorry=I got the lorry with metal up to the surface!
DlgChiefKeepLorry=That's great, now we can use your method to keep excavating the mine! You may keep the lorry and its contents.
DlgChiefReally=You can really keep the lorry and the metal.
# Dialogue: Miner
DlgMinerGreeting=Hi, I am %s, are you one of the miners?
DlgMinerYes=Yes, I am %s. I have been locked down here for more than a day now. Do you have some food?
DlgMinerNoFood=No, I am sorry. If I find something I'll be back.
DlgMinerYesFood=Yes, I have a %s, you can have it.
DlgMinerEatFood=Thank you for the food. How did you get in here? Do you know a way out?
DlgMinerWayOut=Yes, you can just swim up, along the original path of the elevator.
# Dialogue: Explosive Expert
DlgExpertHello=Hi I am looking for a way to get lorries out of this mine. Can you help?
DlgExpertNoHelp=I have no clue how to achieve that. I only know about explosives.
DlgExpertWhatExplosives=Oh explosives! What kind do you have and can I use them?
DlgExpertUseExplosives=I have dynamite. Please use whatever you can find in the chemical lab or the workshop for your endeavour.
DlgExpertThanks=Thanks a lot.

View File

@ -0,0 +1,2 @@
DE:Wasserwerk
US:Waterworks