Game Development Community

file missing: defaultGameProfiles.cs - FIXED (TDOC-259)

by Mark Steelman · in Torque 3D Professional · 06/27/2011 (7:48 am) · 8 replies

I am working through the tutorial called 'Simple Inventory Gui' and in that tutorial I am directed to update defaultGameProfiles.cs in the game/art/gui directory. This file is gone in 1.1. There is a file called gameProfiles.cs but when I put the code in this file it doesn't show up in the Profiles list in my project.

My assumption is that the information that used to be in defaultGameProfiles was moved to c code and this file was created but isn't actually included in any other file. Kind of surprising that QA didn't catch that.

Anyway, what do I need to do to add a profile in 1.1?

Thanks in advance!

#1
06/27/2011 (10:00 am)
QA didn't catch it because the file is still there. ;)
#2
06/27/2011 (10:13 am)
Must be using SectorT3D? It's the only example/demo project that changed that particular filename to gameProfiles.cs. But is is being exec'd correctly in initClient() as gameProfiles.cs, so should work as expected.

But to answer the question:
The Gui Editor, when used to create a new profile, saves the profile to "scripts/client/customGameProfiles.cs". This file is not exec'd anywhere so you have to either exec it or move your newly created profile to gameProfiles.cs or defaultGameProfiles.cs as the case may be. When manually creating a new profile simply drop it into the gameProfiles.cs (or defaultGameProfiles.cs) script.
#3
06/27/2011 (10:26 am)
@Michael Hall: You are right. It is being called gameProfiles.cs in SectorT3D as well as in a Empty Project. All the other projects have it called defaultGameProfiles.cs. It would be worth to note the difference between file names and projects in the tutorial.
#4
06/27/2011 (10:45 am)
Missed seeing that one in the Empty Template - which isn't being exec'd by the way. So Mark, simply add
exec("art/gui/gameProfiles.cs");
inside of "scripts/client.cs" near the top of initClient() before any GUI's get loaded.


Some sort of consistency pass through the various projects scripts may be useful as there are a few differences here and there that some people might find confusing.
#5
06/27/2011 (10:59 am)
Thanks Michael Hall!

I've went ahead and logged this one to be fixed/clarified. Logged as TDOC-259.
#6
06/27/2011 (2:05 pm)
Thanks guys, really happy with the product and the documentation so far. I don't know enough about the product to review it at this time, but I can say, documentation is way better than anything else I have seen, this issue not withstanding.

Also, very happy to get an answer this quickly. I was going to be bummed if I couldn't move forward tonight.

So, one more thing. In the tutorial right before this one where you build a list gui, the code for the button "Insert" doesn't account for the possiblility that nothing is selected. If you press insert and nothing is selected the program will crash. I presume I need to test for that but I haven't learned how yet.
#7
06/27/2011 (2:21 pm)
@Mark Steelman: Checking the console log after the crash may yield some results on where to look. If not triple check your code for Syntax error.
#8
07/22/2011 (1:16 pm)
I believe the original issue is in regards to Sector T3D initially being a XBox 360 demo that (I think) had been built on TGEA for the 360 and may have some project artifacts from its beginnings as an XDK project and different ways of doing things between TGEA and Torque 3D. But I am not sure exactly. I will look at areas to clarify in the documentation. I do not know if a complete project pass for consistency is within scope between all of the projects and developers who have touched them.