Frictional Games Forum (read-only)
[SCRIPT] AddDiary issue - 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: [SCRIPT] AddDiary issue (/thread-51675.html)



AddDiary issue - Slanderous - 07-27-2016

I'm planning to add a diary via script at a certain point in my mod, so I used this function:

Code:
void AddDiary(string& asNameAndTextEntry, string& asImage);
Adds a diary to the player's journal.
asNameAndTextEntry - entries in the .lang file. Must end with _NameX and _TextY whereas X and Y
are numbers of the parts (_Name1: first diary, _Text1: first page) and be in category “Journal”!
asImage - the background image to be used

The problem is that not only the text is not being shown, but also the background image doesn't load up.

Here's the script I have for the diary:

PHP Code:
AddDiary("Diary_CH00L01_1""bg_letter.tga"); 

And here are the entries in .lang file (journal category):

PHP Code:
<Entry Name="Diary_CH00L01_1_Name1">Test</Entry>  
    <
Entry Name="Diary_CH00L01_1_Text1">Just testing</Entry

Any ideas?


RE: AddDiary issue - Mudbill - 07-27-2016

Do you have both the bg_letter_large.tga and bg_letter_icon.tga files?
Referring to this: https://www.frictionalgames.com/forum/thread-25026.html


RE: AddDiary issue - Slanderous - 07-28-2016

(07-27-2016, 11:18 PM)Mudbill Wrote: Do you have both the bg_letter_large.tga and bg_letter_icon.tga files?
Referring to this: https://www.frictionalgames.com/forum/thread-25026.html

Yeah. They are where they're supposed to be.


RE: AddDiary issue - Mudbill - 07-28-2016

Well in that case I don't think you're supposed to include .tga in your script. Make sure they are also located within the scope of your resources.cfg.


RE: AddDiary issue - Slanderous - 07-28-2016

(07-28-2016, 01:01 AM)Mudbill Wrote: Well in that case I don't think you're supposed to include .tga in your script. Make sure they are also located within the scope of your resources.cfg.

Okay, will do that when I'm able to.

Edit: While I was able to solve the first issue with Romulator's help, the image still doesn't show up. I got rid of the .tga extension, and "graphics" is visible in my resources.

Edit 2: The issue has now been resolved. Thanks to Romulator and Mudbill for the help Tongue