RoboticMasterMind

  • Content Count

    11
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by RoboticMasterMind


  1. Hi, I'm not that great at programming, I only know enough to get by, so my programming skills is "meh" at best. However I am a artist and multi-talented  when it comes to drawing, 3d modeling, and making mods for several different games.

     

    I do have a couple of original characters I have been wanting to finish up but the effects I want are a bit complicated for someone with limited coding skills like me. So I hadn't been working on them much. I defiantly would love some help with that and could do a art trade, or even pay possibly depending on how much of a hassle it might be whenever I get back to working on my original mods. ^^

     

    I am willing to provide art examples too.


  2.  

    @RoboticMasterMind, here you go:

    local function Shielding(player)	if player.prefab == "nefarious" then -- Check so non nefarious players cant cheat with RPCs for free shielding		if player.shielding then -- Use shielding variable so we don't depend on light			player.shielding = nil			player.Light:Enable(false)			player:RemoveTag("forcefield")			player.forcefieldfx:kill_fx() -- This is how we access the kill_fx method of the forcefieldfx prefab			player.components.sanity.dapperness = TUNING.DAPPERNESS_SMALL * (-2)			player.components.sanity.night_drain_mult = 2			player.components.health.absorb = (0)			player.components.combat.damagemultiplier = .75			player.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * .2)			player.components.locomotor.walkspeed = 5			player.components.locomotor.runspeed = 7			player.sg:GoToState("powerdown") -- Changed this so it goes directly to state without waiting for idle anims to end			player.SoundEmitter:PlaySound("dontstarve/creatures/bishop/charge")			player.AnimState:ClearBloomEffectHandle()			player.task:Cancel()		else			player.shielding = true			player.Light:Enable(true)			player.Light:SetRadius(3) -- No need to setup it constantly in the task			player:AddTag("forcefield")			player.forcefieldfx = GLOBAL.SpawnPrefab("forcefieldfx") -- "Attach" the fx to the player			player.forcefieldfx.entity:SetParent(player.entity) -- So we don't have to loop through the children to find it later to kill it			player.forcefieldfx.Transform:SetPosition(0, 0.2, 0)			player.components.sanity.dapperness = TUNING.DAPPERNESS_SMALL * (-5)			player.components.sanity.night_drain_mult = 3			player.components.health.absorb = (1)			player.components.combat.damagemultiplier = .25			player.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 10)			player.components.locomotor.walkspeed = 5			player.components.locomotor.runspeed = 7			player.AnimState:SetBloomEffectHandle("shaders/anim.ksh") 			player.sg:GoToState("powerup") -- Changed this so it goes directly to state without waiting for idle anims to end			player.SoundEmitter:PlaySound("dontstarve/creatures/bishop/shoot")			player.components.talker:Say("Activating Shields!") 			player.task = player:DoPeriodicTask(1, function(inst)					if inst.components.hunger.current < 1 then					inst.components.health:DoDelta(-0.5)				end			end)			end	endendAddModRPCHandler(modname, "Shielding", Shielding)  GLOBAL.TheInput:AddKeyDownHandler(GLOBAL.KEY_Z, function()	local player = GLOBAL.ThePlayer	local noextrakeys = not GLOBAL.IsPaused() and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_CTRL) and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_SHIFT)	local nochatorcon = not player.HUD:IsChatInputScreenOpen() and not player.HUD:IsConsoleScreenOpen()	if player and player.prefab == "nefarious" and noextrakeys and nochatorcon then		SendModRPCToServer(MOD_RPC[modname]["Shielding"])	endend)

     

    Thank you so much, it works! ^^


  3. Hi, I've been wanting to make it so that a couple of characters are able to toggle and switch on and off a forcefield shield. So far I was able to make it so that they can activate and spawn the forcefieldfx when pressing a key in the game without a problem.

     

    But when I try to turn off or remove the forcefieldfx, instead of removing the effect. I end up getting another forcefieldfx stacking on top of the one I toggled.

    local function Shielding(player)   if player.Light:IsEnabled() then		player.Light:Enable(false)		player:RemoveTag("forcefield")		player.kill_fx = ("forcefieldfx")		player.components.sanity.dapperness = TUNING.DAPPERNESS_SMALL * (-2)		player.components.sanity.night_drain_mult = 2		player.components.health.absorb = (0)		player.components.combat.damagemultiplier = .75		player.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * .2)		player.components.locomotor.walkspeed = 5	        player.components.locomotor.runspeed = 7		player.sg:PushEvent("powerdown")		player.SoundEmitter:PlaySound("dontstarve/creatures/bishop/charge")		player.AnimState:ClearBloomEffectHandle()		player.task:Cancel()			else		player.Light:Enable(true)		player:AddTag("forcefield")		local fx = GLOBAL.SpawnPrefab("forcefieldfx")                fx.entity:SetParent(player.entity)                fx.Transform:SetPosition(0, 0.2, 0)		player.components.sanity.dapperness = TUNING.DAPPERNESS_SMALL * (-5)		player.components.sanity.night_drain_mult = 3		player.components.health.absorb = (1)		player.components.combat.damagemultiplier = .25		player.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 10)		player.components.locomotor.walkspeed = 5	    player.components.locomotor.runspeed = 7		player.AnimState:SetBloomEffectHandle("shaders/anim.ksh") 		player.sg:PushEvent("powerup")		player.SoundEmitter:PlaySound("dontstarve/creatures/bishop/shoot")		player.components.talker:Say("Activating Shields!") 		player.task = player:DoPeriodicTask(1, function(inst)		inst.Light:SetRadius(3)				if inst.components.hunger.current < 1 then			inst.components.health:DoDelta(-0.5) end		end)endend	AddModRPCHandler(modname, "Shielding", Shielding) GLOBAL.TheInput:AddKeyDownHandler(GLOBAL.KEY_Z, function()local player=GLOBAL.ThePlayerif player and player.prefab=="nefarious"    and not GLOBAL.IsPaused() and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_CTRL) and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_SHIFT)    and not player.HUD:IsChatInputScreenOpen() and not player.HUD:IsConsoleScreenOpen()then    SendModRPCToServer(MOD_RPC[modname]["Shielding"])endend)