Helping getting a screenplay to work

saereth

New Member
Joined
Oct 20, 2017
Messages
4
Hi i'm trying to get a screenplay to work, I plan on adding alot more to this later but the basic conversation doesnt seem to be working. Currently when you talk to the npc you just get an empty chat bubble and no prompts. Hoping someone can tell me what i'm doing wrong here. code is for the 3 main files are hastebined for syntax hilighting here:

[font=Whitney,]https://hastebin.com/uwerulocok.scala[/font]

[font=Whitney,]https://hastebin.com/ebigeninaj.go[/font]

[font=Whitney,]https://hastebin.com/imenabupip.lua[/font]



The conversation debug prints in the conversation template are triggering when you click on him:



Thanks for any advice on this!
 

Valkyra

Member
Joined
Aug 31, 2010
Messages
211
Ok, so a few things to note...

First off, your leftDialogue parameter in the 2nd link should not be there on any screen, as you need to pick 1 or the other, leftDialog is for STF files, and customDialogText is for custom string.

For the insufficient funds, change customText to customDialogueText as the prior screens have.

For the actual screenplay, the format seems a bit out of date. Instead, SWGEmu devs implemented conv_handler, which your convo handler screenplay should inherit instead of object.

So instead of:
bhslicer_convo_handler = Object:new { tstring = "myconversation"}

You need
bhslicer_convo_handler = conv_handler:new { tstring = "myconversation"}

(I could be wrong about the actual name of it, might want to research it...)

Now, in order to successfully use that inheritance, you need to add/edit your functions with the EXACT same parameters as the super/parent one has.

So, you will need getInitialScreen, and runScreenHandlers. I don't think you will need getNextConversationScreen since you won't be modifying anything within that function.

Within runScreenHandlers, you will place your game logic, that executes depending on what the screenID is. There's plenty of examples within the existing SWGEmu core3 unstable repo branch.

Your issue stems from there not being a 'getInitialScreen' function btw, but hopefully I've outlined enough in my prior statements to assist you.
 

saereth

New Member
Joined
Oct 20, 2017
Messages
4
Valkyra said:
Ok, so a few things to note...

First off, your leftDialogue parameter in the 2nd link should not be there on any screen, as you need to pick 1 or the other, leftDialog is for STF files, and customDialogText is for custom string.

For the insufficient funds, change customText to customDialogueText as the prior screens have.

For the actual screenplay, the format seems a bit out of date. Instead, SWGEmu devs implemented conv_handler, which your convo handler screenplay should inherit instead of object.

So instead of:
bhslicer_convo_handler = Object:new { tstring = "myconversation"}

You need
bhslicer_convo_handler = conv_handler:new { tstring = "myconversation"}

(I could be wrong about the actual name of it, might want to research it...)

Now, in order to successfully use that inheritance, you need to add/edit your functions with the EXACT same parameters as the super/parent one has.

So, you will need getInitialScreen, and runScreenHandlers. I don't think you will need getNextConversationScreen since you won't be modifying anything within that function.

Within runScreenHandlers, you will place your game logic, that executes depending on what the screenID is. There's plenty of examples within the existing SWGEmu core3 unstable repo branch.

Your issue stems from there not being a 'getInitialScreen' function btw, but hopefully I've outlined enough in my prior statements to assist you.
This was actually quite help, was working off an example from a site that was outdated, went back and used current screenplays for examples and seems to have worked out better, thanks!
 
Top Bottom