.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Campaigns, Scenarios & Maps (http://forum.shrapnelgames.com/forumdisplay.php?f=106)
-   -   Multi-layer and hex buildings (http://forum.shrapnelgames.com/showthread.php?t=52723)

Karagin May 25th, 2021 06:46 PM

Multi-layer and hex buildings
 
I have noticed when placing multi-layered or hexed buildings that paved roads will appear in some of the hexes and are invisible. I found this out when I tried to put trees around the building I placed.

I used the Stone Buildings and went with multi-layered/hexed and had the building that looks like an apartment building.

Is this an intentional thing or no?

DRG May 25th, 2021 10:22 PM

Re: Multi-layer and hex buildings
 
1 Attachment(s)
not intentional and I suspect that is why some of the older scenario reports mention paved roads in strange spots usually involving buildings piled on buildings.


EDIT

I made an example that maybe can be debugged. Since it's being reported in scenarios that go right back to the beginning it may have been there since day 1

https://forum.shrapnelgames.com/atta...1&d=1621996672

It will go away when you add clear terrain to the hex that reports it but if it's the building registration hex you will lose the building. In this case, avoid piling buildings on other buildings but if you feel you have to then " tidy up" around it when you are done so yes it's "a bug" but it only seems to appear when buildings are piled together and the solution is "don't do that" but if you have to check the perimeter for reported road and clear it away with page 1 clear terrain

Karagin May 25th, 2021 10:49 PM

Re: Multi-layer and hex buildings
 
You get the spillage of the paved roads from just ONE multi-hex building. Any of the Larger buildings like the factory or airfield ones do it as well.

Karagin May 25th, 2021 10:57 PM

Re: Multi-layer and hex buildings
 
1 Attachment(s)
Attached is what I am referring to do. This is multi hex stone building with it's invisible road.

Karagin May 25th, 2021 10:59 PM

Re: Multi-layer and hex buildings
 
Also, it's on more than on facing in the same picture, it shows a paved road the hex on the right side next to the serrated-looking gray part in the supposed empty hex right next to hex 5,3.

zovs66 May 26th, 2021 04:25 AM

Re: Multi-layer and hex buildings
 
I looked at this as a feature and I just worked with it and have been very “creative “ with using it. So if this was fixed it would break a lot of my scenarios. In some cases I purposely stack buildings to get the right effect or will add roads, trees orchards, grass or crops to work with the feature.

So please don’t fix, since I am sure I have at least 75 or so scenarios where I stack. Maybe more because I stack and mix a lot of terrain.

DRG May 26th, 2021 08:09 AM

Re: Multi-layer and hex buildings
 
Quote:

Originally Posted by Karagin (Post 850425)
Attached is what I am referring to do. This is multi hex stone building with it's invisible road.

This is exactly what my example showed only with multi-stacked buildings but if we can get a single multi hex building doing it in a way that's repeatable then that can ( possibly ) be debugged.

I have not tested this yet but will hopefully in a couple days as RL takes precedence but you specified multi hex stone building..... have you noticed this with multi hex wood buildings as well?

DRG May 26th, 2021 08:13 AM

Re: Multi-layer and hex buildings
 
Quote:

Originally Posted by zovs66 (Post 850427)
I looked at this as a feature and I just worked with it and have been very “creative “ with using it. So if this was fixed it would break a lot of my scenarios. In some cases I purposely stack buildings to get the right effect or will add roads, trees orchards, grass or crops to work with the feature.

So please don’t fix, since I am sure I have at least 75 or so scenarios where I stack. Maybe more because I stack and mix a lot of terrain.

Any "fix" would not involve disallowing multi-building placement. It would involve ensuring road is not placed when it's not wanted IF that is indeed a road hex that allows greater movement and not just a report of it being a road hex when it's just normal clear terrain so specific testing to determine that needs to be done.

In the big scheme of things it does not affect how a scenario plays in any way that's even remotely critical but it should not be doing that

DRG May 26th, 2021 08:19 AM

Re: Multi-layer and hex buildings
 
The other question is: Does this happen with both the in-game editor and the extended map editor or just one or the other?

DRG May 26th, 2021 08:26 AM

Re: Multi-layer and hex buildings
 
FWIW I do now have repeatable examples and repeatable examples have a far higher chance of being debugged than random results so this will be looked into but from the reports I've been getting from RetLt about old scenarios showing the same thing it looks like this has been going on a long time

zovs66 May 26th, 2021 08:30 AM

Re: Multi-layer and hex buildings
 
If memory serves I have used the "stacking" in both the in game and extended editor.

Mostly to make different or new building shapes, or to add grass, trees, orchards, grain or crops around them.

zovs66 May 26th, 2021 08:32 AM

Re: Multi-layer and hex buildings
 
Also I don't think the game engine creates stackable buildings, but I could be wrong, (i.e. using the paint city square/grid). If it has I usually demolish it with some nice rubble. I could be wrong but I think it has to be done intentionally.

Karagin May 26th, 2021 08:55 AM

Re: Multi-layer and hex buildings
 
Both

DRG May 26th, 2021 09:03 AM

Re: Multi-layer and hex buildings
 
1 Attachment(s)
Oh this is going to be just so much fun

I was placing multi-hex building and 9 times out of 10 I was seeing the registration hex reporting as paved road.... then I placed some more and none did..... then I placed some more and it started up again but the issue is now known and repeatable but in some cases requires persistance


This is one that shows no paved road anywhere on it or around it but that does not mean that particular building is immune. I have examples of another one showing it and one of the same building placed but not showing it

https://forum.shrapnelgames.com/atta...1&d=1622034464

DRG May 26th, 2021 09:19 AM

Re: Multi-layer and hex buildings
 
1 Attachment(s)
Quote:

Originally Posted by zovs66 (Post 850435)
Also I don't think the game engine creates stackable buildings, but I could be wrong, (i.e. using the paint city square/grid). If it has I usually demolish it with some nice rubble. I could be wrong but I think it has to be done intentionally.

Correct.Even when urban density is set to the max the game won't double stack builds but double stacking is not the issue even though it appeared to be at the start

https://forum.shrapnelgames.com/atta...1&d=1622035310

DRG May 26th, 2021 10:41 AM

Re: Multi-layer and hex buildings
 
1 Attachment(s)
This is all I have time for today but it proves there is indeed "paved road " on the hexes above those churches along the red line. Both T-34's moved the same number of hexes

Just a piece in the puzzle

https://i.imgur.com/dZ4VnsJ.png

zovs66 May 26th, 2021 10:59 AM

Re: Multi-layer and hex buildings
 
Some call em churches some call em barns ...

and the world goes round and round :D

DRG May 26th, 2021 11:12 AM

Re: Multi-layer and hex buildings
 
It could be either but I built them as churches with a bell tower

If anyone can get SP2 to run see if the same thing happens

zovs66 May 26th, 2021 11:13 AM

Re: Multi-layer and hex buildings
 
Again as a scenario designer and map maker I just accepted it as the way the engine draws those buildings, there are several that behave like that and several that don't. I found out the 'hard way' when I'd add say add a multi hex building and then throw a rough hex on it.

Here is all the stone ones and special buildings I think. There is some oddities here.

https://i.imgur.com/6ZQCY8S.png

zovs66 May 26th, 2021 11:14 AM

Re: Multi-layer and hex buildings
 
Those were from MBT but I am pretty sure WW2 is the same.

OOPS........ I hit edit instead of quote:doh:


There are code differences in the two games simply because WW2 was ported to windows a year after MBT but the map/building code should be exactly the same

DRG May 26th, 2021 11:15 AM

Re: Multi-layer and hex buildings
 
This is another piece to the puzzle and a good one too

zovs66 May 26th, 2021 11:17 AM

Re: Multi-layer and hex buildings
 
Last but not least wooded multi hex buildings:

https://i.imgur.com/4Z5usgT.png

DRG May 26th, 2021 11:20 AM

Re: Multi-layer and hex buildings
 
There may be different code for the large special buildings that is not in the smaller multi hex residential buildings in regards to the registration hex. It's been a couple of decades since I ran the basic SP2 but I seem to recall large buildings were only allowed on level zero, IDK it's been a L O N G time.

I suspect this has been going on for years....it's just that now it's been noticed it seems doubly obvious. It's not 100% but note that when the registration hex is clear ground that's when the road shows up....... mostly

DRG May 26th, 2021 11:30 AM

Re: Multi-layer and hex buildings
 
Quote:

Originally Posted by zovs66 (Post 850445)
Last but not least wooded multi hex buildings:

Another little "fact" ( that may not be......) that is niggling is that in the original game houses were placed with pavement but it does show in most cases when the registration/placement hex is blank that is when the paved road is placed but why paved road and not rough ( only "for example" )is a question yet to be answered

And yes things like this were just accepted and worked around in the past but it is a "bug" albeit small but still troubling

zovs66 May 26th, 2021 04:44 PM

Re: Multi-layer and hex buildings
 
The news from my perspective is this all this talk has inspired me to get back to map making and thusly scenario creations again...:D

Starting with MBT for a change and with the Czechs running across the border and running into a US/West Germany task force in '89...

RetLT hope you like missiles, helo's and other fun stuff...lol

Should be a good summer...

Karagin May 26th, 2021 04:55 PM

Re: Multi-layer and hex buildings
 
Quote:

Originally Posted by DRG (Post 850441)
It could be either but I built them as churches with a bell tower

If anyone can get SP2 to run see if the same thing happens

I recall this happening in SP2, but I am working on getting SP2 back up and running....now if FedEx can get me the stuff I order...grr....

zovs66 May 26th, 2021 06:35 PM

Re: Multi-layer and hex buildings
 
Oh I think I have a Dosbox that might run SP2. I’ll check tomorrow.

Karagin May 26th, 2021 06:54 PM

Re: Multi-layer and hex buildings
 
Quote:

Originally Posted by zovs66 (Post 850451)
Oh I think I have a Dosbox that might run SP2. I’ll check tomorrow.

Be willing to help me setup DOSBOX to run SP2? Right now I am working on getting an older computer back to working order in order to run it...

zovs66 May 27th, 2021 08:00 AM

Re: Multi-layer and hex buildings
 
So I loaded up SP2 the problems go all the way back to that, the SSI code.

Here are some screen shots. It's really hard to work with after playing MBT and WW2 after all these years, plus Dosbox is a little sluggy, and on my machine in full screen I could only see a quarter of the game interface and had to switch to windowed mode which is "tiny". But you can see where the problems originated:

Multi hex Wooden Buildings:
https://i.imgur.com/bIy1dqC.png

Multi hex Stone Buildings:
https://i.imgur.com/3qppl1n.png

Multi hex Special Buildings (there were only 4):
https://i.imgur.com/8HrNiyi.png

Me just playing around...
https://i.imgur.com/yGHD7dp.png

I loaded up the first scenario in the editor as I entertained the idea of recreating theses, but dropped that idea in 5 seconds. It would be far much better and less time consuming just creating new ones from scratch. The terrain is so sparse it's unimaginative compared to what we have now. The time you spent going from SP2 in Dosbox back to your local env and recreating one scenario I am sure average joe could whip out 5 to 10 scenarios easily from scratch.

Mobhack May 27th, 2021 11:26 AM

Re: Multi-layer and hex buildings
 
I vaguely recollect that - multiple hex buildings laid paving stones as well, and also had to be laid only on level 0 terrain IIRC.

Several other things had to be on level 0 terrain - like fields, single hex buildings and some other stuff.

It was not a simple thing to go to the 15 levels hills of our versions, and we also managed to get things allowed on terrain levels greater then the flat - like fields and buildings IIRC. (Its been a loing time since I wrassled with the code to get thete).

Any quirkyness the multi-hex buildings have is probably linked to a remnant of the old style code that laid those paved areas, I probably have not quite removed all of whatever it was.

DRG May 28th, 2021 09:58 AM

Re: Multi-layer and hex buildings
 
My tests so far show that if I place a multihex building, no matter if it's wood or stone residential or a "specialty" building.....if it does not have a part of the building in the first hex ( that is the registration hex.. the hex you clicked on to place the building ) I see a paved road reported in that hex.

If anyone sees differently let us know

DRG May 28th, 2021 10:41 AM

Re: Multi-layer and hex buildings
 
This is one of those things that once known is so obvious it seems impossible for it to have existed so long but it has.

Anyone interested can try this experiment

Place 6 multi hex buildings spaced a few hexes apart that have no part of the building in the hex you clicked on to place them

after you are done move your cursor over those hexes and you should see paved road reported

Now place map editor page one clear terrain on those registration hexes.. that's the clear terrain that is level zero

All the buildings should be gone

Now, look at the mini-map. You should still see the shape of where they were

Now change to winter ( this assumes you started the experiment in summer )

Pass your cursor over the area you placed those buildings hex by hex and every time you find one that reports paved road click on it with the clear terrain snow

You should see something like this............

https://i.imgur.com/u3RA662.png

What I found is why some of these older scenarios and probably the newer ones too that show strange residual paved road is because editing had been done that did not clear down all hexes that building was placed in and this is what we need to investigate in the code. Why an empty registration hex places a paved hex and why paved hexes are left behind when the building is removed when only the registration hex is cleared

SO........ Please note when building a map in case the cause of this cannot be found..... when you change your mind about the placement of a multi hex building you MUST clear down the entire area the building had been NOT just the registration hex

As well be aware that even if you place a multi hex building that DOES have a building in the registration hex and then you remove it by placing clear terrain in the registration hex ANY HEX THAT BUILDING HAD OCCUPIED WILL REPORT PAVED ROAD.

So any "change of mind" when it comes to placing multi hex buildings EVERY hex they had occupied MUST be cleared using page one clear terrain to remove all traces of the paved road bug otherwise it will report being paved road

zovs66 May 28th, 2021 12:43 PM

Re: Multi-layer and hex buildings
 
...or let ReLT fine it in my scenarios and have me go back and fix it lol...

Great find DRG

DRG May 28th, 2021 01:50 PM

Re: Multi-layer and hex buildings
 
and further FYI using " clear damage" with the extended editor does not remove them because paved roads are not "damage"

DRG May 28th, 2021 01:53 PM

Re: Multi-layer and hex buildings
 
Quote:

Originally Posted by zovs66 (Post 850454)
So I loaded up SP2 the problems go all the way back to that, the SSI code.

When you place a multi-hex building with SP2 on a ground-level hex what happens?

Does it automatically place the paved hex? It's been 2 decades since I last loaded SP2

Mobhack May 28th, 2021 06:23 PM

Re: Multi-layer and hex buildings
 
The placement of multi-hex buildingss works for generated battles. It also works for scenarios, so long as you then do not remove them, otherwise you will manually have to remove the paving/road heses the building splatters as part of its deployment.

The game keeps no records that building #1234 "owns" these splattered hexes. So in order to remove them, I think I'll have to examine the placement code for building #1234 and find its splatter pattern and then remove them with the building. That will need to be done if the building is simply deleted, or if it gets replaced with another one I think. Right now, there is no such code for the removal of any such splatter - it just deletes building #1234 and leaves the splatter.

Doable, but not going to be fun!.

DRG May 28th, 2021 07:09 PM

Re: Multi-layer and hex buildings
 
It * may* be that the solution is simple...its FINDING the solution that is difficult. We now know what is happening and how to prevent it from being a issue in a final scenario and that might be all you get

zovs66 May 28th, 2021 07:21 PM

Re: Multi-layer and hex buildings
 
SP2: yes it automatically places the paved road as per the screen shots.

DRG May 28th, 2021 07:24 PM

Re: Multi-layer and hex buildings
 
OK that likely explains why then having stray paved road around the building was not an issue and MAYBE stray paved road around the building is WHY pavement was pasted down around them

zovs66 May 28th, 2021 07:28 PM

Re: Multi-layer and hex buildings
 
Yep, as soon as I saw it splatter all the grey I was like that’s why...

I just adapted as I went along in creating all my scenarios.

DRG May 29th, 2021 09:30 AM

Re: Multi-layer and hex buildings
 
The original code as written has 8 types of buildings

0=GOVERNMENT
1=INDUSTRIAL
2=RESIDENTIAL
3=BUSINESS
4=OIL REFINERY
5=AIRFIELD
6=RADAR
7=SINGLE HEX

and there are four sets of code for the 7 MULTIPLE HEX BUILDINGS
one for type 0 , 4 , 5 and 6
one for type 1
one for type 2
and one for type 3

and there are subtle differences ( and randoms...there are always randoms ) in each set up for ground height. overall building height and density, as well, some use wood building code and others use "stone" building code

And the original SP2 code references "gpaved" 158 times ( SP3 only 115 times ) but in MBT it's referenced 274 times and in SPWW2 it's 284 times so this probably can be sorted out but it's not something glaringly obvious ATM so in the meantime if you place a multi then remove it make sure you clear every hex it had been on especially if you "dog pile" buildings and be aware that if the registration hex does not have a part of the building in it there will be a paved road showing so those would be best placed where you were going to have a paved road anyway


All times are GMT -4. The time now is 02:49 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.