Subfolders with SetModPaths?
by Omnigalactic · in Torque Game Engine · 05/19/2004 (12:39 am) · 4 replies
How do I specify mods in subfolders when using the setModPaths proc?
I tried using "client/ui" (to specify the file ./client/ui/main.cs) but it reports "setModPaths: invalid mod path directory name: 'client/ui'".
Do I have to put a LoadMods function into every main.cs of every directory I plan on calling? I know it can't be that tedious...
I tried using "client/ui" (to specify the file ./client/ui/main.cs) but it reports "setModPaths: invalid mod path directory name: 'client/ui'".
Do I have to put a LoadMods function into every main.cs of every directory I plan on calling? I know it can't be that tedious...
About the author
#2
I began by using John Vanderbeck's MinApp tutorials just to get a basic "game" running:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5091
(also MinApp1, MinApp2, MinApp3, MinApp4)
For these tutorials, he uses a common and demo for his directory structure. That all works fine. If I then change the name of demo to something else, that still works fine, as long as the directory I want to reference is in the root. But if I then create my own directory structure and move the files/folders from demo into another folder (ie, demo becomes a subfolder of something else and is no longer at the root), how then do I access its functionality?
Must all such "mod" folders always remain at the root level?
05/19/2004 (10:02 am)
Okay, I guess I need to be a little more verbose...I began by using John Vanderbeck's MinApp tutorials just to get a basic "game" running:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5091
(also MinApp1, MinApp2, MinApp3, MinApp4)
For these tutorials, he uses a common and demo for his directory structure. That all works fine. If I then change the name of demo to something else, that still works fine, as long as the directory I want to reference is in the root. But if I then create my own directory structure and move the files/folders from demo into another folder (ie, demo becomes a subfolder of something else and is no longer at the root), how then do I access its functionality?
Must all such "mod" folders always remain at the root level?
#3
I assume that you can use
$ModPaths = "common;~/common/images;~/common/Missions";
setModPaths($ModPaths);
But I can't get this to work. Any pointers?
03/21/2005 (2:02 pm)
I have a similar problem in that I am trying to name the subdirectories and am getting the same error - invalid mod path.I assume that you can use
$ModPaths = "common;~/common/images;~/common/Missions";
setModPaths($ModPaths);
But I can't get this to work. Any pointers?
#4
03/21/2005 (2:13 pm)
I believe the assumption is that each "mod" root is located at the exe root level.
Torque Owner Stefan Lundmark
You set it once in the main.cs file inside the root of your game (where your .exe file is as default).
Why would you want to set it to the UI directory though? It's used to set different modification sets, like "starter.fps" / "demo".