Page 1 of 2

alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 12:00 am
by ontheDOL
Hi everybody,

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;
i added this
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!

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 5:20 am
by HunabKu
Hi ontheDOL, and thanks for this solution.
if this works, it's a nice patch !
can you give me the file(s) for i test and commit it please ?

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 10:49 am
by PlanarChaosRvrtwo
its an db issue onthedol all keep doors have door type 0 and it assign a door type to it if you want change away from default you need change the door type

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 3:19 pm
by ontheDOL
i tried that , im not exactly sure what value to enter but i read "7" was the value for a keep door.
when i add the doors, 7 out of 9 were keep doors, yet they all have the same value except for "internalID" , so i dont think it is db related

"type" is all 0, yet doors are different, "flags" is all 0, yet doors are different.

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 3:25 pm
by PlanarChaosRvrtwo
7 is the vaule for neutral keep dor its an combined id of keep door and neutral door

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 3:32 pm
by ontheDOL
ok, so are you saying put 7 into the "type" field? because i've tried that and it does nothing.
or is there another value you are saying

in all of the previous posts on this forum about postern doors, no one simply says change a DB value, its all in the code. (but maybe its been updated....)

edited to clarify a few things, PVP ruleset, keep types are set to old.

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 3:46 pm
by ontheDOL
ok i little update, i added this.DoorIndex == 8 and this.DoorIndex == 9 to the code i changed. recompiled and the remaining two postern doors changed to keep doors :) their internal ID's were 2083808 and 2083809 so i guess the last number there is related to door index.

im gonna go try it on swanton keep in black mountains north and see if its all good there too.

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Thu Feb 02, 2017 5:08 pm
by PlanarChaosRvrtwo
No clue then

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Fri Feb 03, 2017 7:02 am
by HunabKu
Okai i tested in New Frontiers with Old Skins (use_new_keeps = 0), all doors works except one per keep, direction : IN to OUT.
The bug is player is jumber on the map floor level so in structure ...
Door ID : 710002002
ComponentID : 20
DoorIndex : 2
TowerNumber : 0
Right clic, show image.
sshot000.jpg
sshot000.jpg (173.04 KiB) Viewed 2930 times

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Fri Feb 03, 2017 8:31 am
by HunabKu
I tested also with New Skins (use_new_keeps = 1) :
Bug with the two ground floor doors, direction IN to OUT.
The bug is player is jumber on the map floor level so in structure ...
DoorID : 710000004
ComponentID : 0
DoorIndex : 4
Right clic, Show image.
sshot002.jpg
sshot002.jpg (194.97 KiB) Viewed 2926 times
DoorID : 710000006
ComponentID : 0
DoorIndex : 6
Right clic, Show image.
sshot001.jpg
sshot001.jpg (191.45 KiB) Viewed 2926 times

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Fri Feb 03, 2017 8:35 am
by HunabKu
Note the last DoorID number = DoorIndex

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Fri Feb 03, 2017 4:00 pm
by ontheDOL
i wonder if you add the same code to the line above
Code: Select all
if (this.Component.Skin == 10 || this.Component.Skin == 30) //old and new inner keep { if (this.DoorIndex == 1) return true;
it might work for NF

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Sat Feb 04, 2017 5:26 am
by HunabKu
the IsAttackableDoor method is not responsible about the bug.
Need to find where teleport destination Z is defined.

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Sat Feb 04, 2017 6:26 am
by HunabKu
For Z, i'm working to. Method Interact line ~379
Actualy it calculate Teleport Destination with player Heading considering if the door is in front but don't works correctly.
A very bad but working solution is to code each RvR door with fixed Destination.
I searching a better solution.
For your code i simplified it :
Code: Select all
public override bool IsAttackableDoor { get { if (Component == null || Component.AbstractKeep == null) return false; if (Component.AbstractKeep is GameKeepTower) { if (DoorIndex == 1) return true; } else if (Component.AbstractKeep is GameKeep) { if (Component.Skin == 10 || Component.Skin == 30) //old and new inner keep { if (DoorIndex == 1) return true; } if (Component.Skin == 0 || Component.Skin == 24) //old and new main gate { if (DoorIndex > 0 && DoorIndex < 10) return true; } } return false; } }

Re: alternative keeps and postern doors, beating dead horse?

PostPosted: Sat Feb 04, 2017 6:39 am
by HunabKu
I tried to put a NF keep on other zones about NF and BG but never works.
I'm so interesting to see that on your server and help you to implement that, and i will put it on the DoL. :lol: