PSUnreal Guildhouses: Difference between revisions

From PSwiki
Jump to navigation Jump to search
Created page with " To define a guild house entrance. We use actionlocations.triggertype == SELECT and actionlocations.responsetype == EXAMINE, then in the actionlocations.response we specify the entrance, example: <Examine><Entrance Type="ActionID" LockID="95" X="197765" Y="-314194" Z="10738.65" Rot="280" Sector="NPCroom" /><Return X="198233" Y="-314282" Z="10599.1" Rot="130" Sector="NPCroom" /><Description>..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:




=== Entrance ===
To define a guild house entrance. We use [[Action locationsTable|actionlocations]].triggertype  == SELECT and [[Action locationsTable|actionlocations]].responsetype == EXAMINE, then in the [[Action locationsTable|actionlocations]].response we specify the entrance, example:
To define a guild house entrance. We use [[Action locationsTable|actionlocations]].triggertype  == SELECT and [[Action locationsTable|actionlocations]].responsetype == EXAMINE, then in the [[Action locationsTable|actionlocations]].response we specify the entrance, example:
<br />
<Examine><Entrance Type="ActionID" LockID="95" X="197765" Y="-314194" Z="10738.65" Rot="280" Sector="NPCroom" /><Return X="198233" Y="-314282" Z="10599.1" Rot="130" Sector="NPCroom" /><Description>A lovely residence</Description></Examine>




<Examine><Entrance Type="ActionID" LockID="95" X="197765" Y="-314194" Z="10738.65" Rot="280" Sector="NPCroom" /><Return X="198233" Y="-314282" Z="10599.1" Rot="130" Sector="NPCroom" /><Description>A lovely residence</Description></Examine>
We check if the action location has a real item associated, which is the lock. This is done by finding an [[Item instancesTable|item_instances.]]<nowiki/>id == LockID specified in the XML.
 
We check if there is a guildhouse with [[GuildsTable|guilds.]]<nowiki/>houselockid == LockID specified above. If found then we use the  [[GuildsTable|guilds.]]<nowiki/>houseid to teleport the player to the right guildhouse instance.
 
=== '''Exit''' ===
To exit a guildhouse, you need a action location defined as this:
<Examine><Entrance Type='ExitActionID' /><Description>Way back home</Description></Examine>
The code will look at the current instance the player is in, and find the corresponding guildhouse, then from the lock ID is finding the original Action Location that was used as Entrance.
 
In the Entrance AL, there are the <Return> coordinates.
 
=== How to add a guildhouse ===
1) Spawn a simple lock (under quest items category) with:


* Pickupable false
* Collision Detection false
* Locked true
* Lockable true


We check if the action location has a real item associated, which is the lock. This is done by finding an [[Item instancesTable|item_instances.]]<nowiki/>id == LockID specified in the XML.
If the house is not owned by players and we need the house to be always open, the use:


We check if there is a guildhouse with [[GuildsTable|guilds.]]<nowiki/>houselockid == LockID specified above. If found then we use the  [[GuildsTable|guilds.]]<nowiki/>houseid to teleport the player to the right guildhouse instance.
* Locked false
* Securitylockable true (to set this one you need to use /key securitylockable)

Latest revision as of 22:58, 21 November 2022


Entrance

To define a guild house entrance. We use actionlocations.triggertype == SELECT and actionlocations.responsetype == EXAMINE, then in the actionlocations.response we specify the entrance, example:


<Examine><Entrance Type="ActionID" LockID="95" X="197765" Y="-314194" Z="10738.65" Rot="280" Sector="NPCroom" /><Return X="198233" Y="-314282" Z="10599.1" Rot="130" Sector="NPCroom" /><Description>A lovely residence</Description></Examine>


We check if the action location has a real item associated, which is the lock. This is done by finding an item_instances.id == LockID specified in the XML.

We check if there is a guildhouse with guilds.houselockid == LockID specified above. If found then we use the guilds.houseid to teleport the player to the right guildhouse instance.

Exit

To exit a guildhouse, you need a action location defined as this:

<Examine><Entrance Type='ExitActionID' /><Description>Way back home</Description></Examine>

The code will look at the current instance the player is in, and find the corresponding guildhouse, then from the lock ID is finding the original Action Location that was used as Entrance.

In the Entrance AL, there are the <Return> coordinates.

How to add a guildhouse

1) Spawn a simple lock (under quest items category) with:

  • Pickupable false
  • Collision Detection false
  • Locked true
  • Lockable true

If the house is not owned by players and we need the house to be always open, the use:

  • Locked false
  • Securitylockable true (to set this one you need to use /key securitylockable)