Chapter 5
by Ken Finney · in Torque Game Engine · 06/30/2004 (12:47 pm) · 7 replies
(this post is a recap of what I've posted elsewhere on the GG site. I'm putting it here to ensure that it doesn't get lost).
Some people have been having problems with Chapter 5. I've double checked the chapter and the code as follows:
A)
1) Using the Ch5 kit install from the CD (step 1), doing a clean install
2) then copying the 'book files' (ie. the files that are printed in the book) from the CD to the Ch5 installation locations
** everything worked fine - started game, ran over and grabbed xbow & arrows, went to find nearest AI guy in gully, killed him, found another, he killed me, respawned, etc. No problems (with minor exception (i) noted below).
B)
1) uninstalled ch 5., deleted folders
2) reran the kit install, and this time plugged in all of the files from the book, with the text from the book (all except the .GUI code since I've run out of time atm - I copied those from the CD).
Again, the program runs ok, same as in A above.
If you are having problems, try replicating the process in Procedure A and see where that gets you. If all goes well, then move on to B.
(i)
There is an issue with startFade & Hide when using EmagaCh5KitInstall - the build of tge.exe in that kit is an incorrect one. To quickly correct this, copy the tge.exe from the chapter 5 Chapter Data (D:\RESOURCES\CH5\TGE.EXE) on the CD over to your emaga5 direcotry on your hard drive.
Somewhere along the way, those two script commands were redefined in the current version of TGE to Fade & SetHidden in the engine source by GG.
There are other console errors, but they don't affect the functionality, nor the purpose of chapters 5 and 6.
NOTE: for Macintosh & Linus readers: EmagaCh5KitInstall.exe has been repackaged in a zip file for you to download. Get it HERE
Some people have been having problems with Chapter 5. I've double checked the chapter and the code as follows:
A)
1) Using the Ch5 kit install from the CD (step 1), doing a clean install
2) then copying the 'book files' (ie. the files that are printed in the book) from the CD to the Ch5 installation locations
** everything worked fine - started game, ran over and grabbed xbow & arrows, went to find nearest AI guy in gully, killed him, found another, he killed me, respawned, etc. No problems (with minor exception (i) noted below).
B)
1) uninstalled ch 5., deleted folders
2) reran the kit install, and this time plugged in all of the files from the book, with the text from the book (all except the .GUI code since I've run out of time atm - I copied those from the CD).
Again, the program runs ok, same as in A above.
If you are having problems, try replicating the process in Procedure A and see where that gets you. If all goes well, then move on to B.
(i)
There is an issue with startFade & Hide when using EmagaCh5KitInstall - the build of tge.exe in that kit is an incorrect one. To quickly correct this, copy the tge.exe from the chapter 5 Chapter Data (D:\RESOURCES\CH5\TGE.EXE) on the CD over to your emaga5 direcotry on your hard drive.
Somewhere along the way, those two script commands were redefined in the current version of TGE to Fade & SetHidden in the engine source by GG.
There are other console errors, but they don't affect the functionality, nor the purpose of chapters 5 and 6.
NOTE: for Macintosh & Linus readers: EmagaCh5KitInstall.exe has been repackaged in a zip file for you to download. Get it HERE
About the author
#2
"Disconnect
You do not have the correct version of the Torque Game Engine or the related art needed to Connect to this server, please contact the server operator to obtain the latest version of this game. (Missing particle texture: !/data/particles/smoke)"
I'm hoping this is one of the things that will be fixed when you recopy tge from the Emaga5 folder onto the harddrive. Just in case it isn't, I've reproduced it here in the hopes that someone can help me.
Thanks in advance!
03/01/2005 (4:59 pm)
I've been getting a weird error. The game goes through the splash screen, to the opening menu. I click "Start Game" and it starts to load, gets to a certain point then opens a message window that says the following:"Disconnect
You do not have the correct version of the Torque Game Engine or the related art needed to Connect to this server, please contact the server operator to obtain the latest version of this game. (Missing particle texture: !/data/particles/smoke)"
I'm hoping this is one of the things that will be fixed when you recopy tge from the Emaga5 folder onto the harddrive. Just in case it isn't, I've reproduced it here in the hopes that someone can help me.
Thanks in advance!
#3
03/01/2005 (5:01 pm)
Okay, I copied the tge.exe file from the resources\ch5 folder into my c:\emaga5 folder and still got the same error. Can anyone tell me what's going on? Thanks!
#4
Who Calls "OnServerCreated" in control/server/server.cs. I have been trying to figure out what I did wrong. And my problem is that this function does not get called. I did A grep in the server and could not find any place where this code was called. The book did not help much with this matter all it says is
"The first function in this module, OnServerCreated is pretty straightforward. When called, it loads all the specific game play modules we need".
Great But who calls OnServerCreated?
06/10/2005 (4:10 am)
Chapter 5 is also making me crazy. My question is Who Calls "OnServerCreated" in control/server/server.cs. I have been trying to figure out what I did wrong. And my problem is that this function does not get called. I did A grep in the server and could not find any place where this code was called. The book did not help much with this matter all it says is
"The first function in this module, OnServerCreated is pretty straightforward. When called, it loads all the specific game play modules we need".
Great But who calls OnServerCreated?
#5
06/12/2005 (5:54 am)
OnServerCreated is called by the common/server.cs file (~line 47) just after it creates the server & server sim group and just before it calls LoadMission. Most of the setup occurs somewhere in the common scripts and is exposted to your mod via callbacks.
#6
the problem with chapter 5 is that chapter 1 or maybe 2 should have been about debugging torque script. chapter 5 is so complex and it's so "all at once" that most people dont know how to deal with figuring out why their emaga5 doesn't work.
if it had been a step 1: build this module, test. step2: build this module, test. step3 etc... it would have been alot better. OR if that didn't work, then it should have been broken down into smaller pieces by building the base modules where they dont really do anything, and then going back and inserting functionality into them.
the modules are so big that a novice, like me, doesn't really know how to fix it if it doesn't work. my chapter 5 still doesn't work. the last problem was that i had totally skipped typing one function for instance. yes that was a mistake on my part. but after typing for 3 hours out of a book, i'm not really sure i understand what the script was doing because of the mind numbing monotony of typing out so many modules. now i have some error message that i have no idea what it means. i'm going to go back through and put a trace in every one of the modules to see if i can figure it out. but, in my opinion they should have been explained step by step and built in much smaller pieces at a time.
just my 2cents.
07/08/2005 (8:22 am)
The problem with chapter 5 is not that the code in the book is wrong or anything. the problem with chapter 5 is that chapter 1 or maybe 2 should have been about debugging torque script. chapter 5 is so complex and it's so "all at once" that most people dont know how to deal with figuring out why their emaga5 doesn't work.
if it had been a step 1: build this module, test. step2: build this module, test. step3 etc... it would have been alot better. OR if that didn't work, then it should have been broken down into smaller pieces by building the base modules where they dont really do anything, and then going back and inserting functionality into them.
the modules are so big that a novice, like me, doesn't really know how to fix it if it doesn't work. my chapter 5 still doesn't work. the last problem was that i had totally skipped typing one function for instance. yes that was a mistake on my part. but after typing for 3 hours out of a book, i'm not really sure i understand what the script was doing because of the mind numbing monotony of typing out so many modules. now i have some error message that i have no idea what it means. i'm going to go back through and put a trace in every one of the modules to see if i can figure it out. but, in my opinion they should have been explained step by step and built in much smaller pieces at a time.
just my 2cents.
#7
07/16/2005 (3:33 pm)
I agree with Jesse somewhat, however, I sure the book could only be so long. After exhaustive investigation of my own typpo's, I was frustrated that some aspects still did not work. Specifically startfade and hide. With the solution given above it works great. Is there erata data for the rest of the book somewhere?
Torque Owner CS \"Bear\" Williams