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 Help Imported Assets Deleting Themselves on Opening .map file
jmitchell Offline
Junior Member

Posts: 31
Threads: 6
Joined: Feb 2015
Reputation: 2
#1
Imported Assets Deleting Themselves on Opening .map file

So this has been an issue for about a month with one of my levels; I'd imported some stuff from A Machine For Pigs into what was a custom story at the time. Eventually I decided that I wanted to make my project a full conversion, made a copy of everything in a different file location, and started manually reassigning file paths for everything I had imported.

However, on removing the assets from the original custom stories folder, my map would crash on being opened with the level editor. Replacing the assets at the original location, I found out that the file paths for each would just revert to the custom stories location.

I eventually managed to get to a point where I can bring in and save maps with these assets, but if I reopen the map in the level editor they're deleted. This makes it difficult to tweak stuff I had, since I need to re-add everything I imported every time I open the map.

I've certainly learned my lesson: make it an FC from the beginning. But is there a way to un-screw my current map?

Summarized timeline:
-Made custom story
-Imported AMFP and custom assets
-Duplicated files for FC
-Attempt to reassign file paths for imported assets, file paths keep going back to first location
-Delete original files
-Assets delete themselves on opening map
-Notice some assets show up in FC, but only if added before quitting level editor

Other notes:
-Planes with imported textures and static objects generally showed up, but entities didn't
-If I switch to another map and back in the level editor without closing, entities are read just fine
-Same with exporting/re-importing selections: it only works if I don't close the editor

05-13-2015, 03:01 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Imported Assets Deleting Themselves on Opening .map file

Where are your assets located? I would tell you not to duplicate them, but rather keep them in the original entities folder until you are ready to export your mod. The game will find the files as long as they are within the scope of the resources.cfg file of your mod, but the editors rely on the root resources.cfg file to find the files.

By keeping them in the original entities folder, you are able to use and edit them as you'd like. When exporting your mod, simply move those files into your own mod's entities folder and double check that it works.

05-13-2015, 07:18 AM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#3
RE: Imported Assets Deleting Themselves on Opening .map file

Sometimes my files moves to %appdata%/??something??/virtualstore/programfiles
Not just amnesia. When I'm missing something, I look from there first.
I think it's some sort of cache thing.
Good luck with it! Smile

When Life No Longer Exists
Full-conversion mod
05-13-2015, 08:18 AM
Website Find
jmitchell Offline
Junior Member

Posts: 31
Threads: 6
Joined: Feb 2015
Reputation: 2
#4
RE: Imported Assets Deleting Themselves on Opening .map file

(05-13-2015, 07:18 AM)Mudbill Wrote: The game will find the files as long as they are within the scope of the resources.cfg file of your mod, but the editors rely on the root resources.cfg file to find the files.

Ah, is that why? That makes sense.

The idea was that I would create a copy of everything I needed in my mod's folder, reassign the file paths in the level editor to point there, then delete the first copy in custom_stories. As is, only one copy exists.

That sounds fairly inconvenient, though, to have to move them back and forth every time you want to edit the map/check the mod.

(This post was last modified: 05-13-2015, 02:22 PM by jmitchell.)
05-13-2015, 02:20 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#5
RE: Imported Assets Deleting Themselves on Opening .map file

If you keep them in your main entities folder, you can still test them just fine as long as you didn't exclude that folder from your mod's resources (which would be unlikely as you would be unable to use any of the default assets).

Basically, keep them in your entities folder when you edit and test the mod. When you're done with the entire mod and want to send it to someone else or upload it, you package those entities into your mod's entities folder. The game will look for the file name, rather than the path, so it will most likely find it just fine.

The only issue can be that if your entity is named the same as a default one, it might confuse them, so be sure to list your directories before the main ones in your resources file.

(This post was last modified: 05-13-2015, 08:56 PM by Mudbill.)
05-13-2015, 08:54 PM
Find




Users browsing this thread: 1 Guest(s)