On Sun, 2008-07-13 at 18:28 +0200, Vincent Verhoeven wrote:
> Hey all,
> 
> the system to place orders (in libtpclient-py in particular, but I
> think the question applies more generally) is confusing the heck out
> of me. Well, not really - I know mostly how OrderDescs() works and I
> can apply orders to the cache but I got a few other questions:
> 
> * how can I know what kind of extra data an order need? In particular
> I'm currently taking a look at the Build Fleet order in RFTS, which I
> believe expects a list and a string, which respectively map to
> "[ISj][II]" and "IS" for some reason. Well, the string I can kinda
> understand (length + string), but the list? What am I supposed to pass
> when creating a Build Fleet order? Is there functionality to
> automatically convert a Python string to the "IS" struct, for example?
> Any other relevant info is also welcome, of course.

[ISj] - What can be selected
 - ID
 - Name
 - Maximum
[II] - What is selected
 - ID
 - Amount

See the
http://www.thousandparsec.net/tp/dev/documents/protocol3.php#OrderDescription_Desc
 document.

If you want to know how to dynamically deal with the order descriptions,
have a look at the code in tpclient-pywx.

> * how can I use probe orders, both in concept and code-wise? As I
> understand it they are used to query various parameters of a would-be
> order. What is that useful for and how to use them?

Probe orders can be sent to figure out what the values will be in the
"what can be selected" or similar part of an order frame.

It's basically a Insert, Get, Remove.

Tim 'Mithro' Ansell

_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel

Reply via email to