Jump to content

Recommended Posts

Does anyone have a guide or file(location) that can be used to create custom soliloquies (the solo speeches/talks the vanilla characters do)  for modded characters? I find these soliloquies as a great way to add more depth to a modded character and I really want to add them to some of the existing modded characters I've worked on.

Link to comment
https://forums.kleientertainment.com/forums/topic/144093-custom-soliloquies/
Share on other sites

EDIT (3/11/22) TO ANYONE ELSE WANTING TO USE THIS: This code is for the current version of Esctemplate and assumes your character information strings are in your Modmain.lua. If they are not, this code will cause a crash because "STRINGS" is not declared. Scroll down three posts to find the alternative version.

 

Hi there. Here's the framework for a custom performance. (I wasn't the person who figured out how to do this, but I've tried searching for the original poster and the forum's search tool isn't cooperating.)

You can just put this in modmain.lua

Quote

STRINGS.STAGEACTOR.YOURCHARACTER1 = {
    "Lorem ipsum dolor sit amet",
    "consectetur adipiscing elit",
}

local general_scripts = require("play_generalscripts")

general_scripts.YOURCHARACTER1 = {
   cast = { "yourcharacter" },
   lines = {
      {roles = {"yourcharacter"}, duration = 5.0, line = STRINGS.STAGEACTOR.YOURCHARACTER1[1]},
        {roles = {"yourcharacter"}, duration = 3.0, line = STRINGS.STAGEACTOR.YOURCHARACTER1[2]},
    }
}

Replace all instances of "yourcharacter" with your character's prefab in the appropriate case.

You can find the formatting for soliloquies in play_generalscripts.lua

Edited by Chesed
  • Like 1

chesed, heya, thanks for replying. I added what you quoted into modmain.lua and changed the yourcharacter to my character's prefab. however when i attempt to open the server, it won't start. I also have no other mods applied. When I remove caves and try to start the server then, the game just crashes.

Sorry to hear. I just tested the code I posted on a clean version of Esctemplate just in case I forgot anything, but it worked as expected. (Just for reference, I added this at the very bottom of modmain.lua.)

Do you have any crash logs (or preferably a copy of the mod) I can look at? I don't know if I'll be able to spot the issue but it will help narrow things down.

Edited by Chesed

For all of those that might run into the problem I did, Chesed found out the problem pretty easily.

local STRINGS = GLOBAL.STRINGS

STRINGS.STAGEACTOR.YOURCHARACTER1 = {
    "Lorem ipsum dolor sit amet",
    "consectetur adipiscing elit",
}

local general_scripts = require("play_generalscripts")

general_scripts.YOURCHARACTER1 = {
   cast = { "yourcharacter" },
   lines = {
      {roles = {"yourcharacter"}, duration = 5.0, line = STRINGS.STAGEACTOR.YOURCHARACTER1[1]},
        {roles = {"yourcharacter"}, duration = 3.0, line = STRINGS.STAGEACTOR.YOURCHARACTER1[2]},
    }
}

We just added the last bit of code at the top. I hope our discussion helps all of you who wish to make a soliloquy for your character!

  • Like 1
13 hours ago, thexenoemblem said:

For all of those that might run into the problem I did, Chesed found out the problem pretty easily.

local STRINGS = GLOBAL.STRINGS

STRINGS.STAGEACTOR.YOURCHARACTER1 = {
    "Lorem ipsum dolor sit amet",
    "consectetur adipiscing elit",
}

local general_scripts = require("play_generalscripts")

general_scripts.YOURCHARACTER1 = {
   cast = { "yourcharacter" },
   lines = {
      {roles = {"yourcharacter"}, duration = 5.0, line = STRINGS.STAGEACTOR.YOURCHARACTER1[1]},
        {roles = {"yourcharacter"}, duration = 3.0, line = STRINGS.STAGEACTOR.YOURCHARACTER1[2]},
    }
}

We just added the last bit of code at the top. I hope our discussion helps all of you who wish to make a soliloquy for your character!

Thankyou so much, this code works! Does anyone know how to add actions to the lines or custom sounds?

3 hours ago, AretMaw said:

Thankyou so much, this code works! Does anyone know how to add actions to the lines or custom sounds?

If you take a look at play_generalscripts.lua you'll see how Klei wrote the other solloquies, that will help you!

Very quickly I added this to a line:

Quote

{roles = {"wyneer"}, duration = 5.0, line = STRINGS.STAGEACTOR.WYNEER1[1], anim="emote_happycheer"},

and that worked to make my character emote on the stage.

I'm not sure how you would go about adding sounds, but Wigfrid's play involves some so I would look there first. I'm more of an artist than a programmer and haven't had much time to look at soliloquies yet, so I don't know how to do anything more advanced with them haha, sorry about that!

Edited by Chesed
I can't spell the word "soliloquies"
  • Like 1
On 11/3/2022 at 11:16 PM, Chesed said:

If you take a look at play_generalscripts.lua you'll see how Klei wrote the other solloquies, that will help you!

Very quickly I added this to a line:

and that worked to make my character emote on the stage.

I'm not sure how you would go about adding sounds, but Wigfrid's play involves some so I would look there first. I'm more of an artist than a programmer and haven't had much time to look at soliloquies yet, so I don't know how to do anything more advanced with them haha, sorry about that!

Thankyou so much for this! I just went with a general Poem Soliloquy for Whyatt at the moment but I may try this in the future! ^v^

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...