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
Changing "Diary" section into something useful (Maps)
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#1
Information  Changing "Diary" section into something useful (Maps)

This quick little guide is a suggestion if you'd like to make use of the "Diary" section of the journal without adding just plain old diary pages. In the original game, the diaries worked pretty well, but for custom stories, they easily get redundant because they're so much like regular notes. Here are a few things you can do about it!


This works for MODS as well as CUSTOM STORIES.


Take advantage of the customized background
[Image: tAetUl3.png]

This can be used for many things. I'm going to show you how you can make cool looking in-game maps for your story. You can of course make anything else you'd like, for example easter egg photos or art or such.

Let's start by changing the whole DIARY section of the journal to our own section. Open your extra_english.lang file and create an entry like this one within your Journal category.

PHP Code: (Select All)
<Entry Name="Diaries">MAPS</Entry

The entry must be named Diaries and I recommend you make the text upper case, because that's how it is originally. This will now change your journal to display MAPS instead of DIARIES when you press J. While we're at it, let's also add the entry for the diary itself.

PHP Code: (Select All)
<Entry Name="Diary_MapMachine_Name1">Map of Machine Room</Entry>
<
Entry Name="Diary_MapMachine_Text1"></Entry

Notice how I left the Text blank. You don't want text over your image, but you can have a title. Edit the MapMachine to whatever you want to use.

The next part includes giving the player a diary note that displays the map. There are two ways you can give them the note. Editor and script. Both require a little work. But before we do that, let's make sure we've prepared our custom background image file.

Creating the image

I use Photoshop for creating images, but a free alternative is Gimp. I'm gonna let you take care of how to aquire your image :P

The primary background does not need a pow² resolution. In other words, just make it a suitable size of around 500x500 pixels. You can add some if you'd like, but if it exceeds it, it might underlap the title and close button, which is ugly.
Export the image as Targa (.tga). DON'T FORGET to add an alpha channel, or else the transparency won't work around the edges!

Also, when naming the file, name it <yourfile>_large.tga. This is because you need 2 images. Once you're done, resize another copy to 20x20 pixels. Export it just the same, this time naming it <yourfile>_icon.tga.

My files look like this:

Spoiler below!
machineroom_map_large.tga
[Image: nPCYwAk.png]

machineroom_map_icon.tga
[Image: fGItunl.png]

Now we have the images. Place them in custom_stories\<yourstory>\graphics\journal.

Editor

In order to get your custom background to work on the diary note item itself, you need to create a new entity for it. This is because the background is baked into it. You won't need to do this if you're using the script method.

PS: Narration is locked on the diary note. This means that if you do not add a voice file in the lang entry, the item will instantly jump to the journal as you pick it up without giving the player any preview. Take a look at the optional details below.

Open the Model Editor and find diary_paper01.ent. Go to Settings > User Defined Variables and at the bottom you'll find ImageFile. Change that to the name of your own file EXCLUDING _large.tga. If you named yours map1_large.tga, then only write map1 into the box. Once you're done, go to Save as and name it something else (for example map_machineroom or something).

Remember that when using custom entities in your custom story, you need to keep the .ent file in the entities folder in order to use them in the Level Editor. This does not apply to the game itself though, so copy the file to custom_stories\<yourstory>\entities when you're gonna give the story to someone else.

Once you're done, simply add the item to your map with the Level Editor. Go on the Entity tab and add the entry for the title in the DiaryText box.

Script

If you do not want to make a custom entity, you can use the script. There is a simple line that does all the work for you.

PHP Code: (Select All)
AddDiary(stringasNameAndTextEntrystringasImage); 

Just enter the lang entry and the image name (excluding _large again). This will give them the map right away. The only difference is that they won't know they got it unless you make it obvious. Those details can be added manually.

Extra optional details

Spoiler below!
If you want to fix some mentions of "diary" in the game, add these to your lang:

Journal category:

PHP Code: (Select All)
<Entry Name="DiariesEmpty">No maps are available!</Entry

Outside the Journal category:

PHP Code: (Select All)
<CATEGORY Name="Actions">
    <
Entry Name="RecentTextTooltip">Brings up most recently read text (note or map).</Entry>
</
CATEGORY

If you have the diary item in your level and do not use any voice files in the lang, you can simulate the PickUp effect of any item instead. On the Entity tab of the diary note at the bottom, is the callback. Write something there (for example MapMsg), then add this to your script file:

PHP Code: (Select All)
void MapMsg(string &in asItemint iDiaryIdx)
{
    
SetMessage("Message""PickUpMap"3);
    
GiveHint("maphint""Hints""HintPickMap", -1);


Also add this to your .lang file:

PHP Code: (Select All)
<CATEGORY Name="Message">
    <
Entry Name="PickUpMap">Picked up Map</Entry>
</
CATEGORY>

<
CATEGORY Name="Hints">
    <
Entry Name="HintPickMap">You have picked up a mapTo view your mapsopen the journal ($ButJournal) and click on maps.</Entry>
</
CATEGORY

This will add a pickup message as well as a hint for the map, making it easier for the player to know what's going on. This applies to both editor and script methods.



I think that's everything. This obviously turned out way longer than I thought. Hopefully I didn't forget anything, but if you have anything to add, just tell me ^^

Thanks for checking it out! Heh, took me a few hours to write.

(This post was last modified: 06-01-2015, 09:35 AM by Mudbill.)
04-07-2014, 08:34 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: Changing "Diary" section into something useful (Maps)

Good job.

04-07-2014, 08:46 PM
Find
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#3
RE: Changing "Diary" section into something useful (Maps)

This will probably be useful for a lot of people. Well done!

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
04-08-2014, 01:33 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Changing "Diary" section into something useful (Maps)

(04-07-2014, 08:46 PM)Amn Wrote: Good job.

(04-08-2014, 01:33 PM)Wapez Wrote: This will probably be useful for a lot of people. Well done!

Thank you =)
I just started experimenting with this like yesterday, and I didn't expect it to work this well for custom stories.

A few other ideas I had for this instead of making them into maps were for example having the section for photos or images that are picked up. I mentioned easter eggs too cause maybe someone would want that, I dunno. I might make use of this at some point.

04-08-2014, 03:12 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#5
RE: Changing "Diary" section into something useful (Maps)

Is it possible to make the section to load multiple stuff? I'm assuming you can because you can just change a diary to an image and leave the original diary to read.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-08-2014, 03:32 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Changing "Diary" section into something useful (Maps)

(04-08-2014, 03:32 PM)SomethingRidiculous Wrote: Is it possible to make the section to load multiple stuff? I'm assuming you can because you can just change a diary to an image and leave the original diary to read.

The background depends on the item itself, so it could work to have the diaries as well as the maps in the same section. You don't even need to use the diaries for this. You can use normal notes. I just decided to replace the diary section because it's not much used, and I like to keep different things separated (ex: notes vs maps).
As for adding more sections on the journal menu, I think that's hard coded in the game, so I don't really think that can be done. I'm not sure though.

(This post was last modified: 04-08-2014, 03:58 PM by Mudbill.)
04-08-2014, 03:57 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#7
RE: Changing "Diary" section into something useful (Maps)

Well-done Mudbill! May I use it in my next IFC project? Rep+ for making awesome stuff!
04-12-2014, 11:49 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Changing "Diary" section into something useful (Maps)

Of course you can use it x)
Thanks!

04-12-2014, 12:52 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#9
RE: Changing "Diary" section into something useful (Maps)

Nice job thre Mud*
With all the respect, i already did this in my mod Mental Memorial.
It was very annoying to create at first, but when i did used to it, i also did make it in Premonition as well.
Looks cool to have your own note pictures.
Anyways,
I will +REP for this tutorial!
10-15-2014, 12:32 PM
Find
Darkfire Offline
Senior Member

Posts: 371
Threads: 22
Joined: May 2014
Reputation: 15
#10
RE: Changing "Diary" section into something useful (Maps)

I've benefitted greatly from this tutorial, so I'll add my part:

There is a file called base_english.lang
You can copy some of the entries from it to your extra_english.lang and (provided that they are placed in the correct category) they'll change different stuff. So far I found that you cannot change the inventory messages, but the jounal is fully customisable:

<CATEGORY Name="Journal">
   <Entry Name="Notes">NOTES</Entry>
   <Entry Name="Diaries">DIARIES</Entry>
   <Entry Name="Quest Log">MEMENTOS</Entry>
   <Entry Name="Back">Back</Entry>          //this doesn't appear anywhere for some reason
   <Entry Name="MainBack">BACK</Entry>      //this changes ALL "back" messages in the inventory
   <Entry Name="NotesEmpty">No notes are available!</Entry>
   <Entry Name="DiariesEmpty">No diaries are available!</Entry>
   <Entry Name="QuestsEmpty">No mementos are available!</Entry>
 </CATEGORY>

Hints can be changed (and, as OP mentioned, added) in the same manner:
<CATEGORY Name="Hints">
    <Entry Name="LanternNoItem">You need to find a flashlight before one can be turned on.</Entry>
    
    <Entry Name="PickOil">The Flashlight drains battery when it is turned on.
       To recharge the flashlight, double click on the battery item in the Inventory ($ButInventory).</Entry>

       <Entry Name="PickLantern">If you found a flashlight, you can turn it on by pressing $ButLantern
or selecting it in the Inventory ($ButInventory).</Entry>

<Entry Name="DefaultDeath">YOU DIED</Entry>
    
</CATEGORY>
In this example I changed some mentions of the lantern into flashlight.
Also, for some reason, the default death screen is in the hints category. You can add this entry so that you don't have to change the death screen manually all the time.

The General category is customisable as well:
<CATEGORY Name="General">
   <Entry Name="Loading">Loading...</Entry> //this is the text displayed between levels, underneath the loading screen
   <Entry Name="TheEnd">The End</Entry> //this is displayed after the credits
 </CATEGORY>



As mentioned before, this works for FC's and CS's alike. However in FC's you probably can change all the entries.


This post has been edited, previously I asked how to change the mementos entries. Hence the following replies

(This post was last modified: 09-08-2018, 02:59 PM by Darkfire.)
06-25-2015, 09:10 PM
Find




Users browsing this thread: 2 Guest(s)