Thread: Housing APIs
View Single Post
11/02/16, 01:39 AM   #12
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
2nd part of my blabla..


So yes, permission system !


First, different types of permissions :

- HOUSING_PERMISSION_TYPE_ENTRANCE <- person will be able to enter in da house
- HOUSING_PERMISSION_TYPE_INTERACT <- person will be able to interact with items in da house
- HOUSING_PERMISSION_TYPE_FURNITURES <- person will be able to move and take furnitures in da house
- HOUSING_PERMISSION_TYPE_PAYEMENTS <- perso will be able to pay your rent

We could split furniture in 2 parts. HOUSING_PERMISSION_TYPE_PLACE_FURNITURES & HOUSING_PERMISSION_TYPE_TAKE_FURNITURES. 1st one will only be able to repositionate your furnitures, 2nd to take (then sell, destroy, etc) your furnitures.

Then how to manage those levels :

- HOUSING_PERMISSION_SCOPE_OWNER : Only owner will be allowed. (ex : 1)
- HOUSING_PERMISSION_SCOPE_FRIENDS : his friendlist will be allowed. (ex : 2)
- HOUSING_PERMISSION_SCOPE_GUILDS : his guildmates will be allowed. (ex : 4)
- HOUSING_PERMISSION_SCOPE_PERDISPLAYNAME : displayname defined list will be allowed. (ex : 8)

Nota: We should be able to choose multiple value.
Ex: If permission scope = 3 it will be OWNER + FRIENDS. If it's 7, it'll be GUILDS+FRIENDS+OWNER . it's it's 11, it'll be OWNER +FRIENDS+DISPLAYNAME list.

Each value will be rattached to a permissionType. per ex, if we set 3 (owner+friends) Owner will have access to everything, friends will have access to HOUSING_PERMISSION_TYPE_ENTRANCE + HOUSING_PERMISSION_TYPE_INTERACT per example.

Default values : Player : everything, others: nothing. A tutorial popup will be nice!

so

local result = GrantHousingPermission(houseId, permissionType, permisionScope, concernedDisplayName)
--houseId is the houseId
--permissionType is the permissionType listed above
--permisionScope is the permissionScope listed above
--concernedDisplayName is a mandatory arg if permisionScope == HOUSING_PERMISSION_SCOPE_PERDISPLAYNAME.
--result will be a resultCode. (basically a boolean).
local isAllowed = GetHousingPermission(houseId, permissionType, permisionScope, concernedDisplayName)
isAllowed will be a boolean which will indicate if the permission is granted.
local result = RevokeHousingPermission(houseId, permissionType, permisionScope, concernedDisplayName)




If you add this:
Social data about housing.
local numHouses = GetNumHousesOwned(displayName)
-- returns the numbers of house the displayName owns.
Nota: If displayName don't allow HOUSING_PERMISSION_TYPE_ENTRANCE to his house to the requester, the function hides the house.
Ex: "@Bob" have 2 houses, 1 big and 1 small, he allow me in its big, but not me in its small. The function returns 1.
local houseId, reputationScore = GetHouseInfo(displayName, ownedHouseIndex)
-- returns the houseId (the address!) of the specified house for a displayName. It also returns the reputationScore of the house.



if you add this:
Rent pay:
local newDateBeforeExpulsion = PayRentForHouse(houseId, currencyType, amount)
-- it will pay the house. User can use different currencies (pay in alliance points, think pvp players ).
If you allow payement in Crowns, I would enjoy the function PayRentForHouseInCrowns(houseId, amount) being private.
-- this function will only be available while being in house (or everywhere ?..) or interacting with the House Seller NPC (see below).
newDateBeforeExpulsion will be a number, the new date before expulsion, it can also return nil if user don't have enought gold, etc.; it'll generate an event EVENT_HOUSE_RENT_PAYED(eventId, houseid, amount) (or EVENT_HOUSE_RENT_PAYEMENT_FAILED(eventId, houseid, reason) per ex.



If you add this:
Mannequins :
You'll be able to craft a mannequin and place your items on your manequin, it'll accept all ITEMTYPE_ARMOR & WEAPONS (excepted jewels). The mannequin will be with your armor dyed. It'll be a nice thing to store armors/weapons. You'll maybe want to allow only 1 mannequin (or 3..5) per house.

PlaceItemOnMannequin(bagId, slotId)
-- will place the item on the mannequin.
GrabItemFromMannequin(slotId)
-- will grab the item from mannequin.
slotId will be a EquipSlot constant.



If you add this :
Fireplaces should logically be present in Housing. I would love that the interaction starts an INTERACTION_CRAFT. Cooking is a craft which does not generate a lot of activities in cities and moving this craft (and only this) won't affect cities a lot. (I understand the consequences of having a craft station in da house -> emptying cities and think that others crafts should not be able in houses for this reason).


If you add this:
In big mansions I would enjoy a maid. The maid will be racial dependant of the house or crown store ++ (I know you are able to sell a sexy maid in crown store). We could interact with her. She'll hang in the house, clean it, etc, maybe tell stories.
The level of the maid could be defined with house level or maid level. We could have :

- Merchant as base. it'll open the merchant UI. I'm not fan of the repair cause of city need. (You want to repair : go in a city)
Nota: If user own a merchant (the ones you can buy in Crown store), I would enjoy this NPC as being permanently summonned in the house. Same for banker.


If you add this:
- Special furnitures
With One Tamriel you added a TON of items as being BoP. Resulting the explosion of need in bag space.
The Maid with a level allowing special furnitures will accept in an unlimited storage Items not eligible to crafting bag except quest items -> weapons/armors/consummables/misc.
Users will be able to unlock this with a crown store bought or an eso+ perk. The "Chest" will only be accessible throught the maid npc (and maybe the house npc seller). Chest will have exact same behavior than crafting bag.


If you add this:
- Musician : You'll be able to hire a musician. You'll be able to interact with him and choose what song you wanna hear.


If you add this:
House Seller NPC: If houses are not lifetime garanted (need to pay a rent, need to be logged last 6 months). the House seller NPC (1 per alliance, or 1 per zone) will :
- accept interaction for paying your rent.
- allow you to recover your furnitures previously set in your ex-house
- allow you to recover to your items previously deposed in your special furniture chest (only withdraw, if you want to deposit again, buy a house!)
This NPC will also guide you to the location of the house, little tutorial, etc. (where are the houses ??!!!)


If you add this:
Kittens and mounts:
For each type of mansions, I'd like to see my vanity pets & my mounts hanging here and there.
A HOUSE_TYPE_SMALL could accept 1 random vanity pet I have unlocked while a HOUSE_TYPE_BIGCASTLE would accept more (ex: 3 pets, 1 mount). All randomly generated from the vanity pet & mounts I own. They'll have their path defined or don't move at all but they'll be here.


If you add this:
Housing steal:
If you visit a house "as guest", you'll be able to steal items. You'll be able to interact with wardrobes, chest, etc. They'll generate a basic item to steal. (like the ones in npc houses).


If you add this:
Housing steal plus:
If there is a maid/musician, she'll maybe spot you and raise your infamy. You should be able to kill her (or steal her). Her presence could also generate a locked chest with a better reward. (or chest defined depending of the type of house). Big house could have some guards too.


If you add this:
Housing steal dailies:
With Thieves Guild DLC bought, you'll be able to take a daily quest, the NPC will send you in one of the houseId to steal the treasure (the locked chest) of the house. User will have to go to this place, select a house, enter as guest and steal the chest. You'll maybe need to enter in the 1st ("best") house of the ranking at this address. So basically, you'll steal top players. Rewards will be the ones of a thieves guild daily per ex.


If you add this:
Selling unpaid furnitures:
With rentals, houses will disappear with time (because player did not payed, did not connected). His furnitures if not "protected" (by maybe an eso perk) could be taken by game and so .. resell to other players maybe 3 months after. (A user come, pay his house for 4 months in gold, he leave game after the 2nd month, so he'll still have his items 5 months after).
A NPC poppping maybe once a week on week-end, selling in limited quantities items lost by players who did not paid their rentals could be done. It'll be a nice way to get items without having to search in guild stores or craft them. This npc will be unique and could pop randomly in some main cities (maybe starter ones, like daggerfall!). the npc could only be here for few minutes then go and then system will destroy those items.
Nota: Items bought in Crown store or unlocked as collectibles won't be sold, only "items".

If you add this:
Furniture dying ?.. a pink chair, a blue table. It would be cool if we could personalize the layers of our furnitures, maybe like armors, 3 colors, for beds it would be really nice. And you could sell *humhum* dyestamps for furnitures aswell. Of course, like armours , item will be bound after being dyed.

The future Crafting revamp :
You said you'll allow player to craft their furnitures, so I guess in the "creation" tab, you'll add a new tab "furnitures". (or revamp everything ).
Here I still don't know what I want. I hope we'll have style, after for mats, it's your choices and we don't really care.
Just the possibility to preview items like in crown store (same for weapons/armors , i asked few weeks ago..). That's all. After same things than all other crafts but it's not housing specific.



Ok, it's not all very API related, but I only talk about what I've in mind.

Last edited by Ayantir : 11/02/16 at 05:11 AM.
  Reply With Quote