Yack Pack port to Torque 3D
by Konrad Kiss · in Torque 3D Professional · 09/01/2009 (10:16 am) · 61 replies
I've seen that there were many people interested in a port of the Yack Pack to Torque 3D, so I decided to give it a try. Unfortunately, this is coming a little more than a week later than I promised, but I hope it's going to be useful for those who own the pack.
I'm going to do the port "live" - hoping that it might help others starting a port on their own. Take it as a tutorial if you will. If it helps one person do another port, its already worth it, right?
I'm going to do the port "live" - hoping that it might help others starting a port on their own. Take it as a tutorial if you will. If it helps one person do another port, its already worth it, right?
About the author
http://about.me/konrad.kiss
#22
09/04/2009 (8:57 am)
Awesome work Konrad. I am so thankful for your port of this pack as it will really help me hit a deadline for a project.
#23
09/04/2009 (9:10 am)
Excellent idea, the "live porting", good reading, and well done!
#24
Thank you Konrad!
09/04/2009 (1:18 pm)
Bookmarked. this will definitely come handy in the near futureThank you Konrad!
#25
09/04/2009 (1:37 pm)
Agree with ben, awsome work, thank you for sharing :)
#26
09/04/2009 (2:20 pm)
Woot. Don't have plans to use this for awhile, but glad to see you have it working. Thanks Konrad.
#27
I am having a problem still. It isn't working properly. for me, the speach bubble is on all the time and the f key does nothing (most of the time).
If I leave my body and copy myself like you did, then go back into my body. Then when i press the f key, it takes me out of my body to where I did the edit from...
Any idea what the problem could be? I don't see any errors in the consule.
09/07/2009 (11:43 pm)
@KonradI am having a problem still. It isn't working properly. for me, the speach bubble is on all the time and the f key does nothing (most of the time).
If I leave my body and copy myself like you did, then go back into my body. Then when i press the f key, it takes me out of my body to where I did the edit from...
Any idea what the problem could be? I don't see any errors in the consule.
#28
@David: Are you doing this in a vanilla install of Torque 3D 2009 Beta 5? Can you check if anything else is bound to the "f" key in your scripts/client/default.bind.cs ?
If that still doesn't solve your problem, could you send me the affected source and script files? (All the .cpp, .h, .cs and .gui files that have "yack" in them) Zip them up, and I will diff them with my version and tell you what the difference / problem is.
09/08/2009 (3:05 am)
Thanks guys for the nice comments! :)@David: Are you doing this in a vanilla install of Torque 3D 2009 Beta 5? Can you check if anything else is bound to the "f" key in your scripts/client/default.bind.cs ?
If that still doesn't solve your problem, could you send me the affected source and script files? (All the .cpp, .h, .cs and .gui files that have "yack" in them) Zip them up, and I will diff them with my version and tell you what the difference / problem is.
#29
Also I have an interactive quiz system that uses the Yack Pack, it would be interesting to see if that would work too.
09/08/2009 (6:34 pm)
One of the things that was keeping me from migrating my 1.7.1 game to the new T3D engine was that I use Yack Pack heavily with 50+ characters to talk to. If your porting works then I could consider jumping to T3D now at least as a test to see how well it works for me.Also I have an interactive quiz system that uses the Yack Pack, it would be interesting to see if that would work too.
#30
09/08/2009 (6:40 pm)
@John: It seems to work pretty well - most of the problems were related to the directory structure. I think the 1.8.1 port would have worked just as fine on Torque 3D. Good luck if you decide to do the migration!
#31
I just coded the GMK 1.2.4 version in T3D Beta 5 today and it works great. just not the physics.
So I will work on adding the Yack Pack] next. This would set me up with a pretty good operational game on T3D since I already have so much built around these two products already.
Anyone heard what the expected release date of version 1 is? I would hate to keep redoing the game code with every version that comes out.
09/09/2009 (5:34 pm)
Thanks Konrad.I just coded the GMK 1.2.4 version in T3D Beta 5 today and it works great. just not the physics.
So I will work on adding the Yack Pack] next. This would set me up with a pretty good operational game on T3D since I already have so much built around these two products already.
Anyone heard what the expected release date of version 1 is? I would hate to keep redoing the game code with every version that comes out.
#32
09/29/2009 (11:32 pm)
Now that 1.0 has been released I plan on working heavly on getting my scripts and files ported to T3D. I see there was some folder changes with core. So I am glad I did not port everything to beta 5, and waited for the release.
#33
Nor can I get 3D sound to work. 2D works just fine.
10/06/2009 (9:14 pm)
I am having problems porting YackPack into T3D, specifically the *.getDialogMemory() always returns NULL.Nor can I get 3D sound to work. 2D works just fine.
#34
in the ~/scripts/server/gameCore.cs instead of the ~/core/scripts/server.spawn.cs. I inserted it at line 691.
10/14/2009 (12:08 am)
I got it figured out. I placed:%dlgMemory = new DialogMemory() {
dataBlock = DefaultDialogMemory;
};
MissionCleanup.add(%dlgMemory);
%player.dialogMemory = %dlgMemory;
%player.dialogMemory.scopeToClient(%this);
%player.setDialogMemory(%dlgMemory);in the ~/scripts/server/gameCore.cs instead of the ~/core/scripts/server.spawn.cs. I inserted it at line 691.
#35
10/14/2009 (6:07 pm)
Thanks for that Chad, I haven't checked this under 1.0 yet.
#36
Edit: The debug build completes without error. I load the empty mission and approach the NPC:
10/18/2009 (1:49 pm)
Has anyone been able to port the Yack Pack to T3D 1.0? I'm on my third attempt.Edit: The debug build completes without error. I load the empty mission and approach the NPC:
- the crosshair does not change to crossHair_talk.png.
- pressing 'f' does not initiate a conversation (no GUI elements are displayed.
- No audio playback.
- The console contains the following error:
Mapping string: YackStart to index: 3 exec: invalid script file name . Error: Start phrase not found.
#37
I had inserted:
Doing so caused my errors in comment #36. As Konrad originally posted, the insert code block should go in player.cs. However, player.cs does not have an "emap = true" so I guessed and dropped it after:
After a clean build:
10/24/2009 (11:20 am)
Fixed it. With the 1.0.1 release an aiPlayer.cs did exist so after:shootingDelay = 2000;
I had inserted:
//START YACK canTalk = true; dialogScriptName = "Stanley_Sunshine_Dialogue"; dialogScriptFile = "./dialogue/Stanley_Sunshine.dls"; dialogImg = "art/shapes/players/Kork_Portrait.png"; name = "Kork"; //END YACK
Doing so caused my errors in comment #36. As Konrad originally posted, the insert code block should go in player.cs. However, player.cs does not have an "emap = true" so I guessed and dropped it after:
aiAvoidThis = true; minLookAngle = -1.4; maxLookAngle = 1.4; maxFreelookAngle = 3.0;
After a clean build:
- the crosshair changes to crossHair_talk.png.
- pressing 'f' initiates a conversation and GUI elements are displayed.
- Audio playback.
#38
1. Cross hair displays
2. pressing 'f' initiates the conversation.
3. Kork portrait is displayed, "Hello Traveller" displays, and audio plays.
After that, the game crashes. I traced it to the line:
Yack_scrollQuestions.setVisible(true);
If I comment out the part that populates Yack_questions, the game doesn't crash, but obviously, there are no choices displayed. All the information in the arrays are valid. It's simply a matter of populating the GuiTextListCtrl makes the game crash when displaying the GuiScrollCtrl.
I'm kind of at a loss how to proceed from here. Anyone have any ideas?
10/24/2009 (2:11 pm)
I've attempted to port to T3D 1.0.1. Mostly good so far:1. Cross hair displays
2. pressing 'f' initiates the conversation.
3. Kork portrait is displayed, "Hello Traveller" displays, and audio plays.
After that, the game crashes. I traced it to the line:
Yack_scrollQuestions.setVisible(true);
If I comment out the part that populates Yack_questions, the game doesn't crash, but obviously, there are no choices displayed. All the information in the arrays are valid. It's simply a matter of populating the GuiTextListCtrl makes the game crash when displaying the GuiScrollCtrl.
I'm kind of at a loss how to proceed from here. Anyone have any ideas?
#39
I don't know if there was a bug in 1.0.1, or if I just fat fingered it, I was having other GUI problems in 1.0.1, so I decided just to stick with 1.0 for a bit longer.
10/24/2009 (5:36 pm)
I got it to work on T3D v1.0!I don't know if there was a bug in 1.0.1, or if I just fat fingered it, I was having other GUI problems in 1.0.1, so I decided just to stick with 1.0 for a bit longer.
#40
Validation required for shape: art/shapes/actors/Gideon/gideon.dts
Validation required for shape: art/shapes/actors/Gideon/gideon.dts
541: Unable to instantiate non-conobject class DialogMemoryData.
It all compiles nicely, so I don't understand why it is unable to instantiate non-conobject.
How can I better track this down to find the source of the problem. Any suggestions?
12/03/2009 (5:03 pm)
I am working with 1.1alpha, and I am getting this messageValidation required for shape: art/shapes/actors/Gideon/gideon.dts
Validation required for shape: art/shapes/actors/Gideon/gideon.dts
541: Unable to instantiate non-conobject class DialogMemoryData.
It all compiles nicely, so I don't understand why it is unable to instantiate non-conobject.
How can I better track this down to find the source of the problem. Any suggestions?
Associate Konrad Kiss
Bitgap Games
First of all, I did a search for info on porting the Yack pack to TGEA 1.8.1 or 1.7.1, to look out for anything that might still cause some trouble. TGEA 1.8.1 and Torque3D have many things in common, so it is very likely that if something did not work in 1.8.1, then it won't work in Torque 3D. I've found this page through a post from Kerry Lyon. For now, I'll just keep it by my side. We have covered most of the problems though, but the last bug mentioning black.png might come handy.
Right now, I'll need to see if the port works. I'll have to spawn another player and see if I can speak with it. It doesn't really need any ai, just a few parameters that we have already added to the DefaultPlayer datablock.
So I start the game, click Play and enter the world editor. Now I'll need to spawn another player character somewhere close. I'll simply ALT-C out of my player, and copy it through a SHIFT-drag. Now there are two players there.
I ALT-C back into mine, close the World Editor, and face the other player. Mmm. The mouse cursor turns into a talk cursor. That's cool. We'll need to speak with this guy.
You might recall, that the "f" key is bound as the yack action. Pressing F while pointing at the other player will initiate the demo conversation. I saw the portraits, the choices worked great, and the gui worked as expected. I also heard the guy talking.
That means the port was successful!
I know this was not easy to follow in this form, but I'm hoping that learning more about porting older stuff is worth that little extra time you spend by doing this port yourself.
Thanks to anyone following through this.