Jump to content
  • 0

Hydrocraft: lost/missing items in containers after load


Eep²

Question

I play with Hydrocraft and in my house have many containers full of it (and the base game's) objects. I've been editing the various \media\scripts\*.txt files to clean up formatting (spaces/tabs). When I loaded my saved game last time I noticed Hydrocraft items in kitchen.txt and many other files were gone yet console.txt shows no errors in loading it. The previous load the items were there and I don't know what could have gotten messed up, corrupted, or whatever to cause this problem.

 

Any ideas? Thanks.

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

36 minutes ago, Eep² said:

I've been editing the various \media\scripts\*.txt files to clean up formatting (spaces/tabs)

 I thinks thats the reason.

When i made my mods its happen to me several time that i rename Itms or make changes in the script and the item ive got vanished in game.

Look around if the item is completly vanished from the game (look into containers you havnt loot). The Items should be there.

Link to comment
Share on other sites

The items are completely gone from my house and it's MANY (but not all) Hydrocraft items. It's very odd. Why would I lose all these items? I hadn't added any mods before or after this problem.

 

I also hate that this game doesn't also create multiple, time-staggered autosaves (and the ability to manually save), which could potentially prevent this problem from occurring by reloading an earlier save.

Link to comment
Share on other sites

But why would altering mod content (just cleaning up formatting) completely remove most of a mod's content from a saved game when it gives no console errors? The scripts with missing items are loaded fine.

Link to comment
Share on other sites

Only reason would be that you made a bigger change then you thought such as cutting out a parenthesis. Perhaps you are using the wrong encoding for the file (e.g. Linux end line vs. windows end lines). I don't really know.

 

But, no item definition means no item which means it gets removed on load. changing item types in particular will break either the chunk item is on or the character containing the item.

Link to comment
Share on other sites

Except I never edited Hydrocraft\media\scripts\kitchen.txt so why would items in it not be showing up in my saved game that I had previously collected? Not ALL Hydrocraft items are missing but many are. I find it hard to believe a missing curly brace ("{", "}" not parentheses: "(", ")") in ONE file could prevent OTHER file items from showing up in-game. And, again, the console would show if an item's definition was missing a brace.

 

Also, encoding isn't the issue since I'm on Windows 7 (which, oddly, the console says "WARNING: Found unknown Windows version: Windows 7") but that's not the issue here.

Link to comment
Share on other sites

Changes to scripts will precipitate to other files on load because they do not truly exist in separate files in memory. It is not as though Hydro has practiced good coding practices by using multiple different tables (modules) when he copy, pasted, and renamed the original mods.

 

So, don't mess with mods if you want to preserve your saves that include those mods.

 

It's basic cause and effect: you changed something and it had an effect. Don't do that.

Link to comment
Share on other sites

Well, I want to improve upon Hydrocraft because some of its things don't make sense. Anyway, the console should list any errors in \media\scripts\*.txt (technically not media since not graphics/sound OR scripts since not LUA...but whatever, PZ) files so you're not helping me in saying "don't do that" when, obviously, it's already been done and I need to figure out what I perhaps inadvertently messed up but I can't figure it out. I've looked through all the modified files since I noticed missing items but nothing looks out of order.

Link to comment
Share on other sites

Well, I don't really know what you expect any of us on the forum to be able to do about this but ...

 

Start a new game and see if those items exist in the world. it might be easier to do this in multiplayer so that you can just try spawning the items directly with /additem

 

If they do work, then congratulations -- there's no problem and I am wrong - why that would happen, I wouldn't know, even when modifying hydrocraft for my severs, it never occurred. Are you really changing only the spaces/tabs/line endings and not the order of variables, names, values, commas, .ect? It probably just means that people will have to start and save games when they use your modified version of Hydrocraft, in any case.

 

If the items don't show up or additem errors out, then there's a problem with your edits. Then you've gone too far, too fast, and will probably have to start again if you can't figure it out yourself. Use tools like file compare and git to avoid these situations in the future. Then make small changes and test often. I highly recommend using itemzed, to make your own version of Hydrocraft rather than presumably overriding the mod directly (a recipe to lose all your changes if the mod ever updates, if you didn't copy the files out of the steam directory and into the user directory).

Link to comment
Share on other sites

I started a new game the other day and am noticing significantly less items in containers in general so it looks like not all Hydrocraft items are showing up still. I still don't understand how any formatting edits I might have done are still not throwing console errors if a curly brace, comma, or variable was inadvertantly changed... Perhaps logs.zip would yield more detailed info but geez this game's file/directory structure is so convoluted and screwy it's ridiculous. I hate Java...

Link to comment
Share on other sites

Because either the error isn't tested for, the console doesn't actually show the errors that you think it shows, or a series of edits resulted in syntactically correct code that is logically flawed.

 

Computers, being dumb things that do exactly what you tell them to, are not adaptable to situations that are unexpected.

 

None of which has anything to do with the game's file structure (the way Steam sets up mods) or involves the Java programming language (the scripts are not in java).

Link to comment
Share on other sites

OK, I've played enough of a new sandbox game to see that the missing Hydrocraft objects in my other sandbox game are in THIS sandbox game. So, I guess, somehow my saved game got corrupt somehow. I do remember running a contig (defragmentation) on the whole C:\Users\<user>\Zomboid (sub)folders and files but that shouldn't've corrupted the saved game. <sarcasm>I mean, gee, 54,800+ items for the saved game file, 600+MB, what could possibly go wrong to corrupt ANY of those files?</sarcasm> The saved game file structure DESPERATELY needs optimization.

 

Update: playing more of my original sandbox game I am seeing most, if not all, Hydrocraft items so I'm still not sure why my "safe house" containers were missing so many Hydrocraft items. Annoying having to recollect all of them...

Link to comment
Share on other sites

21 hours ago, EnigmaGrey said:

Because either the error isn't tested for, the console doesn't actually show the errors that you think it shows, or a series of edits resulted in syntactically correct code that is logically flawed.

 

Computers, being dumb things that do exactly what you tell them to, are not adaptable to situations that are unexpected.

 

None of which has anything to do with the game's file structure (the way Steam sets up mods) or involves the Java programming language (the scripts are not in java).

 

Computers are perfectly capable of at least KNOWING when an unexpected situation occurs--this is called a bug or error. The programmer just needs to be competent enough to CATCH the error when it occurs and report it accordingly. The scripts aren't in Java but the "engine" is. By file structure I mean file/directory organization and layout (i.e. the absurd amount of saved game files, all the .class files, the separate x32/x64 files, including non-media files in a "media" folder, etc).

Link to comment
Share on other sites

Seriously?

 

No, if you mess up during your playtime with Hydrocraft's code in such a manner as you've apparently done, the programmer isn't going to be able to save your ass.

 

The "engine" is a mix of Java, C++, and Lua. Even now, it has no bearing on your own incompetence in modifying another person's code.

 

The file structure does not, either. There are no standard layouts for a game's file structure.

 

Stop trying to pass the buck.

Link to comment
Share on other sites

1 hour ago, Eep² said:

Wow, Enigma, you're an ass. Moderator? More like instigator...

 

I wasn't modifying any code. Stop trying to come off as a know-it-all because you don't.

Sorry, but you're putting on a very off-putting attitude as a whole. Several posts of you knowing (better) how to properly make a game, how things should work, or where to put the focus on in development, all contributing to paint a picture of a user providing destructive feedback rather than constructive, either by intention or not. 

It's this whole know-it-all-and-better-attitude that usually doesn't garner warm welcomes, as you point out.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...