Search the Community

Showing results for tags 'variables'.



More search options

  • 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] PS4
    • [Don't Starve Together] Xbox One
    • [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
  • Klei Entertainment Games
  • Other Stuff

Categories

  • Don't Starve
    • Custom Character and Skins
    • Game Modifications
    • Language Packs
    • Modding Tools, Tutorials & Examples
    • Custom Maps

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out! (Early Access)
  • 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: 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] PS4
  • [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! (Early Access)
  • Griftlands
  • Hot Lava
  • Don't Starve Together
  • [PS4] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve: Hamlet
  • Don't Starve: Shipwrecked

Categories

  • Hot Lava - Bug Reports

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End



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

Found 3 results

  1. I am making a hud-like pannel for my character stats like level experience boss kill etc... Well it works fine but it does not update itself when the character level ups how i can make it check for any changes? Anyway im leaving my codes. this is for my character to level up if inst.experience >= inst.expneededforlevel then inst.experience = 0 inst.SoundEmitter:PlaySound("kitsura/characters/kitsura/level up") inst.level = inst.level + 1 inst.expneededforlevel = (inst.expneededforlevel * 0 + inst.level * 10) inst.components.talker:Say("Level Up!! Level \n".. (inst.level) ) end and this is the screen shot of the menu when this photo taken my character was lvl 1(i am sure he is) and he had some experience with 1 koalefant kill but none of them were updated. i don't know how to check for if the variables are changed or not.
  2. hola yo hablo español ¿Cómo puedo crear una variable de contador que se guarde y cargue al cerrar el servidor? i no speak english How can I create a counter variable that is saved and loaded when shutting down the server? --------------------------------------------------------- "inst.components.helth.maxhealth" is = max hp character in theory "contador" It is my variable to create, when using it locally it is not saved, it is only restarted, not like the previous one that if it is modified because it is saved and loaded in the function -------------------------------------- local contador = contador or nil local function subirnivel(inst) if inst.components.health.maxhealth >= (1) and inst.components.health.maxhealth < (300) then inst.components.health.maxhealth = (inst.components.health.maxhealth + contador ) contador = contador * 0.9 end end ------------------------------------------- my funcion save and load local function onsave(inst, data) data.maxhealth = inst.components.health.maxhealth or nil end local function onpreload(inst, data) inst.components.health:SetMaxHealth(data.maxhealth) end ----------------------------------------------------------------------------- alguien tiene un ejemplo de como crear una variable para usarla como contador para poder guardar su valor y cargarlo sin que se reinicie en tiempo real o al cerrar y abrir el servidor o partida. someone has an example of how to create a variable to use as a counter to save its value and load it without rebooting in real time or when closing and opening the server or game.
  3. Method No.1: Placing files in respective folders within your mod doesn't change whatever you have changed in the files when activating the mod in-game! So, lets say I change total_day_time (total amount of segments) from 16 to 24 (and subsequently change day_segs, night_segs and dusk_segs to correspond to this amount) in a copied tuning.lua file, which I place in [my mod]/scripts folder. Why are no changes applied to my hosted server when I host with the said mod enabled? Is there any code I need to apply in modmain.lua or elsewhere so that the tuning.lua from my mod directly replaces tuning.lua while the mod is enabled? And yes, I know, I've heard it multiple times that file-replacement method isn't optimal for modding, but quite frankly, that's quite fine for the kind of mod that I'm making here. Although, not replacing files via modding and getting it done with a different method is preferable. Method No.2: So, aparently this mod was able to achieve the unachievable; changing local variables (or SOMETHING, somehow) to global. And it flipping works! From my understanding, this is what it in modmain to do so (this isn't the exact code of course, I just took the bits that were relevant): seg_dtime = GetModConfigData("dspeed") * 30 / 8 --Timer segment local total_day_time = seg_dtime * 16 local day_segs = 10 local dusk_segs = 4 local night_segs = 2 GLOBAL.TUNING.SEG_TIME = seg_dtime GLOBAL.TUNING.TOTAL_DAY_TIME = total_day_time GLOBAL.TUNING.DAY_SEGS_DEFAULT = day_segs GLOBAL.TUNING.DUSK_SEGS_DEFAULT = dusk_segs GLOBAL.TUNING.NIGHT_SEGS_DEFAULT = night_segs However, when I put the same code, with just the seg_dtime change to seg_time (and declaring seg_time to what I want, i.e. 60) like this: local seg_time = 60--30 local total_day_time = seg_time*24--16 local day_segs = 12--10 local dusk_segs = 6--4 local night_segs = 6--2 GLOBAL.TUNING.SEG_TIME = seg_time GLOBAL.TUNING.TOTAL_DAY_TIME = total_day_time GLOBAL.TUNING.DAY_SEGS_DEFAULT = day_segs GLOBAL.TUNING.DUSK_SEGS_DEFAULT = dusk_segs GLOBAL.TUNING.NIGHT_SEGS_DEFAULT = night_segs NOTHING changes within the game when I enable my mod. Why? And as a result, how do I achieve this result? I believe there was another mod that changed day time. However, strangely, segment time has not been touched by any mods and I really wonder why, considering segment time, just like total day time (amount of segments) are both local variables declared in tuning.lua.