So basically, I have been playing around with making a keep in a normal region , in this case Humberton keep in black mountains south.
I made a virtual keep there , and then added doors with /door show. There are nine doors total in the keep.
The front two large doors become Keep doors, while every one small door on the inside becomes a postern door. So i did a heap of searching on the forum, and it's asked a few times, and a few people saying they have fixed it (but not provided a solution)
I tried playing around with this code in GameKeepDoor
- Code: Select all
public override bool IsAttackableDoor { get { if (this.Component == null || this.Component.AbstractKeep == null) return false; if (this.Component.AbstractKeep is GameKeepTower) { if (this.DoorIndex == 1) return true; } else if (this.Component.AbstractKeep is GameKeep) { if (this.Component.Skin == 10 || this.Component.Skin == 30) //old and new inner keep { if (this.DoorIndex == 1) return true; } if (this.Component.Skin == 0 || this.Component.Skin == 24)//old and new main gate { if (this.DoorIndex == 1 || this.DoorIndex == 2) return true; } } return false;
- Code: Select all
if (this.Component.Skin == 0 || this.Component.Skin == 24) //old and new main gate { if (this.DoorIndex == 1 || this.DoorIndex == 2 || this.DoorIndex == 3 || this.DoorIndex == 4 || this.DoorIndex == 5 || this.DoorIndex == 6 || this.DoorIndex == 7) return true; }
which kinda works, the front two large doors are keep doors, as well as all the top small doors and one small inner door, while the other two small doors on ground level are still postern doors.
So i'm wondering if anyone has any better code for this? or another solution.
Thanks and sorry for long post!