Frictional Games Forum (read-only)
Combining Hammer and Chipper - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Combining Hammer and Chipper (/thread-8370.html)

Pages: 1 2


Combining Hammer and Chipper - Anxt - 06-01-2011

So, In my own custom story, and in many others, the combining of a hammer and chipper is required to accomplish things such as destroying padlocks.

Here's my problem: Combining them doesn't work for me. Whether it is in the script or not, the combination never works, and often prevents me from playing through custom stories.

I am wondering if there is an issue with my Inventory file, because I know that is where the combinations are placed for the main game, and I believe I recall seeing somewhere that in order to add a different combine function, the inventory file would have to be altered as well.

So, is it possible that my inventory file does not work properly? Or has somehow become messed up? I have tried updating the game, but it hasn't solved the issue.

Anyone have any thoughts?


RE: Combining Hammer and Chipper - Kyle - 06-01-2011

Perhaps I can show you my inventory file for the main game for you to compare? :/


RE: Combining Hammer and Chipper - Anxt - 06-01-2011

That would be nice, if you could. This bug has been irritating me for a while now, I'm not sure what causes it.


RE: Combining Hammer and Chipper - Kyle - 06-01-2011

This is what my inventory.hps looks like:

Code:
//////////////////////////////////
//BEGIN LEVEL 22 - COMBINE DRILL//
// ((and 21-27 really)
void CombineOrbPieceAndTar(string &in asItemA, string &in asItemB)
{
    SetInventoryMessage("Inventory", "CombineLevel22OrbPieceAndTar", -1);        
}

//////////////////////////////////
//BEGIN LEVEL 22 - TRY TO COMBINE ORBS//
// ((and 21-27 really)
void CombineOrbPieceAndOrbPiece(string &in asItemA, string &in asItemB)
{
    SetInventoryMessage("Inventory", "CombineLevel22OrbAndOrb", -1);        
}



//////////////////////////////////
//BEGIN LEVEL 12 - COMBINE DRILL//
void CombineDrill(string &in asItemA, string &in asItemB)
{
    if(GetGlobalVarInt("DrillParts") != 3){
        SetInventoryMessage("Inventory", "CombineLevel12Error", -1);
        return;
    }
    
    PlayGuiSound("12_make_drill", 1.0f);
    
    AddPlayerSanity(10);
    
    for(int i=1;i<=3;i++) RemoveItem("hand_drill_part0"+i);
    
    GiveItem("handdrill", "Puzzle", "hand_drill", "hand_drill.tga", 0);    
}
//END LEVEL 12 - COMBINE DRILL//
////////////////////////////////


///////////////////////////////////
//BEGIN LEVEL 15 - COMBINE HAMMER//
void CombineHammer(string &in asItemA, string &in asItemB)
{
    PlayGuiSound("15_make_hammer", 1.0f);
    
    AddPlayerSanity(10);
    
    RemoveItem(asItemA); RemoveItem(asItemB);
    
    GiveItem("stone_hammer_chipper", "Puzzle", "stone_hammer_chipper", "stone_hammer_chipper.tga", 0);    
}
//END LEVEL 15 - COMBINE HAMMER//
/////////////////////////////////

///////////////////////////////////
//BEGIN LEVEL 19 - COMBINE COPPER TUBE AND NEEDLE
void CombineCopperTubeAndNeedle(string &in asItemA, string &in asItemB)
{
    PlayGuiSound("15_make_hammer", 0.7f);
    
    RemoveItem(asItemA); RemoveItem(asItemB);
    
    GiveItem("copper_tube_and_needle", "Puzzle", "copper_tube_and_needle", "copper_tube_and_needle.tga", 0);        
}

//END LEVEL 19 - COMBINE COPPER TUBE AND NEEDLE
///////////////////////////////////

///////////////////////////////////
//BEGIN LEVEL 23 - COMBINE CONTAINER AND STRING

void CombineContainerAndString(string &in asItemA, string &in asItemB)
{
    PlayGuiSound("26_string_on_glass.ogg", 0.8f);
    
    RemoveItem(asItemA); RemoveItem(asItemB);
    
    GiveItem("container_and_string", "Puzzle", "container_and_string", "glass_container_string.tga", 0);        
}

//END LEVEL 23 - COMBINE CONTAINER AND STRING
///////////////////////////////////


///////////////////////////////////
//BEGIN LEVEL 26 - COMBINE CONTAINER AND INGREDIENT
void CombineSawIngr(string &in asItemA, string &in asItemB)
{
    if(asItemB == "agrippa_head_1")
        SetInventoryMessage("Inventory", "CombineLevel26SawHead", -1);
    if(asItemB == "poison_gland")
        SetInventoryMessage("Inventory", "CombineLevel26SawGland", -1);
    else
        SetInventoryMessage("Inventory", "CombineLevel26SawBone", -1);
}
void CombineMiscIngr(string &in asItemA, string &in asItemB)
{
    if(GetGlobalVarInt("WeyerNoteIsPicked") == 1)
        SetInventoryMessage("Inventory", "CombineLevel2126Ingredients02", -1);
    else
        SetInventoryMessage("Inventory", "CombineLevel2126Ingredients", -1);    
}

void CombineBloodAndIngredient(string &in asItemA, string &in asItemB)
{
    SetInventoryMessage("Inventory", "CombineLevel26BloodAndIngredient", -1);    
}

void CombineNotdoneMixAndIngredient(string &in asItemA, string &in asItemB)
{
    SetInventoryMessage("Inventory", "CombineLevel26NotdoneMixAndIngredient", -1);    
}



//END LEVEL 26 - COMBINE CONTAINER AND INGREDIENT
///////////////////////////////////



/////////////////////////////
//BEGIN LEVEL 04 - CHEMICALS//
void CombineChemicals(string &in asItemA, string &in asItemB)
{
    SetInventoryMessage("Inventory", "CombineLevel05Chemicals", 0);
}
void CombineChemicalsAndJar(string &in asItemA, string &in asItemB)
{
    SetInventoryMessage("Inventory", "CombineLevel05Chemicals", 0);
}
//END LEVEL 04 - CHEMICALS//
/////////////////////////////




//////////////
//TEST STUFF//
void TestFunc(string &in asItemA, string &in asItemB)
{
    RemoveItem(asItemA);
    SetSwingDoorLocked("door01", false, true);    
    //ExitInventory();
}
//////////////////
//START GAUNTLET//
void GauntletCombineHands(string &in asItemA, string &in asItemB)
{
    RemoveItem(asItemA);
    RemoveItem(asItemB);
    
    GiveItem("key", "Puzzle", "item_hand", "_temp_hand.tga", 0);    
}
//STOP GAUNTLET//
/////////////////




////////////////////////////
// Run at the start of the game.
void OnGameStart()
{
    //---- LEVEL 04 ----//
    AddCombineCallback("chem1chem2", "Chemical_1", "Chemical_2", "CombineChemicals", false);
    AddCombineCallback("chem1chem3", "Chemical_1", "Chemical_3", "CombineChemicals", false);
    AddCombineCallback("chem1chem4", "Chemical_1", "Chemical_4", "CombineChemicals", false);
    AddCombineCallback("chem2chem3", "Chemical_2", "Chemical_3", "CombineChemicals", false);
    AddCombineCallback("chem2chem4", "Chemical_2", "Chemical_4", "CombineChemicals", false);
    AddCombineCallback("chem3chem4", "Chemical_3", "Chemical_4", "CombineChemicals", false);
    for(int i=1;i<=4;i++) AddCombineCallback("chem"+i+"jar", "Chemical_"+i, "chemical_container_1", "CombineChemicalsAndJar", false);
    
    //---- LEVEL 12 ----//
    AddCombineCallback("drill_1_2", "hand_drill_part01", "hand_drill_part02", "CombineDrill", false);
    AddCombineCallback("drill_1_3", "hand_drill_part01", "hand_drill_part03", "CombineDrill", false);
    AddCombineCallback("drill_2_3", "hand_drill_part02", "hand_drill_part03", "CombineDrill", false);
    
    //---- LEVEL 15 ----//
    AddCombineCallback("stonechipperhammer", "stone_chipper_1", "stone_hammer_1", "CombineHammer", false);
    
    //---- LEVEL 19 ----//
    AddCombineCallback("coppertubeandneedle", "copper_tube_1", "hollow_needle_1", "CombineCopperTubeAndNeedle", false);
    
    //---- LEVEL 23 ----//
    AddCombineCallback("containerandstring","string_pile_2" , "glass_container_1", "CombineContainerAndString", false);
    
    
    
    //---- LEVEL 22 ----//
    for(int i=1; i<=6; ++i)
    {
        AddCombineCallback("tarandorbpiece"+i, "OrbPiece_"+i, "bucket_of_tar_1", "CombineOrbPieceAndTar", false);
    }    
        
    AddCombineCallback("orbandorbpiece12", "OrbPiece_1", "OrbPiece_2", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece13", "OrbPiece_1", "OrbPiece_3", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece14", "OrbPiece_1", "OrbPiece_4", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece15", "OrbPiece_1", "OrbPiece_5", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece16", "OrbPiece_1", "OrbPiece_6", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece23", "OrbPiece_2", "OrbPiece_3", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece24", "OrbPiece_2", "OrbPiece_4", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece25", "OrbPiece_2", "OrbPiece_5", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece26", "OrbPiece_2", "OrbPiece_6", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece34", "OrbPiece_3", "OrbPiece_4", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece35", "OrbPiece_3", "OrbPiece_5", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece36", "OrbPiece_3", "OrbPiece_6", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece45", "OrbPiece_4", "OrbPiece_5", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece46", "OrbPiece_4", "OrbPiece_6", "CombineOrbPieceAndOrbPiece", false);
    AddCombineCallback("orbandorbpiece56", "OrbPiece_5", "OrbPiece_6", "CombineOrbPieceAndOrbPiece", false);
    
    //---- LEVEL 26 ----//
    AddCombineCallback("sawonmeat", "bone_saw_1", "fresh_meat_remains_1", "CombineSawIngr", false);
    AddCombineCallback("sawonbone", "bone_saw_1", "fresh_meat_2", "CombineSawIngr", false);
    AddCombineCallback("sawonhead", "bone_saw_1", "agrippa_head_1", "CombineSawIngr", false);
    AddCombineCallback("sawongland", "bone_saw_1", "poison_gland", "CombineSawIngr", false);
    
    AddCombineCallback("glandonbone", "poison_gland", "fresh_meat_remains_1", "CombineMiscIngr", false);
    
    string[] vIngredients = {"poison_gland", "fresh_meat_remains_1"};
    
    for(int i=0; i<2; ++i)    
    {
        AddCombineCallback("blood_n_ingredient"+i,"glass_container_blood" , vIngredients[i], "CombineBloodAndIngredient", false);
        
        //Need to 3 different, depending on where it was created!
        for(int j=1; j<=3; ++j)
            AddCombineCallback("blood_n_ingredient"+i+"_"+j,"glass_container_mix_notdone_"+j , vIngredients[i], "CombineNotdoneMixAndIngredient", false);
    }
    
    /*for(int i=1; i<=3; ++i){
        x = i==3 ? 2 : i+1;
        y = i;
        AddCombineCallback("drill"+x+y, "hand_drill_part0"+x, "hand_drill_part0"+y, "CombineDrill", true);
    }*/

    //////////////
    //TEST STUFF//
    AddCombineCallback("test", "hand01", "hand02", "TestFunc", true);
    //GAUNTLET//
    AddCombineCallback("makekey", "hand1", "hand2", "GauntletCombineHands", true);
}



RE: Combining Hammer and Chipper - Anxt - 06-01-2011

Well, I don't think it's the inventory file then, because mine is identical to that.

This is very frustrating Sad


RE: Combining Hammer and Chipper - skypeskype - 06-01-2011

Hmm... I found this problem in someone else's custom story, although the creator said that it was working for him. He gave us a save file from after breaking the padlock. I know this isn't helping you, but I just felt like posting it. I'll try to remember what custom story it was. Everything I DO remember is that it had a storage with a brute in it and a prison-like area in there.


RE: Combining Hammer and Chipper - Anxt - 06-01-2011

I know the one you are talking about, but I am also having the same issue with my own custom story, plus The Sins We Hide, which I greatly enjoyed up until that point, and I would have loved to finish it, but I really don't want to go back through it again. I'd just like to find a solution so I can go back to actually playing through the custom stories people release Tongue


RE: Combining Hammer and Chipper - ferryadams10 - 06-01-2011

Just use the Inventory.hps of the original game Tongue



RE: Combining Hammer and Chipper - Anxt - 06-01-2011

Custom stories default to the main game's inventory.hps. So it should already be using it.


RE: Combining Hammer and Chipper - Acies - 06-01-2011

Yes, this is weird indeed. Have you been editing your original inventory file?