changing maps does not reflect in dynamic maps

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

pmarreddy
Posts: 16
Joined: 07 Jun 2010, 09:21

changing maps does not reflect in dynamic maps

Postby pmarreddy » 06 Mar 2011, 08:03

HI There, we have a specific requirement where we keep changing the base map, right now if we change the base map it only comes for the new users only, i understand but how can we update the map for old users too wile preserving there inventory updates.

Adv thanks
prasanth
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 06 Mar 2011, 12:42

Sorry, I don't understand. Can you better explain?
Paolo Bax
The SmartFoxServer Team
pmarreddy
Posts: 16
Joined: 07 Jun 2010, 09:21

Postby pmarreddy » 26 Mar 2011, 15:05

sorry, i will try to explain better.

1) we created a map, placed some skins on map
2) this map is private for every user that means every user will get his own map based on the original map
3) now we modify the original map skins position or walkable tiles on the map
4) now for new users the map is ok, but for old users the map's changes does not reflect.

how can we make sure those changes get reflected for old users maps too which are already created by the time the original map is updated with out deleting those maps because users inventory will be lost if we delete those maps
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 27 Mar 2011, 13:23

Now it is more clear, thanks.
Unfortunately you can't do that. You will need to update the maps one by one manually. In fact if the user changed it, you can't both update the base one and keep the user changes.

Maybe you have to create your own map parser which does the job.
Paolo Bax
The SmartFoxServer Team
pmarreddy
Posts: 16
Joined: 07 Jun 2010, 09:21

Postby pmarreddy » 04 Apr 2011, 09:15

Thank you verymuch, can you point out how to do our own parser, is there an example code, if not can you briefly explain the process.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Apr 2011, 06:57

There's not much to say. If you open a .map file in a text editor you will see that it uses the JSON protocol to "describe" the map.
You will find JSON implementations for every coding language.
You have to parse that file and then figure out how to modify it without breaking it.
You should start with a small, well known map, with a few tiles on it, so you can figure out how it works.
Many of the values contained parameters should be easy to understand. If some of them is not clear, just ask.
Sorry, no code examples available.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 38 guests