[RunUO 2.0 RC1] Custom Regions in a Box V4.0
Description:
This is a rewrite/update for RunUO 2.0 of Asayre8's extremely popular Custom Regions in a Box script for RunUO 1.0. This is also a compilation of changes made by Rift in his re-release of Custom Regions in a Box.
Along with updating this to 2.0 I have included Rift's mods and quite a few changes of my own to improve upon what Asayre started.
Please visit the following threads to familiarize yourself with the background of Custom Regions in a Box and a more in-depth description:
Asayre's Original CustomRegions in a Box V3.6
Rift's Mod [V3.6a]
Installation:
Download the Custom Regions in a Box v4.0.zip below.
Unzip the Custom Regions folder from the zip into your Scripts folder (preferrably a Custom folder or the Engines folder)
Restart your server and you are ready to go.
Usage:
[add RegionControl in game to add a RegionControl.
Visit the links in the Description section above to see the previous features.
Read my Changelog below for V4.0 to discover the new features and changes from previous versions. The Changelog is also included in the Zip file.
V4.0 Changelog:
- Renaming of RegionStone.cs
- RegionStone.cs renamed to RegionControl.cs to properly reflect the name of the Class. (functionality is still the same)
- New RegionControl Constructors
- RegionControl(Rectangle3D rect) to create a RegionControl with an optional area specified by a Rectangle3D.
- RegionControl(Rectangle2D[] rects) to create a RegionControl with an optional area specified by a Rectangle2D array.
- RegionControl(Rectangle3D[] rects) to create a RegionControl with an optional area specified by a Rectangle3D array.
- New "Active" Property for RegionControl
- Set RegionControl.Active to TRUE (Default) then the Region is active.
- Set RegionControl.Active to FALSE then the Region is inactive.
- Changes to Rift's Custom Region Mods
- NoPlayerCorpses has been split up into DeletePlayerCorpse and DeleteNPCCorpse, to allow more customization.
- NoItemDrop has been split up into NoPlayerItemDrop and NoNPCItemDrop, to allow more customization.
- New RegionControl Flags
- EmptyNPCCorpse, if set to TRUE all the items from an NPC's corpse, on death, will be placed outside of the corpse on to
the ground.
- EmptyPlayerCorpse, if set to TRUE all the items from a Player's corpse, on death, will be placed outside of the corpse on to
the ground.
- DeleteNPCCorpse, if set to TRUE any NPC's corpse, on death, will be deleted.
- DeletePlayerCorpse, if set to TRUE any Player's corpse, on death, will be deleted.
- ResNPCOnDeath, if set to TRUE any NPC that dies will have a new instance created in the spot that it died.
- ResPlayerOnDeath, if set to TRUE any Player that dies will be resurrected in the spot that they died.
- MoveNPCOnDeath, if set to TRUE any NPC that dies will be moved to a spot you designate.
- Set MoveNPCToLoc to the Point3D that you wish to move the NPC to.
- Set MoveNPCToMap to the Map that you wish to move the NPC to.
- MovePlayerOnDeath, if set to TRUE any Player that dies will be moved to a spot you designate.
- Set MovePlayerToLoc to the Point3D that you wish to move the Player to.
- Set MovePlayerToMap to the Map that you wish to move the Player to.
- NoPlayerItemDrop, if set to TRUE any Player that dies will not drop their backpack Items to their corpse.
- NoNPCItemDrop, if set to TRUE any NPC that dies will not drop their backpack Items to their corpse.
- Changes to [RegionBounds command
- Targeting a Mobile shows their Region outlined in blue still.
- Targeting a RegionControl that has its Active property set to TRUE outlines the region in green.
- Targeting a RegionControl that has its Active property set to FALSE outlines the region in red.
- Changes to RegionControl Flags
- CannotLootOwnCorpse property changed to CanLootOwnCorpse
- CannotEnter property changed to CanEnter
- Fixed some spelling mistakes
- All instances of "AllowBenifit" changed to "AllowBenefit".
- Prevention of identical RegionName
- On Deserialize, if a region control has the same RegionName as another the region it will have a 1 or 2 etc. added to its
name to distinguish it.
For eg. If a region is called "Custom Region" and another region is already called "Custom Region" it will get called "Custom
Region 1", if "Custom Region 1" already exists too then it will be called "Custom Region 2" etc. This is because of the new way that
Regions are registered on to maps in RunUO 2.0.
- On creation, a new Region Control will be called "Custom Region" and as before each new "Custom Region" will have a
number added after its name.
- On setting of RegionName, if a Region Control already exists with the RegionName that the user tries to specify by using
[props etc. the RegionName will not be changed and a Warning will be displayed in the Console.
Approval Status:
- Have PMed Asayre before starting work to ask permission, I receieved no reply .
However after reading posts from him saying about his lack of time due to his time being commited to the main RunUO 2.0 release I decided I wanted to do Custom Regions in a Box justice and release it for all the fans for 2.0.
- If Asayre himself or a Mod has a problem with this post then please either PM me and I will remove it or remove it yourself but please send me a PM telling me you have done so and your reasons. Thanks
Comments/Suggestions/Bugs:
Please provide me with any feedback you wish, either in this thread or as a PM. Please also provide me with any Bugs you may find and try to include as much detail in your posts as you can so I can fix them.
I have started a list below of possible features that I would personally like to add to this, please reply in this thread with your comments on these features and also with your own ideas that I will also consider.
Thanks everyone.
Possible Future Updates:
- Export/Import command
An Export command for RunUO 1.0 to export details about all your pre-existing Region Controls. An Import command for RunUO 2.0 to import your exported 1.0 Region Controls into your RunUO 2.0 Server.
- Region Control Profiles
- Profiles for each Region Control so that it can be reused for different things according to different profile sets. An example for this is to use a Region Control for an Event Arena that can hold different Events, different profiles for the Region Control would relate to different Events, so the arena can easily be switched from one Event to another.
- Overhaul of Gumps
Redesigning the Gumps, this would especially be needed if the Region Control Profiles were to be implemented.
Custom Regions in a Box V4.0
Description:
This is a rewrite/update for RunUO 2.0 of Asayre8's extremely popular Custom Regions in a Box script for RunUO 1.0. This is also a compilation of changes made by Rift in his re-release of Custom Regions in a Box.
Along with updating this to 2.0 I have included Rift's mods and quite a few changes of my own to improve upon what Asayre started.
Please visit the following threads to familiarize yourself with the background of Custom Regions in a Box and a more in-depth description:
Asayre's Original CustomRegions in a Box V3.6
Rift's Mod [V3.6a]
Installation:
Download the Custom Regions in a Box v4.0.zip below.
Unzip the Custom Regions folder from the zip into your Scripts folder (preferrably a Custom folder or the Engines folder)
Restart your server and you are ready to go.
Usage:
[add RegionControl in game to add a RegionControl.
Visit the links in the Description section above to see the previous features.
Read my Changelog below for V4.0 to discover the new features and changes from previous versions. The Changelog is also included in the Zip file.
V4.0 Changelog:
- Renaming of RegionStone.cs
- RegionStone.cs renamed to RegionControl.cs to properly reflect the name of the Class. (functionality is still the same)
- New RegionControl Constructors
- RegionControl(Rectangle3D rect) to create a RegionControl with an optional area specified by a Rectangle3D.
- RegionControl(Rectangle2D[] rects) to create a RegionControl with an optional area specified by a Rectangle2D array.
- RegionControl(Rectangle3D[] rects) to create a RegionControl with an optional area specified by a Rectangle3D array.
- New "Active" Property for RegionControl
- Set RegionControl.Active to TRUE (Default) then the Region is active.
- Set RegionControl.Active to FALSE then the Region is inactive.
- Changes to Rift's Custom Region Mods
- NoPlayerCorpses has been split up into DeletePlayerCorpse and DeleteNPCCorpse, to allow more customization.
- NoItemDrop has been split up into NoPlayerItemDrop and NoNPCItemDrop, to allow more customization.
- New RegionControl Flags
- EmptyNPCCorpse, if set to TRUE all the items from an NPC's corpse, on death, will be placed outside of the corpse on to
the ground.
- EmptyPlayerCorpse, if set to TRUE all the items from a Player's corpse, on death, will be placed outside of the corpse on to
the ground.
- DeleteNPCCorpse, if set to TRUE any NPC's corpse, on death, will be deleted.
- DeletePlayerCorpse, if set to TRUE any Player's corpse, on death, will be deleted.
- ResNPCOnDeath, if set to TRUE any NPC that dies will have a new instance created in the spot that it died.
- ResPlayerOnDeath, if set to TRUE any Player that dies will be resurrected in the spot that they died.
- MoveNPCOnDeath, if set to TRUE any NPC that dies will be moved to a spot you designate.
- Set MoveNPCToLoc to the Point3D that you wish to move the NPC to.
- Set MoveNPCToMap to the Map that you wish to move the NPC to.
- MovePlayerOnDeath, if set to TRUE any Player that dies will be moved to a spot you designate.
- Set MovePlayerToLoc to the Point3D that you wish to move the Player to.
- Set MovePlayerToMap to the Map that you wish to move the Player to.
- NoPlayerItemDrop, if set to TRUE any Player that dies will not drop their backpack Items to their corpse.
- NoNPCItemDrop, if set to TRUE any NPC that dies will not drop their backpack Items to their corpse.
- Changes to [RegionBounds command
- Targeting a Mobile shows their Region outlined in blue still.
- Targeting a RegionControl that has its Active property set to TRUE outlines the region in green.
- Targeting a RegionControl that has its Active property set to FALSE outlines the region in red.
- Changes to RegionControl Flags
- CannotLootOwnCorpse property changed to CanLootOwnCorpse
- CannotEnter property changed to CanEnter
- Fixed some spelling mistakes
- All instances of "AllowBenifit" changed to "AllowBenefit".
- Prevention of identical RegionName
- On Deserialize, if a region control has the same RegionName as another the region it will have a 1 or 2 etc. added to its
name to distinguish it.
For eg. If a region is called "Custom Region" and another region is already called "Custom Region" it will get called "Custom
Region 1", if "Custom Region 1" already exists too then it will be called "Custom Region 2" etc. This is because of the new way that
Regions are registered on to maps in RunUO 2.0.
- On creation, a new Region Control will be called "Custom Region" and as before each new "Custom Region" will have a
number added after its name.
- On setting of RegionName, if a Region Control already exists with the RegionName that the user tries to specify by using
[props etc. the RegionName will not be changed and a Warning will be displayed in the Console.
Approval Status:
- Have PMed Asayre before starting work to ask permission, I receieved no reply .
However after reading posts from him saying about his lack of time due to his time being commited to the main RunUO 2.0 release I decided I wanted to do Custom Regions in a Box justice and release it for all the fans for 2.0.
- If Asayre himself or a Mod has a problem with this post then please either PM me and I will remove it or remove it yourself but please send me a PM telling me you have done so and your reasons. Thanks
Comments/Suggestions/Bugs:
Please provide me with any feedback you wish, either in this thread or as a PM. Please also provide me with any Bugs you may find and try to include as much detail in your posts as you can so I can fix them.
I have started a list below of possible features that I would personally like to add to this, please reply in this thread with your comments on these features and also with your own ideas that I will also consider.
Thanks everyone.
Possible Future Updates:
- Export/Import command
An Export command for RunUO 1.0 to export details about all your pre-existing Region Controls. An Import command for RunUO 2.0 to import your exported 1.0 Region Controls into your RunUO 2.0 Server.
- Region Control Profiles
- Profiles for each Region Control so that it can be reused for different things according to different profile sets. An example for this is to use a Region Control for an Event Arena that can hold different Events, different profiles for the Region Control would relate to different Events, so the arena can easily be switched from one Event to another.
- Overhaul of Gumps
Redesigning the Gumps, this would especially be needed if the Region Control Profiles were to be implemented.