![]() |
koraXs XML/INI/CFG parser for your bot
Well I made some nice program which I will use in my bot for CS, so why not to share it with you :)
koraXs parser is program which enables you to work with XML, INI and CFG files, easily retrieve and edit parameters, add new ones and export them to XML, CFG or INI note : If it's not obvious, this is for bot coders, not players :) Supporting INI files like ones in Unreal tournament, CFG files like ones in Half-life, and XML 1.0 specification. Both import and export ;)
Features :
Very easy usage : Imagine we have following XML file : Code:
<?xml version="1.0"?> PHP Code:
C friendly : You don't know C++ well ? No problem, you can easily use koraXs parser with your C skills. The previous example in C friendly way : PHP Code:
Load file on begining of session or when bot spawns (if you have separate configuration files for each bot), and then you can easily access contents of this file with get() functions. No need to create your own variables for each parameter. All content of file is already in memory. Powerful search : You want to search in xml file for name of bot, who has skill 10 and does not have skin 3 or 5 ? You can do it in one function : PHP Code:
Info and download : Right here (900kB) If you have any questions, ask here, on my forum or e-mail me |
Re: koraXs XML/INI/CFG parser for your bot
WOW
I will DEFINITELY have a look at this... and MOST PROBABLY include it in my bot (with proper credit of course :P) thanks man!! |
Re: koraXs XML/INI/CFG parser for your bot
@Jozef: Perhaps you had better add an "exception" comment, otherwise (in theory) anyone except you who use it in an HL bot will be actually in violation of GPL...
Quote:
The "exception" comment is like this one: (taken from the Metamod source) Code:
* In addition, as a special exception, the author gives permission to |
Re: koraXs XML/INI/CFG parser for your bot
koraXs parser stays under GNU/GPL, mainly because it is not only for bots. It can be used in lots of other projects where you need to store some parameters in files.
Quote:
If someone would have a problem including my program in his bot, I could give him koraXs parser in other license, or in GPL with sime exceptions. But of course it will be for concrete person for concrete bot. This GPL release of koraXs parser is for public. |
Re: koraXs XML/INI/CFG parser for your bot
ah :(
it's GPL... :( well I'm not sure I'll use it then... the GPL license is not a really free one... and it's contaminative switch to the BSD license, people, this one is TOTALLY free and enables everybody to do whatever he wants with the source (even include it in a commercial project without disclosing it). I don't like using licenses that contaminate my software. Even if I always release the source code anyway, it's a matter of principle. I do it because I feel like so, I NEVER WILL because some license forces me to. my bot will stay under the BSD license dot period. |
Re: koraXs XML/INI/CFG parser for your bot
ah, first time I licenced my program and look what happened :)
Well I'm gonna look at that BSD licence ... |
Re: koraXs XML/INI/CFG parser for your bot
Quote:
Took me far too long to find it but at the end ... http://www.gnu.org/licenses/gpl-faq....compatibleLibs And about BSD licence, it is non-copyleft licence, so someone can just take your code, do with it what he wants, make a profit from it and not even mention you. Well but PM you are right that if you would like to use program licensed under GPL, it would force you to release your program under GPL ... |
Re: koraXs XML/INI/CFG parser for your bot
about the "BSD Licenses" (plural):
http://www.gnu.org/philosophy/bsd.html And actually you don't have to GPL all your code if you used parts of GPL code as long as you're using a GPL compatiable license (the BSD License without the advertising clause is among one of them). But you have to state clearly that which part if GPL code (i.e., leave all the "this is free software blahblah..." comments as it was) and include a copy of GPL in it. That means when the software is distributed as a whole it's GPL, but I can just strip all the GPL code and it will be only under BSD License. take a look at this one: Quote:
(and I think PM is already in this place due to MegaHAL and Metamod) Also I don't think anyone is "forcing" anyone to release the source code since we can always not use GPL code. If I use GPL code that means I would like to release the source :) And here's what I think about simple permissive licenses like BSD, X11, etc: It's totally free, and even give you freedom to make it non-free :D [back to topic] That's good thing :) But I don't think I need all the CFG, XML and INI parsing code. Only one format is enough I think. |
Re: koraXs XML/INI/CFG parser for your bot
Quote:
Quote:
|
Re: koraXs XML/INI/CFG parser for your bot
Quote:
|
All times are GMT +2. The time now is 04:44. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.