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
Script Help AddDiary issue
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#1
AddDiary issue

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

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: (Select All)
AddDiary("Diary_CH00L01_1""bg_letter.tga"); 

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

PHP Code: (Select All)
<Entry Name="Diary_CH00L01_1_Name1">Test</Entry>  
    <
Entry Name="Diary_CH00L01_1_Text1">Just testing</Entry

Any ideas?
07-27-2016, 09:57 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: AddDiary issue

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

(This post was last modified: 07-27-2016, 11:20 PM by Mudbill.)
07-27-2016, 11:18 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: AddDiary issue

(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.
07-28-2016, 12:45 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: AddDiary issue

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.

(This post was last modified: 07-28-2016, 01:01 AM by Mudbill.)
07-28-2016, 01:01 AM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#5
RE: AddDiary issue

(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
(This post was last modified: 07-28-2016, 03:06 PM by Slanderous.)
07-28-2016, 02:24 AM
Find




Users browsing this thread: 1 Guest(s)