Mirrorrabbit Posted January 17, 2015 Share Posted January 17, 2015 Once again I return in seek of aid, and thankfully managed for bit. However now I'm facing a major issue. I've already figured out mostly, how to input powers as my character now has presets that gives him certain stats and effects. But now I can't figure out how to give him his actual power, which is to gain increased effects based off what he eats. I've tried to look into eater.lua or edible.lua to no avail. So unfortunately I've hit a brick wall so far. And as far as audio goes, I wanted to make a customized audio for my character. However since I don't have the actual instrument. I was wondering if it was acceptable to tailor the singular notes from videos of that instrument to sound like how Don't Starve characters speak. I'm not sure where else I could manage to get alternative sounds from that's why. Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/ Share on other sites More sharing options...
Blueberrys Posted January 26, 2015 Share Posted January 26, 2015 (edited) gain increased effects based off what he eatsHave you looked into wx78's files? I believe his character is designed to upgrade when eating gears.Hint: Look at the functions oneat and applyupgrades in "..\scripts\prefabs\wx78.lua".And line 172:inst.components.eater:SetOnEatFn(oneat) I was wondering if it was acceptable to tailor the singular notes from videos of that instrument Notice on using other's work."Mods containing assets from other games or media are not allowed" But if you find media with the CC licence (or similar), with permission for derivatives, it probably won't be a problem.Remember to read the terms and provide attribution if required.Don't take my word for it though, I have no authority to provide permission in doing so, I'm only providing the information. Edited January 26, 2015 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-606066 Share on other sites More sharing options...
Corrosive Posted January 26, 2015 Share Posted January 26, 2015 I may or may not be able to help you with the audio issue, if you show me some clips of what kind of sounds you're looking for. Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-606072 Share on other sites More sharing options...
Mirrorrabbit Posted February 8, 2015 Author Share Posted February 8, 2015 @blueberrys Oh yes I get what you mean, but I think I worded it wrong sorry. I was looking for the effect of what he eats, as in gaining Health and Sanity from eating food in general. An attempt was made with fiddling with Wickerbottom's files, but I couldn't figure it out sadly.@Corrosive That'd be pretty cool! Although for now I'll have to hold onto the offer for another time. Although I already know I want to either make his voice an Accordion or Harmonica, I'm thinking of posting him first before anything else to get reviews on what I'm doing right and wrong. Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-610859 Share on other sites More sharing options...
MidrealmDM Posted February 8, 2015 Share Posted February 8, 2015 (edited) And as far as audio goes, I wanted to make a customized audio for my character. However since I don't have the actual instrument. I was wondering if it was acceptable to tailor the singular notes from videos of that instrument to sound like how Don't Starve characters speak. I'm not sure where else I could manage to get alternative sounds from that's why.There are several web site that offer free sound samples. https://www.freesound.org/ Edited February 8, 2015 by MidrealmDM Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-610869 Share on other sites More sharing options...
Blueberrys Posted February 8, 2015 Share Posted February 8, 2015 @Mirrorrabbit, if you're looking to do anything special with eating, the OnEatFn will probably work for you. See the eater component ("..\scripts\components\eater.lua") for more information. Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-610938 Share on other sites More sharing options...
Mirrorrabbit Posted February 8, 2015 Author Share Posted February 8, 2015 (edited) @blueberrys Sort of? I'm looking at it, and tried to tweak at it a bit more. Basically what I'm aiming for is to simply multiply the effect of food by two. So say carrots heal 1Health and restores 15Hunger. I want to make it so it'll be 2Health and restores 30Hunger instead. Perhaps I need to just make a new .lua file, since I dont see how I can do this without editing other main ones, but for the time being what I decided to shove in the 'powers sections' as my attempts are as following: Attempt1: -- inst.components.eater.oneatfn = VEGGIES[name].health*2 -- inst.components.eater.oneatfn = VEGGIES[name].hunger*2 -- inst.components.eater.oneatfn = VEGGIES[name].sanity*2 or 0 Attempt2:-- inst.components.edible.healthvalue = VEGGIES[name].health*2 -- inst.components.edible.hungervalue = VEGGIES[name].hunger*2 -- inst.components.edible.sanityvalue = VEGGIES[name].sanity*2 or 0 Current Attempt:-- inst.components.eater:SetOnEatFn(VEGGIES[name].hunger*2) I'm probably going about this all wrong, but I'll have to look at it with fresh eyes later. Edited February 8, 2015 by Mirrorrabbit Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-610967 Share on other sites More sharing options...
Blueberrys Posted February 8, 2015 Share Posted February 8, 2015 (edited) Basically what I'm aiming for is to simply multiply the effect of food by two.debugman18 did the exact same thing here. It only implements the hunger, but the concept is the same. You can add these for health and sanity too.inst.components.eater:SetOnEatFn(function(inst, food) local hunger = food.components.edible.hungervalue inst.components.hunger:DoDelta(hunger) local health = food.components.edible.healthvalue inst.components.health:DoDelta(health) local sanity = food.components.edible.sanityvalue inst.components.sanity:DoDelta(sanity)end)Theoretical code, untested. Edited February 8, 2015 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-611195 Share on other sites More sharing options...
Mirrorrabbit Posted February 9, 2015 Author Share Posted February 9, 2015 @blueberrys Oh dang, well I guess it'll be unfortunate that our powers collide a bit :S. But thank you! It seems to work just like I needed to, so I can fix the speed issue. I guess I should be looking around more threads. Anywho I think that was the last of the coding issues, thanks so much for your help guys! Winsley'll finally be able to be up and running properly. Link to comment https://forums.kleientertainment.com/forums/topic/49280-need-help-personal-power-audio/#findComment-611249 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