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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UPDATED+Pictures!Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#1
Bug  UPDATED+Pictures!Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

Hi to all!!!
This is a TUTORIAL how to get your own designed HUDS to work!

ONLY FOR FULL CONVERSIONS!!!

Let's start!

This tutorial i make is for those who want their OWN CUSTOM HUD

What you have to do is this:

1 :Go to PAINT\Photoshop e.g. etc, and make your own Picture.

ALWAYS make your pictures size
: 32x32 \ 64x64 \128x128 \ 256x 256 \ 512x512 \ 1024x1024 \ 2048x2048 \ 4096x4096
,higher isnt really visible to the eye, i suggest : 2048x2048 or 1024x1024.
HINT:In paint you can change the size here : IMAGE \ RESIZE, Just resize the 2 PIXEL SIZE,-> width and height
Save it as jpg,dds AND tga!!!
*Why?, for some reason if you miss one sometimes it won't show up!!
- JPG is NOT needed, but if you need to change something, you have it close to your other files-
Also then you have everything you need in that folder if you need to change your hud later on.*
-
HINT : Be aware that EVERYTHING around your hud, MUST BE ERASED, with the erasor or use the tool : MAGIC WANDIf you don't do that, the surrounding colors will been shown in game.

-

*Picture Hud\CREATED IN PAINT.NET:
[img][Image: j0ux.png][/img]-----

2 : Create a folder called:
E.g, CustomHud_Phone and be sure to have it Like this for example: C:/Amnesia/redist/MYMOD/mymod_graphics\PHONE
Put all your Hud files in there "dds,jpg,tga.
*The game will find it, Don't wory!*
*Picture Paint,
[img][Image: ucvt.jpg][/img]
3: The SANITYEVENTS!!

*Picture: [img][Image: z7gk.jpg][/img]

Hint : Remove all the STANDARD events that you DON'T WANT TO USE!
or they will been activated randomly IF you do NOT deactivate them with : SetInsanitySetEnabled("HUDNAME", false);[/u]
.
-
The problem with the sanity events is this:
THEY WORK RANDOMLY!!!!
So, what you have to do is this: Open up your main_sanity_event.cfg and here is an example for you! be free to copy\paste.
---
<InsanityEvents>

<SoundStream
Name = "event_1a"
Set = "PHONE"
MaxSanity = "100"

File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"

FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"

FadeImageFile = "PHONE.tga"

DisablePlayer = "false"
/>

Hint: [/u].

4: WHAT DOES WHAT DO, here is a short IMPORTANT explanation:

Name = "event_1a" <-- is the name of the event "YOU CAN NAME THIS ALL YOU WANT"
-
Set = "PHONE" <-- is your [u]HUDNAME
, your name in the SCRIPT
-
File = "YOURMUSIC\SOUND.ogg" <-- your music\sound file.
-
FadeOutTime = "1000000000" <-- Don't worry about this,only takes care that event will" always stays activated" 1000000000 = 27777hours.
-
FadeImageFile = "PHONE.tga" IMPORTEND ONE! This is your Custom CREATED HUD, the .Jpg\dds\tga you created in paint\photeshop,etc.
-
*** I think the other lines ones are easy to understand, like timers and fadein's***

5: The Actual Script!!

Here is an example of a script for the Hud!
void OnStart()
{
AddEntityCollideCallback("Player", "SCRIPTAREA_IN_THE_EDITOR", "GoCheckthehud", false, 1);
AddEntityCollideCallback("Player", "SCRIPTAREA_IN_THE_EDITOR", "GoStoptheHud", false, 1);
}
/////Activate Hud/////
void GoCheckthehud(string &in asParent, string &in asChild, int alState)
{
SetLocalVarInt("PHONEHUD", 1);
SetInsanitySetEnabled("HUD2", false); <---this will DEACTIVATE OTHER HUDS!
SetInsanitySetEnabled("HUD3", false);<---this will DEACTIVATE OTHER HUDS!
SetInsanitySetEnabled("HUD4", false);<---this will DEACTIVATE OTHER HUDS!
SetInsanitySetEnabled("PHONE", true);
AddTimer("reconfigure", 0, "reconfigure");
AddTimer("startevent", 0.1, "startevent");
checkit();
}

void reconfigure(string &in asTimer)
{
SetInsanitySetEnabled("HUD1", false);
SetInsanitySetEnabled("HUD2", false);
SetInsanitySetEnabled("HUD3", false);
SetInsanitySetEnabled("PHONE", true);
}

void startevent(string &in asTimer)
{
StartRandomInsanityEvent();
}

/////THIS WILL STOP THE HUD AND LOOK NORMAL AGAIN/////
void GoStoptheHud(string &in asParent, string &in asChild, int alState)
{
SetInsanitySetEnabled("PHONE", false);
AddTimer("config1", 0.1, "config1");
}

void checkit()
{
if(GetLocalVarInt("PHONEHUD") == 1)
{
SetInsanitySetEnabled("HUD1", false);
SetInsanitySetEnabled("HUD2", false);
SetInsanitySetEnabled("HUD3", false);
SetInsanitySetEnabled("PHONE", true);
}
}

void config1(string &in asTimer)
{
SetInsanitySetEnabled("Default", false);
SetInsanitySetEnabled("PHONE", false);
StartRandomInsanityEvent();
}

---------------
6 :Short EXTRA information and explination!

As youcan see there are a LOT of : SetInsanitySetEnabled("", true);
This is cause the engine\game will reset the sanity event if you don't restart it often!
So what i did "could be a bit different i guess" is activate the HUD often and be 100% sure the OTHER huds are tuned OFF "if you have more huds offcourse, like: HUD1/HUD2,HUD3 etc.."
---
The thing here is also! at the end you see this :
SetInsanitySetEnabled("Default", false);
SetInsanitySetEnabled("PHONE", false);
StartRandomInsanityEvent();
-----
There maybe isn't a "DEFAULT" in your SANITYEVENT.CFG
it doesn't really matter cause the game has turned sanityevent off in the script above!
-
7 : So the thing what you NEED to change is one of the most importend things! main_sanity_events.cfg.

CHECK THE PICTURE ABOVE FOR MORE HELP!
Do this INSIDE the main_sanity_eventcfg:
Make 26 files and copy them all!
so I'll try to show here what i mean:

<InsanityEvents>

<SoundStream
Name = "event_1a"
Set = "PHONE"
MaxSanity = "100"

File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"

FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"

FadeImageFile = "PHONE.tga"

DisablePlayer = "false"
/>

<InsanityEvents>

<SoundStream
Name = "event_1b"
Set = "PHONE"
MaxSanity = "100"

File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"

FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"

FadeImageFile = "PHONE.tga"

DisablePlayer = "false"
/>
<InsanityEvents>

<SoundStream
Name = "event_1c"
Set = "PHONE"
MaxSanity = "100"

File = "silence.ogg"
Volume = "1"
SoundDelayTime = "0.2"

FadeScreen = "true"
FadeColor = "1 1 1 1"
FadeInTime = "0"
FadeOutTime = "1000000000"

FadeImageFile = "PHONE.tga"

DisablePlayer = "false"
/>
---
As you see i've changed 1a 1b 1c -> do that untill you reach 26 times! and yeah.. the file will get BIG!
-
The thing is here:
StartRandomInsanityEvent(); is an RANDOM EVENT!
For some unknown reason there is and INVISIBLE DEFAULT\STANDARD hud!
That "invisible"HUD will screw up your custom hud!
BUT if you have like 25 copy's of the sanityevents, you have 25 times MORE change to get the HUD to work! like +- 95% change that it will work!
I had 1 event the whole time, it worked, BUT randomly!
SO, make sure you have at least 25 events, like above here!
---
8 : Rescources.cfg

The thing you need to create is a TEXTfile { txt } or Just copy the Original amnesia resources.cfg in your mod's MAIN FOLDER.
Open that file with Notepad++ {best for beginners}.
Look at the files and try to understand them a little bit,
cause you need to put YOUR MOD there as the FIRST LINE.
SO i have an example of MY upcoming Mod :


<Resources>
<Directory Path="Investigator" AddSubDirs="true" />
<Directory Path="billboards" AddSubDirs="true" />
<Directory Path="Investigator_billboards" AddSubDirs="true" />
<Directory Path="commentary" AddSubDirs="true" />
<Directory Path="Investigator_entities" AddSubDirs="true" />
<Directory Path="entities" AddSubDirs="true" />
<Directory Path="flashbacks" AddSubDirs="true" />
<Directory Path="gui" AddSubDirs="true" />
<Directory Path="lights" AddSubDirs="true" />
<Directory Path="Investigator_main_menu" AddSubDirs="true" />
<Directory Path="main_menu" AddSubDirs="true" />
<Directory Path="maps" AddSubDirs="true" />
<Directory Path="Investigator_graphics" AddSubDirs="true" />
<Directory Path="Investigator_misc" AddSubDirs="true" />
<Directory Path="Investigator_models" AddSubDirs="true" />
<Directory Path="music" AddSubDirs="true" />
<Directory Path="Investigator_music" AddSubDirs="true" />
<Directory Path="Investigator_particles" AddSubDirs="true" />
<Directory Path="particles" AddSubDirs="true" />
<Directory Path="Investigator_textures" AddSubDirs="true" />
<Directory Path="textures" AddSubDirs="true" />
<Directory Path="shaders" AddSubDirs="true" />
<Directory Path="sounds" AddSubDirs="true" />
<Directory Path="Investigator_sounds" AddSubDirs="true" />
<Directory Path="Investigator_static_objects" AddSubDirs="true" />
<Directory Path="static_objects" AddSubDirs="true" />
<Directory Path="viewer" AddSubDirs="true" />

</Resources>

As you can see MY MOD is on the FIRST LINE, so the game FIRST checks YOUR MODS files!
For the rest you DON'T really need the other files, buit i just do them as an extra "will come back for this later need to test some more for this"
---
*Picture
[img][Image: wuvs.png][/img]

---
So, this wall of tekst is maybe a bit annoying but if there are questions!
Be free to ask, people might want to use this in the future!

Edit:
It works 100%!
BUT when you try to do the event fast after eitchother, THEN % will get +-90\100%

DnALANGE
(This post was last modified: 07-29-2013, 01:54 PM by DnALANGE.)
07-23-2013, 07:03 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#2
RE: Working Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

Tips for your tutorial...

(1) Do more bolding or color coding for steps that should be clearly noticed by the reader and acknowledged by the reader to be of some importance.

(2a) Add pictures (Makes it much easier to see what the reader should be doing and to compare notes!), text can be a real pain sometimes. Especially if you aren't good at writing technical writing and or have spelling errors.
(2b) To elaborate, you have quite a lot of spelling errors, and your wording is more twitter/facebook friendly, not so good for something that needs every step done correctly.

I've had many headaches on tutorials amateurishly done (Which is a pain in the ass by itself) only to find out in the end in a side-note, they put a tag. "May or may not work; Only for this version; Bla bla bla". WTF?

Since you have a "Edit: It will NOT work 100% mostly like 90-95%" that is very worrying and I would consider this tutorial useless if it isn't guaranteed to work 100% if I follow every step correctly.

(3) Include all complete, WORKING files so the reader has something to look back at to before asking for help.
Things that should be included, are all the maps, scripts, the actual "Picture" you asked to make and anything else of importance.

///////
Your tutorial sounds interesting, hence why I clicked it. But I won't bother using it unless it's guaranteed to work 100%.
07-23-2013, 09:01 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#3
RE: Working Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

(07-23-2013, 09:01 PM)Rapture Wrote: Tips for your tutorial...

(1) Do more bolding or color coding for steps that should be clearly noticed by the reader and acknowledged by the reader to be of some importance.

(2a) Add pictures (Makes it much easier to see what the reader should be doing and to compare notes!), text can be a real pain sometimes. Especially if you aren't good at writing technical writing and or have spelling errors.
(2b) To elaborate, you have quite a lot of spelling errors, and your wording is more twitter/facebook friendly, not so good for something that needs every step done correctly.

I've had many headaches on tutorials amateurishly done (Which is a pain in the ass by itself) only to find out in the end in a side-note, they put a tag. "May or may not work; Only for this version; Bla bla bla". WTF?

Since you have a "Edit: It will NOT work 100% mostly like 90-95%" that is very worrying and I would consider this tutorial useless if it isn't guaranteed to work 100% if I follow every step correctly.

(3) Include all complete, WORKING files so the reader has something to look back at to before asking for help.
Things that should be included, are all the maps, scripts, the actual "Picture" you asked to make and anything else of importance.

///////
Your tutorial sounds interesting, hence why I clicked it. But I won't bother using it unless it's guaranteed to work 100%.
I will do the color, good idea!
And i am NOT english so please for sme typo's... i'm sorry!
I will try to make a video of how people have to install and crat from scratch!
SO that people will understand it even better!
Thank you for your reply!
And it works 99-100 for the 1th time, IF you try fast afte eitchother the hud sometimes won't occur!
But it will work 1th time so far for days for me now!

Edit:
Is anybody wants to help me out with the BAD ENGLISH! be very welcome to REwrite and Pm it to me,
Would be very much apriciated!
Sorry for the bad english!
Thanks!
(This post was last modified: 07-23-2013, 09:33 PM by DnALANGE.)
07-23-2013, 09:24 PM
Find
Kullin Offline
Member

Posts: 218
Threads: 23
Joined: May 2013
Reputation: 3
#4
RE: Working Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

I Followed the tutorial all the way through but I can't get it to work for some reason, Could you take a look at my files?
07-27-2013, 10:43 AM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: Working Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

I think this thread needs an example video, picture or perhaps even a download
07-27-2013, 12:28 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#6
RE: Working Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

I will do that ASAP my friends!!
I am alreasy busy and made another mod {testmod} for tutorial.
As i said, IF there are any questions be free to ask here OR pm me, i will Always awnser as soon as i can!
Mostly i am online every day couple of times!
---
I will make a tutorial for you hopefullyu tomorrow!
Back when i have an update\video here!

Bump*
If anybody here wants a little more explanation, be free to add on skype me Or what i said.. post the question here!
My skypename is : redmaster12345
(This post was last modified: 07-27-2013, 09:51 PM by DnALANGE.)
07-27-2013, 09:48 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#7
RE: UPDATED+Pictures!Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

(07-27-2013, 12:28 PM)The Mug Wrote: I think this thread needs an example video, picture or perhaps even a download

Edit: pictures and some more information.

(07-27-2013, 10:43 AM)Kullin Wrote: I Followed the tutorial all the way through but I can't get it to work for some reason, Could you take a look at my files?

I have added more pictures and better information.
If you still dont understand or can't get it to work, ask me on PM or on Skype redmaster12345.
(This post was last modified: 07-28-2013, 03:32 PM by DnALANGE.)
07-28-2013, 02:48 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#8
RE: UPDATED+Pictures!Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

You should post a video showing off the final product, so people can get an idea of what it would look like.
07-29-2013, 01:00 AM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#9
RE: UPDATED+Pictures!Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

Ok, Statyk i will.
But i was this weekend on my gf her laptop so i haven't got the programs for making the video,
as i said here above, i WILL make a video asap when i am back home.
Probly i will be back home today\tonight.
I will try to make a video and upload it on youtube.. but what was it again with youtube?
Can i make a youtube announcement or add a link or can i put the viedo on here?
Forgot a little what i CAN and what NOT.
Thanks, if you reply back.
07-29-2013, 01:01 PM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#10
RE: UPDATED+Pictures!Custom HUD and SanityEvents!!! *Explanation* Full Conversions ONLY!

Finally got this working with DnALANGE's help ;-) thanks!

Closure ModDB page:

[Image: 16LO8Sx]
08-19-2013, 08:16 PM
Find




Users browsing this thread: 2 Guest(s)