News:

Welcome to World of Banished!

Main Menu

Improved Mine - work in progress

Started by Yandersen, January 21, 2018, 01:53:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RedKetchup

i suggest to put some pathing in your mesh that would represent your desc map so you can more easily figure out :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Tom Sawyer

Use points are used by workers to stand their while working or to drop raw materials and these locations are used exactly. Create points are the location of spawned resources in production buildings and a resource can only spawn in center of a tile. The game will choose the tile where your create point is closer. If a create point is above a forbidden tile then citizens ignore the #. So you should place create and use points only where bannies are allowed to walk and can reach it.

The walking rules of natural terrain can be overwritten by a building. So you can force workers to walk in water by a building with allowed tiles and use points there. That's the way of the crayfishing tool in the North mod and it's also used by mines.

In your example they will only walk from the right into your building. The only thing you will notice is that they like to use forbidden tiles to make round walkways. So thy will walk over the right tiles above and below. I also suggest to play around with these things in game to understand how it works. :)

Yandersen

Thank you very much guys for the detailed explanations. Will work with this info and see what I can achieve. Will try to make my own models of the floors for terraformer instead of using the standard ones from tunnel and minimize the footprint by this. Then try it all without building model to clearly see how bannies behave and then will think about the model...

RedKetchup

Quote from: Yandersen on January 26, 2018, 07:54:14 PM
Will try to make my own models of the floors for terraformer instead of using the standard ones from tunnel and minimize the footprint by this.

dont try to minimize too much :P a 3x3 mine is a bit unrealistic in this game :P
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

Not 3x3, RK, of course, but 6x3 seem to be sufficient:

PathBits _placeBitArray
[
Normal | Obstacle | Fast | Faster,
Normal | Obstacle | Unusable | Walkable, 
Unusable | Walkable,
Unusable,
]
String _placeBitmap =
"322220
321110
322220";

String _pathBitmap =
"#####.
##___.
#####.";


With this I decided to move working points at {-0.9;0.0} and the black curtain plane will hide them 0.9 units away (crossing x axis at 0.0).

Therefore a floor model for the terraforming component needs to lower those three tiles to the ground level ("G"):

#####.
##GGG.
#####.


In other words, eight of the terrain tile' vertices located at the corners of these tiles need to be forced to have z=0. And here I encountered problem not sure how to interpret... I made a plane in Blender, being 3.2x1.2 in size (added extra 0.1 width to ensure the tile vertices projected inside the plane' area, not on edges). But the result in game turned to be quite odd: looks like only 4 vertices were actually affected - those which seem to correspond to the corners of the floor plane. So my guess is that the terrain tile' vertices affected are kinda matched to the closest vertices on the floor mesh, and since a simple plane has only 4 vertices, then only matching ones on terrain were affected. Am I guessing right? If so, then the floor model must be tesselated to have at least 8 vertices in my case...

RedKetchup

you cannot terraform outside your footprint, maybe you should solve it by making your footprint larger even if there is no mesh there
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

Why do you think I am trying to terraform outside the footprint?..

Anyway, I figured out how terraforming works with grid mesh as a floor object. Unlike the plane, grid worked fine. I made the grid mesh subdivided to ensure it's vertices correspond to the vertices of the terrain. Seems like I was right - terraformer doesn't project the terrain into the mesh to determine z of the vertices - instead, for each terrain vertex it finds closest vertex from the mesh and uses it's z. Therefore if we take a simple quad (4 vertices) and stretch it over the size of the whole footprint, only 4 terrain vertices at the corners of the footprint will be affected. To ensure proper terraforming one needs to split the floor quad inserting intermediate vertices corresponding in x&y locations to the terrain vertices at those locations.

RedKetchup

Quote from: Yandersen on January 27, 2018, 01:36:57 AM
Why do you think I am trying to terraform outside the footprint?..



i am talking about it because in the past, for my own experience, i lost a couple of hours on this :S i've got to find out that isnt working properly in my brain ^^
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

Hey, pipulz, some progress here! The alpha-version is up for a test and discussion now. Mod attached.

Seems like the footprint of 6x3 is the best option I will stuck with because it allows to restrict the mine placement with a very good consistency over the mountain slope: simply saying, the placement map requires 3 unusable tiles on one end and 3 normal/road tiles on the other.

There are 3 floored tiles now ("G"):

#####.
#GGG_.
#####.

The floor shifted to be at 0.5 now instead of ground level (0.0). Model lifted up by dz=0.5 units as well and moved further into mountain (dx=-1.5). Use points shifted to the left by 1.0 unit (now those are at {-1.95;0.0}).

I also get some XP in blender - I can move vertices now! ;D So I worked over the model Kid did for me before - pushed the black curtain deeper and moved the decorative bucket slightly away from the slope. Also I shrunk+doubled&flipped the wood texture so that planks do not look so stretched.

Bad thing is that I had to use the tiled decal texture from the stockpile. If anyone could make one for me, I would greatly appreciate. Assuming it shall cover 6x3 footprint I wish it to be like that ("T"=transparent, "W"=walking road, "R"=rocky):

TRRRRT
TWWWWT
TRRRRT

Yandersen

Um, guys, Kid got busy with his own mod and I am not good with the modelling... But I know for sure there r plenty of amazing talented modellers lurking around here. Why don't we try to work together on this? Didn't I inspired anyone for some art work? Would be so awesome to hook up with somebody to turn the model of the mine into smg like this:



or this:



Here is the link to the project source if anyone would like to join the developement:
https://drive.google.com/drive/folders/1x6qM3UZp2XJezKQ986FNpJwckb2xYJUl

Discrepancy


Discrepancy


@Yandersen,
on the left is the new mine I have made.
on the right is the mine @kid1293 made for the mod, i just added another as f variant.
I also made a footprint.

I will send you the files shortly.

kid1293


Yandersen

Wow, that looks SOOOOOO AMAZING!!! Can't wait to get it into the complete mod version! Thank you so much! This will be the best mining mod ever! I still have some ideas of improvement for future, but let's hold on to this for now... Just hold on...

RedKetchup

Quote from: Yandersen on January 28, 2018, 04:29:01 AM
Wow, that looks SOOOOOO AMAZING!!! Can't wait to get it into the complete mod version! Thank you so much! This will be the best mining mod ever! I still have some ideas of improvement for future, but let's hold on to this for now... Just hold on...

Congratulations @Yandersen  !

i personally think that 3x3 (+3 in mountains that count for nothing) is way too small to compare the original 12x12 tiles and is alot OP, but it is my personal thoughts. Please don't see any bad intentions in that from me, everyone knows my thoughts about this^^)

again Congrats !!!!  :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .