Jump to content

Search the Community

Showing results for tags 'Nightvision'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Hot Lava
    • [Hot Lava] - General Discussion
    • [Hot Lava] - Suggestions and Feedback
    • [Hot Lava] - Bug Tracker
    • [Hot Lava] - Strats and Records
    • [Hot Lava] - Developer Log
    • Hot Lava Latest Update
  • Griftlands
    • [Griftlands] - General Discussion
    • [Griftlands] - Suggestions and Feedback
    • [Griftlands] - Mods and Tools
    • [Griftlands] - Localization
    • [Griftlands] - Bug Tracker
    • [Griftlands] - Developer log
  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included: Spaced Out!] - Bug Tracker
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
    • Oxygen Not Included DLC Alpha
  • Don't Starve Together
    • Don't Starve Together FAQ
    • [Don't Starve Together] Developer log
    • [Don't Starve Together] General Discussion
    • [Don't Starve Together] Beta Branch
    • [Don't Starve Together] PlayStation
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Nintendo Switch
    • [Don't Starve Together] Bug Tracker
    • [Don't Starve Together] Trading
    • [Don't Starve Together] Server Bulletin
    • [Don't Starve Together] Dedicated Server Discussion
    • [Don't Starve Together] Mods and Tools
    • [Don't Starve Together] Tales of Life and Death
    • [DS + DST] Art, Music and Lore
    • [Don't Starve Together] Suggestions and Feedback
    • [Don't Starve Together] The Forge
    • [Don't Starve Together] The Gorge
    • [Archived Bugs]
  • Don't Starve
    • Don't Starve FAQ
    • [Don't Starve: Pocket Edition] iOS / Android
    • [Don't Starve] General Discussion
    • [Don't Starve] Mods and tools
    • [Don't Starve] Art, Music & Lore
    • [Don't Starve] Suggestions and Feedback
    • [Don't Starve] Videos
    • [Don't Starve] Bug Tracker
    • [Don't Starve] Trading
    • [Don't Starve] Testing Discussion (archive)
  • Klei Entertainment Games
    • Eets Munchies
    • [Invisible, Inc.] General Discussion and Strategies
    • Mark of the Ninja
    • Shank
  • Other Stuff
    • Other Klei Services

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Don't Starve: Hamlet
  • Don't Starve: Hamlet Early Access
  • Don't Starve Together
  • Don't Starve Together: Beta Branch
  • [Don't Starve Together] Nintendo Switch
  • [Don't Starve Together] PlayStation
  • Don't Starve Together: Return of Them
  • Don't Starve Together: The Gorge
  • Don't Starve Together: The Forge
  • Don't Starve Together: The Forge (Archive)
  • [Don't Starve Together] Xbox One
  • Don't Starve: Shipwrecked
  • Don't Starve: Shipwrecked [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked
  • Don't Starve: Hamlet Closed Beta (ARCHIVE)

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Hot Lava
  • Don't Starve Together
  • [Nintendo Switch] Don't Starve Together
  • [PlayStation] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve: Hamlet
  • Don't Starve: Shipwrecked

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Biography


Location


Interests


Occupation


Favorite Game


Modder


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Klei Featured Artist


Early Supporter


Early Supporter


Don't Starve


Don't Starve Together


Oxygen Not Included

Found 9 results

  1. heya there, it's me again... crawling back after just a week or so of getting assistance before on here, helping point my short attention span toward the ignorant mistake of capitalization of Dot's name into the code(dammnit, english class!). i attempted to add nightvision by myself, but i don't really know how to code. one quick google search lead me to THIS thread: after copying and pasting what i thought was right into what i thought was the right spot in the dot.lua[charactername].lua located in the scripts folder for people who are following along). this is what i copied and pasted:____________________________________________________________ local NIGHTVISION_COLOURCUBES = { day = "images/colour_cubes/ruins_light_cc.tex", dusk = "images/colour_cubes/ruins_dim_cc.tex", night = "images/colour_cubes/purple_moon_cc.tex", full_moon = "images/colour_cubes/purple_moon_cc.tex", } local function SetNightVision(inst, enable) if TheWorld.state.isnight or TheWorld:HasTag("cave") then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable(NIGHTVISION_COLOURCUBES) else inst.components.playervision:ForceNightVision(false) inst.components.playervision:SetCustomCCTable(nil) end end -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) inst:WatchWorldState( "isday", function() SetNightVision(inst) end) inst:WatchWorldState( "isdusk", function() SetNightVision(inst) end) inst:WatchWorldState( "isnight", function() SetNightVision(inst) end) inst:WatchWorldState( "iscaveday", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavedusk", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavenight", SetNightVision) SetNightVision(inst) end this is what the entirety of that file looks now: __________________________________________________________ local MakePlayerCharacter = require "prefabs/player_common" local assets = { Asset("SCRIPT", "scripts/prefabs/player_common.lua"), Asset("ANIM", "anim/dot.zip"), } local prefabs = {} -- Custom starting inventory local start_inv = { } -- When the character is revived from human local function onbecamehuman(inst) -- Set speed when not a ghost (optional) inst.components.locomotor:SetExternalSpeedMultiplier(inst, "dot_speed_mod", 1.5) end local function onbecameghost(inst) -- Remove speed modifier when becoming a ghost inst.components.locomotor:RemoveExternalSpeedMultiplier(inst, "dot_speed_mod") end -- When loading or spawning the character local function onload(inst) inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman) inst:ListenForEvent("ms_becameghost", onbecameghost) if inst:HasTag("playerghost") then onbecameghost(inst) else onbecamehuman(inst) end end local NIGHTVISION_COLOURCUBES = { day = "images/colour_cubes/ruins_light_cc.tex", dusk = "images/colour_cubes/ruins_dim_cc.tex", night = "images/colour_cubes/purple_moon_cc.tex", full_moon = "images/colour_cubes/purple_moon_cc.tex", } local function SetNightVision(inst, enable) if TheWorld.state.isnight or TheWorld:HasTag("cave") then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable(NIGHTVISION_COLOURCUBES) else inst.components.playervision:ForceNightVision(false) inst.components.playervision:SetCustomCCTable(nil) end end -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) inst:WatchWorldState( "isday", function() SetNightVision(inst) end) inst:WatchWorldState( "isdusk", function() SetNightVision(inst) end) inst:WatchWorldState( "isnight", function() SetNightVision(inst) end) inst:WatchWorldState( "iscaveday", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavedusk", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavenight", SetNightVision) SetNightVision(inst) end -- This initializes for both the server and client. Tags can be added here. local common_postinit = function(inst) -- Minimap icon inst.MiniMapEntity:SetIcon( "dot.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 = "webber" -- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used inst.talker_path_override = "dontstarve_DLC001/characters/" -- Stats inst.components.health:SetMaxHealth(125) inst.components.hunger:SetMax(175) inst.components.sanity:SetMax(125) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = .72 -- Hunger rate (optional) inst.components.hunger.hungerrate = .61 * TUNING.WILSON_HUNGER_RATE inst.OnLoad = onload inst.OnNewSpawn = onload end return MakePlayerCharacter("dot", prefabs, assets, common_postinit, master_postinit, start_inv) _______________________________________________________________________________________________________________ after loading up the game after deleting & getting new .txt, .zip and .xml files from manually running the compiler, i was surprised to not get a crash after mutilating the character's code like this when starting a new world. everything was fine, no crashing upon worldgen, no whitescreening after character select... no, the problem came after all that. during play. the nightvision didn't work, so Dot lost 100 of her max 125 HP. poor girl... i can upload the 'new and improved' files on google drive and post the shared link, if needed.
  2. Hey guys! 3 things today... 1. Like in woodie's transformation, his nightvision only activates in werebeaver form. I'd like to only have my night vision turn on for my lycan transformation but what should I put in my code that would tell it so? I'm using Kzisor/Ysovuka's transformation code As of now this is my night vision code local function RestoreNightvision(inst) inst:DoTaskInTime(3, function(inst) inst.Light:Enable(true) inst.Light:SetRadius(1) inst.Light:SetFalloff(20) inst.Light:SetIntensity(.1) inst.Light:SetColour(245/255,40/255,0/255) end, inst) end local function UpdateNightVision(inst, phase) local enable = phase == "night" inst:DoTaskInTime(enable and 0 or 1, function(inst) inst.components.playervision:ForceNightVision(enable) inst.components.playervision:SetCustomCCTable(enable and {} or nil) end) end local function OnInitNightVision(inst) if TheWorld.ismastersim or inst.HUD then inst:WatchWorldState("phase", UpdateNightVision) UpdateNightVision(inst, TheWorld.state.phase) end end this is in my local common_postinit inst:DoTaskInTime(0, OnInitNightVision) 2. Also what colorcube codes should I use to get this sort of look? Original picture from SuperDavid. As of now my night vision is super bright a fully lit as if there were no difference from the day time and night time. I'd like to have it dimmer and bluer similar to how it looks when there's a full moon at night 3. I'd also like to only eat raw meats while in lycan form, but I'm not sure where to put that or how to do it. Oh one more thing, this is alot to ask but much feedback from steam has been conflicted with people clamoring for night vision or not to have it at all. I'd like to add a configurable setting to the mod where you can choose to play with it or without it. Does anyone know how to do this? If anyone has answers I'd love to hear them, thanks so much guys! Much appreciated!
  3. This may seem strange but i want to do a character that has night vision when holding a torch, i already did the night vision but i don't know how to turn it on or off. can anyone help me? local BEAVERVISION_COLOURCUBES = { day = "images/colour_cubes/beaver_vision_cc.tex", dusk = "images/colour_cubes/beaver_vision_cc.tex", night = "images/colour_cubes/beaver_vision_cc.tex", full_moon = "images/colour_cubes/beaver_vision_cc.tex", } local function common_init(inst) inst.components.playervision:SetCustomCCTable(BEAVERVISION_COLOURCUBES) end
  4. I want to make a ability to my character that he can turn on and off the nightvision by pressing a key in the keyboard. I already have the nightvision, i just want to make a keystroke for it. I found out that the key detection should look something like this inst.components.keyhandler:AddActionListener("charactername", TUNING.CHARACTERNAME.KEY14, "idk") but i can't understand it very well. could anyone help me? Here is the code for my night vision local NIGHTVISION_COLOURCUBES = { day = "images/colour_cubes/ruins_light_cc.tex", dusk = "images/colour_cubes/ruins_dim_cc.tex", night = "images/colour_cubes/purple_moon_cc.tex", full_moon = "images/colour_cubes/purple_moon_cc.tex", } local function SetNightVision(inst, enable) if TheWorld.state.isnight or TheWorld:HasTag("cave") then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable(NIGHTVISION_COLOURCUBES) else inst.components.playervision:ForceNightVision(false) inst.components.playervision:SetCustomCCTable(nil) end end local function common_init(inst) SetNightVision(inst) inst:WatchWorldState( "isday", function() SetNightVision(inst) end) inst:WatchWorldState( "isdusk", function() SetNightVision(inst) end) inst:WatchWorldState( "isnight", function() SetNightVision(inst) end) inst:WatchWorldState( "iscaveday", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavedusk", function() SetNightVision(inst) end) inst:WatchWorldState( "iscavenight", function() SetNightVision(inst) end) end There is probably a better way to do the night vision but i am a noob in programming ;( Sorry if my english is bad
  5. i don't know if ther is a topic about this but i realy like the mod "the nightmare" but every time i die the nightvision geht turned off and i wanted to ask if someone has a soluten to it or if it get's worked on i found out that the nightvision stays on the skeleton if i die but only for a short while and just sometimes thank you all
  6. So, I am trying to implement the favorite pastime of first-time DST modders and am making a custom character. The short story is that the character is meant to be able to see in the dark and gains a minor amount of sanity in it, but consequently its sanity plummets in any light source, in addition to outright burning in sunlight (without protection). I've gotten the sanity calculation for this down on my own and will be working on the sun-burning thing in the future, but I'm having an issue with the night vision. To be specific, night vision is working too well. Everything seems to essentially be rendered in full brightness, which is a problem as I cannot discern light sources with night vision on, which makes the sanity drops from light sources seem borderline arbitrary. I've tried messing with color cubes and while I've noticed ghost vision color cubes do in fact make light sources barely discernible, it's not enough to really work out from a gameplay standpoint. Not to mention that the light needs to be really intense to be visible. One part of this topic is essentially me asking if making custom color cubes is the way forward for making night vision work as I intend. I don't have any idea if it will work out as-is so for all I know I could be wasting my time, which is why I thought I'd inquire first. Failing that, is there some sort of way to configure it that I've missed? Anyway, that's one avenue to finding a solution for this. I have also tried the classic method of simply applying grue immunity via the grue component (which works) and having a light source like so attached to my character: local function common_postinit(inst) -- <Insert snipped irrelevant code here> --if not TheWorld.ismastersim then inst.entity:AddLight() inst.Light:Enable(true) inst.Light:SetRadius(32) inst.Light:SetFalloff(0.9) inst.Light:SetIntensity(0.4) inst.Light:SetColour(255/255,0/255,0/255) --end end But the problem here is that the light is server-side, which of course makes everyone able to see it and gain protection from Charlie - not to mention the fact that it also lowers my character's sanity, being a light source. As you can see by the comments, I've tried making the light client side... but it doesn't seem to do anything with the check enabled. The light doesn't show up. Am I doing something wrong? And finally, if both of these options don't work out, I've simply considered drawing a ring around the effective radius of a light source, which would be ugly but would at least allow me to tell where they begin and end. That is assuming that I can do this. I'd look into that on my own if need be. I'm hoping that one of the solutions above could work before I resort to that, though. In closing, is it possible to 'fix' night vision with color cubes, or to make a client-side light so I can at least fake it and still see (brighter) lights?
  7. I've been trying to figure out this problem for a while but due to *cough* lack of programming skill *cough* I've had issues. Basically i want my character to have night vision so I've basically took the night vision code from Woodie and put it on my character but added a bit so it fits what i want it to do. This is the night vision code (Not the entire script): local MONSTERVISION_COLOURCUBES ={ day = "images/colour_cubes/beaver_vision_cc.tex", dusk = "images/colour_cubes/beaver_vision_cc.tex", night = "images/colour_cubes/beaver_vision_cc.tex", full_moon = "images/colour_cubes/beaver_vision_cc.tex",}local function NightVision(inst)if not TheWorld.ismastersim then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable(MONSTERVISION_COLOURCUBES)endendlocal function NightVision2(inst)if not TheWorld.ismastersim then inst.components.playervision:ForceNightVision(false) inst.components.playervision:SetCustomCCTable(nil) endendinst:WatchWorldState("startnight", NightVision)inst:WatchWorldState("startday", NightVision2)The code seems to work fine but according to a friend I've messed up the porting of my mod to DST as whenever my character comes into vision of another player on a dedicated server, it crashes with this error: "[00:05:09]: [string "scripts/components/playervision.lua"]:43: attempt to index field 'inventory' (a nil value)" I just don't know what to do sadly and i was wondering if someone could help me?
  8. 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
  9. Hey guys, I found some code to enable a lightsource at night (nightvision) but right now it is visible for all the players on the server. I want it to be playervision-only. This is the code for the "light": Is it possible to make this light (or any other light) player-only? I really think that nightvision is a cool perk, but it's a gamebreaker when everyone can see it. I looked into woddie's code for beaver, but it's just the same as stated above. Since it was singleplayer, it worked as intended. Is it possible to make a player-only light now when it's multiplayer? Best regards
×
×
  • Create New...