Aquafox333

  • Content count

    19
  • Joined

  • Last visited

Community Reputation

5 Neutral

About Aquafox333

  • Rank
    Junior Member

Recent Profile Visitors

482 profile views
  1. [SOLVED] Custom speech help needed

    You can do this, and change a few other things if you wish, using the following method: In the modmain, beneath GLOBAL.STRINGS is where I put mine, paste this code: STRINGS.CHARACTERS.YOURPREFABHERE = require "speech_YOURPREFABHERE" Then go into the Don't Starve data files, into scripts, and copy and paste a character's .lua speech file into your mod's scripts folder. Change the name from speech_wilson.lua or whatever to speech_YOURPREFABHERE.lua You can open the new speech file, find whatever you want your character to change, and type out a new response. When Hamlet comes out you will probably need to copy and paste the Hamlet DLC dialogue from a default character's speech script in order to keep yours up to date.
  2. @Yakuzashi Hi, there. I haven't had too much of an in-depth look at your mod (I haven't loaded it up in the game, basically), but two things stand out to me: In the becometaern function, you have written inst.AnimState:SetBank("taern") It should be inst.AnimState:SetBank("wilson") Also, I notice your mod changes your character based on health loss and the full moon. Again, I am unsure as to whether or not this is the problem, but try using one or the other, not both. If this doesn't work, let me know and I'll have a proper fiddle with your mod.
  3. Credit goes to the Bigby Wolf mod for the health threshold activator; however, if you would prefer to use the full moon as your activator, see the end of this tutorial. In order to make your character transform into any other prefab in the game, you'll need to do a few things first. Firstly, you'll need to post the following code in your character's prefab file (below assets is where I put my code): local function becomeINSERTPLAYERPREFABHERE(inst) inst.YOURTRANSFORMATIONNAMEHERE = false inst.AnimState:SetBank("wilson") inst.AnimState:SetBuild("INSERTPLAYERPREFABHERE") inst:SetStateGraph("SGwilson") end local function becomeYOURTRANSFORMATIONNAMEHERE(inst) inst.YOURTRANSFORMATIONNAMEHERE = true inst.AnimState:SetBank("YOURTRANSFORMATION'SANIMBANK") ----- You can find the bank of whatever creature you are using in its prefab. inst.AnimState:SetBuild("YOURTRANSFORMATION'SANIMFILE_build") ---- You can find the animation for blank_build in your creature's prefab. inst:SetStateGraph("SGCUSTOMSTATEGRAPHNAME") ------- See stategraph below end local becomeformtreshold = 60 local unbecomeformtreshold = 62 local function health_event_listener(inst, data) if inst.components.health.currenthealth <= becomeformtreshold and not inst.YOURTRANSFORMATIONNAMEHERE then becomeYOURTRANSFORMATIONNAMEHERE(inst) elseif inst.components.health.currenthealth >= unbecomeformtreshold and inst.YOURTRANSFORMATIONNAMEHERE then becomeINSERTPLAYERPREFABHERE(inst) end end inst:ListenForEvent("healthdelta", health_event_listener) Stategraph: You are going to need to find whatever creature you are using's stategraph (located in the game's data folders). You will need to replicate it and rename it, then create your own stategraph folder in your mod character's scripts folder and put your new renamed stategraph in there. The stategraph will need some editing. On a basic level, such as turning into a bunnyman or pig, you will need to remove any instance of the term 'follower' from the stategraph (more often than not by just getting rid of the entire line it is contained in). This will prevent crashes if you equip an item such as a hat. You can also add in actions (you can find a list of actions in the game's data folder under 'actions.lua'). For instance, you may want to add in the action PICK and PICKUP using one of the creature's existing animations to avoid any crashes. Here is an example of making a bunnyman able to pick objects such as grass and flowers: local actionhandlers = { ActionHandler(ACTIONS.GOHOME, "gohome"), ActionHandler(ACTIONS.EAT, "eat"), ActionHandler(ACTIONS.PICKUP, "pickup"), ----- The bunnyman can already pick up items ActionHandler(ACTIONS.EQUIP, "pickup"), ActionHandler(ACTIONS.ADDFUEL, "pickup"), ActionHandler(ACTIONS.PICK, "pickup"), ---------- So we added in the PICK action using the bunnyman's "pickup" animation For most creatures, such as the Deerclops, death will cause a crash. This is to do with the fact that on death you drop all your loot and not the Deerclops' loot, so go into your creature's stategraph and remove the following line: inst.components.lootdropper:DropLoot(Vector3(inst.Transform:GetWorldPosition())) And that should be all. This tutorial is probably going to prove rather rough around the edges (first draught, no proofreading, etc.), and not much attention has been paid to syntax as well as the fact I am but a novice when it comes to modding this game, but this should hopefully provide a general outline for those looking for an easy way to transform their character into anything within the game. Now as for custom werecreatures... I have no clue. You won't need a stategraph, and you can probably just use inst.AnimState:SetBuild by itself for both your character's normal form and transformed state, but really, I have no experience in that area. It SHOULD work, but so should capitalism, and communism, and benefit frauds. Regardless, good luck, everyone! I hope this helps. Full moon transformation code: inst:ListenForEvent("nighttime", function(global, data) if GetClock():GetMoonPhase() == "full" and not inst.YOURTRANSFORMATIONNAME then becomeYOURTRANSFORMATIONNAME(inst) end end, GetWorld()) inst:ListenForEvent("daytime", function(global, data) if GetClock():IsDay() and inst.YOURTRANSFORMATIONNAME then becomeINSERTPLAYERPREFAB(inst) end end, GetWorld())
  4. How do i edit my moded charecter's speed

    Hi, This is actually really easy to do. Insert the following under your character's prefab file under local functions: inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.1) inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.2) Edit the digits as you like to adjust the speed at which they travel. Hope this helps.