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
Importing entities from other custom stories?
GettingTheBasics Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2017
Reputation: 0
#1
Brick  Importing entities from other custom stories?

So, I've been set a challenge (by a friend) to make a CS with lots of jokes and stuff. I am really new to this and have only had a couple of weeks of experience.

I was wondering if I was able to import stuff from other CS's like Late Night Drink because I find it really tricky to make my own (I have made my own item before that looks like the grunt but when you pick it up, it turns into fresh meat).

So I tried to import a spinning painting from Late Night Drink. I copied all the files (well, only the ent file as the model was already in the game) and tried to use it in the level editor. I was able to place down a painting that didn't spin (but it still used the ent file that I copied over) and when I played the CS, there was no such painting.

Am I doing something impossible, wrong or stupidly easy?
05-20-2017, 04:33 PM
Find Reply
Mudbill Offline
Posting Freak

Posts: 3,661
Threads: 58
Joined: Apr 2013
Reputation: 169
#2
RE: Importing entities from other custom stories?

If any custom entity has files with the same name as some other (even in a different folder), the game may confuse the files and load an incorrect match. It depends on what order the resources.cfg is set up with.

Make sure you're actually copying over all the files needed by the entity, because they're not always in the same folder.

I'm not sure what exactly is wrong in this instance, but if they got it working, so can you. It's not impossible.

05-20-2017, 10:12 PM
Find Reply
GettingTheBasics Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2017
Reputation: 0
#3
RE: Importing entities from other custom stories?

(05-20-2017, 10:12 PM)Mudbill Wrote: If any custom entity has files with the same name as some other (even in a different folder), the game may confuse the files and load an incorrect match. It depends on what order the resources.cfg is set up with.

Make sure you're actually copying over all the files needed by the entity, because they're not always in the same folder.

I'm not sure what exactly is wrong in this instance, but if they got it working, so can you. It's not impossible.

Thankyou. Theres just one thing. There wasn't any other files for the 'spinning painting' entity apart from the '.ent' file. And I'm not completely sure where the 'resources.cfg' file is. Or how to set it up correctly...

:?
(This post was last modified: 05-21-2017, 09:57 AM by GettingTheBasics.)
05-21-2017, 12:03 AM
Find Reply
Mudbill Offline
Posting Freak

Posts: 3,661
Threads: 58
Joined: Apr 2013
Reputation: 169
#4
RE: Importing entities from other custom stories?

You shouldn't need to worry about the resources.cfg file unless you're making a full conversion mod, but for some custom stories you may need to edit it and add the "custom_stories" directory to the bottom of the list. You can find the file in the main game folder next to the Amnesia executable. I recommend doing so since you don't lose anything and it may fix some issues.

Do you have any screenshots of how the entity looks?

05-21-2017, 03:33 PM
Find Reply
GettingTheBasics Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2017
Reputation: 0
#5
RE: Importing entities from other custom stories?

(05-21-2017, 03:33 PM)Mudbill Wrote: You shouldn't need to worry about the resources.cfg file unless you're making a full conversion mod, but for some custom stories you may need to edit it and add the "custom_stories" directory to the bottom of the list. You can find the file in the main game folder next to the Amnesia executable. I recommend doing so since you don't lose anything and it may fix some issues.

Do you have any screenshots of how the entity looks?

In the editor, the 'spinning painting' looks like this: [Image: o7887OK.png]

And in game it looks like this but it doesn't spin:[Image: XTd0wZX.png]

I dug though the .hps file for the map that it is in and I didn't find any code that made it spin. So it must be the .ent file that makes it spin. right?
05-22-2017, 06:47 PM
Find Reply
FlawlessHappiness Offline
Posting Freak

Posts: 3,987
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Importing entities from other custom stories?

That depends on how it spins. If it is spinning on an axis that would definitely be a script thing, and not have anything to do with the .ent file.

The method "RotatePropToSpeed" would be the most plausible way to do this.

However, if the painting "spins" by the player grabbing it and turning it, that would be the .ent file.

Trying is the first step to success.
05-22-2017, 07:08 PM
Find Reply
Mudbill Offline
Posting Freak

Posts: 3,661
Threads: 58
Joined: Apr 2013
Reputation: 169
#7
RE: Importing entities from other custom stories?

Might also be that you need to spit it with SetMoveObjectState if the entity is of type MoveObject. You can check this by going to Edit > User Defined Variables in the editor.

05-22-2017, 08:55 PM
Find Reply
GettingTheBasics Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2017
Reputation: 0
#8
RE: Importing entities from other custom stories?

(05-22-2017, 07:08 PM)FlawlessHappiness Wrote: That depends on how it spins. If it is spinning on an axis that would definitely be a script thing, and not have anything to do with the .ent file.

The method "RotatePropToSpeed" would be the most plausible way to do this.

However, if the painting "spins" by the player grabbing it and turning it, that would be the .ent file.

It turns out that I over looked the function "RotatePropToSpeed("painting04 Spin_22", 5, .75, 5, 0, 0, false, "");"

Thanks for your help!
05-24-2017, 08:12 AM
Find Reply




Users browsing this thread: 1 Guest(s)