Hello There, Guest! Login or Register


Property Handler
#1
Properties in Las Venturas
Quote:A new property handler will have to be created, giving us loads of new features to place these damn things. If you're interested in creating this, please open a topic in the development section of the forums and start a discussion about the feature set is needs to have.

It's time I found something meaningful to do and since this is necessary and I certainly have plenty of property experience, I'm going to take on the prop handler ;)

[Image: 1204595289.png]

After some brief discussion on IRC, the back-end is probably going to be xml but storing the property info in the mysql database is also a possibility and we're keeping our options open for now. For testing I am assuming XML but, as can be seen below, much of the handler can be independent of the actual back-end.

Things which a property handler will need to do (based mostly on the 2.x handler)

Functions which depend on the back-end.
  • Backend Initialization: need to create the property list initially and if it gets reset for some reason
  • In-game Initialization: loading the properties from the back-end into a table for quick access.
  • Updating/Saving: need to save the new list when property attributes change

Functions which can be independent of the back-end by operating on the internal table storage.
  • Creation: need to allow in-game creation of new props.
  • Modification: need to allow names/costs/etc. to be changed and properties to be moved.
  • Deletion: obviously, sometimes properties have to go and it should be easy to do so.
  • Pickups: need to create the pickups for all the properties and display the descriptive text when someone visits one
  • Default earnings: properties should have a set of standard earnings ratios (which can be overridden). In lvp 2.x this was purely based on price; it may be good to take the wealth of the neighborhood into consideration for lvp 3
  • Property info: should be able to retrieve a list of all the properties and their attributes
  • Player owns: should be able to quickly find out who owns what, and get a list of all the props owned by a certain player; should also be able to simply get the number of props a player owns
  • Special attributes: certain properties will be able to do certain special things. we need to have a way to flag the properties and also quickly find out who owns a prop with a certain attribute.
  • Max properties: how many properties can a given player own at once?
  • Pay the money: how much does a player earn on each update? calculate and give it to them
  • Crash protection: when players disconnect, they should still own the props for a brief time so they can be restored on reconnect. If they don't reconnect, the props should be sold off for them.
  • ?? Distance calculation: LVP 2.x has a function to get the distance from a player to a given prop. Still needed?

Anything missing?
Reply


Messages In This Thread
Property Handler - by pdescobar - 03-04-2008, 03:20 AM
Re: Property Handler - by Peter - 03-04-2008, 10:24 AM
Re: Property Handler - by pdescobar - 03-04-2008, 07:51 PM
Re: Property Handler - by tomozj - 03-04-2008, 09:00 PM
Re: Property Handler - by Peter - 03-05-2008, 09:52 AM