Skip to content

Unlimited number of closed walls#12

Draft
LaoTszy wants to merge 5 commits intonbayazes:masterfrom
LaoTszy:many_walls_hack
Draft

Unlimited number of closed walls#12
LaoTszy wants to merge 5 commits intonbayazes:masterfrom
LaoTszy:many_walls_hack

Conversation

@LaoTszy
Copy link
Copy Markdown

@LaoTszy LaoTszy commented Nov 13, 2024

This change allows to create unlimited amount of Closed (and not being targets of any trigger) walls. All segment sides with such walls can reference the same single wall in the saved file. The only catch I have noticed so far is that if some closed wall is a target of an "Open/Close Wall" trigger, the other side of this wall must also be a target of this trigger. Otherwise the trigger removes all closed walls in the level.

This functionality is configurable and a file once saved with "shared" closed walls can be read and saved as a "standard" file again if the number of walls does not exceed the limit. I was only able to test it with the d2x-rebirth!

Also there is a fix for a preexisting bug that decremented TriggerID::None values when removing a trigger. For that there is also code in the LevelReader that fixes the corrupted files (unless, of cause, the decremented trigger id became an existing one). The code marked as "temporary repair" and in principle can be removed.

@nbayazes
Copy link
Copy Markdown
Owner

Hello, thanks for the contribution.

Can you clarify the use case of this? Being able to save extra walls into the level is interesting, but are they actually usable in Rebirth or Redux?

If I was simply extending the file format I would have added support for extra walls in the IED file.

@LaoTszy
Copy link
Copy Markdown
Author

LaoTszy commented Nov 13, 2024

but are they actually usable in Rebirth or Redux?

I have tested it in d2x-rebirth v0.58.1.

If I was simply extending the file format

This is exactly the point of this "hack": there are no changes in the file format.

@nbayazes
Copy link
Copy Markdown
Owner

I talked with some other developers and I'm hesitant about adding this due to compatibility issues. Someone would need to test all of the current source ports (redux, retro, chocolate, rebirth) and multiplayer for each one to make sure it doesn't break anything. Also it would break compatibility with other level editors like DLE or Devil (less of an issue, but it comes up).

I'm currently focused on getting the D1 alpha out and don't want to mess with the fundamental wall code right now.

@nbayazes nbayazes marked this pull request as draft June 18, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants