Page 1 of 1

xml files and instances

Posted: Tue Jan 20, 2009 10:38 pm
by OldnGrey
I have a runuo scripter working on pol scripts (a nice little situation - I am so used to pol scripters defecting to the runuo community). Since he is used to coding in c# for runuo he has found a few things he's like to see in pol. I wasn't able to answer his questions, so I thought I'd put them to the core devs.

1. The ability to read and manipulate xml file format. I guess this means a new .em file, (I'm not totally sure our cfgfile.em can't already do it with some code wrappers to interpret the data. But just the same it might be a useful ability.) On the same vein I am guessing the need to access this file outside the pol directory tree. There are a lot of little utilities that manage xml files (eg a spawner) and the ability for pol to read them would be good. (Oh how I'd love to have utilities that update automatically unlike gumps). Of course, you might argue that the AUX interface is all we need since that is the only approved way for pol to talk to other applications.

2. Instances. He tells me that they have the ability to register a new map or area instance whereby the server manages players and npcs so they appear all alone in that instance. Many players and npcs can share the same map area and not see each other unless they are in the same registered instance. I am sure Luth has at least thought about this since his project uses fake instances (ie duplicate map segments) to achieve the same idea. But I don't have the luxury of having duplicated map areas.

Re: xml files and instances

Posted: Thu Jan 22, 2009 4:48 pm
by MuadDib
OldnGrey wrote:2. Instances. He tells me that they have the ability to register a new map or area instance whereby the server manages players and npcs so they appear all alone in that instance. Many players and npcs can share the same map area and not see each other unless they are in the same registered instance. I am sure Luth has at least thought about this since his project uses fake instances (ie duplicate map segments) to achieve the same idea. But I don't have the luxury of having duplicated map areas.
WoW Emulators do exactly that too (and several are in C++). Yes it's probably doable, but, let's get the core where it needs to be before adding a monster like that, hehe.

Far as 1. Yes, I agree with Aux Svc. Anyone could EASILY write a Package to read/write XML files using the Fileaccess abilities of POL (No need for cfgfile, with fileaccess!).

However, yes, I have thought on XML and MySQL support both. Nando and I have even discussed making a LoginServer that is ONLY for loginserver handling, using MySQL to run, and POL having an option to use MySQL also. So we do plan to come into the new millennium eventually, and are discussing ways to do it.

Just give us some time to get the core caught up more and we can begin looking at this stuff (or, if there are TRUSTWORTHY enough C++ coders out there, we could even assign specific jobs to new devs like adding the XML support, and that is all they need to work on at first). But who knows. With Austin retiring and Nando replacing him, we are inching closer and closer to our goals. With Turley on board also, that is definitely helping the progress of the core with his knowledge. Just wish we all had more time to dedicate, hehe.

Re: xml files and instances

Posted: Thu Jan 22, 2009 7:52 pm
by Nando
About no.2, we could try an approach of "virtual realms". Just define realms which use the same map_id as another one, but would be a different world (Turley's solution). Seems a nice idea to me. Or were you thinking of something simpler, like defining a box (some place inside the map) to have multiple instances there?

About xml, best bet is auxsvc or just use the scripts to write/read xml. Hm... unless you could find us some C++ xml reader. :)

Re: xml files and instances

Posted: Fri Jan 23, 2009 1:20 am
by Yukiko
My son has been wanting to write an Access or Open Office DB GUI front-end for modifying the CFG files (itendesc, npcdesc, etc.) for some time but since he has almost no experience with conventional programming languages like C or Pascal etc. he has had trouble parsing the cfg text. He says that Access cannot easily parse free-form text strings. Maybe there's some VBA functions that do it but if so he doesn't know about them. He has suggested using a CSV, SQL or XML format for the data files, all the data files. I have stated before that I like the simplicity of POL since there's no need for an SQL server. Plus I like being able to just open a file and edit the text. I'm over 45 years old so I date back to the days of doing EVERYTHING in text. Heck I still use ZTree (an XTree replacement) as a file manager alot. But back to the subject at hand... It might be nice if there were some way to export and import to and from a CSV or other data format as an interim solution until the Core changes to a new DB format. Is that something that's doable with a new EM?

I hope this isn't too far afield for this topic.

Re: xml files and instances

Posted: Fri Jan 23, 2009 3:35 am
by OldnGrey
ooh, I remember xtree. Being able to sort and list all files on a disk was a wonderful trick. But then it was a 10MB hard disk..... (no typo)

Thanks Muad for your reply. I appreciate the complexity a bit more now. And yes to do an instance properly you'd have to be able to register and de-register a rectangle of a map and what happens when a player's realm is on one after it de-registers..... How you populate it with items and npcs is another issue of course. I can imagine the .realm property might become a little more complex.......

Re: xml files and instances

Posted: Fri Jan 23, 2009 6:58 pm
by MuadDib
Tell Nando to finish the C# POLConfig classes for POLUtils, and he won't have to worry about writing special code to read POL's config files ;)

Re: xml files and instances

Posted: Sat Jan 24, 2009 2:45 am
by Yukiko
MuadDib wrote:Tell Nando to finish the C# POLConfig classes for POLUtils, and he won't have to worry about writing special code to read POL's config files ;)
Hey Nando... What he said.
*points to the quote*

Re: xml files and instances

Posted: Sat Jan 24, 2009 6:43 am
by Nando
Owww.. :(

*trying to walk away*