Comments (14)
The maximum chests is 1k, so the behavior you're explaining correlates with that. If whatever software doesn't honor the 1k limit they can write up to 32k chests and the world file will still be valid. The server will even try to load whatever it says, but there's only space allocated for 1k so it will overflow going over that. For this I'm not so sure I see a bug here. But I am interested in hearing that vanilla will load over 1k chests without spilling its guts out. If that's the case, and there are in fact over 1k chests, I'd like to see a copy of the world file before and after being saved with TEdit.
from tsapi.
But its not like Tedit is adding more chests... just must save them another way or something... some way that TSAPI doesnt like.
In either case. Vanilla Terraria server still loads the world. I dont think all the chests will work... but it still loads the map without crashing, definately.
Here is a copy of my Original world file, which loads in TSAPI and Vanilla. It has 1045 chests. (As per above num3 represents chest count)
http://vps.tls.id.au/orig.wld
Here is the world, literally no changes made, just opened and saved in a version of TEdit.
http://vps.tls.id.au/tedit.wld
If you open the world again in Tedit and just Select and delete 45~ chests and save it again, the world will load in TSAPI again.
from tsapi.
I'm showing 997 on orig.wld (revision 1120) but 1045 on tedit.wld (revision 1121)
from tsapi.
yeah, so it must just ignore them on save in tsapi so it can load it later but actually try save them in tedit
But when loading, shouldnt TSAPI ignore the excess chests also, as vanilla does?
Maybe print out a list of all the x,y pos of all 997 and 1045 chests and see which ones it is discarding, perhaps they're empty or something?
I've not seen it myself but apparently when trying to place the over 1000th chest in game it tells you there is a limit?
To test, you can even download a copy of Tedit (its a very VERY usefull tool imho) and open my orig world and save it again.
from tsapi.
Inside the world file is an integer indicating how many chests there are. I'm reading that number and not loading the map with the server. The TEdit saved file has a different value at that offset despite you saying nothing was changed
from tsapi.
Literrally nothing was changed... You can open it in Tedit and save it again to see. It must just try save these extra chests...
Clearly it's ignoring them for some reason. Oblously becasue the count exceeds 1000, but which ones does it ignore? are there timestamp, just start from x0, y0 and stop when it gets to a 1000, does it not count empty ones? idk?
All i know is that it won't load in TSAPI... :(
I might see if i can pull a list of of their positions and compare to see which ones its not counting.
then check in game or in tedit to see if said chests are openable (in game) or contain items (in game or tedit)
from tsapi.
Sure it looks like this https://gist.github.com/hastinbe/69b90b7def5b8fb56953
from tsapi.
Cool...
So Orig:
http://pastebin.com/YhCmbUNK
and TEdit:
http://pastebin.com/7nydpTzG
From this, it seems that the only difference is Orig ignores/drops chests 998 to 1045, the rest are the same
Must be the number/count of chests, since the X,Y coords of chests 998 to 1045 are scattered all over the map
If all it's doing is dropping them, can we have TSAPI just ignore them as well on load? instead of trying and crashing?
Maybe these chests are a different kind of chest that TSAPI doesnt know about or vise versa? a Bunch new containers were added with 1.3
from tsapi.
Just some feedback. I'm not able to load tedit.wld with either official or TSAPI. I've disassembled official and it loads the chest data the same as TSAPI. I've also looked at the TEdit source and it writes all the chest data it has without the limit. Maps created or saved with more than 1k chests will simply be a problem for servers based off official that use the limit.
Now why TEdit is saving 1045 chests in a world file that has 997 is something you might want to bring up with them. TSAPI also does some sanity checks and will flag chests that have invalid tiles, these chests will not be saved, TEdit doesn't do this check. It may or may not be related to the mismatch.
from tsapi.
Ok, So I checked out some of the Chests that exist in the TEdit file, but not the Original...
X=5881 Y=444 - Skyware Dresser
X=7137 Y=412 - Wooden Dresser
X=7626 Y=534 - Spooky Dresser
X=7935 Y=536 - Skyware Dresser
X=8039 Y=372 - Boreal Wood Dresser
They all seem to be dressers....
These Dressers also open and contain items in the orig version too.. how is it then that they're valid containers but don't get saved to the world file?
Raised issue with TEdit for cross reference:
TEdit/Terraria-Map-Editor#698
from tsapi.
@tysonstrange see https://github.com/TEdit/Terraria-Map-Editor/blob/bf61469b669a14c237a869f143916df04ef57f38/TEditXna/Terraria/World.FileV2.cs#L573-L574
This is similar to the check that TSAPI does but it's commented out here in TEdit, it very well could be why. I don't have Windows to compile TEdit and try it out, but it might be worth a shot for you
from tsapi.
Duly noted. Ill pass this info on to the TEdit Issue I logged and test it later.
I'm still confused as to how/why the dressers work in game, but aren't recorded as a chest?
from tsapi.
It's a failing in both Terraria and TEdit for different reasons..... When 1.3.0.1 happened all dressers became storage, When Terraria loads a world file from pre 1.3.0.1 (version < 115) is runs FixDresserChests at the end of the LoadChests function, this converts dressers to chests, up to the 1000 chest limit. All dressers after that do not function as storage. You can pick up a non storage dresser, but will not be able to set it back down since you would be above the 1000 chest limit. If you pick up a storage item, you will be able to set it back down because the dressers are never checked again. The world will be saved in the current version and the FixDresserChests function will not run again, these non storage dressers will remain as non storage until picked up and placed again.
TEdit sees all dressers and chests as storage and makes them so and does the 'conversion' every time it loads the map, it currently doesn't have a check for a chest cap over 1000. Some of the contributors have tried to decide on the best way to handle, but haven't put a solution in the code yet. So TEdit fails but not notifying the user they are over 1000
from tsapi.
Vanilla issue. Don't know if it still exists, and no comments in over 2 years.
Closing
from tsapi.
Related Issues (20)
- Sand Sharks and their biome relatives skip a lot, even on localhost HOT 3
- API crashes on startup on Chinese language systems? HOT 6
- NPC's they are not spawning HOT 4
- Time Skipping is still a known issue. HOT 3
- Enable AppVeyor HOT 2
- Input text still mangled on Debian HOT 1
- ServerPlugins directory should be in the executing directory, not the working directory
- OTAPI needs to be updated HOT 2
- 0day crash on any packet HOT 1
- Master branch is really out of date and that's bad HOT 2
- Regression: Not possible to run bootstrapper with 1 click in VS2017
- Rename packet 82 HOT 13
- Add license HOT 1
- Separate mintaka patcher and publish patched otapi to nuget HOT 1
- Pass GameTime into GameUpdate and GamePostUpdate Hooks HOT 3
- GetDataEventArgs Length is greater by one than it should be. HOT 3
- No Terraria Server.EXE? HOT 1
- `ServerLeave` is not being invoked on `otapi3` HOT 2
- Dependency Dashboard
- Action Required: Fix Renovate Configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsapi.