The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
[Read for Help] - Vocabulary, Tutorials and Troubleshooting!
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#1
Information  [Read for Help] - Vocabulary, Tutorials and Troubleshooting!

Hello everyone!

Note as of 22. June. 2012

Just wanted to let you know I still from time to time check this thread and that I'm not dead.
Still working on apartment, but hopefully I will be back to finish this up soon.

I did, however, add very small changes and a link to a good checklist down below.

Welcome to the basic troubleshooting guide thread!
Keep in mind that this guide is not 100% accurate as I'm no veteran and I will pass down the little I've learned so far. Also if something is incorrect, please notify me and I will change it.

First of all, really sorry if there is a thread like this. I don't mean to do any harm.
If any of the mentioned people feel I've insulted them or violated their privacy or anything, please tell me and I will remove whatever wanted.
I do not take any responsibility for your computer, files or anything.
Please only follow links or instructions if YOU trust it. Otherwise anything I post here should be harmless.
The point is to educate and help people, not to harm (:

I take no credit for any guides, links, websites or anything any other user has posted.
Only thing I take credit for is posting this thread and collecting information from other sources. I do not take credit for the information itself. Credit to those awesome people who wrote guides on the frictional wiki and here on the forum.


The only purpose of this thread is to give answers to commonly asked questions so the poor guys who reply to us all the time can get a break now and then.
I'm pretty sure there is a thread like this, but I can't find it. If this thread is doing harm or breaking any rules. Please, by all means remove it!
(However, if this thread is approved and you find it helpfull leave a + on me if you'd like :]!)

This is Work In Progress. I only decided to post the base layer first to see if it is approved.
More coming soon!


Due to trying to find an apartment I've had to put this on hold. But I will continue it as soon as possible :]
Also keep in mind I've posted this as a base layer and sort of a preview of what it will look like. It's not nearly halfway done yet.


Please do feel free to keep posting suggestions and things to add though. As it's much help and will be added to main thread as soon as possible.

I also know there is a very good guide on the Frictional Wiki, but it can be difficult to understand for some and this is more meant for a very basic collection. Link to the wiki below.


--------------------------------------------------------------------------------------------------------


~~~~Table of Contents - v ~~~~

1. Scripting
2. Expressions
3. Crashes
4. Scripting Tutorial
5. Tips and Sources
6. Credits

~~~~Table of Contents - ^ ~~~~


--------------------------------------------------------------------------------------------------------

1. Scripting

Here is a list of script functions and a VERY helpful thing to note when scripting:
http://wiki.frictionalgames.com/hpl2/amn..._functions




2. Expressions

Entity
An entity can be either the player or objects/enemies in the entities tab in the level editor.
Entities can be set active/inactive trought scripting. This is useful if you want to change the map or enable enemies.
Almost everything that can be interacted with is found in this tab. Such things include doors, lightsources, furniture, tables, chairs etc.

An entity, not like a static object, requires a body (body = grabbable area around object/impact area of object) made by shapes of cubes, cylinders and spheres. An immovable object is activable/deactivable through scripting if it is set, in ModelEditor, to Settings --> User defined variables --> Type --> Object : Static object. These objects are read through the "Model.ent" file, but the original model is always the "Model.dae" file. (1



Static Objects
These are objects that cannot be intreacted with in any way(confirmation needed) and are models with collision.
These can be walls, rooms, trees. In other words, things that you cannot find in the entity tab. And visa versa, things not found in static object tab is most likely found in entity tab.

Static objects do not have "Model.ent" files. They are read directly from the "Model.dae" file. The collision surface is read off the mesh, so no work in model Editor is required. (1



Function
A function is something that is 'called' when for example an entity collides with another entity.
It should look like this:
void *MYFUNCTION*(string &in as("Type", "Parent", "Child", "Item" or the most common "Entity"))



Billboards
I'm not too familiar with these, but they can be used as light rays. Very nice for extra detail like sunrays trough windows in the morning^^

Billboards are images portraying lightrays. That's why the placement and execution of billboards is delicate, since they are a 2D object in a 3D world. Badly made billboards will ruin immersion. (1



Particle systems
Particle systems are basically images which are repeated with a movement, size, color or rotation change to them. (1




3. Crashes

When your game crashes from a script error it will display something like:

"Could not load:/redist/custom_story/*NAMEOFCUSTOMSTORY*/maps/*NAMEOFMAP.hps*"


Unless you can remember or spot what the problem is at first sight, follow these:

Start by going down the whole script, line by line, and check if you can see any typos or wrong commands/values.

Common Typos and Info:
-True and false are written in LOWERCASE like this: "true, false"
-Always end a command inside a function with " ); "


Crashes should be viewed in your documents/amnesia/hpl.log. The hpl.log will always give you a pointer to what line and letter the error(s) have occured at. (1

Now, I don´t know if this has happened to anyone else but during my time level editing it has happened a few times that some kind of bug has been created inside the map itself, not the script. Therefore when I try to load the map ingame the game crashes. Fortunately this don´t mean that the map and all the work spent on it is lost. There´s an option in the level editor to export bits and pieces of the map, so what you want to do is to select the whole map (entites, static objects, lights etc.) and export it and then import it inside a new map, the bug doesn´t follow with it.
(2
[This bug has occured to me as well, at that time I fixed it by re-installing Amnesia and the Level Editor. I suggest trying PreLauncher's techinique first as it saves you the time from backing up files and doing the re-install.]


4. Tools

Something which is definitly recommended to have is "Notepad++" or "Geany".
I used to only use notepad and was content with that, but really in the long run one of the above is worth it.

They can also be used to check for minor typos in your functions. If you for example have written "True" with a capital "t", the font won't turn blue which means it's not categorized as a proper statement.
(Please excuse my bad way of describing things : p)

There is also another link to the frictional wiki which contains helpful articles and more in-depth than this one.

Frictional Wiki:
http://wiki.frictionalgames.com/hpl2/amn..._functions

Notepad++
http://notepad-plus-plus.org/

Geany
http://www.geany.org/Main/HomePage




5. Tips and Sources

Here are links to guides, or description of users who have contributed to my education.

Again, if anyone mentioned is uncomfortable with it, tell me and I will remove them/it at once.
Consider this a free promotion. This is only meant as points in a helpful direction!



"YourComputer" has made a very good series of videos on how the level editor, scripting and other thing workd. Credits to him for a good tutorial which I learned alot from.
It can be found here http://www.youtube.com/user/ThisIsYourComputer .

"CrazyArts" I believe, made a checklist everyone should read trough before or while making a custom story.
If you cover everything or most of it, then most likely your custom story will be enjoyable! Your imagination is your limits. Link here.




6. Credits

Post/ideas/corrections submitted by people are credited here. They will have a number behind them which indicates who posted :]

(1 - Acies - Submitting useful information and first poster)

(2 - Prelauncher - Submitting information about an important bug)

--------------------------------------------------------------------------------------------------------



Also if you like it, don't like it (please say why so I can improve), have a notification to come with, any ideas (will be credited), or simply have a question: Don't hesitate to comment or pm

Keep in mind this thread is only made with good intentions to help and educate people!

~Rokotain
(This post was last modified: 06-22-2012, 01:11 PM by Rokotain.)
02-06-2012, 12:18 AM
Find


Messages In This Thread
[Read for Help] - Vocabulary, Tutorials and Troubleshooting! - by Rokotain - 02-06-2012, 12:18 AM



Users browsing this thread: 1 Guest(s)