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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing "Diary" section into something useful (Maps)
Author Message
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
Daemian Offline
Posting Freak

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

Good job.

04-07-2014 08:46 PM
Find all posts by this user Quote this message in a reply
Wapez Offline
Senior Member

Posts: 360
Joined: Mar 2012
Reputation: 19
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
PutraenusAlivius Offline
Posting Freak

Posts: 4,712
Joined: Dec 2012
Reputation: 119
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #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 all posts by this user Quote this message in a reply
Slanderous Offline
Posting Freak

Posts: 1,608
Joined: Dec 2012
Reputation: 62
Post: #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 all posts by this user Quote this message in a reply
Mudbill Offline
Posting Freak

Posts: 3,527
Joined: Apr 2013
Reputation: 166
Post: #8
RE: Changing "Diary" section into something useful (Maps)

Of course you can use it x)
Thanks!

04-12-2014 12:52 PM
Find all posts by this user Quote this message in a reply
DnALANGE Offline
Banned

Posts: 1,550
Joined: Jan 2012
Post: #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 all posts by this user Quote this message in a reply
Darkfire Offline
Senior Member

Posts: 341
Joined: May 2014
Reputation: 13
Post: #10
RE: Changing "Diary" section into something useful (Maps)

Hi. I noticed you can do the same to notes:
<Entry Name="Notes">MAPS</Entry>
for example.
I wanted to do the same to mementos as well, so they looked like
Notes instead of NOTES
Diaries DIARIES
Mementos MEMENTOS
as in the original game.

However, I don't know how to edit the mementos section.
I already tried "Mementos", "Quests", "Missions" and singular versions of those words. They don't work though.
Any ideas ?

Yeah I hear the Peace^lords are after you or some shit
Chromanin
SDP
06-25-2015 09:10 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)