How to Make A HOUSE SYSTEM in source 5530?

06/08/2013 10:03 ryuchetval#16
Well basically that would be it but it won't have to check much, only check if you're inside a house map and then send all spawns of the players inside the pool you are in.

I am not sure that would be a drawback in performance, and oh...I didn't know that it could be more than 5, at that point it would be a little more complex, yet making a dynamic map system like saving a file for every character that owns a map will probably get some time to think about it when you don't know where to start. At least this way I got an idea where and how to start. Making a map a duplicate of another under a different name doesn't sound too easy and more complex than my idea.
06/08/2013 10:12 Spirited#17
Quote:
Originally Posted by ryuchetval View Post
Well basically that would be it but it won't have to check much, only check if you're inside a house map and then send all spawns of the players inside the pool you are in.

I am not sure that would be a drawback in performance, and oh...I didn't know that it could be more than 5, at that point it would be a little more complex, yet making a dynamic map system like saving a file for every character that owns a map will probably get some time to think about it when you don't know where to start. At least this way I got an idea where and how to start. Making a map a duplicate of another under a different name doesn't sound too easy and more complex than my idea.
Making a map file for each player's house sounds like something from picture maps (back in Elite-CoEmu), which is a very bad way of doing it. As I stated, a dynamic map is a copy of another map. All you have to do is load that map that it's copying from. There's no need for hundreds of copies of the same map.
06/08/2013 13:44 ryuchetval#18
So basically make a file that keeps pairs of the two "Owner Id (as map id) and the MapID (that is duplicated)" and when you teleport to the "OwnerID" you just send the effect of the MapID.

I believe it's pretty easy to make if there are not any problems coming into the way.

To make it clear I'll give an example of what I wanted to say:

Your EntityID : 1000000
Making a house ->
MapID: 1000000
MapID_ToSend: 1098 (or whicever housetype you have)

You teleport to MapID and you see MapID_ToSend. I hope that I made it clear enough heh.
06/08/2013 13:51 InfamousNoone#19
v2 has dynamic maps implemented... lol
06/08/2013 14:01 ryuchetval#20
Oh well, I am using an 5165 source and not willing to change so I am just trying to make my ideas come to implementation in my own style. As long as it works it shouldn't be a problem since there are a lot of possible dynamic maps that can be made.
06/08/2013 18:24 Spirited#21
Quote:
Originally Posted by ryuchetval View Post
Oh well, I am using an 5165 source and not willing to change so I am just trying to make my ideas come to implementation in my own style. As long as it works it shouldn't be a problem since there are a lot of possible dynamic maps that can be made.
"As long as it works" usually isn't a methodology I encourage. With a server, your main goal is performance. If that means more planning and complicated code to achieve that, then so be it. Making additional files is unnecessary (unless your database is flat-file, then you will need to create additional files for saving house and furniture data). Regarding maps, all that is required is that you load the house map (so a copy exists for the player loading it). First, you'd load the save file for the house; then, if the player has a house, you would load the map and teleport the team to the house. Once every individual has left the house, the map is disposed of. Some map systems won't be able to handle this system efficiently, so you might have to replace it. You really need to know what you're doing though to do so.