Game Development Community

config datablocks

by Junsik Shim · in iTorque 2D · 02/03/2010 (9:48 pm) · 7 replies

Hello.

To my knowledge, config datablocks must exist in 'gameScripts/datablocks.cs',
but, all the other custom scripts including 'game.cs' are in 'scripts/'.
So I tried to put config datablocks into 'scripts/datablocks.cs', but didn't work.

Does it has to have both 'gameScripts/' and 'scripts/'?

Thanks in advance.

#1
02/03/2010 (10:18 pm)
for the editor they must be in the managed/datablocks

but to work ingame they must be in the per level datablocks since 1.3.
check the pdfs or the sample project (data/levels/datablocks)
#2
02/04/2010 (12:02 am)
@Marc
I think you misunderstood my question...
I was talking about this.
http://docs.torquepowered.com/tgb/official/content/documentation/Tutorials/Feature/Config%20Datablocks.html

Please correct me if I'm wrong.
#3
02/08/2010 (6:41 pm)
The path to the file that Torque uses is found under common/scripts/projectManagement.cs . T2Di 1.3 changed all the script directories to "scripts" instead of "gameScripts" in iTGB 1.2 . Here's a snippet of the code to help you find it:

if($LevelEditorActive)
   {
      
      %dbFile = expandFilename("game/managed/datablocks.cs");
      %persistFile = expandFilename("game/managed/persistent.cs");
      %brushFile = expandFilename("game/managed/brushes.cs");
   }
   
   %behaviorsDirectory = expandFilename("game/behaviors");
   //Config Datablock Path   
   %userDatablockFile = expandFilename("game/scripts/datablocks.cs"); 
   %userGUIProfileFile = expandFilename("game/scripts/guiProfiles.cs");
#4
02/09/2010 (7:28 pm)
@Joe
Somehow my T2Di 1.3.1 still shows "gameScripts" instead of "scripts", but I guess I can change that on my own. Thanks! :)
#5
02/09/2010 (7:38 pm)
sure you used a new project not just imported your old? cause old projects are not affected by the changes.
#6
02/09/2010 (11:06 pm)
@Marc
Well.. the "iPhoneExample" project that comes with the T2Di 1.3.1 has "gameScripts", and even when I create a new project, it still shows "gameScripts" instead of "scripts".

Maybe my T2Di is somehow mixed up with the old ones.
I'll try re-installing it from scratch.

Thanks anyway!
#7
02/09/2010 (11:30 pm)
strange thing ... though it might be there unused ...
I've 1.3.1 around but work on 1.3.0 cause I implemented the mentioned fixes from the board already and it works as far as I see. should there be something breaking that was fixed I can always backport it

I've ported up an older project with an own structure kind of (too much TGB + TGEA + T3D gives very strange fantasies of a "good folder hierarchy" ...)