merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jun 15, 2004 12:14:47 GMT
Incidentally, I would like to change killed-by to killed-by-id, to bring it in line with the rest of the output. Is this ok for you? Change would only take effect from beta 0.2 onwards. That would be fine. Also, you are not outputting killed-by if the lord is not dead... so exhistence seems to mean dead. Would it be worth having an alive/dead tag and then the killed-by for extra information.
|
|
|
Post by sparrowhawk on Jun 15, 2004 12:51:13 GMT
I can't remember in XML - can you drop elements if they are empty or should they always be included, if only in shortened format, eg <killed-by-id/> ?
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jun 15, 2004 13:32:04 GMT
I think you can drop them, however the question is ambiguity for the reader.
<strength/>
can be construed as being the same as
<strength>0</strength>
but
<Killed-by/>
Does thaat mean he is dead, died of natural causes... or alive because he wasn't killed by anyone. In this instance also, does not including it mean he is alive, or died of natural causes?
In this instance you are using 1 tag to represent 2 possible outcomes, a) they are dead and b) who killed them.
|
|
|
Post by sparrowhawk on Jun 15, 2004 13:42:04 GMT
OK, I'll always include the tag and the value will be 0 (zero) if they are still alive
|
|
|
Post by sparrowhawk on Jun 15, 2004 13:44:16 GMT
OK, I'll always include the tag and the value will be 0 (zero) if they are still alive ditto for garrison-type ("-" if not a garrison) and recruited-by-id (0 for kings as they have not been recruited)
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jul 20, 2004 21:28:51 GMT
Could we have the scenario id or something in the xml output, so I can ident the maps etc...
|
|
|
Post by sparrowhawk on Jul 20, 2004 22:30:47 GMT
no problem (tomorrow though ok? ) as for maps - don't spend your time writing them up, i have a script that generates html maps out of any scenario, including domains. doesn't do lords yet but that should be easy enough
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jul 20, 2004 22:40:20 GMT
DOn't worry I have no intention of making maps!
BTW: I can't post in some threads, so I'm posting this here...
The domain thing is governed by a flag in LOM. So "A keep in the domain of..." has 1 bit set in the map data.
|
|
|
Post by sparrowhawk on Jul 22, 2004 15:51:01 GMT
v0.6 of the xml api is available. the script has changed name to:
api_xml_output.php
the optional parameters of gameID and lords (=Y) still apply
changes: - <citadels-to-capture> - <impassable-mountains> ( a Yes/No value)
- <mounted> tag changed to use Yes or No rather than 1 or 0, for consistency with other booleans
- <killed-by-id> replaces the now defunct <killed-by> - <killed-on-day> <liege-lord> ( a Yes/No value)
maybe some others that I have forgotten about with all the recent excitement
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jul 26, 2004 18:39:17 GMT
What do you store for the shield? I assumed always s_name.gif but I notice you support PNG as well, what about including the shield filename.
|
|
|
Post by sparrowhawk on Jul 26, 2004 21:15:32 GMT
for lords other than kings, it's always s_lordname.gif
for players, it's currently the same (but user name rather than lord name). However, when I get the shield upoad working, it can be any filename, and either gif or png.
I will add shieldname to player data
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Jul 26, 2004 22:50:22 GMT
I will add shieldname to player data Thanks, I think that will avoid any future issues. BTW: You might want to rethink the size restriction of 3k... how about 10k I have no problem with 10 per shield on icemark. SO maybe up the restriction upon move. Also, you should decide if animated gifs are ok or not.
|
|