Jump to content

Recommended Posts

So, since I don't quite know how to do my own personal animation for my custom character, I was just wondering if anyone could tell me how to set her default "custom" animation to Willow's animation?
I'd like for her to have basically the same play-style as willow, lighter and all. I wouldn't mind toning down the sanity drop and nervous burning habits-- but if it can't be toned down, that's completely fine. Really, all I need is her animation to be willow's.
Sorry for the ramble there.

Also-- I'm having this weird clipping/cropping problem with my in-game pictures. I used the same templates, and didn't change the size of any of them, and I exported them into tex format as well. They show up in game, which isn't the problem. No crashes or anything. It's just clipped/cropped like the picture is too big or something, even though I used the right template. I'll add a sample picture of what it ends up like. If anyone can help with that, too, I'd be ecstatic.
Thanks in advance!

Edit:
Updated progress for the character selection screen ~

vy75e8.png

Figured out the clipping thing by trial and error, but I still can't figure out how to set Willow's animations/prefab as her animations/prefab. Thanks again for any help in advance!

Edited by Lolabuns

I don't think there was a grey area in my bigportrait file. It was just the glowy background in a png format. My selectscreen image is off too, for some reason. I didn't change any dimensions or sizes. I just edited the picture given as the template file.

Experimenting by moving the picture, resizing, etc etc etc-- even though it was totally not in the same place of either of the templates, I managed to figure out how to get it somewhat centered and looking okay. My OCD was screaming at me until I did something to fix it. 
Now, I just need someone to help me figure out how to set her animations as Willow's, including her lighter.

you could easily look at the prefab for that. the debug spawn for the lighter is literally "lighter". if you want that in the start inventory:

local start_inv = {"lighter",}

her perks arent very difficult either. all of that you want is in her prefab. idk how to set up the emotes though.

 

I know it's in her prefab, but I don't know how to set it up to make it work in my character's prefab. I don't know what I need to change, if I need to change names, what I need to put where-- I'm not good at coding at all. I just need help figuring out where everything goes.
Emotes are another story. Prefab really is my main concern.

well most of it you could just rip out if you want a willow clone (figuratively). almost all of it will work for you, just not the parts that have things related to willows name. some like:

local fn = function(inst)inst:AddComponent("firebug")inst.components.firebug.prefab = "willowfire"inst.components.health.fire_damage_scale = 0inst.components.sanity:SetMax(TUNING.WILLOW_SANITY)inst.components.sanity.custom_rate_fn = sanityfninst.components.inventory:GuaranteeItems(start_inv)end

will still work since it isnt tailored to the build. honestly, its easy to just read the code and assume what parts arent meant to be the same. it is a character after all. so you could assume 98% of it is safe to use. and whatever you use isnt safe, you can just look at the log for what part to remove.

 

 

pretty much. you should test it when you are unsure though. willowfire has to do with her tendency to light fires when low on sanity i think. might as well spawn a nightmare amulet and stand near a bush farm and find out :D

Hopefully I did it right. Thank you for pointing me in the right direction! Maybe now I can get her done and "published" on the workshop so my friends can actually see me playing as her in game. haha. The art isn't the greatest, but my mouse is probably the worst piece of crap I've ever had to deal with. I'm just happy to have something I made, in game.
Thank you for your help!

lol np. just remember that you can always improve your code when you try other code through vigorous testing. currently im making an item that is a boss slayer, an explosive, a super fire fuel, and a (costly) craftable item. ive been trying to make it also able to resurrect, but im having issues with that as there are multiple lines to deal with. and my character i want immune to overheating, and freezing from winter, but easily hurt by fire (i used willows code to adjust that) and frozen if hit by an ice attack instantly. i cant figure that one out either. its similar to resurrection. but you cant improve without help from the game files :D good luck

Oops. I broke it. lmfao.

e862j8.png

This is my coding for lola.lua:

 

local MakePlayerCharacter = require "prefabs/player_common"
 
 
local assets = {
 
        Asset( "ANIM", "anim/player_basic.zip" ),
        Asset( "ANIM", "anim/player_idles_shiver.zip" ),
        Asset( "ANIM", "anim/player_actions.zip" ),
        Asset( "ANIM", "anim/player_actions_axe.zip" ),
        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),
        Asset( "ANIM", "anim/player_actions_shovel.zip" ),
        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),
        Asset( "ANIM", "anim/player_actions_eat.zip" ),
        Asset( "ANIM", "anim/player_actions_item.zip" ),
        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),
        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),
        Asset( "ANIM", "anim/player_actions_fishing.zip" ),
        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),
        Asset( "ANIM", "anim/player_bush_hat.zip" ),
        Asset( "ANIM", "anim/player_attacks.zip" ),
        Asset( "ANIM", "anim/player_idles.zip" ),
        Asset( "ANIM", "anim/player_rebirth.zip" ),
        Asset( "ANIM", "anim/player_jump.zip" ),
        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),
        Asset( "ANIM", "anim/player_teleport.zip" ),
        Asset( "ANIM", "anim/wilson_fx.zip" ),
        Asset( "ANIM", "anim/player_one_man_band.zip" ),
        Asset( "ANIM", "anim/shadow_hands.zip" ),
        Asset( "SOUND", "sound/sfx.fsb" ),
        Asset( "SOUND", "sound/willow.fsb" ),
 
        Asset( "ANIM", "anim/lola.zip" ),
        Asset( "ANIM", "anim/ghost_lola_build.zip" ),
}
local prefabs = { "willowfire",
    "lighter",}
local start_inv = {"lighter",
-- Custom starting items
}
 
-- This initializes for both clients and the host
local common_postinit = function(inst) 
-- choose which sounds this character will play
inst.soundsname = "wendy"
 
-- Minimap icon
inst.MiniMapEntity:SetIcon( "lola.tex" )
end
 
local function sanityfn(inst)
local x,y,z = inst.Transform:GetWorldPosition()
local delta = 0
local max_rad = 10
local ents = TheSim:FindEntities(x,y,z, max_rad, {"fire"})
    for k,v in pairs(ents) do 
    if v.components.burnable and v.components.burnable.burning then
    local sz = TUNING.SANITYAURA_TINY
    local rad = v.components.burnable:GetLargestLightRadius() or 1
    sz = sz * ( math.min(max_rad, rad) / max_rad )
local distsq = inst:GetDistanceSqToInst(v)
delta = delta + sz/math.max(1, distsq)
    end
    end
 
    return delta
end
 
-- This initializes for the host only
local master_postinit = function(inst)
-- Stats
inst.components.health:SetMaxHealth(150)
inst.components.hunger:SetMax(150)
inst.components.sanity:SetMax(200)
inst:AddComponent("firebug")
inst.components.firebug.prefab = "willowfire"
inst.components.health.fire_damage_scale = 0
inst.components.sanity:SetMax(TUNING.LOLA_SANITY)
 
inst.components.sanity.custom_rate_fn = sanityfn
end
 
return MakePlayerCharacter("lola", prefabs, assets, common_postinit, master_postinit, start_inv)
 

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
×
  • Create New...