inventory.hps just doesnt work. - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: inventory.hps just doesnt work. (/thread-19017.html) |
inventory.hps just doesnt work. - Cherubeal - 10-31-2012 Im trying to make two items combine together. The code im using is here: void OnGameStart() { AddCombineCallback("", "Piracetam", "SalvinaDinorum", "MadPotFun", true); } void MadPotFun(string &in asItemA, string &in asItemB) { RemoveItem("Piracetam"); RemoveItem("SalvinaDinorum"); GiveItem("MadnessPotion", "Puzzle", "MadnessPotion", "chemical_container_full.tga", 1); } Its currently in inventory.hps in my maps file. The names of all the items are definitely correct. The code doesnt work when moved into the main hps file (moving the on game start function to the OnStart section). I tried entering wrong syntax on purpose into my inventory file to see if its even running because i figured an error would return. The game doesnt report back an error. Ive tried renaming, moving, recreating, shifting, refreshing and editing the inventory.hps file to try and connect it and nothing. Is. Working. This is driving me insane. And yes it is called "inventory.hps" with lowercase i. <Entry Name="ItemDesc_SalvinaDinorum">"A jar of powdered Salvina Dinorum"</Entry> <Entry Name="ItemName_SalvinaDinorum">"Salvina Dinorum"</Entry> <Entry Name="ItemDesc_Piracetam">"A jar of concentrated Piracetam"</Entry> <Entry Name="ItemName_Piracetam">"Concentrated Piracetam"</Entry> My lang file entry that DOES work to show all the names are correct. All i get when trying to combine is "That combination doesnt work". The function never calls. The file is never linked. What on earth to i do. Thanks in advance. Im going to destroy my computer at this rate. RE: inventory.hps just doesnt work. - Lizard - 10-31-2012 (10-31-2012, 10:42 PM)Cherubeal Wrote: Im trying to make two items combine together. The code im using is here: Try this: GiveItem("chemical_container_full", "Puzzle", "MadnessPotion", "chemical_container_full.tga", 1); also its called void OnStart() and not void OnGameStart() RE: inventory.hps just doesnt work. - FlawlessHappiness - 10-31-2012 In the inventory file it is: OnGameStart() And the giveitem seems correct. Did you place the .hps file the right place? Usually small mistakes make big errors RE: inventory.hps just doesnt work. - Cherubeal - 10-31-2012 (10-31-2012, 11:11 PM)beecake Wrote: In the inventory file it is: OnGameStart()Ive put it in my map directory and tried it. I put it in the folder above that. I put it in the custom story folder. Ive put it in every possible place inside my custom story folder and it doesnt work. I always restart the game before every test. Ive done them all a few hundred times. RE: inventory.hps just doesnt work. - Your Computer - 11-01-2012 The correct spot is in the same folder as your maps (this is usually the maps folder, and the place you had it in to begin with). Could you tell us the exact entities you are using for the combination? RE: inventory.hps just doesnt work. - Cherubeal - 11-01-2012 (11-01-2012, 12:23 AM)Your Computer Wrote: The correct spot is in the same folder as your maps (this is usually the maps folder, and the place you had it in to begin with).Thats where its sitting now yeah. Im combining a renamed flask01_aqua_regalia and a chemical_container. As an unrelated question if i fill the inventory script with errors will it crash the game or just render the script useless? RE: inventory.hps just doesnt work. - Your Computer - 11-01-2012 (11-01-2012, 12:34 AM)Cherubeal Wrote: Thats where its sitting now yeah. Im combining a renamed flask01_aqua_regalia and a chemical_container. As an unrelated question if i fill the inventory script with errors will it crash the game or just render the script useless? I'm not sure if it'll cause the game to exit with an error for a regular custom story. It may revert to the original inventory.hps or simply not care about it. I will try testing those items on my end and see if i can duplicate your issue. I was unable to duplicate your issue using your code (i.e. it worked fine for me). How do you give the player the chemical container? RE: inventory.hps just doesnt work. - Cherubeal - 11-01-2012 (11-01-2012, 02:49 AM)Your Computer Wrote:Both items just sit there on different tables for the player to pick up normally.(11-01-2012, 12:34 AM)Cherubeal Wrote: Thats where its sitting now yeah. Im combining a renamed flask01_aqua_regalia and a chemical_container. As an unrelated question if i fill the inventory script with errors will it crash the game or just render the script useless? |