ELEMENTALCRAFTER009

  • Content Count

    67
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by ELEMENTALCRAFTER009

  1. Ah, okay. To change the character would I just change wilson in the AddPrefabPostinit to the desired character? And is there still a way to change the damage?
  2. Would this be for a specific character or for all characters? Also, is there a way to edit the projectile being fired as far as damage and effects? Edit: Variable AddAction is not declared
  3. This might be long depending the answer, but I was wondering if was possible to make it so that when nothing is equipped in the hands slot, you can fire a projectile similar to the fire staffs?
  4. The only problem left now is that it's not passing the onunequip at all. Edit: Also, do you know if is possible to increase the amount of loot every monster drops by a certain amount?
  5. [00:08:57]: [string "../mods/Trent - DST/scripts/prefabs/trent.l..."]:261: attempt to index local 'chest' (a nil value) Also, is that inst.spearstate = nil supposed to be at the top all by itself?
  6. Since I don't think you can change the tint of only the item, would it be possible to change the build of the player instead?
  7. I'm trying to modify the spear with certain traits (such as higher damage, a colored tint, and/or faster movement speed) when it's equipped with a specific amulet.
  8. Alright, now after rezecib got me on the right track, I ran into some confusion again with a more modified version of the code. local function onequip(inst, data) local item = data.item local chest = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.BODY) if item and item.prefab == "spear" and chest == nil then inst.components.talker:Say("I think I could modify this.") inst.AnimState:SetMultColour(2, 1, 1, 1) elseif item and item.prefab == "spear" and chest.name == "Life Giving Amulet" then inst.components.talker:Say("I feel somewhat more focused.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 1, 1, 1) elseif item and item.prefab == "spear" and chest.name == "Chilled Amulet" then inst.components.talker:Say("I feel somewhat more quick.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(1, 1, 2, 1) elseif item and item.prefab == "spear" and chest.name == "Nightmare Amulet" then inst.components.talker:Say("I feel somewhat more insecure.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 1, 2, 1) elseif item and item.prefab == "spear" and chest.name == "Magiluminescence" then inst.components.talker:Say("I feel somewhat more vibrant.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 2, 1, 1) elseif item and item.prefab == "spear" and chest.name == "The Lazy Forager" then inst.components.talker:Say("I feel somewhat more efficient.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(2, 1.5, 1, 1) elseif item and item.prefab == "spear" and chest.name == "Construction Amulet" then inst.components.talker:Say("I feel somewhat more intelligent.") inst:RemoveComponent("finiteuses") inst.AnimState:SetMultColour(1, 2, 1, 1)end end How would you set which item it's applying the effects to?
  9. local function onequip(inst, owner) if ThePlayer.prefab == "trent" then inst:AddTag("sharp") inst:AddComponent("weapon") inst.components.weapon:SetDamage(55)end endlocal function onunequip(inst, owner) inst:RemoveTag("sharp") inst:RemoveComponent("weapon")endDo I have the right idea here?
  10. I am adding this AddPrefabPostinit to my modmain AddPrefabPostInit("diviningrod", function(inst)if GLOBAL.GetPlayer().prefab == "trent" then inst:AddTag("sharp") inst:AddComponent("weapon") inst.components.weapon:SetDamage(55)endend)and it gives me this error [00:01:20]: error calling PrefabPostInit: diviningrod in mod Trent - DST (Trent Character): [string "../mods/Trent - DST/modmain.lua"]:67: attempt to index a nil valueWhat am I doing wrong?
  11. How would I be able to run this function client-side only? local function FormVision(inst, phase) if inst.trentform and phase == "night" then inst.entity:AddLight() inst.Light:SetFalloff(0.5) inst.Light:SetIntensity(0.9) inst.Light:SetRadius(15) inst.Light:SetColour(245/255,255/255,245/255) inst.Light:Enable(true) else inst.Light:Enable(false) endend
  12. here's my character.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/wilson.fsb" ), Asset( "ANIM", "anim/beard.zip" ), Asset( "ANIM", "anim/trent.zip" ), Asset( "ANIM", "anim/ghost_trent_build.zip" ), Asset( "ANIM", "anim/trent_form.zip" ),}local prefabs = {}local start_inv = { "multitool_axe_pickaxe", "goldenshovel", "nightsword", } local function becometrent_form(inst) inst:AddTag("insomniac") inst:AddTag("monster") inst.trentform = true inst.AnimState:SetBuild("trent_form") inst.Transform:SetScale(1.4, 1.4, 1.4) inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 1.5) inst.components.health:SetMaxHealth(250) inst.components.combat.damagemultiplier = 2.75 inst.components.sanity.dapperness = TUNING.DAPPERNESS_HUGE inst.components.sanity.night_drain_mult = 2.2 inst.components.sanity.neg_aura_mult = 0.5 inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.2) inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.2) inst.components.builder.magic_bonus = 1endlocal function becometrent(inst) inst:AddTag("insomniac") inst.trentform = false inst.AnimState:SetBuild("trent") inst.Transform:SetScale(1, 1, 1) inst.components.health:SetMaxHealth(150) inst.components.hunger:SetMax(200) inst.components.sanity:SetMax(80) inst.components.sanity.dapperness = (TUNING.DAPPERNESS_HUGE * 0.7) inst.components.sanity.night_drain_mult = 2 inst.components.sanity.neg_aura_mult = 1.2 inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.07) inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.07) inst.components.builder.magic_bonus = 1end local becomeformtreshold = 33local unbecomeformtreshold = 45local function sanity_event_listener(inst, data)if inst.components.sanity.current <= becomeformtreshold and not inst.trentform then becometrent_form(inst)elseif inst.components.sanity.current >= unbecomeformtreshold and inst.trentform then becometrent(inst) endendlocal function sanityfn(inst) local x,y,z = inst.Transform:GetWorldPosition() local delta = 0 local rad = 10 local rad_sq = rad*rad for k,v in pairs(AllPlayers) do if v ~= inst then local distsq = inst:GetDistanceSqToInst(v) if distsq < rad_sq then local sz = TUNING.SANITYAURA_TINY * 0.75 delta = delta + sz/math.max(1, distsq) end endend return delta end -- Map Iconlocal common_postinit = function(inst) inst.MiniMapEntity:SetIcon( "trent.tex" )end-- This initializes for the host onlylocal master_postinit = function(inst) -- choose which sounds this character will play inst.soundsname = "trent" -- Stats inst:AddTag("insomniac") inst.components.health:SetMaxHealth(150) inst.components.hunger:SetMax(200) inst.components.sanity:SetMax(80) inst.components.sanity.dapperness = (TUNING.DAPPERNESS_HUGE * 0.7) inst.components.sanity.night_drain_mult = 2 inst.components.sanity.neg_aura_mult = 2 inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.06) inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.06) inst.components.builder.magic_bonus = 1 inst.components.sanity.custom_rate_fn = sanityfn inst:ListenForEvent("sanitydelta", sanity_event_listener)endreturn MakePlayerCharacter("trent", prefabs, assets, common_postinit, master_postinit, start_inv)
  13. How would I make it so that my character has access to the magic tab by default?
  14. 'I hate the outdoors so much.' Perks: • Sanity regenerates quickly • Transforms at low sanity • Sanity is slightly faster with more company • Max Health - 150 • Max Hunger - 200 • Max Sanity - 80 Trent - DST was made using the Extended Character Template by Dleowolf. This is my first mod so if there's any glitches or bugs put it here or http://forums.kleientertainment.com/files/file/1090-trent-dst/ here