blindcoder Posted March 25, 2015 Share Posted March 25, 2015 Hi. How is it determined from the map if the water on a tile is tainted or not?Can mappers decide this on a per-tile basis, or is it watertile == tainted? Link to comment Share on other sites More sharing options...
valrix Posted March 25, 2015 Share Posted March 25, 2015 I'd post code if at my desk, but if I remember right you'll want to check out the ISWorldObjectContextMenu.lua file for that. Link to comment Share on other sites More sharing options...
blindcoder Posted March 25, 2015 Author Share Posted March 25, 2015 I'd post code if at my desk, but if I remember right you'll want to check out the ISWorldObjectContextMenu.lua file for that. I know how to get the states (square:Is(IsoFlagType.Tainted)), but I want to know if every water tile is automatically tainted, or if the map creator can define this. Link to comment Share on other sites More sharing options...
valrix Posted March 25, 2015 Share Posted March 25, 2015 It looks like you can remove it by calling UnSet() on it. So maybe on LoadGridSquare if the square is found in the safe list you can callsquare:getProperties():UnSet(IsoFlagType.Tainted);http://theindiestone.com/zomboidjavadocs/zombie/core/properties/PropertyContainer.html Link to comment Share on other sites More sharing options...
blindcoder Posted March 26, 2015 Author Share Posted March 26, 2015 Still not what I'm asking. I'm asking about the INITIAL state of the squares when the game is first started. How is this initial state determined? Link to comment Share on other sites More sharing options...
valrix Posted March 26, 2015 Share Posted March 26, 2015 My bad, for some reason I didn't understand the initial question. To be honest, I haven't played around with the map/tile editor, so I don't know how they work. However, from what I've gleaned off the code, it looks like the initial tainted state is stored in one of these .tiles map definition files. Whether it does it per-tile, or per-tile-definition, I don't know.media/newtiledefinitions.tilesnewtiledefinitions_4.tilestiledefinitions.tilestiledefinitions_4.tilestiledefinitions_erosion.tiles Link to comment Share on other sites More sharing options...
Suomiboi Posted March 27, 2015 Share Posted March 27, 2015 The tile definition editor itself doesn't seem to have any modifier for tainted water per se. It only defines if and how much a tile holds water. And I also checked the tiledefinitions in a text editor, but they don't give any info on the taintiness, again only water amounts. Link to comment Share on other sites More sharing options...
EnigmaGrey Posted March 27, 2015 Share Posted March 27, 2015 Looks like tiles are flagged: C:\Users\EG\Desktop\Build31\zombie\iso\SpriteDetails\IsoFlagType.java (2 hits) Line 73: public static final IsoFlagType taintedWater = new IsoFlagType("taintedWater", 66, 66); Line 73: public static final IsoFlagType taintedWater = new IsoFlagType("taintedWater", 66, 66);Doesn't look like it's set by the game itself, though. Must be in the map files. Link to comment Share on other sites More sharing options...
blindcoder Posted March 28, 2015 Author Share Posted March 28, 2015 Looks like tiles are flagged: C:\Users\EG\Desktop\Build31\zombie\iso\SpriteDetails\IsoFlagType.java (2 hits) Line 73: public static final IsoFlagType taintedWater = new IsoFlagType("taintedWater", 66, 66); Line 73: public static final IsoFlagType taintedWater = new IsoFlagType("taintedWater", 66, 66);Doesn't look like it's set by the game itself, though. Must be in the map files. That's exactly what I was hoping for I'm trying to update my saltwater mod in this regard. Pondering whether to separate the still from the saltwater, too, that's why I was interested in this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now