Jump to content

Two Different Speech Files


Recommended Posts

You could try if adding something like this to you modmain works:

if GetModConfig("which_speechfile") == 1 then
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character1"
else
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character2"
end

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Monti18 said:

You could try if adding something like this to you modmain works:


if GetModConfig("which_speechfile") == 1 then
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character1"
else
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character2"
end

 

quick question is it possible to change it in game? like when its fullmoon character uses speech_1 and if its new moon character uses speech_2 and if its not any of them the character uses speech_3)

Link to comment
Share on other sites

On 6/24/2021 at 5:30 PM, Monti18 said:

You could try if adding something like this to you modmain works:


if GetModConfig("which_speechfile") == 1 then
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character1"
else
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character2"
end

 

Wait, I thought that kinda stuff was supposed to go in Modinfo?

Link to comment
Share on other sites

So there's a problem.

My modmain has

if GetModConfig("which_speechfile") == 1 then
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_inky1"
else
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_inky2"
end

and in my modinfo has

configuration_options =
{
	{
		name = "which_speechfile",
		label = "Personality",
		options =	{
						{description = "Speech 1", data = 1},
						{description = "Speech 2", data = 2},
					},
		default = 2,
	}
}

but the game hard crashes. I looked at the log and at the line of GetModConfig it says "attempt to call global 'GetModConfig' (a nil value)". I have no idea what to do next.

Link to comment
Share on other sites

I just tried it, it works on my side.

Did you change YOUR_CHARACTER in the code

if GetModConfig("which_speechfile") == 1 then
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_inky1"
else
	GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_inky2"
end

to the name of your character in upper case?

Did you remove the line in the modmain that selects the speechfile that you had in there before ?

GLOBAL.STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_inky" 

If you did all of this, post your modmain so I can have a look.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...