Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item Description, Note text (LANG file problem)
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#1
Item Description, Note text (LANG file problem)

Hey I have a problem with my Item descriptions and my note.

I first had a note and 1 key and that worked excellent now I added another key and now nothing works anymore. Sad

I have this code:
void OnStart(){
    int GiveLanternOnStart = 1; // Set to 1 to receive a Lantern on start of game
    int TinderboxStartAmount = 5; // Amount of Tinderboxes you receive on start of game
    
    // SetPlayerSanity(100.0f);
    SetPlayerLampOil(0.0f);
        
    SetNumberOfQuestsInMap(2);
    
    AddQuest("Explore","Explore");
    
    PlayMusic("06_amb.ogg", true, 1, 3, 0, true);
    
    for(int i = 1; i != 147; i++){
        AddEnemyPatrolNode("waterlurker_1","PathNodeArea_" + i,0,"");
    }
}

//if(ScriptDebugOn()){
//    GiveItemFromFile("lantern","lantern.ent");
//        
//    SetPlayerLampOil(100.0f);
//
//    for(int i = 0; i != TinderboxStartAmount; i++){
//        GiveItemFromFile("tinderbox_"+i,"tinderbox.ent");
//    }
//}

void OnEnter(){
    AddUseItemCallback("","FirstCellDoorKey","FirstCellDoor","KeyOnBedRoomDoor1",true);
    AddUseItemCallback("","LockedSewerDoorKey","LockedSewerDoor1","KeyOnSewerDoor1",true);

    AddEntityCollideCallback("Player","ScriptAreaCloseBedRoomDoor1","CloseDoorBedRoom1",true,1);
    AddEntityCollideCallback("Player","ScriptAreaFirstCellRoom1SecretPassage","CellRoom1SecretPassage",false,1);
    // AddEntityCollideCallback("Player","ScriptAreaActivateWaterLurker","ActivateWaterLurker",true,1);
    
    SetEntityPlayerInteractCallback("FirstLockedDoor","FirstLockedDoorScare",true);
    SetEntityPlayerInteractCallback("FirstCellDoor","FirstLockedCellDoor",true);
    SetEntityPlayerInteractCallback("CellarDoor1","CellarRoom1Scare",true);
    
    SetEntityPlayerLookAtCallback("BedRoom1Door","BedRoom1ScareDoor",false);
}

void OnLeave(){
    
}

void FirstLockedDoorScare(string &in asEntity){
    PlaySoundAtEntity("","break_wood_metal",asEntity,0,false);
    GiveSanityDamage(5.0f,true);
    PlayMusic("react_breath2",false,100.0f,0.0f,1,false);
    // StartScreenShake(0.1f,1.0f,0.0f,0.75f);
}

void FirstLockedCellDoor(string &in asEntity){
    AddQuest("CellIsLocked","CellIsLocked");
}

void KeyOnBedRoomDoor1(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("FirstCellDoor",false,true);
    PlaySoundAtEntity("","unlock_door","FirstCellDoor",0.0f,false);
    RemoveItem("FirstCellDoorKey");
    GiveSanityBoost();
    PlayMusic("02_puzzle",false,100.0f,0.0f,1,false);
    AddDebugMessage("The Door has successfully opened. Congratulations!", false);
}

void CloseDoorBedRoom1(string &in asParent,string &in asChild,int alState){
    SetSwingDoorClosed("BedRoom1Door",true,true);
    PlayMusic("react_breath1",false,100.0f,0.0f,1,false);
    GiveSanityDamage(5.0f,true);
    AddTimer("BedRoom1ScareDoorTimer",2.0f,"LookAtBedRoom1Door");
    StartPlayerLookAt("BedRoom1Door",10.0f,50.0f,"BedRoom1ScareDoor");
}

void LookAtBedRoom1Door(string &in asTimer){
    RemoveTimer("BedRoom1ScareDoorTimer");
    StopPlayerLookAt();
}

void CellRoom1SecretPassage(string &in asParent,string &in asChild,int alState){
    PlayMusic("01_puzzle_passage",false,100.0f,0.0f,1,false);
    GiveSanityBoost();
    AutoSave();
    SetEntityActive("waterlurker_1",true);
    CheckPoint("CheckPoint1","PlayerStartArea_2","CellRoomCheckPoint","Hints","");
}

void CellRoomCheckpoint(string &in asName, int alCount){
    SetEntityActive("waterlurker_1",true);
    CheckPoint("CheckPoint1","PlayerStartArea_2","CellRoomCheckPoint","Hints","");
}

void CellarRoom1Scare(string &in asEntity){
    PlaySoundAtEntity("","notice","WoodenBoxScare1",0.0f,false);
    GiveSanityDamage(5.0f,true);
}

void KeyOnSewerDoor1(string &in asItem, string &in asEntity){
    // SetSwingDoorLocked("FirstCellDoor",false,true);
    PlaySoundAtEntity("","unlock_door","LockedSewerDoor1",0.0f,false);
    RemoveItem("LockedSewerDoorKey");
    GiveSanityBoost();
    PlayMusic("02_puzzle",false,100.0f,0.0f,1,false);
    AddDebugMessage("The Door has successfully opened. Congratulations!", false);
}

and my .lang file:
<LANGUAGE>
<RESOURCES>
    </RESOURCES>
        <CATEGORY Name="CustomStoryMain">
            <Entry Name="Description">My first level for Amnesia: The Dark Descent.[br]I created this level and hope you will enjoy it...</Entry>
        </CATEGORY>
    
        <CATEGORY Name="Ending">
            <Entry Name="MyCredits">- A SLEAZY BIGFOOT PRODUCTION -[br][br][br]- MY FIRST LEVEL -[br] - HORROR SURVIVAL PUZZLES - [br][br][br]*Ideas:[br]Sleazy Bigfoot[br][br]*Level Design:[br]Sleazy Bigfoot[br][br]*Scripting:[br]Sleazy Bigfoot[br](And kinda Dark88)[br][br][br][br]*Special thanks to:[br]FRICTIONAL GAMES[br]Dark88[br][br][br]Thank you for playing.  :)[br]Hope you enjoy this!</Entry>
        </CATEGORY>
        
        <CATEGORY Name="Inventory">
            <Entry Name="ItemName_FirstCellDoorKey">the key to unlock the cell.</Entry>
            <Entry Name="ItemDesc_FirstCellDoorKey">Tag reads "Cell room".</Entry>
            
            <Entry Name="ItemName_LockedSewerDoorKey">the key to unlock the sewer exit.</Entry>
            <Entry Name="ItemDesc_LockedSewerDoorKey">Tag reads "Sewer door".</Entry>
        </CATEGORY>
        
        <CATEGORY Name="Journal">
            <Entry Name="Quest_Explore_Text">Where am I?, maybe I should explore.</Entry>
            <Entry Name="Quest_CellIsLocked_Text">Find the key to open the locked cell door!</Entry>
            
            <Entry Name="Note_StrangeNoises_Name">Daniel - 1824 - February 19th.</Entry>
            <Entry Name="Note_StrangeNoises_Text">I have been hearing strange noises coming from below the cell downstairs.[br]
                                            It sounds like people are getting murdered down there![br]
                                            I am scared that it will eventually come to get me.[br]
                                            [br]
                                            I don't know what I should do.</Entry>
        </CATEGORY>
        
        <CATEGORY Name="Hints">
            
        </CATEGORY>
        
        <CATERGORY Name="Levels">
        
        </CATEGORY>
</LANGUAGE>

I hope someone can help me :p
12-27-2010, 05:33 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#2
RE: Item Description, Note text (LANG file problem)

Hmm... there are many options.. but i suggest you have too many spaces on lang.file Example: <Entry Name="ItemName_FirstCellDoorKey">the key to unlock the cell.</Entry>
<Entry Name="ItemDesc_FirstCellDoorKey">Tag reads "Cell room".</Entry>
This <-
<Entry Name="ItemName_LockedSewerDoorKey">the key to unlock the sewer exit.</Entry>
<Entry Name="ItemDesc_LockedSewerDoorKey">Tag reads "Sewer door".</Entry>
</CATEGORY>

Try it.

“Life is a game, play it”
12-27-2010, 06:48 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#3
RE: Item Description, Note text (LANG file problem)

"FirstCellDoorKey" and "FirstSewerDoorKey" must go in the CustomSubItemTypeName field in the entity tab of the keys in the level editor.
Took me a while to figure this one out, too.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
(This post was last modified: 12-27-2010, 06:52 PM by Frontcannon.)
12-27-2010, 06:52 PM
Find
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#4
RE: Item Description, Note text (LANG file problem)

@Humiliation

What are you talking about.


@Frontcannon

I tried it, but no succes Sad.


Also my note's don't show up Sad.
12-28-2010, 10:02 AM
Find
ModManDann Offline
Member

Posts: 61
Threads: 6
Joined: Dec 2010
Reputation: 0
#5
RE: Item Description, Note text (LANG file problem)

try to remove the last item you have added to your .lang and see if everything else starts working again. if so there's something wrong with the last entry you have put into it.

Current project: Mind Trap
12-28-2010, 04:04 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#6
RE: Item Description, Note text (LANG file problem)

(12-28-2010, 10:02 AM)bigfoot Wrote: @Humiliation

What are you talking about.


@Frontcannon

I tried it, but no succes Sad.


Also my note's don't show up Sad.

Im not sure about this there can be many mistakes try that what ModmanDann says Smile

“Life is a game, play it”
12-28-2010, 04:43 PM
Find
bigfoot Offline
Member

Posts: 58
Threads: 12
Joined: Dec 2010
Reputation: 0
#7
RE: Item Description, Note text (LANG file problem)

I actually just started making a new story. (a only puzzle story for my little sister lol. she doesn't want monsters and such)

and I made a new key. and still the same problem. Sad maybe I need to delete the crap I don't use?, like the hints category and the levels.

EDIT:

Ok so I deleted the Hints Category and Levels Category and the text works again :/ that was weird.

ah well who cares xD it's working lol.

Anyway thanks for the tips. Ill keep my "sentences" as short as possible to key's and other items just incase.

EDIT2:

My note's or quests (or both) aren't working yet.

I added a quest, and when I interact with the locked door, I hear the sound of a new note or quest but the text doesn't show up.

here is my code:
(hsp file)
void deurkamerkevin(string &in asEntity){
    PlaySoundAtEntity("","locked_door","mansion_door_1",0.0f,false);
    AddQuest("mansiondoor1","mansiondoor1");
    SetMessage("Message","KevinKamerDeurOpslot",0);
}

and my lang:

<CATEGORY Name="Message">
    <Entry Name="Message_KevinKamerDeurOpslot_Text">De deur zit op slot, ik heb een sleutel nodig!</Entry>
</CATEGORY>

Yes I know it's in my own language because my sister sucks at english lol.
(event becomes avant lol).

anyway I hope I can get this fixed, it's starting to bug me a lot Sad

Thanks in advance

________________________________________________
EDIT3:
________________________________________________

I think I have it right now. I left it the way it was in the .HPS file
and changed the .LANG file to this:

<CATEGORY Name="Journal">
    <Entry Name="Quest_mansiondoor1_Text">De deur zit op slot, ik heb een sleutel nodig.</Entry>
    
    <Entry Name="Note_StrangeNoises_Name"></Entry>
    <Entry Name="Note_StrangeNoises_Text"></Entry>
</CATEGORY>

I'm going to try with another quest i'll let it know if it works.
(This post was last modified: 12-28-2010, 06:08 PM by bigfoot.)
12-28-2010, 05:32 PM
Find




Users browsing this thread: 2 Guest(s)