-
Notifications
You must be signed in to change notification settings - Fork 2
2 issues with Shatter's tileSize paramaters for importing/exporting segments + tileOrientation isn't applied to boxes from imported segments #31
Comments
I've known about this for a long time and I honestly just think this segment is broken. If you look in the binary you will notice this help text for tileRot: Which strongly implies that it's RightLeft (X) TopBottom (Y) FrontBack (Z) (at least, if I understand it as the axis on which to rotate). Now let's look at the segment: <box size="1.0 4.0 1.0" pos="0.0 -4.0 -7.0" hidden="0" template="holo_floor" tileSize="1 10 1"/>
<box size="1.5 4.0 0.5" pos="-0.5 -4.0 -8.5" hidden="0" template="holo_floor" tileSize="1 10 1"/>
<box size="0.5 4.0 0.5" pos="3.0 -4.0 -9.0" hidden="0" template="holo_floor" tileSize="1 10 1"/>
<box size="2.5 4.0 0.5" pos="-0.5 -4.0 -9.5" hidden="0" template="holo_floor" tileSize="1 10 1"/> So the segment has those properties set for TopBottom ... What the fuck? I've not been able to understand what's happening here so I've just let this bug stay since it seems to make no sense to me how this could work.
I don't know what would have broken this or if it was ever correct but I'll look into that. At a glance the code looks right though: Shatter/addon/shatter/segment_export.py Lines 383 to 384 in 8d45b3e
Again the code looks like it should be right but I could be wrong and I'll need to look into it. Shatter/addon/shatter/segment_import.py Line 321 in 8d45b3e
However, I do want to point out that there are no tileRot's in this XML file. More likely this is the meshbaker getting the default rotations wrong. I will admit that working with these rotations has been kind of a pain in the ass for me and I still don't understand exactly how it's supposed to work in Smash Hit due to these seemingly weird edge cases. Not helping is that I've forgotten 90% of how the meshbaking script I wrote works and that it sucks at doing rotations (and forget doing them properly) as well. :/ |
I guess I should have figured that some of these issues was due to the segment itself and not the editor. On the bright side, at least implementing the values manually can act as a workaround, though it's going to be tedious since I wanted to modify the holodeck segments. (I'm currently making a mod using Shatter and that's how I kept finding all the bugs.) I'll see if the other holodeck segments have the same problem or not. |
Alright! I should probably implement some workaround for checkpoint 2 segments since that would be better than just leaving them completely broken. And I'll also leave this issue open with won't fix label since I still need to look at some things mentioned here. |
I used the segment
start0.xml.gz.mp3
fromsegments/holodeck
to see whether the editor'stileSize
parameters would translate correctly to the segment upon exporting, and it ultimately led to the discovery of multiple errors. The results are shown below.Issue 1:
tileSize
parameters are not always applied correctly when importing a segmentIt appears the
RightLeft
,TopBottom
, andFrontBack
values were applied erroneously, as shown in the photo above. The top surface has now been stretched instead of the front, and the front surface is now a repeating texture. Changing the values manually revealed that the value forFrontBack
had been applied toTopBottom
instead.Issue 2:
RightLeft
andFrontBack
values are mislabeled/swapped in the editorWhen I manually applied the
tileSize
values, I found out the values are not labelled in the correct order, as the editor says the order of values isRightLeft
,TopBottom
, andFrontBack
, but the output reveals the first value is forFrontBack
and the third value is forRightLeft
instead.Issue 3:
tileOrientation
doesn't apply to imported segment boxesWhen importing any segment, the
tileOrientation
value is automatically set to0 0 0
for all boxes, but thankfully, manually changing it still works.The text was updated successfully, but these errors were encountered: