Jump to content

Custom character codes just not working


Recommended Posts

Well i try to add this perks to my character but i have this error

 

adbjvg.jpg

can't freeze 
takes 2x damage from fire and over heat 
fridge inventory 
night vision (only new moon)
run and walk fast (new moon)
run and walk slow (full moon)
when eat's fish restores 10 health 20 sanity 20 hunger 
only eat's meat and honey
lowers the temperature araund her
campfires cause overheating
eating ice restores healt and sanity (2 health 5 sanity)
eats meat not drops sanity or health monster meat too
takes 1.5x damage from hounds
when takes 50 or more damage in 60 sec. she freeze all near creatures (without damage)

 

Did I do something wrong? A long time ago I asked a friend to help me with these codes, I am not sure if they are working. There might be a problem with my own coding as well. Can anyone please help me find where the problem is? Also, there are some other codes that I would like to add but I don't know how to make them properly, I would appreciate if someone could help me about those as well.

,

here is the file and the codes

 

Quote


local MakePlayerCharacter = require "prefabs/player_common"


local assets = {
    Asset("SCRIPT", "scripts/prefabs/player_common.lua"),
}
local prefabs = {}

-- Custom starting items
local start_inv = {
}

-- When the character is revived from human
local function onbecamehuman(inst)
	-- Set speed when reviving from ghost (optional)
	inst.components.locomotor.walkspeed = 4.6
	inst.components.locomotor.runspeed = 7
	inst.components.combat:SetAttackPeriod (0.6)
end

local function onbecameghost(inst)
	-- Remove speed modifier when becoming a ghost
   inst.components.locomotor.walkspeed = 7
end

-- When loading or spawning the character
local function onload(inst)
    inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman)
	inst.components.locomotor.walkspeed = 4.6
	inst.components.locomotor.runspeed = 7
	inst.components.combat:SetAttackPeriod (0.6)
	
    if not inst:HasTag("playerghost") then
        onbecameghost(inst)
    end
end

local function UpdateMoonStats(inst)
	-- Get clock information
	local Clock = GetClock()
	local IsNight = Clock:IsNight()
	local MoonPhase = Clock:GetMoonPhase()

	-- If it is night, else, it is day
	if IsNight then
		-- Full, new, else, any of the other moonphases (quarter, half, threequarter)
		if MoonPhase == "full" then
			-- 2x sanity drain
			inst.components.sanity.night_drain_mult = 2
			inst.components.sanity.neg_aura_mult = 2
			
			inst.components.locomotor.walkspeed = 3.8
			inst.components.locomotor.runspeed = 5.6
		elseif MoonPhase == "new" then
			
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 8.4
			-- Enable Nightvision
			inst.Light:Enable(true)
		else
			-- No changes
		end
	else
		-- No changes
	end
end

local function OnBeingAttacked(inst, data)
	local damage = data and data.damage
	if damage then
		local last_time_first_hit = inst.last_time_first_hit
		local current_time = GetTime()
		-- If the hit is the first, or more than 60 seconds passed, reset the damage received and the last hit time
		-- Else, add it up
		if (last_time_first_hit == nil) or (current_time - last_time_first_hit > 59.5) then
			inst.total_damage_received = damage
			inst.last_time_first_hit = current_time
		else
			inst.total_damage_received = inst.total_damage_received + damage
		end
		-- We pass 50 damage, freeze everything, then reset damage and timer
		if inst.total_damage_received > 49.5 then
			local x, y, z = inst.Transform:GetWorldPosition()
			-- First table, table with "must have" tags, entities with freezable component have freezable tag
			-- Second table, table with "cant have" tags, player has player tag
			local ents = TheSim:FindEntities(x, y, z, 20, {"freezable"}, {"player"})
			for i, v in ipairs(ents) do
				v.components.freezable:AddColdness(10)
				v.components.freezable:SpawnShatterFX()
			end
			inst.total_damage_received = 0
			inst.last_time_hit = nil
		end
	end
end

local function oneat(inst, food)
	if food and food.components.edible and food.prefab == "fish" then
		inst.components.sanity:DoDelta(20)
		inst.components.hunger.DoDelta(20)
		inst.components.health:DoDelta(10)
	end
end

local function oneat(inst, food)
    if food and food.component.edible and food.prefab == "ice" then
	    inst.component.health:DoDelta(2)
		inst.component.sanity:DoDelta(5)
    end
end

-- Creatures with hound tag (hounds) will increase the damage dealt
local function ExtraHoundDamage(inst)
	local _GetAttacked = inst.components.combat.GetAttacked
	inst.components.combat.GetAttacked = function(self, attacker, damage, ...)
		if attacker and attacker:HasTag("hound") and damage then
			damage = damage * 1.5
		end
		return _GetAttacked(self, attacker, damage, ...)
	end
end

-- When you overheat, this runs, and it doubles the damage from overheating
local function IncreaseHurtRate(inst)
	inst.components.temperature.hurtrate = inst.components.temperature.hurtrate * 2
end

-- You stop overheating, you go back to normal
local function DecreaseHurtRate(inst)
	inst.components.temperature.hurtrate = inst.components.temperature.hurtrate / 2
end

-- This initializes for both the server and client. Tags can be added here.
local common_postinit = function(inst) 
	-- Minimap icon
	inst.MiniMapEntity:SetIcon( "alishia.tex" )
end

-- This initializes for the server only. Components are added here.
local master_postinit = function(inst)
	-- choose which sounds this character will play
	inst.soundsname = "willow"
	
	-- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used
    --inst.talker_path_override = "dontstarve_DLC001/characters/"
	

	
	-- Stats	
	inst.components.health:SetMaxHealth(130)
	inst.components.hunger:SetMax(175)
	inst.components.sanity:SetMax(250)
	
	inst.components.neg_aura_mult = 0.75
	inst.components.sanity.night_drain_mult =0.75
	
	-- Damage multiplier (optional)
    inst.components.combat.damagemultiplier = 1
	
	-- Hunger rate (optional)
	inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE
	
		-- Light for Nightvision
	inst.entity:AddLight()
	inst.Light:Enable(false)
	inst.Light:SetRadius(7)
	inst.Light:SetFalloff(0.5)
	inst.Light:SetIntensity(0.6)
	inst.Light:SetColour(255 / 255, 255 / 255, 255 / 255)
	
		-- Events that trigger when the day phase changes
	-- They run UpdateFn, which runs UpdateMoonStats and passes inst, the player, as argument
	local UpdateFn = function() UpdateMoonStats(inst) end
	inst:ListenForEvent("daytime", UpdateFn, GetWorld())
	inst:ListenForEvent("dusktime", UpdateFn, GetWorld())
	inst:ListenForEvent("nighttime", UpdateFn, GetWorld())
	UpdateMoonStats(inst)
		-- Set oneat to run when you eat something
	inst.components.eater:SetOnEatFn(oneat)
	
		-- Your inventory is now a fridge
	inst:AddTag("fridge")

	-- Extra fire damage taken
	inst.components.health.fire_damage_scale = 2

	-- Extra hound damage
	ExtraHoundDamage(inst)
	
		-- Overheats faster and gets extra damage from overheating
	inst.components.temperature.inherentsummerinsulation = -120
	inst:ListenForEvent("startoverheating", IncreaseHurtRate)
	inst:ListenForEvent("stopoverheating", DecreaseHurtRate)
	
	
		-- Now you can't be frozen
	-- Can't freeze what doesn't have a freeze function that actually freezes you
	if inst.components.freezable then
		inst.components.freezable.Freeze = function() end
	end
	
		-- Freezing counterattack
	inst.total_damage_received = 0
	inst.last_time_first_hit = nil
	inst:ListenForEvent("attacked", OnBeingAttacked)
	
	inst.OnLoad = onload
    inst.OnNewSpawn = onload
end

return MakePlayerCharacter("alishia", prefabs, assets, common_postinit, master_postinit, start_inv)

 

 

alishia.lua

Link to comment
Share on other sites

look around the forms and see if "getclock" is

1.) in the correct format (if changing from dont starve to dont starve together check here, it describes whats changed....

2.) a desired lua variable for the function your trying to perform

"getclock" is Dont starve's way of doing the function of checking the games time. whereas don't starve together calls the clock differently.

 

Link to comment
Share on other sites

Sometime the error you see here is only a part of the problem, and the problem is due to your mod but you don't have details. Try to follow this :

 

Quote

 

Search the log for error.

One of the first step when you have a problem with a mod is to take a look at the log. When a crash occurs, the log could provide you useful informations about what is wrong.

You could find the log in

C:\Users\YOURUSERNAME\Documents\Klei\DoNotStarveTogetherANewReignBeta (If you are in the beta branch)

Or

C:\Users\YOURUSERNAME\Documents\Klei\DoNotStarveTogether (classic branch)

Usually, informations will be in the "client_log.txt"

Sometimes, a crash will happen server-side, so you must look at the server log. Search in

C:\Users\YOURUSERNAME\Documents\Klei\DoNotStarveTogetherANewReignBeta\Cluster_1\Master

With "DoNotStarveTogetherANewReignBeta" your current branch, "Cluster_1" your current save, "Master" if the crash happen on surface, and "Caves" if the crash happen on caves.
Look at the "server_log.txt"


Now you have an error log. If you can, try to understand what the error log says. Some errors could easily be fixed by yourself. You could also try a search to see if someone encountered the same problem.

And copy here the error log if you can't fix it yourself. It will probably give more clues about the problem.

Link to comment
Share on other sites

Finally i find the error(in main files).

function EntityScript:GetPersistData()
    local references = nil
    local data = nil
    for k,v in pairs(self.components) do
        if v.OnSave then
            local t, refs = v:OnSave()
            if type(t) == "table" then
                if t and next(t) and not data then
                    data = {}
                end
                if t and data then
                    data[k] = t
                end
            end

            if refs then
                if not references then
                    references = {}
                end
                for k,v in pairs(refs) do
                    
                    table.insert(references, v)
                end
            end
        end
    end

the problem must be this

"if v.OnSave then"

 and in client_log i have this error

 

[00:02:50]: [string "scripts/entityscript.lua"]:1437: attempt to index local 'v' (a number value)
LUA ERROR stack traceback:
    scripts/entityscript.lua:1437 in (method) GetPersistData (Lua) <1433-1482>
    scripts/entityscript.lua:278 in (method) GetSaveRecord (Lua) <233-283>
    scripts/networking.lua:260 in (global) SerializeUserSession (Lua) <257-264>
    scripts/networking.lua:251 in () ? (Lua) <235-253>
    =[C]:-1 in (method) SendSpawnRequestToServer (C) <-1--1>
    scripts/mainfunctions.lua:1272 in (local) cb (Lua) <1270-1273>
    scripts/frontend.lua:531 in (method) DoFadingUpdate (Lua) <495-535>
    scripts/frontend.lua:583 in (method) Update (Lua) <543-695>
    scripts/update.lua:94 in () ? (Lua) <39-127>

 

i'm uploading client_log i hope you guys can tell me what i must do. Thanks by the way

client_log.txt

entityscript.lua

Link to comment
Share on other sites

Person sent a PM about this, reposting here in case of future searchers.

 

Line 164:

inst.components.neg_aura_mult = 0.75

Should be:

inst.components.sanity.neg_aura_mult = 0.75

 

Reason: neg_aura_mult isn't a component and the component saver assumes all variables in components are components.

Link to comment
Share on other sites

3 hours ago, CarlZalph said:

Person sent a PM about this, reposting here in case of future searchers.

 

Line 164:

inst.components.neg_aura_mult = 0.75

Should be:

inst.components.sanity.neg_aura_mult = 0.75

 

Reason: neg_aura_mult isn't a component and the component saver assumes all variables in components are components.

thanks a lot.

 

Edited by AkaiNight
Link to comment
Share on other sites

hi it's me again and a broke code

local function PowerUpAtNewMoon(inst, phase)
	if phase == "night" then
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.Light:Enable(true)
			inst.Light:SetRadius(18)
			inst.Light:SetFalloff(0.75)
			inst.Light:SetIntensity(.7)
			inst.Light:SetColour(70/255,230/255,12/170)
			inst.components.talker:Say("The curse has gone We are finally free! Nya~")
			
		elseif phase == "dusk" then
			if TheWorld.state.isnewmoon == true then
				inst.components.combat:SetAttackPeriod (0.4)
				inst.components.locomotor.walkspeed = 6
				inst.components.locomotor.runspeed = 10
			
		elseif phase == "dusk" then
			if TheWorld.state.isfulmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
			
		elseif phase == "night" then
			if TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
		    inst.components.talker:Say("I can feel the curse of moon. The moon bind us! Nya~")
					end
				end
			end
		end
	end
end

this little guy is not working

Link to comment
Share on other sites

Again you are using strange else. Like "if it's night then, else if it's dusk then, else if it's night then, else if it's dusk then", but i don't think it could work because it's like if you ask to do two differents things for the same result. Sorry if it's not clear. Try something like this :

local function PowerUpAtNewMoon(inst, phase)
	if phase == "night" then
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.Light:Enable(true)
			inst.Light:SetRadius(18)
			inst.Light:SetFalloff(0.75)
			inst.Light:SetIntensity(.7)
			inst.Light:SetColour(70/255,230/255,12/170)
			inst.components.talker:Say("The curse has gone We are finally free! Nya~")
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
		    inst.components.talker:Say("I can feel the curse of moon. The moon bind us! Nya~")
		end
			
	elseif phase == "dusk" then
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
		
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
			
		end
	end
end

Note : i didn't test it, verify the number of "end" because i'm not sure i put all of them.

Note 2 : there was a "if TheWorld.state.isfulmoon == true then", i corrected it.

Note 3 : i suggest you to use print to test your mod and see where the problem is. For example

local function PowerUpAtNewMoon(inst, phase)
	if phase == "night" then
		print("Night test is working.")
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.Light:Enable(true)
			inst.Light:SetRadius(18)
			inst.Light:SetFalloff(0.75)
			inst.Light:SetIntensity(.7)
			inst.Light:SetColour(70/255,230/255,12/170)
			inst.components.talker:Say("The curse has gone We are finally free! Nya~")
			print("Night and new moon test is working.")
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
		    inst.components.talker:Say("I can feel the curse of moon. The moon bind us! Nya~")
			print("Night and full moon test is working.")
		end
			
	elseif phase == "dusk" then
		print("Dusk test is working.")
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			print("Dusk and new moon test is working.")
		
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
			print("Dusk and full moon test is working.")	
			
		end
	end
end

You could see the print in the console. My keyboard request to press ù to show it, your could request another key, search informations about it.

This way you could find where the test fail and correct it yourself.

Link to comment
Share on other sites

29 minutes ago, AkaiNight said:

hi it's me again and a broke code


local function PowerUpAtNewMoon(inst, phase)
	if phase == "night" then
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.Light:Enable(true)
			inst.Light:SetRadius(18)
			inst.Light:SetFalloff(0.75)
			inst.Light:SetIntensity(.7)
			inst.Light:SetColour(70/255,230/255,12/170)
			inst.components.talker:Say("The curse has gone We are finally free! Nya~")
			
		elseif phase == "dusk" then
			if TheWorld.state.isnewmoon == true then
				inst.components.combat:SetAttackPeriod (0.4)
				inst.components.locomotor.walkspeed = 6
				inst.components.locomotor.runspeed = 10
			
		elseif phase == "dusk" then
			if TheWorld.state.isfulmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
			
		elseif phase == "night" then
			if TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
		    inst.components.talker:Say("I can feel the curse of moon. The moon bind us! Nya~")
					end
				end
			end
		end
	end
end

this little guy is not working

Do you have a listen event for this function?

Example:

inst:ListenForEvent("night", PowerUpAtNewMoon)

You would need one for each time you want the function to trigger, I won't know the exact wording for each of those at the moment, not at a computer where I can view the game files.

Link to comment
Share on other sites

14 hours ago, RedHairedHero said:

Do you have a listen event for this function?

Example:

inst:ListenForEvent("night", PowerUpAtNewMoon)

You would need one for each time you want the function to trigger, I won't know the exact wording for each of those at the moment, not at a computer where I can view the game files.

i'll try this thanks

Link to comment
Share on other sites

well i tried it but it's not working is there something missing or did i just need an other code?

local function PowerUpAtNewMoon(inst, phase)
	if phase == "night" then
		print("Night test is working.")
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.Light:Enable(true)
			inst.Light:SetRadius(18)
			inst.Light:SetFalloff(0.75)
			inst.Light:SetIntensity(.7)
			inst.Light:SetColour(70/255,230/255,12/170)
			inst.components.talker:Say("The curse has gone We are finally free! Nya~")
			print("Night and new moon test is working.")
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
		    inst.components.talker:Say("I can feel the curse of moon. The moon binds us! Nya~")
			print("Night and full moon test is working.")
		end
			
	elseif phase == "dusk" then
		print("Dusk test is working.")
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.components.talker:Say("I can't feel the moon. Finally i can be free. Nya~")
			print("Dusk and new moon test is working.")
		
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
			inst.components.talker:Say("Oh! I can feel the moon. This night will be cursed. Nya~")
			print("Dusk and full moon test is working.")	
			
		end
	end
end

well that's not works too

local function onkilled(inst, data)

    if data.victim ~= nil and data.victim.components.health ~= nil then
    
      local random = math.random

        if random >= .8 then
            inst.components.talker:Say("Your soul is sleeping now. Nya~")
        elseif random >= .6 and random < .8 then    
            inst.components.talker:Say("I told you to run. Nya~")
        elseif random >= .4 and random < .6  then    
            inst.components.talker:Say("Did you die already? Nya~")
        elseif random >= .2 and random < .4 then    
            inst.components.talker:Say("Noone can be better than me... Exempt me! Nya~")
        else    
            inst.components.talker:Say("Well you were tough... For a baby. Nya~")
        end
    end
end

local function master_init(inst)
	inst:ListenForEvent("killed", onkilled)
end

 

Link to comment
Share on other sites

1 hour ago, AkaiNight said:

well i tried it but it's not working is there something missing or did i just need an other code?


local function PowerUpAtNewMoon(inst, phase)
	if phase == "night" then
		print("Night test is working.")
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.Light:Enable(true)
			inst.Light:SetRadius(18)
			inst.Light:SetFalloff(0.75)
			inst.Light:SetIntensity(.7)
			inst.Light:SetColour(70/255,230/255,12/170)
			inst.components.talker:Say("The curse has gone We are finally free! Nya~")
			print("Night and new moon test is working.")
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
		    inst.components.talker:Say("I can feel the curse of moon. The moon binds us! Nya~")
			print("Night and full moon test is working.")
		end
			
	elseif phase == "dusk" then
		print("Dusk test is working.")
		if TheWorld.state.isnewmoon == true then
			inst.components.combat:SetAttackPeriod (0.4)
			inst.components.locomotor.walkspeed = 6
			inst.components.locomotor.runspeed = 10
			inst.components.talker:Say("I can't feel the moon. Finally i can be free. Nya~")
			print("Dusk and new moon test is working.")
		
		elseif TheWorld.state.isfullmoon == true then
			inst.components.combat:SetAttackPeriod (0.8)
			inst.components.locomotor.walkspeed = 3.2
			inst.components.locomotor.runspeed = 4
			inst.components.talker:Say("Oh! I can feel the moon. This night will be cursed. Nya~")
			print("Dusk and full moon test is working.")	
			
		end
	end
end

well that's not works too


local function onkilled(inst, data)

    if data.victim ~= nil and data.victim.components.health ~= nil then
    
      local random = math.random

        if random >= .8 then
            inst.components.talker:Say("Your soul is sleeping now. Nya~")
        elseif random >= .6 and random < .8 then    
            inst.components.talker:Say("I told you to run. Nya~")
        elseif random >= .4 and random < .6  then    
            inst.components.talker:Say("Did you die already? Nya~")
        elseif random >= .2 and random < .4 then    
            inst.components.talker:Say("Noone can be better than me... Exempt me! Nya~")
        else    
            inst.components.talker:Say("Well you were tough... For a baby. Nya~")
        end
    end
end

local function master_init(inst)
	inst:ListenForEvent("killed", onkilled)
end

 

I answered the onkilled function in another thread for you, please try to refrain from opening multiple threads regarding the same issue.

I'll take a look at the other function and get back to you on what needs to be updated.

Edit: With the Moon function what are you wanting to do exactly? From what I can tell you want stat changes during a full moon and new moon. But you're also wanting to makes changes during Dusk just before these moons come up, is that right? 

Edited by RedHairedHero
New comment
Link to comment
Share on other sites

13 hours ago, RedHairedHero said:

I answered the onkilled function in another thread for you, please try to refrain from opening multiple threads regarding the same issue.

I'll take a look at the other function and get back to you on what needs to be updated.

Edit: With the Moon function what are you wanting to do exactly? From what I can tell you want stat changes during a full moon and new moon. But you're also wanting to makes changes during Dusk just before these moons come up, is that right? 

Yes that's what i want. At fullmoon (night and dusk) my character slowly walk, slowly run, slowly fight.. And at newmoon my character getting faster run and walk and fight.  And at newmoon my character gains night vision. That's what i try to do but i couldn't.

Link to comment
Share on other sites

8 hours ago, AkaiNight said:

Yes that's what i want. At fullmoon (night and dusk) my character slowly walk, slowly run, slowly fight.. And at newmoon my character getting faster run and walk and fight.  And at newmoon my character gains night vision. That's what i try to do but i couldn't.

One other question, do you want it to only last for the night/dusk of the full moon/newmoon or do you want it to change on the full moon and last until a new moon happens again? 

Link to comment
Share on other sites

21 hours ago, RedHairedHero said:

One other question, do you want it to only last for the night/dusk of the full moon/newmoon or do you want it to change on the full moon and last until a new moon happens again? 

Only newmoon and fullmoon dusk/night

 

 

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...