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
Level editor bug; entities disappear when map is loaded
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#1
Level editor bug; entities disappear when map is loaded

I wanted to have shirts of different colors, so I tried what I could muster on my own. I copied the hanging_shirt_white entity, edited the texture *.dds to the color I wanted (blue for starters), then finally I renamed every instance of the word 'white' with 'blue' (among other colors after editing the color of the texture), and that goes not just for the filenames, but also edited inside the *.ent, *.dae and *.mat files with notepad. I also changed the path inside *.mat so that it fits the path of the custom story I'm working on, to load from the custom_entities folder inside it.

Everything worked, I could load all the shirts I edited into the level editor without any errors, so I saved the map, and tested it in-game. It didn't crash so I rejoiced.

But here's the bug. After closing the editor, then opening it again, when I load the map with the edited shirts, I get an error message and all those shirts aren't loaded anymore.
"Found some errors while loading file. Check log for details. File index out of bounds!" it says.

Either I keep the level editor until I'm absolutely finished editing this room (and by extension the PC), or something can be done to prevent this from happening again. Or is that normal when loading custom entities outside the default folder? Cuz I'd rather keep it like this, so that when it's finally released, I can pack up just the custom story folder instead of having to fumble around with extra folders and such that will land in the root directory when unpacked.
07-23-2011, 08:53 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Level editor bug; entities disappear when map is loaded

This is because the editor isn't looking in your directory for the entities. The best solution is just to dummy your entities into a "custom_ents" entity folder inside "entities". Place all your entities in here, and work on the entities in this folder (after copying, delete your current ones in the custom story folder). Then when you are done editing your story, copy that folder across to the custom story folder.


You can also try opening MainEditorSettings.cfg.
You will have something that looks like this:
<Directories EditorHomeDir="HPL2" EditorTempDir="Temp" ThumbnailsDir="Thumbnails" MapsDir="maps" StaticObjectsDir="static_objects" EntitiesDir="entities" LightsDir="lights" BillboardsDir="billboards" ParticlesDir="particles" SoundsDir="sounds" />

Change it to:

<Directories EditorHomeDir="HPL2" EditorTempDir="Temp" ThumbnailsDir="Thumbnails" MapsDir="maps" StaticObjectsDir="static_objects" EntitiesDir="" LightsDir="lights" BillboardsDir="billboards" ParticlesDir="particles" SoundsDir="sounds" />

This tells the editor to start looking in the base directory, and so you can load in an entity file stored in any subdir, and not just in the entity subdirs. This however, means you have to sit through a massive lag when you first navigate the entities folder though, which is why the first solution is better.

(This post was last modified: 07-23-2011, 12:28 PM by Apjjm.)
07-23-2011, 12:22 PM
Find
AlexxShadenk777 Offline
Junior Member

Posts: 40
Threads: 5
Joined: Jul 2011
Reputation: 1
#3
RE: Level editor bug; entities disappear when map is loaded

I see. Thanks for the educational reply, I'll keep this in mind. For now I have indeed finished editing the room but I'm pretty sure I will need to do what you've instructed in a different room.

I suppose everyone would be interested in having these shirts with different colors so I'll make a thread in the Showcase board eventually with them, I just wanna make some more colors. Right now I have made blue, green, dark brown, grey and black.
(This post was last modified: 07-23-2011, 01:29 PM by AlexxShadenk777.)
07-23-2011, 01:28 PM
Find




Users browsing this thread: 2 Guest(s)