Jump to content

Forums

  1. News & Announcements

    1. News

      Blog posts, interesting news, and forum announcements.

      5k
      posts
  2. Project Zomboid

    1. PZ Updates

      Patch notes and announcement threads for PZ builds.

      22.2k
      posts
    2. General Discussions

      Just the general place to natter about zombie apocal-em-upse, Project Zomboid.

      66.2k
      posts
    3. Bug Reports

      Bugs go here. Please save us the time to translate all the posts in different languages and post them in English instead.

      16.9k
      posts
    4. PZ Support

      For any problems about purchasing, the actual running of the game, crash reports, etc.
      Bug reports go here (click).

      25.5k
      posts
    5. 22.3k
      posts
    6. 8.3k
      posts
    7. PZ Suggestions

      Got things you want to see in PZ? Post here! Tip: search to see if there's already an existing thread.

      54.9k
      posts
  3. PZ Modding

    1. Tutorials & Resources

      The place to learn and gather everything you could need for modding PZ!

      2.4k
      posts
    2. Mods

      Anything that alters gameplay mechanics or the UI and doesn't fit into the other categories.

      17.4k
      posts
    3. Items

      Weapons, food, recipes, clothes. All the items you need (or not) for survival.

      9.7k
      posts
    4. Mapping

      Visit exotic places.

      8.3k
      posts
    5. Mod Ideas and Requests

      For the creative minds and everyone else.

      2.8k
      posts
  4. General Games Development

    1. Indie Scene

      Talk about the Indie scene, promote your work, and get feedback about all aspects of game development!

      2.3k
      posts
  5. Other Discussions

    1. General Discussion

      Talk about anything you like!

      21.5k
      posts
    2. Forum Games & Activities

      Relax with some good ol' fashioned forum tomfoolery and creative fun!

      9.3k
      posts
  • New Topics

  • 2311 The Ultimate Question!

    1. 1. Which is better: pancakes or waffles?


      • PANCAKES
      • WAFFLES

  • Posts

    • I'd suggest a dedicated server but since you want every character playing on their own timeline that would be out of the question and somewhat strange I might add. Imagine one chracter deep in winter where no rain is falling but he already got carpentry 7, so easy solution is he builds a lot of rain barrels and a new char jumps into the world in summer where these said rain barrels pop into existence (back in time) and fills them up with water from the still working water pipes or even rain...? Or another example would be that freshly cooked meals and fresh ingredients travel forward in time?
    • Generally this would indicate a desync on the server. What is that friends Ping and FPS when on the server?
    • NB: This issue is not game breaking and does not seem to affect the stability of the game. NB2: This post contains a bugfix.  (Scroll to the bottom for bugfix if tl;dr) Version: 41.78.16 Affects all game modes. (single/multiplayer) Reproduction steps: 1. save any game. Issue description: WorldDictionaryReadable.lua is currently not syntactically correct lua code and will error any code that attempts to load it: > -- in lua repl > worldDict = require("WorldDictionaryReadable") error loading module 'WorldDictionaryReadable' from file './WorldDictionaryReadable.lua': ./WorldDictionaryReadable.lua:20356: '}' expected (to close '{' at line 20355) near '=' stack traceback: [C]: in ? [C]: in function 'require' stdin:1: in main chunk [C]: in ? > dofile("WorldDictionaryReadable.lua") WorldDictionaryReadable.lua:20356: '}' expected (to close '{' at line 20355) near '=' stack traceback: [C]: in function 'dofile' stdin:1: in main chunk [C]: in ? This is due to the following generated section (e.g. from a save file of mine, note file continues before and after this section):   --[[ ---- OBJECTS ---- --]] objects = { 0 = "American Holly", 1 = "Canadian Hemlock", 2 = "Virginia Pine", 3 = "Riverbirch", 4 = "Cockspur Hawthorn", 5 = "Dogwood", 6 = "Carolina Silverbell", 7 = "Yellowwood", 8 = "Eastern Redbud", 9 = "Redmaple", 10 = "American Linden", 11 = "Spicebush", 12 = "Ninebark", 13 = "Blueberry", 14 = "Blackberry", 15 = "Piedmont azalea", 16 = "Arrowwood viburnum", 17 = "Red chokeberry", 18 = "Beautyberry", 19 = "New jersey tea", 20 = "Wild hydrangea", 21 = "Shrubby St. John's wort", 22 = "Butterfly Weed", 23 = "Swamp Sunflower", 24 = "Purple Coneflower", 25 = "Joe-Pye Weed", 26 = "Blazing Star", 27 = "Wild Bergamot", 28 = "White Beard-tongue", 29 = "Ironweed", 30 = "White Baneberry", 31 = "Wild Columbine", 32 = "Jack-in-the-pulpit", 33 = "Wild Ginger", 34 = "Wild Geranium", 35 = "Alumroot", 36 = "Wild Blue Phlox", 37 = "Polemonium Reptans", 38 = "Foamflower", 39 = "Grass", 40 = "Generic", 41 = "Fern", 42 = "CrackGrass", 43 = "WallVines", 44 = "WallCracks", 45 = "Flowerbed", } Two things are wrong with this generated dump.  The first, and minor issue which does not result in syntax errors, is that the generated table is 0-indexed and not 1-indexed which lua operates on. The second, and major issue, is that Number = Value syntax directly is not possible in lua.  This is what's causing the loading errors. -- lua requires this syntax for numerical indexes, so the section should look like this: objects = { [1] = "American Holly", -- [...] [45] = "Flowerbed", } this file is generated by zombie.world.DictionaryData's saveAsText method.  Debugging the related string information (https://docs.oracle.com/javase/specs/jvms/se22/html/jvms-4.html#jvms-4.4.3) from the compiled class, one finds that the string being interpolated in this section of saveAsText's execution is: "\t\u0001 = \"\u0001\",\u0001" Which, when interpolated with a key of 0, a value of "American Holly" (without quotes), and a local system's newline (here we use "\n" for simplicity) would give an example of: "\t0 = \"American Holly\",\n" Which matches the currently syntactically erroneous lua file. It should be: "\t[\u0001] = \"\u0001\",\u0001" which with the above example interpolation would give "\t[0] = \"American Holly\",\n" Which, along with some further knowledge of Java's instruction set allows us to arrive at our solution: Fix (for the syntax errors):   // zombie.world.DictionaryData // nb: variable names are ad hoc based on my notes and may not represent those in actual The Indie Store codebases public class DictionaryData { // [...] protected void saveAsText(String readableSaveFileName) throws IOException, WorldDictionaryException { // [...] // the foor loop is extrapolated based on my notes, // in decompiled code this would show as a while(hasNext) called on an iterator. // actual code may vary. for(object in objectIdToNameMap) { readableSaveWriter.write("\t" + object.getKey() + " = \"" + object.getValue() + "\"," + System.lineSeperator()); } // [...] } /* N.B. The instantiation of the readableSaveWriter variable (a java.io.FileWriter instance) * on a java.io.File (opened on the readableSaveFileName argument) is omitted for brevity, as are any related * try blocks or error handling, as that is beyond the scope of this report, and is all working perfectly well. */ Should be:   // zombie.world.DictionaryData // nb: above comments in previous code-section apply, but are omitted for brevity public class DictionaryData { // [...] protected void saveAsText(String readableSaveFileName) throws IOException, WorldDictionaryException { // [...] for(object in objectIdToNameMap) { readableSaveWriter.write("\t[" + object.getKey() + "] = \"" + object.getValue() + "\"," + System.lineSeperator()); } // [...] }  
    • but a nurse hat tho. 
×
×
  • Create New...