On Wed, 2 Jul 2008 00:32:28 -0400
"Victor Ivri" <[EMAIL PROTECTED]> wrote:
> The three issues below haven't really been resolved, and I do need
> them resolved sooner rather than later, to be able to make good
> progress. I'd appreciate feedback :)
With the exception of the one that is almost certainly a bug (the colonisation
issue), you can solve the other issues quickly yourself with a bit of testing.
> >>> > Another quick question: can anyone provide mapping between
> >>> > ship-types (integer), and the actual ship type (mk 1 - mk 4,
> >>> > scout, colonist) ?
> >>>
> >>> You probably wanted to send this to the mailing list?
> >>>
> >>> Otherwise it's probably generated automatically...
> >>>
> >>> nash
> >>> -------------------------------------------------------------------
> >>>
> >>> Hm, TP03 protocol specifies (and I have a feeling that it won't
> >>> change) a -numeric- type for ships. E.g., I can have a fleet of 15
> >>> type 1s, 4 type 3s, and 2 type 6s. What I need to know, is how to
> >>> map these numeric types to logical ones (mk1-4, transport,
> >>> scout). Does anyone know the exact mapping?
> >>
> >> The mapping is up to the server at run time. It may hard code it,
> >> the numbers may be per-player at creation time.
> >>
> >> For example in minisec using tpserver-cpp:
> >> Player 1 scout: 1
> >> Player 1 frigate: 2
> >> Player 1 destroyer: 3
> >> Player 2 scout: 4
> >> ...
> >> Each id is allocated when the player joins the game.
> >>
> >> So basically you need to discover the numbers yourself at run time
> >> - most likely by finding designs by name. Working out which is
> >> yours needs to be done by seeing what you can build.
> >
> > Hm, I was actually hoping for a hard-coded mapping I can, in turn,
> > hard code into the client :-/. Otherwise, I'll be going in a tangent
> > that's not really productive for my project (nor for meeting
> > deadlines :) . Xdotx, perhaps there's still hope? ;)
>
>
> Nash, you said that I need to check the designs, but in a separate
> thread in tp-devel (Re: [tp-devel] Goals for mid-term evaluations -
> Does RFTS have designs?) Mithro wrote:
> On Wed, Jun 25, 2008 at 12:03 AM, Tim Ansell <[EMAIL PROTECTED]>
> wrote:
> > I believe that RFTS does not use the design stuff in Thousand
> > Parsec, so we can ignore that for now (it will be needed in the
> > future for completeness).
>
> Now it seems as if it really should be hard-coded in the ruleset.
> Tyler?
Ignore mithros comments. He is answering a different question.
The id used in constructions is not defined by the ruleset, nor can you assume
it is static in any case.
You will need to discover the IDs at run time. In my AIs I do discovery of
the build order (Order with name "BuildFleet") id at run time as well.
Once you do the probe, you'll get a list of possible build items, use the NAME
to determine which one you want to build.
This is the literal code I use to solve the problem (in the Probe Order
Response) for minisec:
tpe_util_parse_packet(msg->data, msg->end, "iiiiB6i",
&oid, &slot,&type,&turns,
&nbr,&br,
&noptions,&options,
&maxstr);
for (i = 0, frigate = 0 ; i < noptions ; i ++){
if (strcmp(options[i].name,"Frigate") == 0){
frigate = options[i].id;
break;
}
}
Following a strict interpretation of the protocol, there is no guarantee that
the numbers returned from a build order probe are:
* consistent between players
* consistent between games
* consistent between turns
For the sake of being able to implement things the last is not likely to
change, but the earlier ones definitely could (and should in some cases).
So even if RFTS does always use consistent numbering (which it may), there is
no reason you need to.
> >>> Another question, regarding "mineable" resources. Is the
> >>> "mineable" quantity the limit to the amount of resource I can
> >>> purchase in the current turn, or in general throughout the game?
> >>> (My intuition is the first one, but i need to be sure).
> >>
> >> No idea... ;-)
> >
> > anyone?
>
> still, anyone? ;)
Dump them out:
What is the Minable for "Planetary Env"?
Or Social Env?
Generally they will be what you can build currently (in some way) with
available for later.
Regards,
nash
_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel