Homes and Properties - Dev Guide for 0.8.8.0
netuttki upravil túto stránku 5 mesiacov pred

Using properties

Going Home

go_home

Call: gs 'homes_properties', 'go_home'

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Takes home to the location from where she can access either her current home - City Residential ('city_residential'), Pavlovsk Complex ('pav_complex'), etc. - or the property passed in $ARGS[1]

Uses the attributes of home, as defined in homes_property_attr - Homes and Properties - Property Attributes

go_straight_home

Call: gs 'homes_properties', 'go_straight_home'

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Takes Sveta to the entrance location of either her home - the hallway in the parents' home for example ('korrPar') or the property passed in $ARGS[1]

Uses the attributes of home, as defined in homes_property_attr - Homes and Properties - Property Attributes

go_bathroom

Call: gs 'homes_properties', 'go_bathroom'

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Takes Sveta to the bathroom of the property they are staying at the moment (home, hotel, guest, etc.) or the property that is identified by the vale passed in $ARGS[1] Uses the attributes of the property, as defined in homes_property_attr - Homes and Properties - Property Attributes

go_bedroom

Call: gs 'homes_properties', 'go_bedroom'

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Takes Sveta to the bedroom of the property they are staying at the moment (home, hotel, guest, etc.) or the property that is identified by the vale passed in $ARGS[1] Uses the attributes of the property, as defined in homes_property_attr - Homes and Properties - Property Attributes

free_internet_available

Call: func('homes_properties', 'free_internet_available', $ARGS[1])

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Returns -1 if the location provides free internet or 0 if it doesn't.


Managing property access, status and information


Setting access and current home

Every one of these calls has the the following argument.

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Using an invalid property code, or a location that is not part of a property will not have any effect, the functions check whether the passed value is valid and only act if it is.

The valid codes as recognised by the main game can be found in homes_properties_attr and Homes and Properties - Property Attributes, the ones added by different mods can be found in the given mod's code or documentation.

set_home

Call: gs 'homes_properties', 'set_home', $ARGS[1]
Set the current home for the player based on either a property code, the id or a location. This will also check whether the player has access to the property and if not, it will give them access.

give_access

Call: gs 'homes_properties', 'give_access', $ARGS[1]
Give access to the property for the player based on either a property code, the id or a location. Use this for properties that are not bought or rented therefor the player doesn't have a control over them, but can use it as a home long term - e.g. they can use the wardrobe, have their computer set up, etc.

Examples: Parents' Home, the Shulga Home, the Meynold Household, the live in maid bedroom, etc.

This will also check whether the player has a current home set, and if not and this is the only property they have access to, it will set this as the current home If the player has more than 1 accessible home left, then the player will have to set it based on their preference.

block_access

Call: gs 'homes_properties', 'block_access', $ARGS[1]

Block access for the player to the property based on either a property code, the id or a location.

This will also:

  1. clear out the current home if this was set as the player's home
  2. if the player has only one accessible home left then it will set that as the new current home. If the player has more than 1 accessible home left, then the player will have to set it based on their preference.

Querying property and location status

Every one of these calls has the the following argument.

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Using an invalid property code, or a location that is not part of a property will result in an empty string or 0 as a result.

The valid codes as recognised by the main game can be found in homes_properties_attr and Homes and Properties - Property Attributes, the ones added by different mods can be found in the given mod's code or documentation.

has_access

Call: func('homes_properties', 'has_access', $ARGS[1]) Returns -1 if the player has access to the property and 0 if they doesn't have access. The type of access is not relevant, it includes owned and rented properties, as well as one where an NPC granted access to the property - i.e. can live there. This will return 0 for properties used by a tenant.

can_live_here

Call: func('homes_properties', 'can_live_here', $ARGS[1])

Returns -1 if the location/property is a place where the player can live, whether he owns or rents the place, or just just allowed to live there: university dorm, parents home, the Meynold Household, etc.

is_current_home

Call: func('homes_properties', 'is_current_home', $ARGS[1]) !! Returns 0 if the location/property passed in $ARGS[1] is not the current home, otherwise returns -1.

is_at_a_home

Call: func('homes_properties', 'is_at_a_home', $ARGS[1]) Returns -1 if the location passed in $ARGS[1] is one of the homes the player has, be it owned, rented or just allowed to stay there.

is_property_of_status

Call: func('homes_properties', 'is_property_of_status', $ARGS[1], $ARGS[2])

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. 'rented': the player is renting the property
  2. 'owned': the player owns the property and can use it
  3. 'tenants': the player owns the property but tenants are using it
  4. 'purchased': the player owns the property (the sum of 'owned' and 'tenants')
  5. 'blocked': the player doesn't have access (has_access is easier though)
  6. 'hasaccess': the player has access the property but doesn't own or rent it.
$ARGS[2] string Same as $ARGS[1] in the previous table. property_code, location or empty/not passed Same as $ARGS[1] in general

Returns -1 if the location passed in $ARGS[1] is of the  queried status, otherwise returns 0.

get_property_code

Call: func('homes_properties', 'get_property_code', $ARGS[1])

Returns the property code for the value passed in $ARGS[1].

For example: returns 'parents_home' if $ARGS[1] has the value 'parents_home', '2', 'bedrPar', 'korrPar', 'sitrPar', etc.


Managing rented properties

Every one of these calls has the the following argument.

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'

Using an invalid property code, or a location that is not part of a property will not have any effect, the functions check whether the passed value is valid and only act if it is.

The valid codes as recognised by the main gam can be found in homes_properties_attrand Homes and Properties - Property Attributes, the ones added by different mods can be found in the given mod's code or documentation.

rent_property

Call: gs 'homes_properties', 'rent_property', $ARGS[1], ARGS[2]`

Argument Type Accepted Values Explanation
ARGS[2] integer
  1. Any positive number
  2. 0 or missing: The code will get the number of days in the current month and will use that.
The number of days the rent is paid for.

Use this when you want the player to have a rented property. It doesn't check whether the property can be rented, that has to be checked before calling this.

If it is used with a property code that can't be rented, it will not show up anywhere, rent won't be paid, rent days won't progress, etc. when using the "functions" provided, but checking the accessible_property[] will show it as present.

Ideas: Waiting Period and Deposit

To make it a bit more lifelike, I am thinking of adding a waiting time, i.e. the player can't move in immediately, only after a few days. This would also include the option for the player to select a Move in date that is at most 3 or 4 weeks away.

And to make life easier, include a deposit that would be between 2 weeks and 2 months worth of rent, that they would get back when they cancel the rent. Well, provided the landlord is not a dick. :)

The last utility bill would also be paid from this deposit.

cancel_rent

Call: gs 'homes_properties', 'cancel_rent', $ARGS[1]

Cancels the rent with immediate effect.

Ideas: Notice period I'm thinking of maybe adding one of the below

  1. allow the player to stay until the end of the current rental period as there is no refund
  2. implement a notice period system, like in real life.

pay_rent

Call: gs 'homes_properties', 'pay_rent', $ARGS[1]

Argument Type Accepted Values Explanation
ARGS[2] string
  1. 'card': payment is made via card
  2. 'cash': payment is made with cash
  3. '' or missing: this argument is optional, the default is 'card' payment
The method used for paying the rent. Mostly needed when the player pays the rent at the agency.

Pays the rent, the amount is based on the rent value stored for the property - it is stored when the player rents it.
This also sets the remaining rental days based on the number of days in the month.

set_rent_days

Call: gs 'homes_properties', 'set_rent_days', $ARGS[1], ARGS[2]

Argument Type Accepted Values Explanation
ARGS[2] integer
  1. Any number, positive or negative
Sets the remaining days to the exact amount passed.

Sets the remaining rental days to a specific amount that can be a positive number , a negative number or zero.

add_rent_days

Call: gs 'homes_properties', 'add_rent_days', $ARGS[1], ARGS[2]

Argument Type Accepted Values Explanation
ARGS[2] integer
  1. Any number, positive or negative
  2. 0 or missing: the number of days added will equal the number of days in the current month.
The number of days to be added to the remaining rent days.

Adds the number of days passed or the number of days in the current month to the remaining rent days.

set_rent_amount

Call: gs 'homes_properties', 'sent_rent_amount', $ARGS[1], ARGS[2]

Argument Type Accepted Values Explanation
ARGS[2] integer
  1. Any number that is >= 0.
The new rent to be paid every month.

Changes the rent amount to the new value passed. Useful in case the story calls for something like this - player demolishes the rental in a story, or someone implements a few How I pissed off my landlord... scenearios.

get_rent_days

Call: func('homes_properties', 'get_rent_days', $ARGS{1])

Returns the remaining rent days for the property

get_rent_amount

Call: func('homes_properties', 'get_rent_amount', $ARGS[1])

Returns the monthly rent of the property.


Managing purchased properties

Every one of these calls has the the following argument.

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'

Using an invalid property code, or a location that is not part of a property will not have any effect, the functions check whether the passed value is valid and only act if it is.

The valid codes as recognised by the main gam can be found in homes_properties_attrand Homes and Properties - Property Attributes, the ones added by different mods can be found in the given mod's code or documentation.

buy_property

Call: gs 'homes_properties', 'buy_property', $ARGS[1], ARGS[2]

Argument Type Accepted Values Explanation
ARGS[2] integer Any non negative value The final sales price of the property.

Use this when the player buys a property. Sets up the property as an owned property, and sets the sales price to the new sales price passed in $ARGS[2].

Right now the player can move in immediately, but I'm thinking of adding a waiting time - like in real life, you can't buy a `property and start using it the next minute.

sell_property

Call: gs 'homes_properties', 'sell_property', $ARGS[1], ARGS[2]

Argument Type Accepted Values Explanation
ARGS[2] integer Any non negative value The final sales price of the property.

Use this when the player sells a property. Removes the property from the owned properties, blocks access to it and sets the sales price to the new sales price passed in $ARGS[2].

Right now the player loses the property immediately, but I'm thinking of adding a waiting time - see buy_property.

get_property_sales_info

Call: gs 'homes_properties', 'get_property_sales_info', $ARGS[1]

Creates: $property_code: the property code ('parents_home') $property_display: a text that can be displayed in a sentence to describe the property. It starts with a lowercase letter and doesn't have any prepositions. ('cottage located in the cooperative village' ). property_sales_price: the sales price of the property as a number.

Creates a set of variables with the attributes relevant for the sale of property.

get_property_sales_price

Call: func('homes_properties', 'get_property_sales_price', $ARGS[1])

Returns the actual sales price of the property

tenants_move_in

Call: gs 'homes_properties', 'tenants_move_in', $ARGS[1], ARGS[2], ARGS[3]`

Argument Type Accepted Values Explanation
ARGS[2] integer A non negative value between 1 and 31 The day when the tenants will move out.
ARGS[3] integer A non negative value between 1 and 12 The month when tenants will move out

Important!

If tenants are using the propery it is not counted as an accessible property.

Makes the necessary changes to the property to track the tenants. If this property was the player's current home, then the code will try to find the next one.

If there is only one accessible property available (the property where the tenants moved in is not accessible anymore) it will set that as the current home of the player.

Otherwise the player will have to pick one themselves.

tenants_move_out

Call: gs 'homes_properties', 'tenants_move_out', $ARGS[1]`

Makes the necessary changes move the tenants out and make the property accessible to the player. It also makes the property the current home if this is the only accessible home the player has.

Managing construction and renovation

Every one of these calls has the the following argument.

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Using an invalid property code, or a location that is not part of a property will result in an empty string or 0 as a result.

The valid codes as recognised by the main game can be found in homes_properties_attr and Homes and Properties - Property Attributes, the ones added by different mods can be found in the given mod's code or documentation.

get_property_constuction_status

Call: func('homes_properties', 'get_property_construction_status', $ARGS[1])

Results: 0 - the property construction hasn't started (example, plot of land for the Matryona Mansion), 1 - construction started, utilities are installed, foundation and outer walls built 2 - property fully constructed.

Currently only one property needs to be constructed, the Matryona Mansion. Properties that don't need construction will automatically get value 2 assigned.

progress_construction_status

Call: func('homes_properties', 'progress_construction_status', $ARGS[1])

Moves the construction status of the property to the next level by one, until it reaches 2. So it needs to be called twice to get from 'construction didn't start' to 'fully constructed'.

is_property_renovated

Call: func('homes_properties', 'is_property_renovated', $ARGS[1])

Returns -1 if the property has been renovated and 0 otherwise.

renovate_property

Call: gs 'homes_properties', 'renovate_property', $ARGS[1], ARGS[2], $ARGS[3]

Argument Type Accepted Values Explanation
ARGS[2] integer A positive number The value/cost of the renovation.
$ARGS[3] string
  1. the renovated location, like 'bedroom'
  2. empty string or missing
The location that has been renovated. Optional, as not every property has renovation by room or such.

Stores what has been renovated on the property if it is passed in $ARGS[3] and stores the total renovation value, i.e. the total money spent on renovating the property. This impacts the sales price.


Getting information about properties


Getting the number of properties/homes

The list of which one of these are useful or relevant can change, this is a starting list, and I expect that it can change - removing ones that are never used, adding ones that would be more useful, etc.

Every get_%_count function has the following argument.

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. 'home'
  2. 'business'
  3. 'all' / '' / not passed
Will return the result for only the type of property that is defined by the value passed.
At the moment every property is a home, but there are plans for some business properties in the future.

Call these as functions, i.e. func('homes_properties', $ARGS[0], $ARGS[1]

get_rented_property_count

:

Call: func('homes_properties', 'get_rented_property_count', $ARGS[1])

Returns the number of properties that the player rented via an agency - i.e. it doesn't include the Pavlovsk Shared home, for example.

get_accessible_property_count

Call: func('homes_properties', 'get_accessible_property_count', $ARGS[1])

Returns the number of properties that the player can access at the moment. For homes this means that the player can live there. This includes properties that the player bought, rents or has permission to use - the parents' home, the Meynold household, the Pavlovsk Hotel room, etc. - but it does not include properties that the player has rented out, for example, the city apartment when it has tenants.

get_rentable_property_count

Call: func('homes_properties', 'get_rentable_property_count', $ARGS[1]) Returns the count of properties that can be rented, whether they are already rented by the player or not. For example, if the City Apartment is rented by the player, it will still count for this purpose.

get_available_for_rent_property_count

Call: func('homes_properties', 'get_available_for_rent_property_count', $ARGS[1]) Returns the number of properties that are avaiable for rent - rentable properties that are not rented by the player.. For example, if the City Apartment is rented by the player, it will not be included in the count.

get_furnishable_property_count

Call: func('homes_properties', 'get_furnishable_property_count', $ARGS[1])

Returns the number of furnishable properties. Currently used in the shop instead of if owned_home[1] = 1 or owned_home{1] = 2 or owned_home[3] > 0 or owned_home[4] > 0 or owned_home[5] = 2 or owned_home[5] = 3 or owned_home[15] > 0:


Get property attributes

The following calls will create a set of arrays containing the attributes for all the properties that fit the criteria.

get_rented_properties

Call: gs 'homes_properties', 'get_rented_properties', $ARGS[1], $ARGS[2]

Argument Type Accepted Values Explanation
$ARGS[1] string
  1. home: only properties that can be used as a home will be included
  2. 'business': only business properties (that can't be used as a home) will be included
  3. 'all' or '': all properties will be returned
The type of the property that should be "returned"
ARGS[2] integer
  1. 1 : only the $property_code array will be generated
  2. 0 or missing: full result will be created

Result: $property_code[] : an array holding the property code for the rented properties - 'city_apartment' $property_name[] : an array holding the names of the rented properties - 'City residential apartment' $property_display[] : an array holding the display strings of the rented properties - 'apartment in St. Petersburg''s residential area'

property_rent[] : an array holding the monthly rent payable for the rented properties property_days[] : an array holding the remaining days for the rented properties

It returns the above values for every property that is being rented by the player.

An example of how to use this can be found in the agentned.qsrc file.

get_owned_properties

Call: gs 'homes_properties', 'get_rented_properties', $ARGS[1], $ARGS[2]

Argument Type Accepted Values Explanation
$ARGS[1] string
  1. home: only properties that can be used as a home will be included
  2. 'business': only business properties (that can't be used as a home) will be included
  3. 'all' or '': all properties will be returned
The type of the property that should be "returned"
$ARGS[2] string
  1. a property code
  2. empty string or missing
If $ARGS[2] has a valid property code value it will return only that specific property. If $ARGS[2] has a value, then $ARGS[1] is ignored and is treated as 'all'

Result:
$property_code[] : an array holding the property code for the accessible properties - 'city_apartment'
$property_name[] : an array holding the names of the owned properties - 'City residential apartment'
$property_display[] : an array holding the display strings of the owned properties - 'apartment in St. Petersburg's residential area'
$property_status_display[] : an array of strings describing the properties' status - 'A(n) apartment in St. Petersburg's residential area which is currently occupied by your tenants'
$property_type[] : an array holding the type of the owned properties - 'permanent residence'

property_status[] : an array holding the status of the owned properties - 1, 2 or 3

Note: I will replace it with a string representation returning owned, rented or tenants, to eliminate the need of remembering what the numbers mean.

property_construction_status[] : an array holding the construction status of the owned properties - 0, 1, 2
property_is_renovated[] : an array holding the renovation status of the owned properties - -1 if the property is renovated and 0 if it isn't
property_sales_price[] : an array holding the sales price for the owned properties.
property_renovation_value[] : an array holding the renovation value for the owned properties.

It returns the above values for every property that has been purchased (and not sold) by the player, including ones that are used by tenants.

An example of how to use this can be found in the agentned.qsrc file.

get_accessible_properties

Call: gs 'homes_properties', 'get_accessible_properties', $ARGS[1]

Argument Type Accepted Values Explanation
$ARGS[1] string
  1. home: only properties that can be used as a home will be included
  2. 'business': only business properties (that can't be used as a home) will be included
  3. 'all' or '': all properties will be returned
The type of the property that should be "returned"

Result:
$property_code[] : an array holding the property code for the accessible properties - 'city_apartment'
$property_name[] : an array holding the names of the accessible properties - 'City residential apartment'
$property_display[] : an array holding the display strings of the accessible properties - 'apartment in St. Petersburg''s residential area'
$property_status_display[] : an array of strings describing the properties' status - 'A(n) apartment in St. Petersburg''s residential area which is currently occupied by your tenants'
$property_type[] : an array holding the type of the accessible properties - 'permanent residence'

property_status[] : an array holding the status of the accessible properties - 1, 2 or 3

Note: I will replace it with a string representation returning accessible, rented or tenants, to eliminate the need of remembering what the numbers mean.

property_construction_status[] : an array holding the construction status of the accessible properties - 0, 1, 2
property_is_renovated[] : an array holding the renovation status of the accessible properties - -1 if the property is renovated and 0 if it isn't
property_sales_price[] : an array holding the sales price for the accessible properties.
property_renovation_value[] : an array holding the renovation value for the accessible properties.

Returns the above values for every property that is accessible by the player, whether owned, rented or just given access to by an NPC.

get_properties_for_sale

Call: gs 'homes_properties', 'get_properties_for_sale', $ARGS[1]

Argument Type Accepted Values Explanation
$ARGS[1] string
  1. home: only properties that can be used as a home will be included
  2. 'business': only business properties (that can't be used as a home) will be included
  3. 'all' or '': all properties will be returned
The type of the property that should be "returned"

Result:
$property_code[] : an array holding the property code for the accessible properties - 'city_apartment'
$property_name[] : an array holding the names of the accessible properties - 'City residential apartment'
$property_display[] : an array holding the display strings of the accessible properties - 'apartment in St. Petersburg''s residential area'
$property_status_display[] : an array of strings describing the properties' status - 'A(n) apartment in St. Petersburg's residential area which is currently occupied by your tenants'
$property_type[] : an array holding the type of the accessible properties - 'permanent residence'

property_construction_status[] : an array holding the construction status of the accessible properties - 0, 1, 2
property_is_renovated[] : an array holding the renovation status of the accessible properties - -1 if the property is renovated and 0 if it isn't
property_sales_price[] : an array holding the sales price for the accessible properties.
property_renovation_value[] : an array holding the renovation value for the accessible properties.

Returns the above values for every property that can be bought by the player.

An example of how to use this can be found in the agentned.qsrc file.

get_properties_for_rent

Call: gs 'homes_properties', 'get_properties_for_rent', $ARGS[1]

Argument Type Accepted Values Explanation
$ARGS[1] string
  1. home: only properties that can be used as a home will be included
  2. 'business': only business properties (that can't be used as a home) will be included
  3. 'all' or '': all properties will be returned
The type of the property that should be "returned"

Result:
$property_code[] : an array holding the property code for the rented properties - 'city_apartment'
$property_name[] : an array holding the names of the rented properties - 'City residential apartment'
$property_display[] : an array holding the display strings of the rented properties - 'apartment in St. Petersburg''s residential area'

property_rent[] : an array holding the monthly rent payable for the rented properties
property_days[] : an array holding the remaining days for the rented properties

Returns the above values for every property that can be rented by the player.

An example of how to use this can be found in the agentned.qsrc file.

get_internet_enabled_properties

Calls: gs 'homes_properties', 'get_internet_enabled_properties', $ARGS[1]

Argument Type Accepted Values Explanation
$ARGS[1] string
  1. home: only properties that can be used as a home will be included
  2. 'business': only business properties (that can't be used as a home) will be included
  3. 'all' or '': all properties will be returned
The type of the property that should be "returned"

Result:
$property_code[] : an array holding the property code for the rented properties - 'city_apartment'
$property_name[] : an array holding the names of the rented properties - 'City residential apartment'
$property_status[] : an array holding the status for the properties - rented, owned, tenants, no access
property_is_current_home[] : an array holding a true/false flag for the properties - 0 not the current home, -1 it is the current home.

Returns the above values for all properties for which the player can buy an internet subscription

clean_up_property_data

Call: gs 'homes_properties', 'clean_up_property_data' As the above calls create a number of variables, doing a killvar for all of them can be tedious and error prone.

Calling this will clean up every property_*[] and $property_*[] variable created by these calls.

get_property_attributes

Call: gs 'homes_properties', 'get_property_attributes'

Arguments Type Accepted Values Explanation
$ARGS[1] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Creates gets the property attributes via gs 'homes_properties_attr', 'get_property_attr' and creates a copy of the arrays to use -> $current_property and current_propertythen cleans up the original property array. Mostly useful in case only to "hide" the homes_properties_attr from the general code.
Not 100% convinced that it's that useful.

get_property_attribute

Call: func('homes_properties', 'get_property_attribute', $ARGS[1], <$ARGS[2]>)

Arguments Type Accepted Values Explanation
$ARGS[1] string Any valid property field name ('name', 'rent', etc.) the name of the field has to be prefixed with $ if the value is a string, like '$name' - this is needed to know whether to return $RESULT or RESULT. Or we could add an $ARGS[3] to specify STRING or NUMBER.
$ARGS[2] string
  1. a property code: the valid codes can be found in the homes_properties_attr file. Examples: 'city_apartment', 'parents_home'
  2. a property id: this is the old numeric id (city apartment = 1, parents home = 2) but pass it as a string
  3. a location: a value that can appear in $loc, like 'bedrPar' or 'pav_park'
  4. an empty string or not passed: if the value is empty, the the current $loc value will be used.

Returns the value of $property[$ARGS[1]] either in $RESULT (for strings, if $ was added to the field name) or RESULT (for numbers, if $ was not present).