Mission File format specifications
by Lykon · in Torque Game Engine Advanced · 04/10/2008 (6:30 am) · 6 replies
I was wondering if anyone new where I could get some specifications on the structure of mission files, as I was hoping to do some work on integrating the new HTC terrain editor for Atlas with a mission exporter, to make a basically one-stop-shop for Atlas deformation and mission export functionality.
Anyone know where I can find information on the format of the mission files?
Thanks in advance!
Anyone know where I can find information on the format of the mission files?
Thanks in advance!
About the author
#2
04/10/2008 (10:57 am)
Yes, an often little known but very powerful feature of Torque is that each SimObject has the innate ability to write itself out (in its current state) in script form. As Michael points out, all you need to do is call %object.save();
#3
04/10/2008 (11:09 am)
Correct about the "little known" feature Mark. Up until I realized I could use the ::save(), I was using File I/O to write out each character or string. Talk about tedious! Once I discovered the save functionality, I re-wrote my AFX Creator tool and created the Environment Package Save/Load resource with ease.
#4
04/10/2008 (11:22 am)
I have been meaning to look into this so I could use the apparently-very-extensive "field order randomization" code for my poker game app ;)
#5
Thanks for letting me know about that Michael!
04/11/2008 (5:26 am)
Wow, that is very useful to know, I was thinking that I was going to have to write the code to create the mission file myself, but if each object can write itself out...that will save a huge amount of coding on my part!Thanks for letting me know about that Michael!
#6
04/11/2008 (5:30 am)
Happy to help out Gerard =)
Employee Michael Perry
ZombieShortbus
When you save or write out a mission, MissionGroup.save() is called. This a console method that parses the group and writes out each object and its members using its own tabbing convention. All text, btw.
Edit: To go a little deeper, the ::save method is a member of SimObject, which is called recursively in SimSet or SimGroup save methods.