WesisBless Posted October 15, 2020 Share Posted October 15, 2020 (edited) So! I've been working on this for a while, but since this doesn't pertain to my other thread about this mod (it's far more specific), I'll make a separate thread for it. I'm trying to add some code to the Modmain.lua in order to have the existing characters in the game react in unique ways to my character (Different from the Player string in the speech_[character].lua file) and I pulled the code from an existing mod that had it. In my testing, it seemed characters like Wilson and Webber still used their default descriptors instead of the ones I modded in. Here's what the code looks like (Only posting a few as not to clutter this thread): Quote -- The default responses of examining the character STRINGS.CHARACTERS.GENERIC.DESCRIBE.warlock = { GENERIC = "Great day to you, %s.", ATTACKER = "I knew to be wary of you, %s!", MURDERER = "Murderer! Neither magic nor science will save you now!", REVIVER = "Perhaps I'll accept that a LITTLE magic is real.", GHOST = "Did your tricks get you into trouble again, %s?", FIRESTARTER = "Was this supposed to be some kind of prank, %s?", } STRINGS.CHARACTERS.WILLOW.DESCRIBE.warlock = { GENERIC = "Oh, it's just you %s.", ATTACKER = "%s, you're STILL mad about that!?", MURDERER = "Well now you've got your revenge, I hope you're happy %s.", REVIVER = "Have you forgiven me now, %s?", GHOST = "Maybe I should just leave you like that, %s. Just kidding!!", FIRESTARTER = "Hehehe, you went and started some fun without me %s?", } STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.warlock = { GENERIC = "Is little tricky man, %s.", ATTACKER = "%s is not a nice man!", MURDERER = "%s is evil! Demon man!", REVIVER = "%s is good, strong demon friend!", GHOST = "%s needs to be strong like Wolfgang. Don't worry, will teach you.", FIRESTARTER = "Is not funny trick, %s! Stop!", } STRINGS.CHARACTERS.WENDY.DESCRIBE.warlock = { GENERIC = "Hello %s. Abigail also says hello.", ATTACKER = "You were just pretending to be nice, weren't you %s.", MURDERER = "I wish I never met you, %s.", REVIVER = "Thank you for returning my body to me, %s.", GHOST = "Don't worry, %s. I won't leave you like that.", FIRESTARTER = "He holds a burning desire, that %s.", } STRINGS.CHARACTERS.WX78.DESCRIBE.warlock = { GENERIC = "IT IS THE FLESHLING WITH HORNS, %s.", ATTACKER = "%s, I CAN'T SAY I AM SHOCKED.", MURDERER = "%s, DIRECT YOUR VIOLENCE AT OTHER FLESH BEINGS, NOT ME.", REVIVER = "YOU HAVE REBOOT ME. PERHAPS I CAN MAKE YOU MY MINON, %s.", GHOST = "I GUESS YOU EXPECT ME TO GET YOU A REVIVING MODULE, %s?", FIRESTARTER = "I HAVE NOT COMMANDED YOU TO COMMENCE WORLD DOMINATION YET, %s!", } STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.warlock = { GENERIC = "Ah, the warlock. Greetings dear %s, how have you been?", ATTACKER = "Do not make me pull you by the ear, %s!", MURDERER = "Your feindish tricks end here, %s!", REVIVER = "%s, you're such a sweet lad.", GHOST = "Did you forget your magic lessons, dear %s?", FIRESTARTER = "Now %s, this is no way to practice!", } STRINGS.CHARACTERS.WOODIE.DESCRIBE.warlock = { GENERIC = "I hate to break it to you, but magic powers ain't real, bud.", ATTACKER = "%s watch where you're slinging that stuff, eh?", MURDERER = "%s, you've gone and made me angry!", REVIVER = "Well ain't you the bees knees, %s!", GHOST = "You really outta be more careful, %s!", FIRESTARTER = "You've gone and started a fire, eh %s?", } STRINGS.CHARACTERS.WAXWELL.DESCRIBE.warlock = { GENERIC = "Hello, Wanon.", ATTACKER = "How dare you lash out at me, %s!", MURDERER = "You are not going to win this game, %s.", REVIVER = "Ah, %s. I knew I could count on a fellow magician.", GHOST = "%s. How lovely to see you again, you're looking a bit white.", FIRESTARTER = "Clumsy, %s. Very clumsy.", } My first thought was in the line "...DESCRIBE.warlock", warlock needed to be capitalized. I tried that, and it still didn't work properly. If anybody has any info I'd appreciate it! ---------------------- I tossed out using this code entirely, as nothing I tried worked and nobody seemed to have a fix for it. Instead, I ended up using a different code to use a custom speech file I made and added my character's prefab to the character interaction list. In case anybody else is looking for it, the code I used is this: GLOBAL.STRINGS.CHARACTERS.GENERIC = GLOBAL.require "speech_wils" This is for Wilson, because he uses the generic string. I took his speech file, renamed it to speech_wils so it wouldn't conflict with his existing speech file, and it worked like a dream. Hope this helps someone else! Edited October 18, 2020 by WesisBless Found a solution. 1 Link to comment https://forums.kleientertainment.com/forums/topic/122470-solvedtrouble-with-the-describe-strings-for-character-mod/ 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