RadiantRoma

  • Content Count

    289
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by RadiantRoma

  1. Alright well I learned from that mod is that it can all be done from modmain.lua! maybe that was really obvious already. I looked through the tallbird mod's modmain and the only references I could find were towards the end: local function DumpBT(bnode, indent) local s = "" for i=1,indent do s = s.."| " end s = s..bnode.name print(s) if bnode.children then for i,childnode in ipairs(bnode.children) do DumpBT(childnode, indent+1) end end end AddBrainPostInit("smallbirdbrain", function(brain) --print("\n\n\t\t\t\tDumping a smallbirdbrain") --DumpBT(brain.bt.root, 0) --print("\n\n") --[[ local function CustomFollow(inst, oldfn) print("Confirmed CustomFollow run from main code that edits RunAway") return oldfn(inst) end --]] local function CustomRunAway(inst, target, oldfn) --print("Confirmed CustomRunAway run from main code that edits RunAway") if target and target:HasTag("player") then if not inst.components.follower.leader then inst.components.trader:SetAcceptTest(ShouldAcceptItem) inst.components.trader.onaccept = OnGetItemFromPlayer inst.components.trader.onrefuse = OnRefuseItem inst.components.follower:SetLeader(target) --target.components.leader:AddFollower(inst) --inst:AddComponent("named") --inst.components.named.possiblenames = STRINGS.PIGNAMES --inst.components.named:PickNewName() end --print("returning false - do not run away..") return false -- Do not run away. else --print("returning original function") return oldfn(inst,target) -- Return the old function to handle it end end local index = nil local index2 = nil for i,v in ipairs(brain.bt.root.children) do if v.name == "RunAway" then index = i break end end for i,v in ipairs(brain.bt.root.children[3].children[2].children[2].children) do if v.name == "Follow" then index2 = i break end end if not index then --print("RunAway Not Found!") return end --print("RunAway Found!") local old_shouldrunfn = brain.bt.root.children[index].shouldrunfn brain.bt.root.children[index].shouldrunfn = function(target) return CustomRunAway(brain.inst, target, old_shouldrunfn) end if not index2 then --print("Follow Not Found!") return end local old_shouldrunfn2 = brain.bt.root.children[3].children[2].children[2].children[index2].shouldrunfn end) I feel like the answer to it all is really simple, like in the end it will only be 3 lines of code. Well, until we can figure it out!
  2. I think it would be better to look into WX's code, since he is able to eat gears by default, whereas Woodie can only eat wood while in Beaver form.
  3. So in simpler terms, this mod lets custom made animations easier to make? I don't really understand
  4. Update, I had the idea to look in tuning.lua and found some lines that might be helpful. Each mob has a "(mob)_TARGET_DIST = (#)" line. If if could figure out how to insert this into my mod and modify the values, I might have figured out what I was looking for. Update, Started looking in brain files, and found what I'm certain I'm looking for; local STOP_RUN_DIST = 10 local SEE_PLAYER_DIST = 5 local AVOID_PLAYER_DIST = 3 local AVOID_PLAYER_STOP = 6 is what I found in rabbitbrains.lua local SEE_THREAT_DIST = 5 local function ShouldFlyAway(inst) return not (inst.sg:HasStateTag("sleeping") or inst.sg:HasStateTag("busy") or inst.sg:HasStateTag("flight")) and (TheWorld.state.isnight or (inst.components.health ~= nil and inst.components.health.takingfiredamage and not (inst.components.burnable and inst.components.burnable:IsBurning())) or FindEntity(inst, SEE_THREAT_DIST, nil, nil, { "notarget", "INLIMBO" }, { "player", "monster", "scarytoprey" }) ~= nil) end was found in birdbrains.lua. So I'm sure if I change these variables in modmain.lua, it would work correctly. The only thing is, I'm not adept with coding right now, so I'm not exactly sure how to do it exactly. I only wish for passive animals that run away when the player gets close not to run away until half the default player distance. So the player can get closer to rabbits before they run, closer to butterflies, etc. Any help would be greatly appreciated.
  5. For a custom character I am making, I want to be able to sneak around enemies or be able to get closer to a mob without it knowing I'm there. For example, I could get closer to a rabbit before it notices me and runs back to its home, or I can get closer to a bird before it flies off. I'm aware of the "scarytoprey" and "notarget" tags, but they basically remove detection altogether. Any help would be greatly appreciated!
  6. Got this error code when I got in the radius of a tree in game This is what the code looks like... inst:DoPeriodicTask( 0.1, function(inst) local x, y, z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, 3.5, {"tree"}, {"FX", "NOCLICK", "DECOR", "INLIMBO", "stump", "burnt"}) if #ents > 0 then if inst.wollawossiky_treebonus == nil then inst.components.locomotor:SetExternalSpeedMultiplier(inst, "wollawossiky_treebonus", 1.0*TUNING.CANE_SPEED_MULT) inst.components.combat.damagemultiplier = 2.0*TUNING.WILSON_DAMAGE_MULT inst.components.combat.damagemultiplier = 1.0 inst.wollawossiky_treebonus = true end else if inst.wollawossiky_treebonus ~= nil then inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, "wollawossiky_treebonus") inst.wollawossiky_treebonus = nil end end end )
  7. It works like a charm! If I wanted to also add a damage bonus would I add a line underneath so it would be this? inst:DoPeriodicTask( 0.1, function(inst) local x, y, z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, 3.5, {"tree"}, {"FX", "NOCLICK", "DECOR", "INLIMBO", "stump", "burnt"}) if #ents > 0 then if inst.wollawossiky_treebonus == nil then inst.components.locomotor:SetExternalSpeedMultiplier(inst, "wollawossiky_treebonus", 1.0*TUNING.CANE_SPEED_MULT) inst.components.combat:SetExternalDamageMultiplier(inst, "wollawossiky_treebonus", 2.0*TUNING.WILSON_DAMAGE_MULT) inst.wollawossiky_treebonus = true end else if inst.wollawossiky_treebonus ~= nil then inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, "wollawossiky_treebonus") inst.components.combat:RemoveExternalDamageMultiplier(inst, "wollawossiky_treebonus") inst.wollawossiky_treebonus = nil end end end )
  8. What if you rescaled or repositioned the back of the head to fit the pigtails?
  9. Thank you so much for helping! I put that in the prefabs file and replaced all of the "mymodname" with the character's name (Wollawossiky), but got this error message when attempting to enter the game. Thanks again for the help
  10. For a new character I'm developing, I wanted the character to benefit from having many trees around in the area. If anyone knows some way for a way to add some sort of invisible aura that would affect the character, maybe increasing speed or damage when in a certain radius of a tree, help would be highly appreciated.
  11. What if you used pigtails for the front, and hair for the back?
  12. Instead of using the pigtail feature, did you try using the hair feature?
  13. Try moving the hair over in the png file in exported folder. Move it a bit and then check spriter to see if it is in the right place. Rinse and repeat until it looks good.
  14. Thanks for the feedback! I am starting to think that if the speed of a character is increased too much, the character becomes bland or even over powered. I will most likely change the speed of all my characters, thanks to your suggestion.
  15. Ward The Ranger Whisp The Mellifluous Won-il the Defender Wollawossiky The Pathfinder Wisniowski The Sleepyhead My goal was to create a well balanced team of custom characters. I'm not that good of an illustrator so most of the appearances of the characters are mixed and matched from in-game assets. You can download the characters by clicking the above links which will take you to their Steam Workshop pages. Thanks!