RimWorld

RimWorld

Castle Walls Reborn
88 Comments
Gideon  [author] 10 Jun @ 7:51am 
@Bodacious, exactly what it says on the tin: add castle walls as a new type of wall. They're located in the architect tab named Castle.
Bodacious Cowboy 5 Jun @ 7:08pm 
What does the mod even do?
Gideon  [author] 24 Apr @ 8:50am 
Knewdle/Greisyn, it's been a bit since your initial messages...but something occurred to me...are your towers being loaded up with steel? They do use steel as ammo...
Lord Rugdumph 23 Mar @ 12:10pm 
ooooo cheers!!
Enrico  [author] 23 Mar @ 11:57am 
Check out my expansion pack to modify that component requirement: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3024167916
Lord Rugdumph 23 Mar @ 10:11am 
The defence towers seem to need components to work, there don't be no way to get vanilla components in medieval rimrim D:
троечка 14 Mar @ 5:36am 
Thank you so much for this mod!

Previous versions required an XML extension that was broken and prevented the game from loading. This one doesn't have that issue. A must-have mod because I'm building a castle.
Gideon  [author] 9 Feb @ 9:22am 
It could be. It's certainly fine to share any ideas and experiences, I hope I'm not coming across as discouraging open discourse.

It's possible that a future major revision of this mod could change the names of defs as a way to prevent, assuming that consistently prevents, but this would have to be done with communication to the community as changing a defname would create a permanent incompatibility between the new and old versions of the mod, so people would have to be given advance notice and know that they would need to avoid updating the mod on old saves. It's a fairly difficult change to justify unless the problem is creating widespread issues.
elfxiong 8 Feb @ 4:07pm 
To be honest I don’t expect you to fix it because I feel like this particular issue is beyond your control/not something fixable by mod author. I was just sharing info to see other players who have the issue have anything in common. A new test shows that a dummy mod with only one almost empty Def, ThingDef named JDS_Tower_L_connector, can cause the Uranium vein to turn into L_connector vein after being added mid-save to a barebone save created with only Core enabled. Again, the defname has to be exact for this to happen. It makes me wonder if this is caused by some game cache…
Gideon  [author] 8 Feb @ 10:14am 
I can't bug report an issue that is only present if the mod is installed mid-save. Unfortunately, since mod list changes mid-safe is not safe and is known to cause unpredictable behavior, this is a risk you take when you add something partway through. If you are able to reproduce it with the mod installed from the start, we can definitely call this a bug.
elfxiong 8 Feb @ 9:28am 
There is probably no L Connector vein if the mod is added from the start, because even if the mod is added mid-save, newly scanned veins after adding the mod are all normal ores (including normal Uranium).
Gideon  [author] 8 Feb @ 8:47am 
@elfxiong, have you tried starting a new game that has this mod from the start? This could be an issue you're encountering by adding the mod in mid-save. I know people do this all the time (I'm guilty as well), but it is not safe to change your mod list in the middle of a run--this can cause all kinds of corruption and strange behavior.
elfxiong 8 Feb @ 7:13am 
I removed and then resubbed this mod just in case and based on (3), I find out a way to reproduce the issue with minimal mod:
1. Disable all DLC and mods and only enable Core. 2. Dev quicktest, god mode, place a scanner, power on, tap finish scan until there are Uranium veins. 3. Save. 4. Add Castle Walls Reborn to mod list (now there are only Core and this mod) 5. Restart RimWorld and load the save. 6. The Uranium veins are now Tower L Connector veins.

It turns out it is this mod itself that causes the issue. I’m surprised, because I did look into the files of this mod before doing all of these and couldn’t find anything remotely related to the issue so I had ruled out the possibility.
elfxiong 7 Feb @ 7:56pm 
3) (Just to be clear, without any modification or mod removal mentioned above) The third thing I noticed is that, newly scanned Uranium vein (after having added this mod) is normal Uranium vein. Newly scanned veins are always normal resources ores (Uranium, Steel etc) and no L Connector. The old Uranium vein (that was scanned before adding this mod and turned to L Connector vein upon adding the mod) remains as L Connector vein.
elfxiong 7 Feb @ 7:23pm 
1) What I don’t understand is how the game stores ore vein data in the save file. It doesn’t seem to use the defname in any way. I was speculating the weird ore vein is saved as Uranium and something weird happened (another mod interfering) when loading the save that turned it into L Connector.

Are you suggesting that it is actually saved as L Connector ore veins but it defaults back to Uranium when L Connector def is removed (like in (1)) or renamed (like in (2))?
elfxiong 7 Feb @ 7:23pm 
Don’t worry, I am aware of that kind of risks. All the experiments were done by repeatedly loading the same backup save that had the tower connector ore vein, and I had reverted back the modifications (defname etc.) before I continued actually playing the game.

I was already on the premise that this mod alone won’t cause the issue so I was trying to figure out what is the other mod that is interfering.

2) When I did the renaming experiment (renaming both this mod and save file’s def name simultaneously), there was no NullReferenceException. At least there was none logged in console.
Gideon  [author] 7 Feb @ 1:34pm 
@elfxiong:
2) This behavior is also explained by what I mentioned in the long answer in 1 below. If you rename the def in the mod files and load up your save, the game will ignore (i.e. delete) anything in your world that references the original name because that original object no longer exists. You're effectively creating a NullReferenceException in the Rimworld code and when this happens with XML-based defs, the game simply skips loading anything that references it.
Gideon  [author] 7 Feb @ 1:32pm 
@elfxiong
1) Short Answer: The best test for this would be to create a quick start game (don't bother with extensive setup of the scenario, just get into a new colony as quick as possible) with only this mod and Harmony enabled. If the problem still happens, then this mod is causing the issue. If it doesn't, something else is creating the conflict.
Gideon  [author] 7 Feb @ 1:30pm 
@elfxiong
1) Long Answer: removing Castle Walls Reborn resulting in the weird ore vein returning back to uranium makes sense regardless what mod is the problem...the castle wall object ID doesn't exist when you disable the mod, so all references to it get ignored by the game when loading the save. For future reference, this is a dangerous thing to do and should always be done with a backup copy of your save as this can result in unpredictable corruption that may not even show up until years (in-game years) later. This is true of removing any mod if your save already has references to that mod inside it.
elfxiong 4 Feb @ 6:40am 
2. The mod that causes the issue might be targeting the def name. I tried changing the def name from JDS_Tower_L_connector to anything else (JDS_Tower_LL_connector or DS_Tower_L_connector) and replacing all occurrences in the save file accordingly, and the ore vein is back to uranium.
elfxiong 4 Feb @ 6:39am 
I also encountered the problem of underground uranium ore vein turning into Castle Tower L Connector. I don't have any mod related to terrain, or adding ores so I have no idea which mod is causing this (I tried removing some potentially related mods but it didn't work). I discovered two things after some investigation.

1. The change is not permanent. After saving the game with Castle Tower L Connector ore vein, and searching "JDS_Tower_L_connector" in the save file, it isn't there (well, there is an occurrence in the save file but I am pretty sure it is the actual building I built). And if I load the save with only Castle Tower Reborn removed, the ore vein is back to uranium ore instead of disappearing.

Knewdle 1 Feb @ 5:39pm 
@gideon yea the towers when built have a 'fuel' component built in for # of shots remaining. Its displayed on the UI.
Greisyn 1 Feb @ 5:37pm 
thanks for looking into this, i really like the mod having recently gotten into the whole "medieval run" for rimworld. currently just trying to build em so they shoot but its so hard telling which direction to face them (a clue was it shoots along a wall face) but still not sure this is entirely correct cause ive faced them several ways. i think the simpler fix would be clarifying which direction they shoot visually (maybe a notch or mark in the graphic on top of the crenelation) I dont know how hard it would be for either change but hopefully something is solved mod is wonderful for Medieval Overhaul / Outworld Playthroughs.
Gideon  [author] 1 Feb @ 3:17pm 
I'm not 100% sure you can have a building be both a consumer and a produce of power at the same time...so if that's not an option, I'll do something as close as possible (like setting it to +1).
Gideon  [author] 1 Feb @ 3:16pm 
My thought on this would be to set the power consumption and power production of the building to the same value so it nets 0 and have wood be supplied as the ammo type.
Gideon  [author] 1 Feb @ 3:14pm 
@Greisyn/Knewdle, thanks for pointing this out. Due to the primary goal of this mod's design, which is to keep everything 100% reliant on only vanilla code for future compatibility, I'm currently considering turning the towers into automated defense turrets. Not 100% ideal, given this breaks the medieval tech level, but unless someone knows of a vanilla structure that is a closer match than a defense turret, that's the mechanic we have to work with.
Greisyn 1 Feb @ 10:32am 
Apparently these towers have a "facing" tho you cant tell which way they are. hopefully this will be changed as it seems to cause an issue or at least maybe put indication on facing.
Knewdle 1 Feb @ 10:17am 
bummer =/
Greisyn 1 Feb @ 10:03am 
Same issue as Knewdle
and original mod images are removed so any "instruction" for this is lost.
Knewdle 1 Feb @ 7:54am 
defense towers dont seem to do anything? can't be manned, and aren't automated. trying to man them just gives "no path". tried connecting to various walls etc with no luck. Is there a way to make these defense towers automated or mannable?
Gideon  [author] 5 Dec, 2024 @ 8:23am 
@DarthBrawn, in regards to Layered Wall Destruction, this will require some investigation. I can't give an immediate answer since I haven't used this mod before, but I'll download it and see what I can do.

Do you have any suggestions on how much the durability should be reduced by (preferably a %) when Layered Wall Destruction is detected?
Gideon  [author] 5 Dec, 2024 @ 8:21am 
@DarthBrawn,

The mod does not add any ores or materials to the game, so there's not something in the mod itself that would cause the deep drill to mine it as if it were an ore.

This sounds like another mod has misidentified it as a material and made an ore for it, probably through some kind of automatic detection process.

Do you have any mods that alter terrain, mining, or add ores? If so, I'd be curious to know which ones to see if I can reproduce the problem.
DarthBrawn 4 Dec, 2024 @ 12:38pm 
Good mod so far.

Getting a bug where a deep drill mining uranium is now mining the "Castle Tower Connector"

Also, could you add an optional patch for compatibility with Layered Wall Destruction? Or would that mod's author have to fix it? LWD adjusts hit points on all walls for balance, so these castle walls become disproportionately strong.

Thanks again
Device 23 Sep, 2024 @ 12:38pm 
my hero
Evian [✚] 20 Sep, 2024 @ 8:33am 
Do the defense towers work as auto-turrets or do pawns need to man them?
Gideon  [author] 18 Sep, 2024 @ 10:29am 
Should be compatible with everything. It uses only vanilla logic so there's nothing really to conflict with unless another mod uses the same asset ID.
zeus57007 18 Sep, 2024 @ 9:57am 
is this compatible with CE like the original?
Gideon  [author] 31 Aug, 2024 @ 8:31am 
@JonathonMackey, the best way to verify whether or not it's this mod causing it, save your list of mods (I prefer to use a mod manager named RimPy and it makes it very easy), then remove all your mods and add only this one. Try running the game (use a quick start, don't load your old save). If everything works fine, then it's either another mod or a conflict with another mod (but this is unlikely because this mod does not add any code or modify any existing items).
jonathonmackey 30 Aug, 2024 @ 7:14pm 
keeps crashing cant seem to find whats causing it.
Naturtok 25 Jul, 2024 @ 10:44pm 
There isn't a way to get a 4x2 castle gate, is there? I'd like it to be even with the 2-wide doors I have to the Keep
r33Cy 26 Jun, 2024 @ 5:40pm 
I already posted it there.
N7Huntsman said it was added in a PR with some other fixes.
Gideon  [author] 26 Jun, 2024 @ 5:09pm 
@r33Cy, this suggestion is good but probably better posted on the mod page for CE.
r33Cy 26 Jun, 2024 @ 4:14pm 
fyi a CE patch exists for the original mod, if you add one line to the LoadFolders.xml file in CE, this mod can be patched too.

<li IfModActive="gideon.castlewalls">ModPatches/JDS Castle Walls</li>
Enrico  [author] 16 Jun, 2024 @ 12:42pm 
A previous version of the mod had misalligned gates. This was fixed during the June 9 update. It sounds like your mod hasn't been updated since. Maybe try unsubscribing and resubscribing!
CantPlayJack 16 Jun, 2024 @ 12:41pm 
Weird. I'm going to go through my load order, remove anything that seems even tangentially related and will see if I can get it working. If I can identify the culprit, I'll report back.
Gideon  [author] 16 Jun, 2024 @ 12:15pm 
Hi Can't Play Jack,

On my end, there is no misalignment when I test. I'm able to place a wall on either side of a gate exactly aligned with the gate where it looks like it should go and the gate will connect and operate exactly as expected.

I have not been able to reproduce a need for any misalignment of walls and gates.

You can send me a friend request if you'd like to exchange screenshots via DM.
CantPlayJack 16 Jun, 2024 @ 11:43am 
Alright, I've done some more testing. I'm not sure if this is actually intended behavior, but it doesn't seem like it would be.

What does NOT work:
1 gate aligned perfectly with 1 wall on the left, 1 wall on the right
1 gate misaligned to the north with 1 wall on the left, and 1 wall on the right
1 gate misaligned to the south with 1 wall on the left, and 1 wall on the right
2 gates misaligned to the north and south, with 1 wall on the left, and 1 wall on the right

What DOES work:
1 gate with 2 walls misaligned to the upper left and upper right, 2 walls misaligned to the lower left and the lower right

The visualization of this is:

WALL.........WALL
.........GATE
WALL ........WALL

I do have other mods, but none that directly modify walls or doors. I have no issues with other doors or walls, vanilla or modded.
Gideon  [author] 16 Jun, 2024 @ 10:22am 
Hi Can't Play Jack,

Is your version number missing the last digit? There was no 3901 release, but there is a 39019 patch, so I will troubleshoot under the assumption you meant 39019, which is the current release version.

Using this release version, I'm able to align the gates and walls visually and have them behave as I would expect them to.

Are you able to provide any details on other mods you have installed? Do any of them modify walls, doors, or graphics rendering?

Please keep in mind that this version of the mod relies on vanilla objects, so if you have any mods that alter, for example, BuildingBase, DoorBase, or Building_MultiTileDoor, this could alter the way this mod behaves.
CantPlayJack 16 Jun, 2024 @ 9:39am 
After testing, they are indeed still offset in all orientations. I have to build the gate behind the wall. This ends up looking like the corners of the walls are touching the corners of the gates, so offset by one whole square.
CantPlayJack 15 Jun, 2024 @ 8:19pm 
I'm still having an issue with the gates not functioning despite being "connected" to walls. I'm using version 1.54104.1625.3901