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
#42
That is why I am so confused that it cant find it from the script..
Any other suggestions?
Oh, I found the problem, I was compiling a debug code, not release. Now I no longer see that error.
12/04/2009 (12:48 am)
Those files are definately there, since other files such as player.h now include these files, it wouldn't compile without them and it all compiles great. That is why I am so confused that it cant find it from the script..
Any other suggestions?
Oh, I found the problem, I was compiling a debug code, not release. Now I no longer see that error.
#43
12/04/2009 (9:48 am)
It should still work in debug though.. Weird. Perhaps a complete debug rebuild would solve that too.
#44
//START YACK
moveMap.bind(keyboard, "f", Use);
echo("yack");
function Use(%val)
{
echo("Yack");
if(%val)
{
%obj = CrossHair.getTarget();
if(isObject(%obj) && %obj.isUseEnabled())
{
commandToServer('YackStart', %obj.getGhostID());
}
else if(isObject(%obj) && %obj.getType() &
$TypeMasks::ItemObjectType)
{
commandToServer('Pickup', %obj.getGhostID());
}
}
}
//END YACK
12/07/2009 (10:21 pm)
Well i have found a few mistakes I made, but it is still not quite working. The speach bubble comes up, but pressing "f" does absolutely nothing. This is the code from default.bind.cs. I added the echos to see if it is running, and the first "yack" shows up when it loads, but the "Yack" in the function Use never appears no matter when I press the f key. Any thoughts?//START YACK
moveMap.bind(keyboard, "f", Use);
echo("yack");
function Use(%val)
{
echo("Yack");
if(%val)
{
%obj = CrossHair.getTarget();
if(isObject(%obj) && %obj.isUseEnabled())
{
commandToServer('YackStart', %obj.getGhostID());
}
else if(isObject(%obj) && %obj.getType() &
$TypeMasks::ItemObjectType)
{
commandToServer('Pickup', %obj.getGhostID());
}
}
}
//END YACK
#45
12/08/2009 (7:26 am)
Your f key is probably bound to something else too - further down in that file.
#46
Is there anywhere else that might be overriding this key binding?
12/08/2009 (5:07 pm)
I thoroughly checked and removed another bind to f as well as ctrl f (just to be safe). Still nothing happens when I press "f".Is there anywhere else that might be overriding this key binding?
#47
$pref::Yack::useKeyboard = "0";
I tried setting this to something else, but it was reset to "0"
I will look into this later, but if you know off the top of your head, please let me know.
12/08/2009 (5:12 pm)
hmm, in the prefs.cs the last line is $pref::Yack::useKeyboard = "0";
I tried setting this to something else, but it was reset to "0"
I will look into this later, but if you know off the top of your head, please let me know.
#48
12/16/2009 (1:34 pm)
I found the problem, there is a config.cs in scripts/client that is overriding the bind file. if I add the key bind here it works.
#49
I have pretty much finished porting the Yack Pack into 1.1 alpha, but I am getting an error when the conversation is initiating. The input to the game also freezes after playing the speech dialog.
I am pretty sure it has something to do with "addPhrase" not being a console function, but from what I can tell in the engine source, it is. Any ideas?
01/07/2010 (1:12 pm)
Hi all,I have pretty much finished porting the Yack Pack into 1.1 alpha, but I am getting an error when the conversation is initiating. The input to the game also freezes after playing the speech dialog.
Quote:Executing scripts/server/dialogue/Stanley_Sunshine.dls.
scripts/server/yack.cs (261): Unknown command addPhrase.
Object (3685) Player -> ShapeBase -> GameBase -> SceneObject -> NetObject -> SimObject
I am pretty sure it has something to do with "addPhrase" not being a console function, but from what I can tell in the engine source, it is. Any ideas?
#50
I am now spawning an AIPlayer and the error I mentioned above goes away. However, I still can't choose any of the dialog options in the window. I will update everyone when I figure it.
01/09/2010 (1:22 am)
Actually, I figured out that the player copy I made in the editor was not using the AIPlayer class, so the DialogMemory object was not being created when it was spawned in the level. I am now spawning an AIPlayer and the error I mentioned above goes away. However, I still can't choose any of the dialog options in the window. I will update everyone when I figure it.
#51
01/09/2010 (12:10 pm)
Silly me, I missed a step in the merge process. I missed the onWake() changes in step 17.
#52
07/10/2010 (9:25 pm)
Has the Yack Pack been ported over now? Is it safe to buy yack pack and follow this resource to port it without any issues?
#53
You can also use the application Chat Mapper to map out your conversations for free.
www.chat-mapper.com/
07/10/2010 (9:35 pm)
Yes, there have been two ports of the pack. You can use this to port yours or find my port here, which is more concise and contains the majority of the fixes in it already. www.torquepowered.com/community/resources/view/19541You can also use the application Chat Mapper to map out your conversations for free.
www.chat-mapper.com/
#54
I've ported the YackPack to T3D1.1B1 (by following your steps in this post and Sean Rice's port) All works fine, except the problem you mentioned with the black.png. I get 2 white banners and white text (which still is selectable and turning yellow when hoovering over it). I will try the solution in the link you mentioned (by changing it into a 64x64 png) tonight to see if this works.
Also you have to make the merge step 15 mentioned in the merge guide in gamecore.cs instead of scripts/server/game.cs (somehow the createPlayer function is not called)
Thanks for your help.
Edit: corrected a typo.
07/15/2010 (11:53 am)
@Konrad:I've ported the YackPack to T3D1.1B1 (by following your steps in this post and Sean Rice's port) All works fine, except the problem you mentioned with the black.png. I get 2 white banners and white text (which still is selectable and turning yellow when hoovering over it). I will try the solution in the link you mentioned (by changing it into a 64x64 png) tonight to see if this works.
Also you have to make the merge step 15 mentioned in the merge guide in gamecore.cs instead of scripts/server/game.cs (somehow the createPlayer function is not called)
Thanks for your help.
Edit: corrected a typo.
#55
07/15/2010 (11:55 am)
Thanks for that info, Richard. I really appreciate it. I haven't had the time to keep this up to date with Torque 3D, unfortunately.
#56
Changing black.png to a 64x64 did the trick. Everything is working fine under T3D1.1B.
About step 15 in the Merge guide.
You have to add this to the function GameCore::SpawnPlayer right after this:
07/15/2010 (4:36 pm)
@Konrad:Changing black.png to a 64x64 did the trick. Everything is working fine under T3D1.1B.
About step 15 in the Merge guide.
You have to add this to the function GameCore::SpawnPlayer right after this:
if(isObject(%player))
{
#57
07/24/2010 (9:20 am)
Hehehehe ... Nice Konrad. Love your porting guide ... it has now given me some motivation to do a few ports of my own ... even if they have been done already.
#58
If you have some time, perhaps make a resource about one of those ports. There's a web based patch to markup lite converter at the products section of the bitgap.com website. So if you do a port all you need to do is create a patch and run the patch through the converter - it will give you all the instructions for your resource. Well, just in case.
07/24/2010 (9:33 am)
That's very cool, Quinton! If you have some time, perhaps make a resource about one of those ports. There's a web based patch to markup lite converter at the products section of the bitgap.com website. So if you do a port all you need to do is create a patch and run the patch through the converter - it will give you all the instructions for your resource. Well, just in case.
#59
static SimTime sAudioTimeout = 500;
into this:
//START YACK
static SimTime sAudioTimeout = 500000;
//END YACK
Setting the sAudioTimeout value this high gives you problems when playing the same sound with obj.playAudio(...) rapidly (Think about gun shots and so...) in the same slot.
One solution (not recommended) is to call obj.stopAudio(slot) right before calling the playAudio, but a better solution imo is to set back the value of sAudioTimeOut back to 500. Just test if your dialogues play well with this value. I haven't found any problems with this value maybe this is something from the past, but it seems not necessary in T3D1.1 beta 2.
Side note:
sAudioTimeout is used to stop a non-looping sound after sAudioTimeout msecs. But checking the code responsible for this, the sound will only be stopped after this time out AND when it is NOT playing.
09/09/2010 (2:02 pm)
There is a minor problem in step 4 of the merge-guide where you have to change this:static SimTime sAudioTimeout = 500;
into this:
//START YACK
static SimTime sAudioTimeout = 500000;
//END YACK
Setting the sAudioTimeout value this high gives you problems when playing the same sound with obj.playAudio(...) rapidly (Think about gun shots and so...) in the same slot.
One solution (not recommended) is to call obj.stopAudio(slot) right before calling the playAudio, but a better solution imo is to set back the value of sAudioTimeOut back to 500. Just test if your dialogues play well with this value. I haven't found any problems with this value maybe this is something from the past, but it seems not necessary in T3D1.1 beta 2.
Side note:
sAudioTimeout is used to stop a non-looping sound after sAudioTimeout msecs. But checking the code responsible for this, the sound will only be stopped after this time out AND when it is NOT playing.
#60
"I found the problem, there is a config.cs in scripts/client that is overriding the bind file. if I add the key bind here it works."
That got it working for me! :)
11/29/2010 (1:44 am)
@David Stoesz, thank you for posting:"I found the problem, there is a config.cs in scripts/client that is overriding the bind file. if I add the key bind here it works."
That got it working for me! :)
Associate Konrad Kiss
Bitgap Games