Jump to content

[REQUEST] Code for a vampire character mod?


Recommended Posts

Okay, so I'm not a very good coder at all, and every time I try to apply my modded code the game crashes after I click "I understand". So I'm trying to make a character that resembles me (I can do the art, I'm good at this style), and I wanted him to have some vampire perks as well. Only issue is that I can't code for crap and I need a baseplate so I can just insert the art in and be done with it. Or at least some help with this issue, as no tutorials or anything seem to be helping. Yes, I used the ESCTemplate and read the tutorials and watched videos, and no, none of them stopped the crashing. 

 

So can anyone be willing to lend a hand in coding this character?

Link to comment
Share on other sites

I personally cannot help with either the baseplate or the coding, but I look forward to seeing if the baseplate gets made.

 

Your character is a pony or something, right?

 

I have an idea for a dragon character, and i'd love to be able to get some of use out of the baseplate.

 

Also, you should have posted the log.txt, so we can know WHY it crashes.

Link to comment
Share on other sites

I found it, but my mod isn't crashing anymore, it loads, but when I go back to the mods to see if it applied, it reads To Be Disabled every time. Here's the log.txt though:

 

local assets =
{
Asset("ANIM", "anim/log.zip"),
}
 
local function fn()
local inst = CreateEntity()
 
inst.entity:AddTransform()
inst.entity:AddAnimState()
    inst.entity:AddNetwork()
 
    MakeInventoryPhysics(inst)
 
    inst.AnimState:SetBank("log")
    inst.AnimState:SetBuild("log")
    inst.AnimState:PlayAnimation("idle")
 
    if not TheWorld.ismastersim then
        return inst
    end
 
    inst.entity:SetPristine()
 
    inst:AddComponent("edible")
    inst.components.edible.foodtype = FOODTYPE.WOOD
    inst.components.edible.woodiness = 10
 
    inst:AddComponent("fuel")
    inst.components.fuel.fuelvalue = TUNING.MED_FUEL
 
MakeSmallBurnable(inst, TUNING.MED_BURNTIME)
    MakeSmallPropagator(inst)
 
    MakeHauntableLaunchAndIgnite(inst)
 
    ---------------------       
    
    inst:AddComponent("inspectable")
    
    inst:AddComponent("inventoryitem")
    inst:AddComponent("stackable")
 
inst:AddComponent("repairer")
inst.components.repairer.repairmaterial = MATERIALS.WOOD
inst.components.repairer.healthrepairvalue = TUNING.REPAIR_LOGS_HEALTH
 
--inst:ListenForEvent("burnt", function(inst) inst.entity:Retire() end)
 
    return inst
end
 
return Prefab("common/inventory/log", fn, assets)
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...