Jump to content

Nebula

Member
  • Posts

    277
  • Joined

  • Last visited

Everything posted by Nebula

  1. DarkKreepe, Disappeared from the spring somewhere http://my-files.ru/enekzn
  2. Yes, I looked. Thank you! I correctly understood - that the phases of the moon in the weather script do not have a real binding to the calendar and work like an imitation? Is there a way to get MoonPhase from this script into its variable? Or is it better to use a self phase calculation script? It will be something - GameTime: getMoon ()? Sorry if my question is stupid ...
  3. Thank you very much for your answer! In fact, the algorithm for calculating the lunar phases depending on the year and day of the calendar day is quite simple ... and I was surprised at first by your answer. I thought that this was implemented in the game. Here is the code JavaScript for HTML ... It's pretty simple to adapt to lua for Zomboid ... var currentDate = new Date(); currentDate.setTime(currentDate.getTime()); var FullMoonDate = new Date(90, 1, 11, 1, 0, 0); // Full Moon (Toronto, Canada) in 1990 - January 11 at 1:00 am //You can calculate from an earlier year - you need to specify the exact time of the full moon in the past ... and it is calculated on the current date ... //This is the simplest formula, without calculating distances, an elliptical orbit, and much more. var lunarPeriod = 29*(24*3600*1000) + 12*(3600*1000) + 44.05*(60*1000); var moonPhaseTime = (currentDate.getTime() - FullMoonDate.getTime()) % lunarPeriod; var percentRaw = (moonPhaseTime / lunarPeriod); var time = Math.round((lunarPeriod-moonPhaseTime)/(24*3600*1000)); document.write("The next full moon through ",time," "); if (time == 1) document.write("Day"); if (time == 2) document.write("Day"); if (time == 3) document.write("Day"); if (time == 4) document.write("Day"); if (time == 5) document.write("Day"); if (time == 6) document.write("Days"); if (time == 7) document.write("Days"); if (time == 8) document.write("Days"); if (time == 9) document.write("Days"); if (time == 10) document.write("Days"); if (time == 11) document.write("Days"); if (time == 12) document.write("Days"); if (time == 13) document.write("Days"); if (time == 14) document.write("Days"); if (time == 15) document.write("Days"); if (time == 16) document.write("Days"); if (time == 17) document.write("Days"); if (time == 18) document.write("Days"); if (time == 19) document.write("Days"); if (time == 20) document.write("Days"); if (time == 21) document.write("Days"); if (time == 22) document.write("Days"); if (time == 23) document.write("Days"); if (time == 24) document.write("Days"); if (time == 25) document.write("Days"); if (time == 26) document.write("Days"); if (time == 27) document.write("Days"); if (time == 28) document.write("Days"); if (time == 29) document.write("Days"); if (time == 30) document.write("Days"); if (time == 31) document.write("Days"); It was possible to give the character a chance to see the moon and its phases under the condition of good weather - lack of cloudiness, And also if we take into account the time of sunrise and sunset, then also the presence of the moon in the sky ... Myopia and punctured eyes)))) ...etc. also change the illumination depending on the current phase of the moon. In fact, in reality, the Moon and its phases have quite a strong influence on plant growth, animal behavior, the general state of man ... and very great influence and importance in various sacred actions and rituals ... This can be treated differently .. To believe, or not to believe, but it's all real ... very real. - It's much more real than Zombies I want to continue to use this in my add-on to the game. Unfortunately, I just started to get acquainted with Java and so far it's only in the plans for the future. So far I'm learning to do very simple things and try to understand the code implemented by others - more experienced people and apply the knowledge gained. I have a lot of syntax questions, and there is a lot of misunderstanding of the Zomboid API - I'm not a programmer at all ... I do not want to annoy my stupid questions, so I rarely ask, the code does not work at all on my own ... - but there is progress ... more ... Thanks for the answer ...
  4. There are phases of the moon in the game, if so, how to get the value of the phase or the number of the lunar day?
  5. Ok. but how to get a whole (without a point) number? 3f - Mean how many characters after the dot? How to get the value of the lunar phase, or the numbers of the lunar day? if such exists at all ...
  6. Thank you! Everything worked out! Another question... How to reduce the received value in a variable up to 3 characters after the point?... or up to one character after the point ... or generally get the value of an integer without signs after the dot ... And further... How to get the value of the lunar phase, or the numbers of the lunar day, if such exists at all ... Thanks to everyone who helps! I sincerely thank you!
  7. I want to see by clicking. To see for myself ... to understand ... keys meaning "UnhappynessLevel" if keynum == 88 then Ulvl = player:getBodyDamage():getUnhappynessLevel() and player:Say(Ulvl); end but I get this error: attempted index: getBodyDamage of non-table: null what does this mean and what am I doing wrong? Show it as it should. And another question: local - only acts within the function being performed, or within the condition? And yes ... I could change Nolan's code myself. I begin to understand superficially what and how. But I still need your help ... Excuse me, I am already a grandfather and this is given to me with great difficulty. But I'm trying.
  8. Nebula

    Amulets & Dreams

    Amulets & Dreams v1.1b - Fixed code - Other minor changes Now you can equip: - Vanilla electronic watch clock on the left wrist - Nominal Army tokens on the neck - Wedding ring on hand - Earrings in the ears - Gold chain - Ties - Straw hat and other items ... Soon - More items ... and more amulets ...
  9. Nebula

    Amulets & Dreams

    Amulets & Dreams v1.1 has been released! Which includes: - Amulets can now be equipped with a character - Added equipping items from Hydrocraft - Minor changes in recipes - Fixed book distribution - Disassembly and drilling of ammunition adds gunpowder to inventory - Removed the recipe of a cross from a branch - Fixes in language files Thanks to everyone who did not help ... To be continued...
  10. Thank you, but that's not what I need. Similar to what I need - implemented by Nolan Armor Mod. But in a lot of code I could not figure out how he does it. Can someone on the basis of his code do what I need. I turned to Nolan directly, but he did not answer me.
  11. But still. Is it possible for community members to help with the code? I need to equip the item from the inventory on the head of the character, provided that the item is not clothing. The item must give a constant effect of improved mood, or reduced stress. Sample code written tommysticks does not work. Help me please!
  12. I figured out the objects and recipes, but writing code to implement it was too complicated for me. Help me write code for mod. I need to ensure that the equipped item on the character gives a permanent little effect of reducing stress, or a slight increase in mood. Is there anyone who can help me do this?
  13. Nebula

    Delete

    Delete
  14. Nebula

    Amulets & Dreams

    Mod adds the ability to create various amulets and talismans, and also adds dreams. After reading the book you will receive recipes for making amulets. The book is almost always found in libraries, rarely on shelves in homes and very rarely in dead zombies. In the mod used items and tools from Hydrocraft, so without it the mode will not function! • The character will have dreams. In most cases, he will not remember them. Make a DreamCatcher and mix it into the main inventory so that the character is more likely to see and remember dreams • Amulets made by the character - have a basic effect, which prevents a decrease in mood. • The effect on the character depends on the phase of the moon. • The phase of the moon and the effectiveness of the amulet can be seen in the window of Amulet and Talisman. • The window of the amulets is called by the key O (by default). You can change this key in the game settings. Supported languages: Russian, English Amulets & Dreams (Steam Workshop)
  15. Revise the radio range.
    Now the stationary radio station operates within a radius of only 5 km! This is very small. Do at least 20 km for it. In multiplayer it is very difficult (impossible) to communicate with other players located in other cities at a great distance.

     

    At the moment they are practically useless.

  16. 593 Revise the radio range. Now the stationary radio station operates within a radius of only 5 km! This is very small. Do at least 20 km for it. In multiplayer it is very difficult (impossible) to communicate with other players located in other cities at a great distance. At the moment they are practically useless.
  17. Hello! Can I add sounds to a multi-tool?

    jig_saw_08.mp3

    zvuk_-_sverla.mp3

  18. Nebula

    Hydrocraft Mod

    Add the craft of the surgical needle. For example: Bone + Knife + Thread = Homemade Surgical Needle ... + boil in a container of water ... Playing on servers, it is almost impossible to find a needle for sewing deep wounds.
  19. Nebula

    Hydrocraft Mod

    Found an unpleasant bug. When you take a charged multi tool into your hand, it is very quickly discharged. for 2-3 seconds. I ran out of medium batteries
  20. Is there a way to declare that an item can be used as fuel and how long does it burn? The question is removed ... the answer found here...
  21. Please add the ability to manually change the gearbox
  22. Nebula

    Hydrocraft Mod

    The lighter fluid is not poured into the lighter. Please correct.
  23. Make it possible to manually change the gearbox.
  24. 590 Сigarettes. Return the normal kind of cigarettes in the game. Now all cigarettes look like a bundle, before they were cigarettes, and packs - packs. Is it possible to make it so that you can light a cigarette from a burning fire (bonfire)?
  25. Is it possible to do the manual shifting of the gearbox in the car? How do I turn on the radio in the car? The battery weighs 1 kg ... but they are really heavy. When the heater is turned on in the car, it does not get hot and the battery is not consumed, just like when the light is on without a running engine, it does not consume the battery in the car. The same applies to the heater.
×
×
  • Create New...