leberechtreinhold / dba3_tts

A module for playing De Bellis Antiquitatis 3 on Tabletop Simulator
https://steamcommunity.com/sharedfiles/filedetails/?id=2105272640
MIT License
3 stars 2 forks source link

Hide trees when base intersects with it #18

Open marcpawl opened 3 years ago

marcpawl commented 3 years ago

When a base is "in the trees", it is hard to see. On a gaming table we would move the trees out of the way, and then put them back when the base has moved.

Have the trees become invisible when there is a collision and then visible when the collision is no longer occuring.

marcpawl commented 3 years ago

I have a proof of concept in https://github.com/marcpawl/dba3_tts.git 00014_hide_trees. I will clean it up for a push request.

leberechtreinhold commented 3 years ago

I'm not entirely convinced on the need of this feature. For one, because collisions on TTS are putting more resources and can be finicky, although that shouldn't be much of a problem. The other is objects selected already have a highlight making them easy enough to see. If somone is having too much trouble, they can already have an always on outline by creating an army with the specific color. And if all that is not enough, the terrain can be spawned purely on 2d without trees without any way of confusion.

That said I'm not opposed to it, and if you have it working I will merge it when it's clean it, but I think we should add a toggle for it, for screenshots and for those that prefer the trees being clearly visible.

Note, seems you have created that branch from the unmerged PR. I have still to see what's wrong with that branch because the error when dropping the camp still (rarely) happens there. I'm not sure if it's anything from the branch, because the code doesn't seem like it shouldn't do anything, but I cannot reproduce with the master...

marcpawl commented 3 years ago

https://youtu.be/-gjmQn7zEoo for proof of concept.

I have been thinking of the toggle and totally agree that there should be something to disable the feature, but not sure where to put it. I would not like to have it in the menu on the RHS since it occupies real estate which already is pretty small when playing on a laptop. Maybe a toggle switch on the the board's popup menu? I was thinking of a card or token that could be flipped over, initially spawned where the terrain tags are.

leberechtreinhold commented 3 years ago

Below the 3D terrain checkbox would be a good place I think, with interactable=true only with that option selected.