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]
[/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]
[/img]
3: The SANITYEVENTS!!
*Picture: [img]
[/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]
[/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