This tutorial was originally posted by Lemmy, over at the official Project Zomboid forums. Essentially all of the recipes and item distribution systems are now in scripts (instead of hard coded), allowing you near complete control over items in the game, how they can be crafted together, and where they appear on the map.
item Pop<br />{<br /> Type = Food,<br /> DisplayName = Pop,<br /> Icon = Pop,<br /> Weight = 1,<br /> HungerChange = -10<br />}<br /><br />item Pop2<br />{<br /> Type = Food,<br /> DisplayName = Pop,<br /> Icon = Pop2,<br /> Weight = 1,<br /> HungerChange = -10<br />}<br /><br />item Pop3<br />{<br /> Type = Food,<br /> DisplayName = Pop,<br /> Icon = Pop3,<br /> Weight = 1,<br /> HungerChange = -10<br />}<br /><br />item Crisps<br />{<br /> Type = Food,<br /> DisplayName = Crisps,<br /> Icon = Crisps,<br /> Weight = 0.2,<br /> HungerChange = -20<br />}<br /><br />item Crisps2<br />{<br /> Type = Food,<br /> DisplayName = Crisps,<br /> Icon = Crisps2,<br /> Weight = 0.2,<br /> HungerChange = -20<br />}<br /><br />item Crisps3<br />{<br /> Type = Food,<br /> DisplayName = Crisps,<br /> Icon = Crisps3,<br /> Weight = 0.2,<br /> HungerChange = -20<br />}<br /><br />item PotOfSoup<br />{<br /> Type = Food,<br /> DisplayName = Pot of Soup,<br /> Icon = PotFull,<br /> Weight = 3,<br /> HungerChange = -40,<br /> ReplaceOnUse = Pot<br />}<br /><br />item Steak<br />{<br /> Type = Food,<br /> DisplayName = Steak,<br /> Icon = Steak,<br /> Weight = 0.2,<br /> HungerChange = -40,<br /> DaysFresh = 2,<br /> DaysTotallyRotten = 4,<br /> DangerousUncooked = true<br />}<br /><br />item Apple<br />{<br /> Type = Food,<br /> DisplayName = Apple,<br /> Icon = Apple,<br /> Weight = 0.2,<br /> HungerChange = -30,<br /> DaysFresh = 7,<br /> DaysTotallyRotten = 9,<br />}<br /><br />item Banana<br />{<br /> Type = Food,<br /> DisplayName = Apple,<br /> Icon = Apple,<br /> Weight = 0.2,<br /> HungerChange = -30,<br /> DaysFresh = 5,<br /> DaysTotallyRotten = 7,<br />}<br /><br />item Chocolate<br />{<br /> Type = Food,<br /> DisplayName = Chocolate,<br /> Icon = Chocolate,<br /> Weight = 0.1,<br /> HungerChange = -10<br />}<br /><br />item TinnedSoup<br />{<br /> Type = Food,<br /> DisplayName = Canned Soup,<br /> Icon = TinCan,<br /> Weight = 4,<br /> HungerChange = -30,<br /> RequireInHandOrInventory = TinOpener<br />}<br /><br />item Bread<br />{<br /> Type = Food,<br /> DisplayName = Bread,<br /> Icon = Bread,<br /> Weight = 0.2,<br /> HungerChange = -40,<br /> DaysFresh = 3,<br /> DaysTotallyRotten = 6<br />}<br /><br />item Carrots<br />{<br /> Type = Food,<br /> DisplayName = Carrots,<br /> Icon = Carrots,<br /> Weight = 0.2,<br /> HungerChange = -40,<br /> DaysFresh = 4,<br /> DaysTotallyRotten = 7<br />}<br /><br />item WhiskeyFull<br />{<br /> Type = Food,<br /> DisplayName = Whiskey Bottle (full),<br /> Icon = WhiskeyFull,<br /> Weight = 4,<br /> ReplaceOnUse = WhiskeyHalf,<br /> Alcoholic = true<br />}<br /><br />item WhiskeyHalf<br />{<br /> Type = Food,<br /> DisplayName = Whiskey Bottle (half),<br /> Icon = WhiskeyHalf,<br /> Weight = 3,<br /> ReplaceOnUse = WhiskeyEmpty,<br /> Alcoholic = true<br />}<br /><br />item Molotov<br />{<br /> Type = Weapon,<br /> DisplayName = Molotov Cocktail,<br /> Icon = Molotov,<br /> MaxDamage = 0.0,<br /> MinDamage = 0.0,<br /> PhysicsObject = MolotovCocktail,<br /> OtherHandRequire = Lighter,<br /> OtherHandUse = true,<br /> MaxRange = 8.0,<br /> MaxHitCount = 0,<br /> UseSelf = true,<br /> SwingAnim = null,<br /> Weight = 3<br /> <br />}<br /><br />item BaseballBat<br />{<br /> Type = Weapon,<br /> DisplayName = Baseball Bat,<br /> Icon = BaseballBat,<br /> MinAngle = 0,<br /> MaxDamage = 1.0,<br /> MinDamage = 0.7,<br /> MaxRange = 1.5,<br /> SwingAnim = bat,<br /> WeaponSprite = baseballbat,<br /> Weight = 10,<br /> DoorDamage = 5,<br /> MinimumSwingTime = 15,<br /> SwingTime = 26,<br /> SwingAmountBeforeImpact = 0.2, <br /> <br /> <br />}<br /><br />item BaseballBatNails<br />{<br /> Type = Weapon,<br /> DisplayName = Spiked Baseball Bat,<br /> Icon = BaseballBatNails,<br /> MinAngle = 0,<br /> MaxDamage = 1.4,<br /> MinDamage = 0.7,<br /> MaxRange = 1.5,<br /> SwingAnim = bat,<br /> WeaponSprite = baseballbat,<br /> Weight = 15,<br /> WeaponWeight = 1.0,<br /> DoorDamage = 10,<br /> MinimumSwingTime = 15,<br /> SwingTime = 26,<br /> SwingAmountBeforeImpact = 0.2,<br /> PushBackMod = 0.6,<br /> <br /> <br />}<br /><br />item Axe<br />{<br /> Type = Weapon,<br /> DisplayName = Axe,<br /> Icon = Axe,<br /> MinAngle = 0.2,<br /> MaxDamage = 1.5,<br /> MinDamage = 0.7,<br /> MaxRange = 1.3,<br /> SwingAnim = bat,<br /> WeaponSprite = axe,<br /> Weight = 35,<br /> WeaponWeight = 2.0,<br /> DoorDamage = 50,<br /> MinimumSwingTime = 30,<br /> SwingTime = 35,<br /> SwingAmountBeforeImpact = 0.15,<br /> PushBackMod = 0.3,<br /> SplatNumber = 4,<br /> KnockBackOnNoDeath = false, <br /> SplatBloodOnNoDeath = true,<br /> ImpactSound = splat1,<br />}<br /><br />item Shotgun<br />{<br /> Type = Weapon,<br /> DisplayName = Shotgun,<br /> Icon = Shotgun,<br /> Ranged = true,<br /> MinAngle = 0.88,<br /> MaxDamage = 1.8,<br /> MinDamage = 1.5,<br /> MaxRange = 8.0,<br /> SwingAnim = rifle,<br /> WeaponSprite = shotgun,<br /> SwingSound = shotgun,<br /> SoundVolume = 40,<br /> SoundRadius = 50,<br /> AngleFalloff = true,<br /> ToHitModifier = 1.5,<br /> NPCSoundBoost = 1.5,<br /> Weight = 25,<br /> WeaponWeight = 1.8,<br /> DoorDamage = 20,<br /> MinimumSwingTime = 0,<br /> SwingTime = 33,<br /> SwingAmountBeforeImpact = 0.0,<br /> PushBackMod = 0.3,<br /> SplatNumber = 5,<br /> KnockBackOnNoDeath = false, <br /> SplatBloodOnNoDeath = true,<br /> ImpactSound = null,<br /> RangeFalloff = true,<br /> UseEndurance = false,<br /> ShareDamage = false,<br /> AmmoType = ShotgunShells,<br /> <br />}<br /><br />item Plank<br />{<br /> Type = Weapon,<br /> DisplayName = Wooden Plank,<br /> Icon = Plank,<br /> MinAngle = -0.2,<br /> MaxDamage = 0.2,<br /> MinDamage = 0.1,<br /> MaxRange = 2.0,<br /> SwingAnim = bat,<br /> WeaponSprite = plank,<br /> Weight = 8,<br /> WeaponWeight = 2.5,<br /> DoorDamage = 5,<br /> MinimumSwingTime = 15,<br /> SwingTime = 26,<br /> SwingAmountBeforeImpact = 0.2, <br /> PushBackMod = 4.5,<br /> <br />}<br /><br />item Hammer<br />{<br /> Type = Weapon,<br /> DisplayName = Hammer,<br /> Icon = Hammer,<br /> MinAngle = 0,<br /> MaxDamage = 1.0,<br /> MinDamage = 1.0,<br /> MaxRange = 0.7,<br /> SwingAnim = bat,<br /> WeaponSprite = hammer,<br /> Weight = 7,<br /> WeaponWeight = 1.5,<br /> MinimumSwingTime = 20,<br /> DoorDamage = 10,<br /> SwingTime = 26,<br /> SwingAmountBeforeImpact = 0.3, <br /> CanBarricade = true,<br /> MaxHitCount = 1, <br />}<br /><br />item Pot<br />{<br /> Type = Normal,<br /> DisplayName = Cooking Pot,<br /> Icon = Pot,<br /> Weight = 5<br />}<br /><br />item Bowl<br />{<br /> Type = Normal,<br /> DisplayName = Bowl,<br /> Icon = Bowl,<br /> Weight = 2<br />}<br /><br />item KatePic<br />{<br /> Type = Normal,<br /> DisplayName = Picture of Kate,<br /> Icon = PictureKate,<br /> Weight = 2<br />}<br /><br />item WhiskeyEmpty<br />{<br /> Type = Normal,<br /> DisplayName = Empty Bottle,<br /> Icon = WhiskeyEmpty,<br /> Weight = 2<br />}<br /><br />item Belt<br />{<br /> Type = Normal,<br /> DisplayName = Belt,<br /> Icon = Belt,<br /> Weight = 3<br />}<br /><br />item Pen<br />{<br /> Type = Normal,<br /> DisplayName = Pen,<br /> Icon = Pen,<br /> Weight = 0.1<br />}<br /><br />item Pencil<br />{<br /> Type = Normal,<br /> DisplayName = Pencil,<br /> Icon = Pencil,<br /> Weight = 0.1<br />}<br /><br />item Sheet<br />{<br /> Type = Normal,<br /> DisplayName = Sheet,<br /> Icon = Sheet,<br /> Weight = 2<br />}<br /><br />item RippedSheets<br />{<br /> Type = Normal,<br /> DisplayName = Ripped Sheet,<br /> Icon = Rag,<br /> Count = 8,<br /> Weight = 0.25<br />}<br /><br />item Pillow<br />{<br /> Type = Normal,<br /> DisplayName = Pillow,<br /> Icon = Pillow,<br /> Weight = 2<br />}<br /><br />item Socks<br />{<br /> Type = Normal,<br /> DisplayName = Sock,<br /> Icon = Socks1,<br /> Count = 2, <br /> Weight = 2<br />}<br /><br />item Door<br />{<br /> Type = Normal,<br /> DisplayName = Door,<br /> Icon = Door,<br /> Weight = 100<br />}<br /><br />item TinOpener<br />{<br /> Type = Normal,<br /> DisplayName = Can Opener,<br /> Icon = CanOpener,<br /> Weight = 2<br />}<br /><br />item ShotgunShells<br />{<br /> Type = Normal,<br /> DisplayName = Shotgun Shells,<br /> Icon = ShotgunAmmo,<br /> Weight = 0.5,<br /> Count = 12<br />}<br /><br />item WineEmpty<br />{<br /> Type = Normal,<br /> DisplayName = Empty Bottle,<br /> Icon = WineEmpty,<br /> Weight = 2<br />}<br /><br />item WineEmpty2<br />{<br /> Type = Normal,<br /> DisplayName = Empty Bottle,<br /> Icon = Wine2Empty,<br /> Weight = 2<br />}<br /><br />item DishCloth<br />{<br /> Type = Normal,<br /> DisplayName = Dish Towel,<br /> Icon = Dishtowel,<br /> Weight = 1<br />}<br /><br />item Nails<br />{<br /> Type = Normal,<br /> DisplayName = Nails,<br /> Icon = Nails,<br /> Weight = 0.1,<br /> Count = 5<br /> <br />}<br /><br />item Barricade<br />{<br /> Type = Normal,<br /> DisplayName = Barricade,<br /> Icon = Barricade,<br /> Weight = 16,<br /> <br />}<br /><br />item Battery<br />{<br /> Type = Drainable,<br /> DisplayName = Battery,<br /> Icon = Battery,<br /> Weight = 1,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />item Torch<br />{<br /> Type = Drainable,<br /> DisplayName = Flashlight,<br /> Icon = Flashlight,<br /> Weight = 5,<br /> DisappearOnUse = false,<br /> UseDelta = 0.0009,<br />}<br /><br />item Lighter<br />{<br /> Type = Drainable,<br /> DisplayName = Lighter,<br /> Icon = Lighter,<br /> Weight = 0.5,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />item Pills<br />{<br /> Type = Drainable,<br /> DisplayName = Painkillers,<br /> Icon = Pills,<br /> Weight = 0.1,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />item PillsBeta<br />{<br /> Type = Drainable,<br /> DisplayName = Beta Blockers,<br /> Icon = Pills2,<br /> Weight = 0.1,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />item PillsAntiDep<br />{<br /> Type = Drainable,<br /> DisplayName = Anti-depressants,<br /> Icon = Pills3,<br /> Weight = 0.1,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />item PillsSleepingTablets<br />{<br /> Type = Drainable,<br /> DisplayName = Sleeping Tablets,<br /> Icon = Pills4,<br /> Weight = 0.1,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />item PetrolCan<br />{<br /> Type = Drainable,<br /> DisplayName = Fuel Can,<br /> Icon = Petrol,<br /> Weight = 12,<br /> UseWhileEquipped = false,<br /> <br />}<br /><br />containeritemdistribution<br />{ <br /> Room = tutKitchen1, <br /> Containers = counter, <br /> TinOpener = 1, <br /> Pot = 1, <br />}<br /><br />containeritemdistribution<br />{<br /> Room = tutKitchen2,<br /> Containers = counter,<br /> TinnedSoup = 3,<br />}<br /><br />containeritemdistribution<br />{<br /> Room = tutorialBathroom,<br /> Containers = medicine,<br /> Pills = 1,<br />}<br /><br />containeritemdistribution<br />{<br /> Room = tutorialBedroom,<br /> Containers = wardrobe,<br /> Sheet = 1,<br /> Pillow = 1,<br />}<br /><br />containeritemdistribution<br />{<br /> Room = shed,<br /> Containers = counter,<br /> Hammer = 1, <br /> Plank = 10,<br /> Nails = 12,<br />}<br /><br />containeritemdistribution<br />{<br /> Room = kitchen,<br /> Containers = counter,<br /> WhiskeyHalf = 1,<br /> WhiskeyFull = 1,<br /> Bread = 1,<br /> TinnedSoup = 1,<br />}<br /><br />containeritemdistribution<br />{<br /> Room = shopGeneral,<br /> Containers = counter,<br /> Bread = 10-20,<br /> WhiskeyFull = 5-10,<br />}<br /><br />containeritemdistribution<br />{<br /> Containers = counter,<br /> Shotgun = 200,<br />}<br /><br />recipe SpikedBat<br />{<br /> BaseballBat,<br /> Nails,<br /> keep Hammer, <br /> null, <br /> <br /> BaseballBatNails, <br /> 5.0, <br />}<br /><br />recipe Molotov<br />{<br /> WineEmpty/WhiskeyEmpty,<br /> PetrolCan,<br /> DishCloth/RippedSheets,<br /> null,<br /> <br /> Molotov,<br /> 3.0<br />}
Here is (minus some dialogue for testing) the entire tutorial up to just before setting the house alight/raider entrance, all done in text file scripts you can edit / add to, or make your own additional npcs / quests / stories in new files based on these.
waypoint KateInBed<br />{<br /> 40, 23, 1<br />}<br /><br />inventory RaiderInventory<br />{<br /> Shotgun,<br /> BaseballBat,<br /> ShotgunShells=20,<br /> Lighter,<br />}<br /><br />inventory KateInventory<br />{<br /><br />}<br /><br /><br />character Raider<br />{<br /> GunNut, Bobby, Collins,<br /> RaiderInventory,<br />}<br /><br />character RaiderShop<br />{<br /> GunNut, Jack, Bloggs,<br /> RaiderInventory,<br />}<br /><br />character Kate<br />{<br /> Kate, Kate, Smith,<br /> KateInventory,<br />}<br /><br />inventory PlayerBobInventory<br />{<br /><br />}<br /><br />character Player<br />{<br /> null, Bob, Smith,<br /> <br /> PlayerBobInventory,<br />}<br /><br />script LoadCharacterTextures<br />{<br /> LoadTexturePage(zombieFrames);<br /> LoadTexturePage(characters);<br /> LoadTexturePage(characterpieces);<br />}<br /><br />script LoadMapTextures<br />{<br /> LoadTexturePage(tiles1);<br /> LoadTexturePage(tiles2);<br /> LoadTexturePage(tiles3);<br /> LoadTexturePage(tiles4);<br />}<br />script CreateCharacters<br />{<br /> Kate.Actualize(KateInBed);<br />}<br />trigger PreMapLoad<br />{<br /> call LoadMapTextures<br />}<br /><br />trigger PostMapLoad<br />{<br /> call LoadCharacterTextures,<br /> call CreateCharacters<br />}
waypoint ShedDoor<br />{<br /> 19, 24, 0<br />}<br /><br />waypoint InsideTutBedroomDoor<br />{<br /> 43, 22, 1 <br />}<br /><br />/*******************************************************************************************<br />** Triggers added to start of game to launch tutorial.<br />********************************************************************************************/<br />trigger GameStart<br />{<br /> call CreateTendWifeQuest,<br /> call CreateBarricadeQuest,<br /> call OpeningConversation<br /><br />}<br /><br />/*******************************************************************************************<br />** Barricade quest... called after you've given Kate pills and bandages.<br />********************************************************************************************/<br />script CreateBarricadeQuest<br />{<br /> Quest.CreateQuest("BarricadeQuest", "Secure the Safehouse" );<br /> Quest.RunScriptOnComplete("SleepBeforeSupplies");<br /> Quest.AddGotoLocationTask("tutorial2A", "Go to the shed", ShedDoor);<br /> Quest.Unlock();<br /> Quest.UnlockNextTasksOnComplete(3);<br /> Quest.AddFindItemTask( "tutorial2B", "Find a hammer", Hammer, 1 );<br /> Quest.UnlockTaskOnComplete( "tutorial2D" );<br /> Quest.AddFindItemTask( "tutorial2E", "Find some wood", Plank, 1 );<br /> Quest.AddFindItemTask( "tutorial2F", "Find some nails", Nails, 1 );<br /> Quest.AddEquipItemTask( "tutorial2D", "Equip hammer", Hammer );<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddHardCodedTask("tutorial2G", "Barricade the safehouse doors and windows", "barricadeTutorial");<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddGotoLocationTask( "tutorial2ZZQ", "Return to Kate", InsideTutBedroomDoor );<br /> <br />}<br /><br />/*******************************************************************************************<br />** Opening quest. Make bandages, find pills. Give them to Kate.<br />********************************************************************************************/<br />script CreateTendWifeQuest<br />{<br /> Quest.CreateQuest("TendWifeQuest", "Tend to Kate's Broken Leg");<br /> Quest.RunScriptOnComplete("BobBarricade");<br /> Quest.AddFindItemTask("tutorial1B", "Find something to make bandanges", Sheet, 1);<br /> Quest.Unlock();<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddFindItemTask("tutorial1C", "Craft some bandages", RippedSheets, 8);<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddUseItemOnTask("tutorial1E", "Bandage Kate's leg", RippedSheets, Kate);<br /> Quest.AddFindItemTask("tutorial1Z", "Check the adjoining bathroom for painkillers", "Pills", 1 ); <br /> Quest.Unlock();<br /> Quest.AddUseItemOnTask("tutorial1ZZ", "Give Kate a pill", Pills, Kate);<br /> Quest.Unlock();<br /> Quest.RunScriptOnComplete("TakeThesePills");<br /> <br /> <br />}<br />/*******************************************************************************************<br />** Script where Kate says to sleep before hunting for supplies.<br />********************************************************************************************/<br />script SleepBeforeSupplies<br />{<br /> Player.Say("Okay, we're safe."); <br /> Kate.Say("My hero!"); <br /> <br /> if(IsNight())<br /> {<br /> Kate.Say("It's pitch black out there, hon.");<br /> }<br /> else<br /> {<br /> Kate.Say("It's going to be dark soon, hon.");<br /> }<br /> <br /> Kate.Say("You won't see the neighbors till they've taken chunks from you."); <br /> Kate.Say("We'll sleep hungry."); <br /> Hook.RegisterOneTime("OnPlayerWake", "WokeUpInTutorialBed");<br /> Player.Sleep(9.0);<br /> /*<br /> Script follows on from opening2.txt with "WokeUpInTutorialBed" next time the player wakes up.<br /> */<br /> <br />}<br /><br />/*******************************************************************************************<br />** Script called after giving pills / bandages to Kate.<br />********************************************************************************************/<br />script BobBarricade<br />{<br /> /* Needed to allow for time to say TakeThesePills if pills quest is done last.*/<br /> if(Player.IsSpeaking())<br /> {<br /> Wait(3.0); <br /> }<br /> <br /> Kate.Say("I'm sorry I fucked up hon.");<br /> Kate.Say("I screwed everything.");<br /> Quest.UnlockQuest("BarricadeQuest");<br />}<br /><br />/*******************************************************************************************<br />** Short dialogue once given Kate pills for player feedback if they do it first.<br />*******************************************************************************************/<br />script TakeThesePills<br />{<br /> Player.Say("Here, take one of these..."); <br /> <br />}<br /><br />/*******************************************************************************************<br />** Opening script<br />*******************************************************************************************/<br />script OpeningConversation<br />{ <br /> LockHud(true);<br /> Wait(2.0);<br /> Kate.Say("I'm sorry. I'm sorry.");<br /> Player.Say("It's fine. We can deal with this. Just...");<br /> LockHud(false);<br /> Quest.UnlockQuest("TendWifeQuest"); <br />}
waypoint OutsideSoupHouse<br />{<br /> 67, 17, 0<br />}<br /><br />waypoint ZombieSpawnLocation<br />{<br /> 66, 6, 0<br />}<br /><br />waypoint SafehouseKitchen<br />{<br /> 42, 22, 0<br />}<br /><br />activatable TutorialStove<br />{<br /> stove, 39, 21, 0<br />}<br /><br />container TutorialStoveContainer<br />{<br /> stove, 39, 21, 0<br />}<br /><br />/*<br />talker TutorialRadio<br />{<br /> 39, 22, 1, <br /> 255,255,255 <br />}<br />*/<br /><br />/*******************************************************************************************<br />** Trigger for creating fast food quest.<br />********************************************************************************************/<br />trigger GameStart<br />{<br /> call CreateFastFoodQuest,<br /> call CreateMakeSoupQuest,<br />}<br /><br />/*******************************************************************************************<br />** Making some soup for your lovely wife! Didn't it go well?<br />********************************************************************************************/<br />script CreateMakeSoupQuest<br />{<br /> Quest.CreateQuest("MakeSoupQuest", "Soup Kitchen" );<br /> Quest.AddFindItemTask( "a", "Get a cooking pot", Pot, 1 );<br /> Quest.Unlock();<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddFindItemTask( "b", "Find a tin opener and craft a pot of soup", PotOfSoup, 1 );<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddHardCodedTask( "c", "Put soup in oven and turn oven on", "tutSoupInStove" );<br /> Quest.RunScriptOnComplete("RadioWorks");<br /> <br />}<br /><br />/*******************************************************************************************<br />** Fast Food quest - Go next door and battle a zombie, before collecting soup and returning to safehouse.<br />********************************************************************************************/<br />script CreateFastFoodQuest<br />{<br /> Quest.CreateQuest("FastFoodQuest", "Fast Food" );<br /> <br /> /* Invisible task, spotting the zombie is put first, unlocked but hid so once it's completed (by spotting the zombie) it will unlock the 'kill the zombie' quest which will take precedence over getting food. <br /> since it's the first unlocked task which displays. */<br /> Quest.AddHardCodedTask( "tutorialaaa", "", "spotzombie" );<br /> Quest.UnlockButHide();<br /> Quest.UnlockTaskOnComplete( "tutorialCa" );<br /> Quest.AddHardCodedTask("tutorialA", "Leave the house", "PlayerOutside" );<br /> Quest.Unlock();<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddGotoLocationTask("tutorialB", "Carefully approach house to the east", OutsideSoupHouse );<br /> Quest.RunScriptOnComplete("SpawnZombieOnFastFood");<br /> Quest.UnlockTaskOnComplete("tutorialC");<br /> Quest.AddHardCodedTask( "tutorialCa", "Kill the zombie", "killzombie" );<br /> Quest.AddFindItemTask( "tutorialC", "Search the kitchen and collect some food supplies", TinnedSoup, 1 );<br /> Quest.UnlockNextTasksOnComplete(1);<br /> Quest.AddGotoLocationTask( "tutorialD", "Return to safehouse kitchen", SafehouseKitchen );<br /> Quest.RunScriptOnComplete("WeGotSoup");<br /> <br />}<br /><br />/*******************************************************************************************<br />** Called in opening.txt once you've woke up after a lovely nights sleep with Kate.<br />********************************************************************************************/<br />script WokeUpInTutorialBed<br />{<br /> Wait(1.0);<br /> if(Player.HasInventory(Hammer))<br /> {<br /> Kate.Say("I miss the days when we didn't take a hammer to bed."); <br /> }<br /> <br /> Player.Say("Time to go out. See what I can see.");<br /> Quest.UnlockQuest("FastFoodQuest");<br /> <br />}<br /><br />/*******************************************************************************************<br />** Spawns a zombie in the kitchen. Called when you hit outside of the soup house next door.<br />********************************************************************************************/<br />script SpawnZombieOnFastFood<br />{<br /> Player.Say("Spawning zombie.");<br /> World.SpawnZombie(ZombieSpawnLocation);<br /> Tutorial.SetZombieLimit(1);<br />}<br /><br />/*******************************************************************************************<br />** Called when Bob returns to safehouse kitchen from next door.<br />********************************************************************************************/<br />script WeGotSoup<br />{<br /> Player.Say( "We got soup!");<br /> Quest.UnlockQuest("MakeSoupQuest");<br />}<br /><br />/*******************************************************************************************<br />** Called after soup is put in oven and oven is turned on.<br />********************************************************************************************/<br />script RadioWorks<br />{<br /> Kate.Say("Honey! It's working!");<br /> Kate.Say("This piece of shit radio picked something up!");<br /><br /><br /> TutorialStove.Toggle();<br /> TutorialStoveContainer.AddInventory(PotOfSoup);<br /> <br /> if(TutorialStove.IsActivated() && TutorialStoveContainer.HasInventory(PotOfSoup))<br /> {<br /> Kate.Say("BURN!");<br /> <br /> }<br /> else<br /> {<br /> Kate.Say("NO BURN!");<br /> } <br />}
Almost 100% driven from the script (there are a few hardcoded quest conditions etc, e.g. to detect if you've barricaded the tut house, but I'll replace these with more scripty things asap) and all this is in, working... you're seeing the actual tutorial in script form as you could use it. WIP obviously.
Heh, classic coding.
Remains me my start on Gta Vice city coding^^
It is very INtense! :)
So going to buy!
I bought it months ago, before the piracy problem, when you could play it via web browser.
I bought it months ago, before the piracy problem, when you could play it via web browser.
Great, thanks!
Idk what to do what How is this getign me confuesed its a tutorial to prevent that T-T
I don't how to do any of this can someone explain please
Don't really see how this is a tutorial, all this is is "hey look here are what the scripts look like, you can edit them" and doesn't say anything about how to do so.
Quick Start to Modding: Theindiestone.com
RoboMat's Modding Tutorials: Theindiestone.com
I know this isn't the place to talk but I have to do it. Hello can anyone please help me out, how to spawn items in Project Zomboid? I cant find the command line! Please help. Where is the command line? I tried all letter's from the keyboard nothing seems to come up. And I tried typing on the CMD background behind the game, nothing's happening. Oh please oh please help me. Can anyone give me step by step procedure to bring the command line up? I want to spawn items. :_(