RedMattis

  • Content Count

    86
  • Joined

  • Last visited

Community Reputation

39 Excellent

About RedMattis

  • Rank
    Junior Member
...

Badges

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. This is a mod I made crashing, but it seems inconsistent in when it crashes. The crash is when examining a mole digging. Sometimes she says generic description of it, sometimes it crashes. [00:02:21]: Console_CreateRoom: roomName RedMattis's World created for id 109775242011523442[00:02:21]: Succesfully removed server listing[00:02:25]: Received request to spawn as seras from RedMattis[Host][00:02:26]: [Fixed] SPAWNING PLAYER AT: (350.00, 0.00, 66.00) [00:02:26]: Serializing user session to session/0FE00002DC1EFFEE/KU_rcx2C0hm_/0000000002[00:02:26]: Loading minimap from session/0FE00002DC1EFFEE/KU_rcx2C0hm_/minimap[00:02:26]: Clearing minimap[00:07:16]: [string "scripts/stringutil.lua"]:5: attempt to index local 'ret' (a nil value)LUA ERROR stack traceback:scripts/stringutil.lua:5 in () ? (Lua) <1-13> topic_tab = table: 15AFD500 modifier = table: 2ECBE838 ret = nil i = 2 v = UNDERGROUND=(tail call):-1 in () (tail) <-1--1>scripts/stringutil.lua:146 in () ? (Lua) <123-149> inst = seras stringtype = DESCRIBE modifier = table: 2ECBE838 character = SERAS specialcharacter = SERAS=(tail call):-1 in () (tail) <-1--1>scripts/components/inspectable.lua:61 in (method) GetDescription (Lua) <53-84> self = descriptionfn = function - scripts/fx.lua:280 inst = 111406 - (valid:true) nameoverride = Raised Dirt viewer = 109642 - seras (valid:true) desc = nilscripts/actions.lua:282 in (field) fn (Lua) <279-294> act = Examine 111406 - (valid:true) targ = 111406 - (valid:true)scripts/bufferedaction.lua:22 in (method) Do (Lua) <19-35> self (valid:true) = options = table: 479BA308 action = table: 15E41C38 doer = 109642 - seras (valid:true) onfail = table: 479B8DA0 doerownsobject = false target = 111406 - (valid:true) onsuccess = table: 479BA128scripts/entityscript.lua:1165 in (method) PushBufferedAction (Lua) <1131-1178> self (valid:true) = DynamicShadow = DynamicShadow (18A7E750) inlimbo = false GetMoistureRateScale = function - scripts/prefabs/player_common.lua:97 SetCameraDistance = function - scripts/prefabs/player_common.lua:1043 ScreenFlash = function - scripts/prefabs/player_common.lua:1097 player_classified = 109643 - player_classified (valid:true) playercolour = table: 18CC6DD0 AnimState = AnimState (18A7DF50) Light = Light (18DCEEC8) OnRemoveEntity = function - scripts/prefabs/player_common.lua:538 pendingtasks = table: 0D7070F0 ShowHUD = function - scripts/prefabs/player_common.lua:1037 sg = sg="wilson", state="idle", time=0.30, tags = "idle,canrotate," IsHUDVisible = function - scripts/prefabs/player_common.lua:1027 ApplyScale = function - scripts/prefabs/player_common.lua:1112 SetGhostMode = function - scripts/prefabs/player_common.lua:454 CanExamine = function - scripts/prefabs/player_common.lua:20 HUD = HUD OnWakeUp = function - scripts/prefabs/player_common.lua:960 Transform = Transform (18A7DF30) actionreplica = table: 0D7068A8 event_listening = table: 18762068 actioncomponents = table: 0D705F70 GetMaxMoisture = function - scripts/prefabs/player_common.lua:87 prefab = seras updatecomponents = table: 44384198 ShakeCamera = function - scripts/prefabs/player_common.lua:1057 OnDespawn = function - scripts/prefabs/player_common.lua:978 persists = false MiniMapEntity = MiniMapEntity (18A7E790) event_listeners = table: 18768BC0 OnSetSkin = function - scripts/prefabs/player_common.lua:1005 replica = table: 0D706178 GetTemperature = function - scripts/prefabs/player_common.lua:47 GUID = 109642 ghostenabled = true EnableMovementPrediction = function - scripts/prefabs/player_common.lua:415 worldstatewatching = table: 4438CC08 Network = Network (18A7E7D0) userid = KU_rcx2C0hm OnPreLoad = function - ../mods/Seras/scripts/prefabs/seras.lua:473 LightWatcher = LightWatcher (18A7E770) inherentactions = table: 4524DA98 spawntime = 15.500000808388 SnapCamera = function - scripts/prefabs/player_common.lua:1049 IsWet = function - scripts/prefabs/player_common.lua:107 ScreenFade = function - scripts/prefabs/player_common.lua:1090 strength = normal entity = Entity (45995B00) name = RedMattis children = table: 45B7F318 OnSleepIn = function - scripts/prefabs/player_common.lua:932 experience = 0 AttachClassified = function - scripts/prefabs/player_common.lua:527 IsOverheating = function - scripts/prefabs/player_common.lua:67 IsActionsVi[00:07:16]: SCRIPT ERROR! Showing error screen [00:07:17]: QueryServerComplete no callback[00:07:18]: QueryServerComplete no callback[00:07:29]: Force aborting...
  2. Does this method still work? I get an error complaining that "IsRecipeValid" isn't declared on the "local OldIsRecipeValid = GLOBAL.IsRecipeValid" line [00:00:03]: Mod: Seras Error loading mod![string "../mods/Seras/modmain.lua"]:114: variable 'IsRecipeValid' is not declaredLUA ERROR stack traceback: =[C] in function 'error' scripts/strict.lua(23,1) ../mods/Seras/modmain.lua(114,1) in main chunk =[C] in function 'xpcall' scripts/util.lua(455,1) in function 'RunInEnvironment' scripts/mods.lua(369,1) in function 'InitializeModMain' scripts/mods.lua(350,1) in function 'LoadMods' scripts/main.lua(246,1) in function 'ModSafeStartup' scripts/main.lua(294,1) =[C] in function 'SetPersistentString' scripts/mainfunctions.lua(24,1) in function 'SavePersistentString' scripts/modindex.lua(82,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(69,1) in function 'BeginStartupSequence' scripts/main.lua(293,1) in function 'callback' scripts/modindex.lua(436,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(416,1) in function 'Load' scripts/main.lua(292,1) in main chunk [00:00:03]: [string "../mods/Seras/modmain.lua"]:114: variable 'IsRecipeValid' is not declaredLUA ERROR stack traceback: =[C] in function 'error' scripts/strict.lua(23,1) ../mods/Seras/modmain.lua(114,1) in main chunk =[C] in function 'xpcall' scripts/util.lua(455,1) in function 'RunInEnvironment' scripts/mods.lua(369,1) in function 'InitializeModMain' scripts/mods.lua(350,1) in function 'LoadMods' scripts/main.lua(246,1) in function 'ModSafeStartup' scripts/main.lua(294,1) =[C] in function 'SetPersistentString' scripts/mainfunctions.lua(24,1) in function 'SavePersistentString' scripts/modindex.lua(82,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(69,1) in function 'BeginStartupSequence' scripts/main.lua(293,1) in function 'callback' scripts/modindex.lua(436,1) =[C] in function 'GetPersistentString' scripts/modindex.lua(416,1) in function 'Load' scripts/main.lua(292,1) in main chunk[00:00:03]: Error error! We tried displaying an error but TheFrontEnd isn't ready yet...
  3. I believe he ended up replacing the prefab though. Anyway I'm still stuck on this. I keep getting this error: [string "../mods/Seras/modmain.lua"]:174: attempt to call global 'AddStateGraphPostInit' (a nil value) when I try to modify the WilsonSG function as suggested. Probably I'm making some error with the AddStateGraphPostInit. I don't really get how it works. AddStateGraphPostInit("wilson", function(sg) local oldOnEnter = sg.states.bedroll.onenter function newOnEnter(inst) if inst:HasTag("nocturnal") then -- Code copied from SGWilson inst.components.locomotor:Stop() if TheWorld.state.isnight then inst:PushEvent("performaction", { action = inst.bufferedaction }) inst:ClearBufferedAction() inst.sg:GoToState("idle") inst.components.talker:Say(GetString(inst, TheWorld:HasTag("cave") and "ANNOUNCE_NODAYSLEEP_CAVE" or "ANNOUNCE_NODAYSLEEP")) return end local danger = FindEntity(inst, 10, function(target) return target:HasTag("monster") or target.components.combat and target.components.combat.target == inst end) local hounded = TheWorld.components.hounded if hounded and (hounded:GetWarning() or hounded:GetTimeToAttack() <= 0) then danger = true end if danger then inst:PushEvent("performaction", { action = inst.bufferedaction }) inst:ClearBufferedAction() inst.sg:GoToState("idle") inst.components.talker:Say(GetString(inst, "ANNOUNCE_NODANGERSLEEP")) return end inst.components.health:SetInvincible(true) -- Just while we play the initial anim inst.AnimState:PlayAnimation("action_uniqueitem_pre") inst.AnimState:PushAnimation("bedroll", false) if inst.components.grue ~= nil then inst.components.grue:SetSleeping(true) end if inst.components.talker ~= nil then inst.components.talker:IgnoreAll() end if inst.components.firebug ~= nil then inst.components.firebug:Disable() end inst:OnSleepIn() inst.components.inventory:Hide() if inst.components.playercontroller ~= nil then inst.components.playercontroller:EnableMapControls(false) inst.components.playercontroller:Enable(false) end else oldOnEnter(inst) end endend)
  4. I have a nocturnal character and I want her to be able to sleep at day, but not night. Any ideas for how to go about this?
  5. @rezecib & @PeterA Thanks. As long as the side-effects of the weird method doesn't effect the players all is good.
  6. For some reason it seems some people joining servers don't get custom items to show up in the skill bar. Anyone have ideas for what could be the cause? http://steamcommunity.com/workshop/filedetails/discussion/360319890/619574421569721115/?tscn=1420667705 Below: example of custom items in my mod.
  7. Is it possible to have more than one recipe for the same thing? Like say I want it to be possible to craft rabbit trap with either the standard recipe or one using papyrus instead of grass? Or even user made recipes like crafting your unique weapon out of either nightmare fuel or gold.
  8. local function master_postinit(inst) -- Ghost TEMP inst.experience = 0 -- default hunger level inst.strength = "normal" inst.components.hunger.current = 125 inst.components.hunger:SetMax(150) -- Emit light at night / Night vision -- WARNING doesn't work at day in caves! local light = inst.entity:AddLight() inst.Light:Enable(false) inst.Light:SetRadius(10) inst.Light:SetFalloff(0.75) inst.Light:SetIntensity(.6) inst.Light:SetColour(235/255,12/255,12/255) -- Stats varies day/night inst:ListenForEvent( "dusktime", function() updatestats(inst) end , GetWorld()) inst:ListenForEvent( "daytime", function() updatestats(inst) end , GetWorld()) inst:ListenForEvent( "nighttime", function() updatestats(inst) end , GetWorld()) updatestats(inst) -- Sanity Changes inst.components.sanity.night_drain_mult = 0.5 inst.components.sanity.neg_aura_mult = 1.1 inst.components.sanity:SetMax(TUNING.WILLOW_SANITY) --Update hunger status inst:ListenForEvent("hungerdelta", onhungerchange) --temp test inst:ListenForEvent("hungerdelta", onExperienceGain) --Carnivore, can only eat meat. Can Eat Monster Meat. inst.components.eater:SetCarnivore() inst.components.eater.strongstomach = true inst.components.eater.foodprefs = {FOODTYPE.MEAT, FOODTYPE.BLOOD} return inst endlocal function common(bank, build, anim, tag) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank(bank) inst.AnimState:SetBuild(build) inst.AnimState:PlayAnimation(anim) inst:AddTag("blood") if tag ~= nil then inst:AddTag(tag) end if not TheWorld.ismastersim then return inst end inst.entity:SetPristine() inst:AddComponent("edible") inst.components.edible.ismeat = true inst.components.edible.foodtype = FOODTYPE.BLOOD inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst:AddComponent("stackable") inst:AddComponent("perishable") inst.components.perishable:SetPerishTime(TUNING.PERISH_SLOW) inst.components.perishable:StartPerishing() inst.components.perishable.onperishreplacement = "spoiled_food" MakeHauntableLaunchAndPerish(inst) inst:ListenForEvent("spawnedfromhaunt", function(inst, data) Launch(inst, data.haunter, TUNING.LAUNCH_SPEED_SMALL) end) return instend-- small bloodbaglocal function smallblood() local inst = common("deerclops_eyeball", "smallblood", "idle") if not TheWorld.ismastersim then return inst end inst.components.edible.healthvalue = TUNING.HEALING_MEDSMALL inst.components.edible.hungervalue = TUNING.CALORIES_SMALL inst.components.edible.sanityvalue = TUNING.SANITY_TINY inst.components.inventoryitem.atlasname = "images/inventoryimages/smallblood.xml" inst.components.perishable:SetPerishTime(TUNING.PERISH_PRESERVED) inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM return instendreturn Prefab("common/inventory/smallblood", smallblood, assets)The lower codeblock is mostly copied from the meats LUA.
  9. I'm pretty sure I heard that mentioned about the RoG characters like Webber at least. I think it is better to leave the RoG stuff alone. Klei will probably implement it in some form later. Perhaps free to those who own the DLC with a bit of luck.
  10. Is it possible to create wildcard recipes similar to how the crockpot or drying rack can take several different ingredients?
  11. I'm trying to add extracted blood as a foodtype and get a blood drinking-character to have exclusive access to it similar to WX-78 with his gears. The food items work and are created with the "BLOOD" tag, but I'm still struggling to figure out how to get the character to eat it. I've tried the following (and a few others which simply crashed). (in the master_postinit of the character) inst.components.eater.foodprefs = {FOODTYPE.BLOOD}
  12. Is code missing in AddClassPostConstruct? I get "unexpected symbol near ' '" on the row just below AddClassPostConstruct when testing it. Edit: nevermind copying code from the forum seems to create invisible weird symbols in Eclipse. weird.
  13. I've found the solution for this, so I thought I'd share it with you since it was pretty tough to figure out based on the problem. Basically you need to make the character stop shape shifting while dead. -- All code stolen right from Wolfgang, so some of this might not be relevant for you.-- Just before your conditions which trigger shape shifting. In Wolfgang's case this is his "onhungerchange" function.if inst.sg:HasStateTag("nomorph") or inst:HasTag("playerghost") or inst.components.health:IsDead() then return end-- Enable and disable stuff depending on if the character is alive or dead.local function onbecamehuman(inst) if inst._wasnomorph == nil then inst.strength = "normal" inst._wasnomorph = inst.sg:HasStateTag("nomorph") inst.talksoundoverride = nil inst.hurtsoundoverride = nil inst:ListenForEvent("hungerdelta", onhungerchange) inst:ListenForEvent("newstate", onnewstate) onhungerchange(inst, nil, true) endendlocal function onbecameghost(inst) if inst._wasnomorph ~= nil then inst.strength = "normal" inst._wasnomorph = nil inst.talksoundoverride = nil inst.hurtsoundoverride = nil inst:RemoveEventCallback("hungerdelta", onhungerchange) inst:RemoveEventCallback("newstate", onnewstate) endendlocal function onload(inst) inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman) inst:ListenForEvent("ms_becameghost", onbecameghost) if inst:HasTag("playerghost") then onbecameghost(inst) else onbecamehuman(inst) endendHope this was useful to someone. Cheers.