Jump to content

[Help] Custom quotes for Wilson, specifically?


Recommended Posts

I've added a new "perk" of sorts to Wilson in my mod, it lets him craft potions medicine (potions just aren't science-y), and I want him to have specific quotes.

Can't find the email right now but I heard someone say they got an email from a dev stating Wilson was a doctor (Can I get confirmation on this?). It's not too vital to this update but that's what I centered his perk around.

 

ANYWAY, BACK TO WHAT I ACTUALLY NEED HELP WITH, YES?

I need to add custom quotes for Wilson examining these potions medicine bottles specifically. However, Wilson is by default, the generic speech, generic animation base, generic... everything. And I learned this when I wrote the string

STRINGS.CHARACTERS.WILSON.DESCRIBE.RED_POTION = {	
	"This won't be painful.", 
	"Looks sweet.", 
	"Pain killers usually aren't in syrup form!", 
	 
}

(The multiple strings allows a quote to be selected at random. That works.)

And... that crashed DST. Apparently, it cannot find "WILSON". That frustrated me a little, because I have at least 1 or more Wilsons in my dorm right now, what do you mean you "can't find him", game engine?

But I can do this!

STRINGS.CHARACTERS.WOODIE.DESCRIBE.RED_POTION = {	
	"That's sweet.", 
	"Not really one to take medicine, yanno?", 
	"Are you sure this will work, bud?", 
	 
}

DST can find woodie and give him that custom quote.

I'm worried about overriding speech_wilson.lua, since I have already overrode his prefab and build (he's getting a labcoat in this next update.) I'm worried that already, this mod will conflict with other mods and cause crashes.

 

So, is there a way for me to get around overriding speech_wilson.lua to add these quotes? Or is that not possible?

Link to comment
Share on other sites

Heh, I don't know If this text will help you, maybe I understanted badly. Sorry!

Idk if theres an way to make the wilson specific describe, because wilson (or any mod character or character without the quotes) will ever use the CHARACTERS.GENERIC.DESCRIBE, Or thats just my thought. Also.

 

34 minutes ago, DextersComicLaboratory said:

(he's getting a labcoat in this next update.)

Oh!! I ever wanted see Wilson with an labcoat, since... Well, It's some kind of scientist, right?

Link to comment
Share on other sites

Good morning!

The problem is, Wilson was the first survivor and thus got the first batch of quotations. You see, the devs decided to make Wilson's speech the default, since he had some already and the new characters might not have.

So you can't really well and truly give Wilson unique quotations without changing the "GetString()" function from stringutil.lua, but you can set the default quotation to Wilsons and everybody else's to something else.

Usually you'd do this like so:

STRINGS.CHARACTERS.GENERIC.DESCRIBE.YOURPREFABNAME = "This is one snowflake of a string!"

STRINGS.CHARACTERS.WILLOW.DESCRIBE.YOURPREFABNAME = "I don't know."

[...]

But this leaves the problem of mod characters. Mod characters almost certainly don't prepare in advance for mod items. Either you grin and bear it or you bite the bullet and go through all character speeches. Here's some pseudo-code I wrote, maybe you can already use it like this:

for k,v in pairs(STRINGS.CHARACTERS) do

  if v.DESCRIBE then

    v.DECRIBE.YOURPREFABNAME = "Standardised I know not."

  end

end

STRINGS.CHARACTERS.GENERIC.DESCRIBE.YOURPREFABNAME = "This is one snowflake of a string!"

If you have any further questions, feel free to summon my wrath tag me again!

Link to comment
Share on other sites

3 hours ago, Mobbstar said:

Good morning!

The problem is, Wilson was the first survivor and thus got the first batch of quotations. You see, the devs decided to make Wilson's speech the default, since he had some already and the new characters might not have.

So you can't really well and truly give Wilson unique quotations without changing the "GetString()" function from stringutil.lua, but you can set the default quotation to Wilsons and everybody else's to something else.

Usually you'd do this like so:


STRINGS.CHARACTERS.GENERIC.DESCRIBE.YOURPREFABNAME = "This is one snowflake of a string!"

STRINGS.CHARACTERS.WILLOW.DESCRIBE.YOURPREFABNAME = "I don't know."

[...]

But this leaves the problem of mod characters. Mod characters almost certainly don't prepare in advance for mod items. Either you grin and bear it or you bite the bullet and go through all character speeches. Here's some pseudo-code I wrote, maybe you can already use it like this:


for k,v in pairs(STRINGS.CHARACTERS) do

  if v.DESCRIBE then

    v.DECRIBE.YOURPREFABNAME = "Standardised I know not."

  end

end

STRINGS.CHARACTERS.GENERIC.DESCRIBE.YOURPREFABNAME = "This is one snowflake of a string!"

If you have any further questions, feel free to summon my wrath tag me again!

Oh wow, as a "newbie" here this is what I was gonna suggest too, but when modded characters came to mind, I just decided not to post it

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