Jump to content

Recommended Posts

So, I've been working on a mod character for a while, I'm pretty much done, but I would love Maxwell to say something different than the usual "say pal..." upon start. I've been looking at some lua files, namely maxwellintro (under nis),components.talker , and strings.

I feel like my solution should be in these three, plus dropping a postinit in modmain. Any help would be greatly appreciated. Also if I'm completely wrong, that's ok. Is it possible to do this?

Well, maybe nothing actually. But I know editing wether maxwell spawns or not is part of world gen, my initial thought was editing the sequence of events that are triggered upon entering the world might also be considered world gen. Looking at it now it probably isn't. Good point sir

Well, maybe nothing actually. But I know editing wether maxwell spawns or not is part of world gen, my initial thought was editing the sequence of events that are triggered upon entering the world might also be considered world gen. Looking at it now it probably isn't. Good point sir

 

You, sir, are a true intellectual and I respect that. Someone throw this guy a code-bone and help him out please.

You, sir, are a true intellectual and I respect that. Someone throw this guy a code-bone and help him out please.

Thank you very much, I do my best anyways. So I would like terribly to change the title of this thread, but for the life of me can't figure out how.  It may just be I'm incredibly dense, but I've never had to change a title of a thread before.  So any help on changing the Maxwell intro, along with details on how to fix this blasted thread would be greatly appreciated.

Try adding this line to modmain.lua.

 

GLOBAL.STRINGS.MAXWELL_SANDBOXINTROS.ONE = "Hello friend!"
From my experience this will only work in the root of modmain where we can't use it to check for what character is played. Instead I would suggest hooking into "maxwellintro" and changing the appropriate entries in

inst.components.maxwelltalker.speech
Or something along those lines. You can always look for reference in "maxwellintro.lua" for which entries are relevant for you.

Here's something Malacath gave me.

local function ModMaxwellIntro(inst)    if GLOBAL.GetPlayer().prefab == "CHARACTERPREFABNAME" then        inst.components.maxwelltalker.speeches.SANDBOX_1 =        {            appearsound = "dontstarve/maxwell/disappear",            voice = "dontstarve/maxwell/talk_LP",            appearanim = "appear",            idleanim= "idle",            dialogpreanim = "dialog_pre",            dialoganim="dial_loop",            dialogpostanim = "dialog_pst",            disappearanim = "disappear",            disableplayer = true,            skippable = true,            {                string = "Say pal, you don't look so good.",                wait = 3,                anim = nil,                sound = nil,            },            {                string = "You better find something to eat before night comes.",                wait = 3,                anim = nil,                sound = nil,            },        }    endend AddPrefabPostInit("maxwellintro", ModMaxwellIntro)

Place this inside your modmain.lua file. After ofcourse entering the name of the prefab your character uses and replacing the default lines with something you want.

 

I don't know though how to make a character use Waxwell's intro. It's probably something about denying the use of the entire intro file and just making the character wake up without Maxwell greeting you.

Edited by KiddyCorky

You guys are the best ("sniff", tears up)

 

Yeah no problem. I'am more curious to know how to make characters use Waxwell's intro. Since it's definetaly not inside waxwell.lua or maxwellintro.lua.

Edited by KiddyCorky

This has worked great so far. I can get him to change his speech for the intro, but not for the adventure. By that I mean, what he says in the intro. And then he says something else during adventure.

 

Example:

 

Intro:

 

"Say Pal, hooby dooby!

Go skip rope for me!"

 

Adventure:

 

"You didn't skip rope well enough.

Now hooba-doo and get outta here."

 

 

That's not actually what he'll say, but you know what I mean?

 

Changing the speech for adenture works basically the same. Take a look into "maxwellintro.lua", copy the local table "Speech" from there into your modmain and edit whatever you need to edit. Then do the same check you did so far and instead of changing a single subtable of the "maxwelltalker" component change the whol thing like so

local Speech = {    LOOOOOOOOOOOOOOTS of stuff}local function ModMaxwellIntro(inst)    if GLOBAL.GetPlayer().prefab == "CHARACTERPREFABNAME" then        inst.components.maxwelltalker.speeches = Speech    endend  AddPrefabPostInit("maxwellintro", ModMaxwellIntro)
Edited by Malacath

I tried that. It would replace the last one, so the adventure would work but the survival intro wouldn't.

 

I got it. Just put in a comma that wasn't meant to be there.

 

local function ModMaxwellIntro(inst)
    if GLOBAL.GetPlayer().prefab == "wil" then
        inst.components.maxwelltalker.speeches.SANDBOX_1 =
        {
stuff stuff
            {
string stuff
            },
    }  (< here is where I put the comma that shouldn't have been there)

 

        inst.components.maxwelltalker.speeches.ADVENTURE_1 =  (<for the adventure)
        {
 stuff stuff
{
string stuff
        },
    }
 

end

end

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...