![Smile :)](./images/smilies/icon_e_smile.gif)
LuaSurface::get_tileproperties
LuaSurface::get_tileproperties
Does anyone use this function on LuaSurface? I was working on map generation earlier and found it was broken. Before I spend the time to fix it I was wondering if anyone actually uses it or if I could just remove it ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
If you want to get ahold of me I'm almost always on Discord.
Re: LuaSurface::get_tileproperties
I don't but I think this guy might have used it: viewtopic.php?f=25&t=30628. Though he seems to be hard to reach.
And aubergine18 might have used it as well. I pm-ed him about this post.![Wink ;)](./images/smilies/icon_e_wink.gif)
And aubergine18 might have used it as well. I pm-ed him about this post.
![Wink ;)](./images/smilies/icon_e_wink.gif)
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: LuaSurface::get_tileproperties
What aspects of it are broken?
I used it in this sensor mod: https://mods.factorio.com/mods/aubergin ... _elev_temp (0.13 version)
While testing that mod I did notice that there seemed to be no correlation between the tile property values and what was rendered on the map for the most part. Maybe it's mostly based on elevation and the other values have little to no effect?
I'm planning to use it in other mods I've been tinkering with for example height and temperature as buffs for radio signal on a radio mast.
I've also been tinkering with a map overlay during entity placement. For example, on a stone water well entity, I've used a grid of flying-text around the player placing the entity that depicts the amount of water (moisture) for each tile - being able to query tile properties was useful in that respect as it meant I didn't have to worry about creating my own values and storing them. I want placement of the well to have an effect on the amount of water it produces (although I've not yet found a way to alter its production rate that avoids on_tick handler).
I've not tried setting values but was considering something that sets moisture level in an entity that could drain or fill lakes, etc.
I've not thought of any uses for roughness value (yet). I've no idea what tier_from_start is.
I used it in this sensor mod: https://mods.factorio.com/mods/aubergin ... _elev_temp (0.13 version)
While testing that mod I did notice that there seemed to be no correlation between the tile property values and what was rendered on the map for the most part. Maybe it's mostly based on elevation and the other values have little to no effect?
I'm planning to use it in other mods I've been tinkering with for example height and temperature as buffs for radio signal on a radio mast.
I've also been tinkering with a map overlay during entity placement. For example, on a stone water well entity, I've used a grid of flying-text around the player placing the entity that depicts the amount of water (moisture) for each tile - being able to query tile properties was useful in that respect as it meant I didn't have to worry about creating my own values and storing them. I want placement of the well to have an effect on the amount of water it produces (although I've not yet found a way to alter its production rate that avoids on_tick handler).
I've not tried setting values but was considering something that sets moisture level in an entity that could drain or fill lakes, etc.
I've not thought of any uses for roughness value (yet). I've no idea what tier_from_start is.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: LuaSurface::get_tileproperties
It possibly uses deleted memory depending on how long you wait to use the properties or how much chunk generation is happening.aubergine18 wrote:What aspects of it are broken?
If you want to get ahold of me I'm almost always on Discord.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: LuaSurface::get_tileproperties
Does that issue apply to all the properties of a LuaTileProperties object?
When I was doing the moisture overlay, it seemed to consistently show the same values as I was running round the map - for example, I could return to a previously visited location after several minutes and the overlay would look the same (I wasn't storing the values, I was always pulling from get_tileproperties() in a grid around player location).
When I was doing the moisture overlay, it seemed to consistently show the same values as I was running round the map - for example, I could return to a previously visited location after several minutes and the overlay would look the same (I wasn't storing the values, I was always pulling from get_tileproperties() in a grid around player location).
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: LuaSurface::get_tileproperties
The values for a given position are always identical for the same map seed. That's the entire point of themaubergine18 wrote:Does that issue apply to all the properties of a LuaTileProperties object?
When I was doing the moisture overlay, it seemed to consistently show the same values as I was running round the map - for example, I could return to a previously visited location after several minutes and the overlay would look the same (I wasn't storing the values, I was always pulling from get_tileproperties() in a grid around player location).
![Razz :P](./images/smilies/icon_razz.gif)
If you want to get ahold of me I'm almost always on Discord.