Atrik Posted October 10 Report Share Posted October 10 (edited) This mod allow snapping walls to any buildings (or entities like mineral deposits), increasing drastically their potential utility by making sure to leave no gaps, and/or speed at which you can place them. Walls.. That snaps... I did my best for the behavior to be simple and intuitive, but there are still a couple compromises that were done. Also there are vanilla flaws with wall placements that I couldn't address. Compatible mod (can be enabled in MP) Works with other mods I tested that modify inputs (autociv, customtrainer, moderngui) SnappingWalls.zip Edited 1 hour ago by Atrik 7 1 1 Quote Link to comment Share on other sites More sharing options...
Player of 0AD Posted October 10 Report Share Posted October 10 Snapping walls are nothing new. These things are called gates. 3 Quote Link to comment Share on other sites More sharing options...
AlexHerbert Posted October 10 Report Share Posted October 10 (edited) I have installed to try. Edited October 11 by AlexHerbert Quote Link to comment Share on other sites More sharing options...
Atrik Posted Thursday at 10:52 Author Report Share Posted Thursday at 10:52 Updated : Significant performance improvement (First version was bad, this one fix it but also improve wall placement performance impacts in general) Now other towers can be used as a starting or end point for wall placement instead of wall towers. This doesn't prevent you from walling easily around them : you can also snap walls and palisades to their edges! (The threshold distance makes it so easy to choose between the two you won't even be bothered). 2 Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted Thursday at 16:48 Report Share Posted Thursday at 16:48 What if you add the ability to snap walls to a fortress' towers? Then fortresses would be more realistic, more useful to build, and take up less space. 3 Quote Link to comment Share on other sites More sharing options...
Atrik Posted Thursday at 16:53 Author Report Share Posted Thursday at 16:53 4 minutes ago, Perzival12 said: What if you add the ability to snap walls to a fortress' towers? Then fortresses would be more realistic, more useful to build, and take up less space. Wish I could, however this would either be very complicated, or needs to be as a incompatible mod setting some references point in fort templates or something. I wanted this mod to be compatible. Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted Thursday at 16:58 Report Share Posted Thursday at 16:58 Kay, just a thought. 1 Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted Thursday at 17:00 Report Share Posted Thursday at 17:00 By the way, your download isn't recording how many people have downloaded it. Quote Link to comment Share on other sites More sharing options...
Grautvornix Posted Thursday at 18:22 Report Share Posted Thursday at 18:22 It must be hundreds if not thousands! This feature is definitely long awaited! 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted Saturday at 21:15 Report Share Posted Saturday at 21:15 On 16/10/2025 at 6:52 AM, Atrik said: Updated : Significant performance improvement (First version was bad, this one fix it but also improve wall placement performance impacts in general) Now other towers can be used as a starting or end point for wall placement instead of wall towers. This doesn't prevent you from walling easily around them : you can also snap walls and palisades to their edges! (The threshold distance makes it so easy to choose between the two you won't even be bothered). Why aren't you making this a pull request? 3 Quote Link to comment Share on other sites More sharing options...
Atrik Posted Saturday at 22:28 Author Report Share Posted Saturday at 22:28 1 hour ago, wowgetoffyourcellphone said: Why aren't you making this a pull request? Unlikely to be accepted as a PR. It lengthen the code by a bit; and is probably not how one would go about to implement all of the different features I've added, without the constraint of trying to make it into a compatible mod.. Quote Link to comment Share on other sites More sharing options...
Vantha Posted yesterday at 18:04 Report Share Posted yesterday at 18:04 19 hours ago, Atrik said: Unlikely to be accepted as a PR. It lengthen the code by a bit; and is probably not how one would go about to implement all of the different features I've added, without the constraint of trying to make it into a compatible mod.. I took a quick look at the code, correct me if I'm wrong, but for a PR it looks like you could directly move most of the logic to the GuiInterface.prototype.SetWallPlacementPreview method. I don't think length would be an issue since you largely rewrote the logic of that method anyway, which is itself already quite long. And I don't think anyone would mind having a bit more code for more desired behaviour. Also, that would make it even more performant because you wouldn't have to compute the entire entity state for each snap candidate and could pull values like the position from the simulation directly, which is a lot quicker. What do you think? I believe a lot of people (including me) would love to see this added to the main game. 5 Quote Link to comment Share on other sites More sharing options...
Atrik Posted 23 hours ago Author Report Share Posted 23 hours ago 3 hours ago, Vantha said: I took a quick look at the code, correct me if I'm wrong, but for a PR it looks like you could directly move most of the logic to the GuiInterface.prototype.SetWallPlacementPreview method. I don't think length would be an issue since you largely rewrote the logic of that method anyway, which is itself already quite long. And I don't think anyone would mind having a bit more code for more desired behaviour. Also, that would make it even more performant because you wouldn't have to compute the entire entity state for each snap candidate and could pull values like the position from the simulation directly, which is a lot quicker. What do you think? I believe a lot of people (including me) would love to see this added to the main game. Thanks, I've just realized I've slept an stupid, potentially error-generating mistake so I've just re-uploaded again with tiny fix... There are also small compromises I made as said in the opening comment... And the buildings templates that can be used as end wall sections (towers) are defined arbitrarily in a constant etc... So there are a few things that needs extra work. 2 1 Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted 3 hours ago Report Share Posted 3 hours ago On 16/10/2025 at 10:00 AM, Perzival12 said: By the way, your download isn't recording how many people have downloaded it. It seems to have been fixed, the newest upload says 5 downloads. Wonder what the bug was. Quote Link to comment Share on other sites More sharing options...
Atrik Posted 1 hour ago Author Report Share Posted 1 hour ago 1 hour ago, Perzival12 said: On 16/10/2025 at 7:00 PM, Perzival12 said: By the way, your download isn't recording how many people have downloaded it. It seems to have been fixed, the newest upload says 5 downloads. Wonder what the bug was. You probably got confused by the counter resetting because I'm reuploading shamefully the mod every time I find some bugs coming from the mod.. 4rd reupload due to poorly handled exceptions ... Also on @Vantha's tip I've tried to see if I could get some of the logic in guiinterface. I couldn't import much logic there but in SetWallPlacementPreview we could control additional visual effects of the previews. I also rewrote some of it to be able to reason from it... Anyways... If the mod/code is working as I think it is now (finely), my guess is that it is still not possible to PR it as long as it is a constant storing tower-like structures, usable as start/end points for wall segments. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.