Jump to content

Recommended Posts

I created a separate file containing the speech for the pets of my mod. Much like the STRINGS file for Don't Starve Together, but the problem is that I can not access it always returns null. Example:

ENGLISH =
    {
        SKIP =
        { 
            ATTACK = {},
            
            STATUS = 
            {
                EMPTY = {},
                HALF  = {},
                FULL  = {},
            },
                
            ACTION = 
            {
                PICK = {},
                DROP = {},
                FAIL = {},
            },
        },

}

I used GLOBAL.require and still does not work.

Sorry for my english!

@PaulCiclops for starters, when you say pet, you mean follower/companion and not a playable creature, yes?

 

I haven't tested this, but what might work is hooking up a custom character speech file ("speech_creaturename.lua") and remove all examination quotes so that the only quotes left are the announce quotes. hook it up like you would to a playable character, and add custom announce strings if you have to (and the wisecracker component and/or functions)

you're gonna need to ad a talker function to the prefab too

 

for example, a speech function on the creature's prefab or brain might look something like this:

local function onpickupitem                                                                                                                                                                            inst.components.talker:Say(GetString(inst, "ANNOUNCE_PICKUP"))                                                                                       end

 

then add an event listener somewhere so that the speech is triggered when the creature picks something up. The problem there is that there might not be an event for picking up an item, but I'm not sure.

 

 

Edited by mf99k
On 08/04/2016 at 4:26 AM, mf99k said:

@PaulCiclops for starters, when you say pet, you mean follower/companion and not a playable creature, yes?

 

I haven't tested this, but what might work is hooking up a custom character speech file ("speech_creaturename.lua") and remove all examination quotes so that the only quotes left are the announce quotes. hook it up like you would to a playable character, and add custom announce strings if you have to (and the wisecracker component and/or functions)

you're gonna need to ad a talker function to the prefab too

 

for example, a speech function on the creature's prefab or brain might look something like this:

local function onpickupitem                                                                                                                                                                            inst.components.talker:Say(GetString(inst, "ANNOUNCE_PICKUP"))                                                                                       end

 

then add an event listener somewhere so that the speech is triggered when the creature picks something up. The problem there is that there might not be an event for picking up an item, but I'm not sure.

 

 

Thanks, but I doing otherwise. I set up the file with separate lines return an array of types. Worked perfectly. And to access the prefabs saved it TUNING.

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