Troubles with priories. #63


  • Other
  • Replied
Open
Assigned to phoenix_iv_
  • _ForgeUser4508675 created this issue Sep 12, 2013

    This is a question of certain mechanics within the plugin, not an error report. As of now the plugin is up to date.
    My setup is the following:
    Parent Region: Market - Contains Market Stalls (Shops)
    Parent Region: Eco_Housing - Contains Small Houses (House)
    Parent Region: Eco_Bundle- Contains Region: Market and Region: Eco_Housing
    Parent Region: Lower_City- Contains Dual House-Shops (House and Shop) and Region: Eco_Bundle

    The regions Market and Eco_Housing are separate, but encompassed by Eco_Bundle.
    Lower_City has an additional complex, a group of Home-Shops, and encompasses Eco_Bundle as well.

    This is the Desired result:

    I would like only one shop and one house to be rented by the players at one time, with the House-Shops counting as both.

    Methods that did not work:
    1. Set Region: Market and Region: Eco_Housing at priority 3, and max-regions-rent to 1.
        Set Region: Eco_Bundle at priority 2, and max-regions-rent to 2.
        Set Region: Lower_City at priority 1, and max-regions-rent to 1.
    -Still allowed one to buy both a stall and home, plus the dual-home-shop.

    2. Set Region: Market and Region: Eco_Housing at priority 1, and max-regions-rent to 1.
        Set Region: Eco_Bundle at priority 2, and max-regions-rent to 2.
        Set Region: Lower_City at priority 3, and max-regions-rent to 1.
    -Only allowed to buy 1 stall period

    3.Set Region: Market and Region: Eco_Housing at priority 3, and max-regions-rent to 1.
        Set Region: Eco_Bundle at priority 2, and max-regions-rent to 2.
        Set Region: Lower_City at priority 2, and max-regions-rent to 1.
    -Still allowed one to buy both a stall and home, plus the dual-home-shop.

    4.Set Region: Market and Region: Eco_Housing at priority 1, and max-regions-rent to 1.
        Set Region: Eco_Bundle at priority 3, and max-regions-rent to 2.
        Set Region: Lower_City at priority 2, and max-regions-rent to 1.
    -Can buy two shops or two homes in Eco_Bundle, and can buy a House-shop.

    Is what I am trying possible? Or can I not do this?

    Attaching a paint pic for region reference.

  • _ForgeUser4508675 added the tags New Other Sep 12, 2013
  • _ForgeUser4508675 added an attachment Reference.jpg Sep 12, 2013

    Reference.jpg

  • _ForgeUser4508675 added an attachment Sep 12, 2013
    Attachment was deleted Dec 3, 2016
  • Phoenix_IV_ posted a comment Sep 14, 2013

    Very interesting idea. I've thought about it and I think there is a solution which works without any code-hacking:

    Create two wrapper-regions where one covers "Market" and "Lower City" and one covers "Eco-Housing" and "Lower City". Set the max-regions for these two to 'one'. Now, if a user buys a region in "Market" or "Eco-Housing" this will block the possibility to buy another region in "Lower City". If he buys a region in "Lower City" this will prevent the user from buying a plot in one of the other two regions. However, a user will still be able to buy a region in "Market" plus a region in "Eco-Housing", as the wrapper-regions do not overlap there.

    The priorities shouldn't matter then, but make sure to remove the region-limitation for all other regions.

    I did not test this, but I think it should work. What's your opinion?

    Thanks for spending the time creating the description and the image, it was easy to understand. I will attach an altered version of your sketch myself. It's not a masterpiece, but it still might help.


    Edited Sep 14, 2013
  • Phoenix_IV_ removed a tag New Sep 14, 2013
  • Phoenix_IV_ added a tag Waiting Sep 14, 2013
  • _ForgeUser4508675 posted a comment Sep 14, 2013

    unfortunately this did not work, when the two are set and have equal priority one takes complete control and allows the renting of the lower city house-shops and one of the others, and when I step up the priority on the ignored zone, the other loses hold.

  • _ForgeUser4508675 removed a tag Waiting Sep 14, 2013
  • _ForgeUser4508675 added a tag Replied Sep 14, 2013
  • Phoenix_IV_ posted a comment Sep 15, 2013

    Hm, yeah, you're right. I didn't consider the fact that a plot within a region that has a custom limit set is not counted.
    I'm sorry to say but in this case I can't think of a 'perfect' solution. However, there are some alternatives:

    1. Allowing one plot in each region
    Pro:
    - Not much to do
    Con:
    - Obviously not what you are looking for. Users will be able to own more regions than you want them to

    2. Customizing the code
    Pro:
    - Can achieve exactly what you need
    Con:
    - Requires coding skills
    - Needs to be redone / adjusted every time the plugin is updated.

    3. Let the users choose the area using permissions
    Require buying permissions for "Eco-Bundle" and "Lower City" (this time NOT including the Eco-Bundle). Create a possibility for users to gain either the permission for "Eco-Bundle" or "Lower City". This can be done using Command-Signs for example. But you have to make sure that users are not able to gain permission for both at once or for "the other one" if they already own a plot in one of the regions.

    Pro:
    - Fits your needs
    - Update-save
    Con:
    - If a user wants to change from one option / region to the other admin-help is required. The admin has to make sure the user does not own a region in the area anymore.

    4. Combine 2 & 3
    Write a plugin that takes over the admin's job for (3).

    Pro:
    - Fits your needs
    - As long as RegionForSale's API doesn't change it is update compatible
    Con:
    - Requires coding skills


    It might be an option to add native support for such 'constructs' in the future. If you have an idea how this could work then let me know.

  • _ForgeUser4508675 posted a comment Sep 15, 2013

    Ok, for number 3, how would one guarantee that players would not be able to gain permission for both? and would it be possible to remove a gained permission with another sign? and would any of this be possible to be done with command blocks?

  • Phoenix_IV_ posted a comment Sep 15, 2013

    @Shadowfire_Omega: Go

    I haven't worked with command blocks up to now, but it's all about executing commands, so it should be.

    Here is one idea how to do this:
    Create an area that can't be accessed. The two command blocks or whatever else are in there. You can get in there using /warp. You need permission to use this /warp. Triggering one of the command blocks / signs will execute the following commands: Remove the permission for the warp, add the permission for the corresponding region and teleport the player out of the area.

    Just one possibility. Another way could be to do this using a plugin that lets you create your own commands for example. Might even be easier.

    Like I said before the permission can be removed later, but if the player already owns a plot this will not evict him.


To post a comment, please login or register a new account.