Game Development Community

Terrains texture won't load when starter.fps folder renamed?

by Leroy Frederick · in Torque Game Engine · 06/03/2005 (5:42 pm) · 12 replies

Hi all,

1. It seems when you change the name of the starter.fps folder, the terrain textures don't load. The only way i've been able to get it to do so is by moving the 'terrains' folder to 'data\missions\starter.fps\data\terrains' (creating a 'starter.fps\data' folder in in the process).

Here's what the console log says:
"*** Phase 3: Mission Lighting
Missing terrain texture: FPS_TEST/data/missions/starter.fps/data/terrains/grassland/grass
Missing terrain texture: FPS_TEST/data/missions/starter.fps/data/terrains/grassland/patchy
Missing terrain texture: FPS_TEST/data/missions/starter.fps/data/terrains/grassland/sand
Successfully loaded mission lighting file: 'FPS_TEST/data/missions/stronghold_f4d4221.ml'
Mission lighting done"

I created the above directory and copied the terrains folder as a workaround, is there a script i need to edit to point the folder in the right direction after changing the folder name?

Also, is the following true

2. Folders cannot have spaces e.g. "starter fps".

3. Is their a remstart - remend command for torquescript, can't find it in the documentation yet.
e.g.
/*
This
is
ignored
*/

Thanks in advance! :-)

#1
06/03/2005 (6:49 pm)
Ever tried loading the Terrain Painter editor and re-adding the terrain textures (from your renamed folder) there? Not everyone uses "starter.fps" for their projects you know.
#2
06/03/2005 (6:54 pm)
Actually, I get that error in the console, and I don't have any terrains linking to the files under what would have been "starter.fps".
#3
06/03/2005 (7:00 pm)
The problem is, I believe that the resource manager is looking in the wrong place for its resources...

Try going into main.cs in the root directory, and make sure that when SetModsPath is called check that the folder you've renamed to be in the string passed into the function. e.g. common;yourdirectory

Or just try typing in torqueDemo -game yourdirectoryhere into the console and see if that works (if it does, you probably need to modify the script code for the setModsPath call).

Hope it helps,

- Eric
#4
06/03/2005 (7:21 pm)
Edit: Wow, they was only one reply a minute ago!

@Manoel Neto:
No, i haven't, because, assuming that worked, isn't it meant to still find the texture files regardless of the folder name, as the i imagine the links to the textures to be relative, not absoloute directories e.g. "data\terrains\grass" as opposed to "c:\torque\sdk\examples\starter.fps\data\terrains\grass" or "starter.fps\data\terrains\grass".

I know not everyone will be using starter.fps, but, they are starter kits, which means you are meant to build/edit your game from them, and add what you need as you go alone, no?
#5
06/03/2005 (7:34 pm)
@Eric Roberts:

Trying it now, thanks.

@Chris "C2" Byars:

I'm assuming that despite the fact you get this message, everything looks ok? My terrain ends up all white looking (untextured in lamens terms :0)
#6
06/03/2005 (7:54 pm)
Tried the $userMods="FPS_TEST", and checked it in the console without the edit, and it came up right, so im a bit lost!?

Selecting the textures in texture paint editor works as expected, but, i'm sure there is a script i need to edit, somewhere along the lines that Robert was talking about, i mean, it should just load them right, provided the folders/files within 'starter.fps' or any other game folder isn't moved about, everything should load up right?

Any other ideas?

Also, is their a remstart - remend command for torquescript, can't find it in the documentation yet.
e.g.
/*
This
is
ignored
*/

Thanks for all your thoughts/comments thus far :-)
#7
06/03/2005 (8:09 pm)
1) Texture names are hard coded into the terrain file from the root base, meaning that within that file itself is the "starter.fps" portion of the directory structure. Once you re-map the textures using the terrain painter and then re-save your mission, you should be fine.

2) No, there is no block commenting in TorqueScript at this time.
#8
06/03/2005 (11:18 pm)
There are also some really old paths in EditorGui.gui that need to change if you
want to clear some missing paths in the console.
Like this one , bitmap = "fps/data/terrains/grassland/grass";
They are some default values about 5 or 6 of them , but has nothing todo with the mission itself.
#9
06/04/2005 (4:21 am)
Nice one guys

@ Stephen
understood, each time a folder is renamed, the terrain textures have to be repointed/applied via terrain texture painter. Shame about the block commenting, but no biggie.

@Billy
Yer, i noticed those too, thanks for that.

@all:
Ok, thanks guys, you've cleared everything up, i'll be back with some fresh q's soon i'm sure! Thanks again :-0
#10
06/04/2005 (7:12 am)
I didn't mention this in my original post, but as Billy pointed out, there are a few hardcoded paths still remaining in the engine that haven't been factored out yet. Might be a good idea to search in files in your project for hardcoded paths, and replace them with a more generic path. There is also a recent post on this topic, so search for "hardcoded" or something similar and you may find that research work done for you!
#11
06/06/2005 (6:13 am)
Nice one Stephen, well do, thanks guys :-)

EDIT: for any1 that might be interested, here's what i found via search on hardcoded paths in TGE:

www.garagegames.com/mg/forums/result.thread.php?qt=2806

www.garagegames.com/mg/forums/result.thread.php?qt=1287
#12
11/10/2007 (7:20 pm)
This code works but need the textures in common or first loaded mod:

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=12615