On Wed, 2007-11-21 at 10:14 +1100, Brett Nash wrote:
> Hello,
> So I'm in the process of implementing order entry for galaxie[1]. One
> thing I noticed for object selection is that is currently all or
> nothing. That is an object parameter is currently all objects are
> 'valid' with no filter.
Agreed, this is rather annoying as the list is 2700 lines long in recent
games (and is only going to get longer).
> The problem is that too often the list of valid objects is a small
> subset of this. Merge with fleet is obviously can only be merged with
> other fleets. Similarly colonise can be only be on planets. Obviously
> there is a second level of validity here.. but you really can't colonise
> a star.
Again agreed.
> Work arounds are to use a list of valid objects, but then there is no
> way for a client to know what it is[2], and if the list is all
> objects... well that could be a long list (especially since it would be
> sending the objects by name). A reference list could also be sent.. but
> then again that would be a long list as well.
>
> Hence I'd like to propose either a new order argument or a modification
> to the current object argument to include:
> * a list of
> <Uint32> Valid Object Types
> If the list is empty, any object can be selected.
>
> This should be fairly short for most games. (ie Planets for a colonise
> order), although an game that distinguishes between types of planets or
> a race that can colonise suns may get two or thee).
I actually think this (may) be already solved in a slightly more
complicated way. See the "Generic Reference" or "Generic Reference
List" order arguments.
Generic Reference List
A list of reference to something.
* A read write list of,
* A reference, as describe in the Generic Reference System
section.
* The valid reference types, A list of:
* a UInt32, read only, id of valid reference types
You could then easily say that the Colonise order should take a
reference to an object of type X?
Do you think this would work? If not, could it be adapted to work? (And
hence give a much more powerful way to say what can be selected?)
Tim 'Mithro' Ansell
_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel