SqHd Posted July 31, 2016 Share Posted July 31, 2016 RPG Dialog 1.4 to T3D 3.8(*It also works in T3D 3.9)Since I couldn’t get the Yack Pack working in T3D 3.8, I decided to check out an old GG resource called: RPG Dialog (v1.4). After some experimenting, I was able to get NPCs spawning with the dialog options. Only issue is the sound isn't working. See console errors:scripts/client/RPGDialog.cs (190): Unable to find function alxIsPlayingscripts/client/RPGDialog.cs (191): Unable to find function alxStopscripts/client/RPGDialog.cs (194): Unable to find function alxPlayDropBox link: https://www.dropbox.com/sh/gxfy58huq3hvrpl/AACefZCSBHwnU4JAftDhzv9Ga?dl=0I used the following forum topics to get this working:(Original Resource): http://www.garagegames.com/community/resources/view/3531https://www.garagegames.com/community/forums/viewthread/93667http://www.garagegames.com/community/forums/viewthread/75606https://www.garagegames.com/community/forums/viewthread/137872 Quote Link to comment Share on other sites More sharing options...
SqHd Posted July 31, 2016 Author Share Posted July 31, 2016 game/core/scripts/client/core.cs- After:exec("~/scripts/client/scriptDoc.cs");- Add://---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- exec("~/scripts/RPGDialogEditor/ingameRPGDialogEditor.cs"); //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- game/scripts/client/config.cs- Add:moveMap.bind(keyboard, "q", TalkTo); game/scripts/client/default.bind.cs- Comment/remove the following line://moveMap.bindCmd(keyboard, "1", "commandToServer('use',\"Ryder\");", "");- Add to the end of the file:// RPGdialog moveMap.bind(keyboard, "q", TalkTo); //---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- function TalkTo(%val) { if(%val) commandToServer('RPGDialogRay'); } moveMap.bind(keyboard, "q", TalkTo); moveMap.bindCmd(keyboard, "1", "SelectAnswer(1);", ""); moveMap.bindCmd(keyboard, "2", "SelectAnswer(2);", ""); moveMap.bindCmd(keyboard, "3", "SelectAnswer(3);", ""); moveMap.bindCmd(keyboard, "4", "SelectAnswer(4);", ""); moveMap.bindCmd(keyboard, "5", "SelectAnswer(5);", ""); moveMap.bindCmd(keyboard, "6", "SelectAnswer(6);", ""); moveMap.bindCmd(keyboard, "7", "SelectAnswer(7);", ""); moveMap.bindCmd(keyboard, "8", "SelectAnswer(8);", ""); moveMap.bindCmd(keyboard, "9", "SelectAnswer(9);", ""); moveMap.bindCmd(keyboard, "0", "SelectAnswer(10);", ""); function OutOfRPGDialogFunction(%Number) { switch(%Number) { case 1: commandToServer('use',"Ryder"); case 2: %Number=0;//Does nothing... just a placeholder. case 3: %Number=0;//Does nothing... just a placeholder. case 4: %Number=0;//Does nothing... just a placeholder. case 5: %Number=0;//Does nothing... just a placeholder. case 6: %Number=0;//Does nothing... just a placeholder. case 7: %Number=0;//Does nothing... just a placeholder. case 8: %Number=0;//Does nothing... just a placeholder. case 9: %Number=0;//Does nothing... just a placeholder. case 0: %Number=0;//Does nothing... just a placeholder. } } //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- game/scripts/gui/optionsDlg.cs- Right after:$RemapName[$RemapCount] = "Fire Weapon";$RemapCmd[$RemapCount] = "mouseFire";$RemapCount++;- Add:$RemapName[$RemapCount] = "Talk to NPC"; $RemapCmd[$RemapCount] = "TalkTo"; $RemapCount++; game/scripts/client/defaults.cs- Add to the end of the file://---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- $Pref::RPGDialog::Client::QuestionPath="art/dialogs/dlq/";//RPGDialog Question Path. $Pref::RPGDialog::MaxOptions = 100;//RPGDialog Max Options. $Pref::RPGDialog::ChatHudQuestionColor="\c1";//Question text Color on the chat hud. $Pref::RPGDialog::ChatHudAnswerColor="\c5";//Answer text Color on the chat hud. //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- game/scripts/client/init.cs- After:exec("art/gui/remapDlg.gui");- Add://---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- exec("art/gui/RPGDialog.gui"); //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- - After:exec("scripts/gui/optionsDlg.cs");- Add://---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- exec("./RPGDialog.cs"); exec("./RPGDialogAudioProfiles.cs"); //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- - After:Canvas.setCursor("DefaultCursor");- Add//---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- initRPGDialogEditor(); //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- game/scripts/client/pref.cs- Add to the end of the file:$Pref::RPGDialog::ChatHudAnswerColor = "\c5"; $Pref::RPGDialog::ChatHudQuestionColor = "\c1"; $Pref::RPGDialog::Client::QuestionPath = "art/dialogs/dlq/"; $Pref::RPGDialog::MaxOptions = 100; $Pref::Server::RPGDialog::ActionPath = "art/dialogs/dla/"; game/scripts/server/scriptExec.cs- After:exec("./aiPlayer.cs");- Add://---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- exec("./RPGDialog.cs"); //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- game/scripts/server/defaults.cs- After:// Now add your own game specific server preferences as// well as any overloaded core defaults here.- Add://---------------------------------------------------------------- //RPGDialog Code Begin //---------------------------------------------------------------- $Pref::Server::RPGDialog::ActionPath="art/dialogs/dla/"; //RPGDialog Action Path. //---------------------------------------------------------------- //RPGDialog Code End //---------------------------------------------------------------- game/scripts/server/pref.cs- Add to the end of the file:$Pref::Server::RPGDialog::ActionPath = "art/dialogs/dla/"; game/scripts/server/aiPlayer.cs- Change this function://----------------------------------------------------------------------------- // AIPlayer static functions //---------------------------------------------------------------------------- function AIPlayer::spawnAtLocation() - To the following: function AIPlayer::spawnAtLocation(%name, %data, %spawnPoint, %Script, %Portrait, %startQuestion) { // Create the demo player object %player = new AiPlayer() { //dataBlock = DemoPlayer; dataBlock = %data; path = ""; }; MissionCleanup.add(%player); %player.setShapeName(%name); %player.setTransform(%spawnPoint.getTransform()); %player.RPGDialogScript = %Script; %player.RPGDialogPortrait = %Portrait; %player.RPGDialogStartQuestion = %startQuestion; %player.RPGDialogBusy = false; %player.RPGDialogBusyText = 'Sorry but I\'m busy talking to %1 right now.'; %player.RPGDialogTalkingTo = 0; return %player; } game/scripts/server/gameCore.cs- In this function:function GameCore::startGame(%game)- After:// // Start the AI on the specified path// AIPlayer::spawn("Path1");- Add:AIPlayer::spawnAtLocation(Kaneda, DemoPlayer, spawn1, "Test", "test.png", 1); *Note: This is how you spawn the NPCs - First is the NPC name: Kaneda - Second is the datablock used for the NPC: DemoPlayer (derived from game/art/datablocks/aiPlayer.cs) - Next is the new spawn point: spawn1 - Then the RPG Dialog script: Test (found in the dialogs folder) - Next the RPG Dialog portrait: test.png (found in the dialogs folder) - Finally, the RPG Dialog start question: 1Create a spawnsphere in the world editor and name it "spawn1". Place it where ever you like. Also, if you don't want the player to use this as a spawn point, make sure it's NOT in the playerDropPoints simset. Quote Link to comment Share on other sites More sharing options...
JeffR Posted February 20, 2017 Share Posted February 20, 2017 @SqHd Hey dude, the dropbox link looks dead. Any chance of a reupload? Quote Link to comment Share on other sites More sharing options...
SqHd Posted February 20, 2017 Author Share Posted February 20, 2017 Hi. Link is back and working. Sorry about that. I didn't think anyone was interested.On a separate note, thanks for all your hard work on 3.10! And I enjoy your work blog. Later. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.