PaulCiclops Posted April 8, 2016 Share Posted April 8, 2016 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! Link to comment https://forums.kleientertainment.com/forums/topic/66159-help-with-custom-pet_speech-file/ Share on other sites More sharing options...
MF99K Posted April 8, 2016 Share Posted April 8, 2016 (edited) @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 April 8, 2016 by mf99k Link to comment https://forums.kleientertainment.com/forums/topic/66159-help-with-custom-pet_speech-file/#findComment-746735 Share on other sites More sharing options...
PaulCiclops Posted April 10, 2016 Author Share Posted April 10, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/66159-help-with-custom-pet_speech-file/#findComment-747848 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now