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.

Yandersen

Want to replace the vanilla Mine with some better model and smaller footprint. Wish it to be just an entrance sticking out of the mountain. Used the Tiny Mine mod and liked it - almost what I want the vanilla' mine to be replaced with, but some improvements are required, IMO. I suggest using the terraform component from the vanilla' Tunnel entrance to form a steep hill entry point. This will minimize the required model size of the tunnel forming an entrance, leading to smaller overall footprint. My semi-successfull attempt is a combo of the IronMine and TunnelStart forming a nice small entry with just a 5x3 footprint (see the attachments).

To make it into a full mod I need help. Requesting a small model for the mine entry (fitting into 3x3 footprint size) with 30 "use" and 4 "build" points for interactions to replace the TunnelStart model I temporary use.
Few things worth noting in the modified IronMine.rsc file attached. Most importantly, the terraform component I modified:
TerraformDescription terraform
{
PathBits _ceilingModifyBits = Faster | Fast | Normal | Obstacle | Walkable | Unusable;
PathBits _floorModifyBits = Faster | Fast | Normal | Obstacle | Walkable | Unusable;
PickingMesh _floorMesh = "Models\Bridges\Tunnel\TunnelFloor.rsc";
PickingMesh _ceilingMesh = "Models\Bridges\Tunnel\TunnelCeiling.rsc";
}

This ensures that terraforming modifies all subjected tiles with no exceptions. My testing shows that on 5x3 footprint the terraformer forms a step edge right at the central tile. Seems like the subjected tiles are those (marked as "X" and unaffected are "0"):
0XXX0
0XXX0 ->tunnel exit
0XXX0

Note that exit is to the right in controversy to most buildings' layouts.
Terraforming ensures that "H" tile is lifted uphigh and "G" is on the ground level with "S" being the transition slope tile:
0XXX0
0HSG0 ->tunnel exit
0XXX0

In the attached image the road tile sticking out corresponds to "G" tile on the map. Note how it is lowered on the Mine that is built.
Therefore for the requested tunnel model (that should decorate central 3x3 area) the work location for miners should be right between "S" and "G" points, and the black curtain plane covering the exit should be placed at the center of the tile "G". This will remove the need of the use of floor component ensuring the working bannies will stand on the low ground level invisible from the outside.
Such a deeply specific request. Can anyone make such a model for the mine tunnel entry?

Yandersen

Some progress made, some changes to the initial idea happened.
First, the minimal footprint of 5x3 didn't worked well as expected due to wierd pathing issues, but 7x5 proved to be sufficient. I had to ununiformly rescale the model Kid designed for the initial footprint, so it looks stretched now. But overall, things are working. You can test it yourself.

Technical info:

build points (4) are at locations: {3.0;-1.5}, {3.0;-0.5}, {3.0;0.5}, {3.0;1.5};
create points (4) are at locations: {3;-2}, {3;-1}, {3;1}, {3;2};
use points (30) are all at location: {0.5;0};

Terraformer seem to ensure that terrain vertices located at these coordinates
{-0.5;-0.5}, {-1.5;-0.5}, {-2.5;-0.5},
{-0.5; 0.5}, {-1.5; 0.5}, {-2.5; 0.5},

have height z>2.0 and those vertices
{ 0.5;-0.5}, { 1.5;-0.5},
{ 0.5; 0.5}, { 1.5; 0.5},

are at the ground level (z=0.0) - so the flat tile is this one now:

######.
######.
###_G_.  -> exit (front)
######.
######.

Model was rescaled to push black curtain plane slightly upfront (crossing x axis at at 1.5). This way the curtain is on the front edge of G tile at 1.0 distance away from the work positions it hides (passing through the back edge of the G tile).

If Kid or anyone else is willing to redo the model, please let me know and I will make some sketch pic with detailed description first.

Discrepancy

 :) very good.

Question, if you are already using blender to alter the models, why not try to redo or adjust it yourself? you have lots of particular ideas it might be easier.

Also I don't think putting the build, create or use points at different heights make any difference. The citizens will just go to the natural ground height or otherwise use a floor once the building is constructed.

RedKetchup

Quote from: Discrepancy on January 24, 2018, 04:25:49 PM

Also I don't think putting the build, create or use points at different heights make any difference. The citizens will just go to the natural ground height or otherwise use a floor once the building is constructed.

they will always follow the natural ground like you said. The floor mesh first, and then the natural ground
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

I know that, no idea why you mention this?.. BTW, about the floor mesh. How exactly does it work and built? What kind of structure is it assumed to have? Is it a grid of points, or surface or it can be any mesh?
Quote from: Discrepancy on January 24, 2018, 04:25:49 PMQuestion, if you are already using blender to alter the models, why not try to redo or adjust it yourself? you have lots of particular ideas it might be easier.
No much time to spare. By the time I will learn how to use the software well enough to draw sweet things the inspiration will be long gone and all ideas forgotten. I am a factory worker, not a designer/modeller, I do not do such things on regular basis, you know, just screwing nuts most of the day.  :)

Discrepancy

It can be any mesh for a floor, just a plane normally. The game won't register it until the building is constructed. It remains invisible to the player.

RedKetchup

Quote from: Yandersen on January 25, 2018, 05:21:01 AM
No much time to spare. By the time I will learn how to use the software well enough to draw sweet things the inspiration will be long gone and all ideas forgotten. I am a factory worker, not a designer/modeller, I do not do such things on regular basis, you know, just screwing nuts most of the day.  :)

it is with time and experience you get better :)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

Quote from: Discrepancy on January 25, 2018, 05:26:57 AM
It can be any mesh for a floor, just a plane normally. The game won't register it until the building is constructed. It remains invisible to the player.
What about the size? Should it cover the whole footprint or not? If not, what is the pathing behavior on edges? When height calculated from floor mesh and terrain tile are different, does banny "jumps"? Or the highest/lowest from either terrain tile "z" or mesh-projection' "z" is taken? See, thing is I can't use the component until I have clear understanding of how it works... :-[

RedKetchup

this game has no idea of what is "height" . the game is 3D , yeah, but the pathing is 2D. so yeah they will jump in a wink of the eye even if 1000' in the air.

i usually take my mesh and i delete everything that is not  a top plane and everything that is below it.


edit: an example of floor, my floor of my open sky mine
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

OK, thanks. So {x;y} are projected vertically onto the mesh and "z" is taken. But still it is not clear which of "z" is taken - from the mesh explicitly with no regards to corresponding terrain ground "z" at that location, or the higher between floor's "z" and tile' "z"? Or the lower? Which one? I mean, what if the floor mesh is actually below the ground surface - will bannies fall through the ground? Because this is what I actually may need to achieve - to make them walk in a little bit through the mountain. Plus pathing question: the walkable/unusable tiles flags still have permission/restriction effects when floor is used?

RedKetchup

if the ground is higher than your floor they will walk on the ground, unless you use the tunnel terraform and set the floor as the floor

the ____ in the map desc function = they can go
the #### in the map desc = it is a wall.

but the bannies will often send you to hell and do what they want ^^
you should experiment instead of too much thinking and see how they react :D

and also they cut corners very very much ^^
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Yandersen

Oh, I get it now, thank you, oh guru! So it is exactly opposite from what I need in my case...
Um, what about ceiling component? Does it exists and works exactly opposite to floor component (I mean, overwriting "height" of terrain in case it is below it)?
Quote from: RedKetchup on January 25, 2018, 07:55:56 AMbut the bannies will often send you to hell and do what they want ^^
you should experiment instead of too much thinking and see how they react :D
Those experiments made me guessing that they may ignore a single unwalkable tile if it is located between two walkable ones. It's like at least two of "##" may stop a banny from walking over. May it be true?

RedKetchup

the ceilling will put ground back over the mesh depending how high you put your plane, if your plane is under the mountain, the natural ground will be dominent and ontop

Quote from: Yandersen on January 25, 2018, 08:07:30 AM
Those experiments made me guessing that they may ignore a single unwalkable tile if it is located between two walkable ones. It's like at least two of "##" may stop a banny from walking over. May it be true?

they should stop but like i said , they love to laugh in our face ^^

in the screenshot there is a wall of ######### 4 row thick and they still love to laugh at me ^^
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Tom Sawyer

Actually # marks forbidden tiles to walk. But if there are use or create points at these tiles they ignore it. I could solve such issues in the last version of my cabin workplaces and dairy hut. So if you have clean points then bannies behave and will not cross any #  :)

Yandersen

Quote from: Tom Sawyer on January 25, 2018, 08:35:40 AM
Actually # marks forbidden tiles to walk. But if there are use or create points at these tiles they ignore it. I could solve such issues in the last version of my cabin workplaces and dairy hut. So if you have clean points then bannies behave and will not cross any #  :)
Guaranteed? Hm. Simple 3x3 example:

###
#__
###

Let's say I have a use point right at the center {0;0}. Then under no circumstances bannies will walk up, left or down - only to the right, correct? And what if I move the use point half tile to the left {-0.5;}, so it is right between the forbidden and walkable tiles? Then both will be walkable and bannies will move to the left and right with no difference then? But still no way they attempt to escape up or down? Is it like that for sure? Cuz I had this kind of situation where use point was in the middle between forbidden and walkable tiles and bannies stuck in the forbidden tile like they could move there, but not out. From the other hand, I also tried to place use point in the middle of the forbidden tile, adjacent to walkable one, and in that case bannies just refused to go to work at that building.

Anyway, more practical would be to ask if the use/create/build points MUST be placed in the middle of the tiles or can they be in any spot inside or the edge? Any known bugs there?
Aaand few more q about the terraforming... Does it updates the tile "natural" flags when terrain changes (like if a tile on the slope of the mountain flattened to the ground and then building demolished)? Do previous and current "natural" tile flags have any effect on pathing? Like if I place a building over mountain and set it's footprint to "all walkable" - will the mountain slope under the building will actually become walkable?