|
From: Cpt. B. <cpt...@te...> - 2003-12-23 21:15:27
|
Hey all,
I just finished typing up the original x-com research tree in the format
decided on below, and I ran into a few things regarding <grants> and
<obsoletes>.
1. Under the <grants>, we have <item> and <topic> elements. <item> points to
an item that the player can now utilise/build/whatever. <topic> points to
another research topic in the same table that is now available for
research(dependent on prerequisites, of course). However, NOTHING points to
the entry in the xnet table. Are we relying on the name of the topic being
the same as the xnet entry?
The problem is, the xnet title "Sectoid Interrogation" (the default sectoid
race data a player gets from any sectoid) is not really an 'item' per se,
and name of the research topics ("Sectoid Soldier", Sectoid Engineer", etc.)
that you can get this from can't correspond to the xnet title (because the
have different names). Excerpt from "Sectoid Soldier" record:
<grants>
<topic name="Alien Origins"/>
<item name="Sectoid Interrogation"/>
</grants>
I would feel better with an explicit reference (effectively a foreign key)
to the xnet table, as in the example below. This would have to apply to all
research topic records though, it might get a bit redundant looking for a
lot of it. It does allow more flexibility though, so rather than researching
"Plasma Cannon" to get the xnet entry 'Plasma Cannon', you can research
"Vehicle Mounted Plasma Weapons" to get 'Plasma Cannon'.
<grants>
<topic name="Alien Origins"/>
<xnet name="Sectoid Interrogation"/>
</grants>
2. Also within <grants>, we have the <xor> tag to allow for any one of
multiple research conclusions (as in Alien Engineers). When writing up the
Sectoid Leader and Commander entries, Something new came up. Below is the
<grants> from the Sectiod Leader record.
<grants>
<topic name="Alien Origins"/>
<item name="Sectoid Interrogation"/>
<xor>
<topic name="Psi Lab"/>
<topic name="The Martian Solution"/>
<item name="Alien Supply" />
<item name="Alien Research" />
<item name="Alien Harvest" />
<item name="Alien Abduction" />
<item name="Alien Infiltration" />
<item name="Alien Base" />
<item name="Alien Terror" />
<item name="Alien Retaliation" />
</xor>
</grants>
To break it down, any live alien will give "Alien Origins", so that will
always show up. Any live sectoid will give the xnet entry for "Sectoid
Interrogation". However, a Sectoid Leader can give not only tactical data
(i.e.: the missions) but info for Psi Labs or The Martian Solution. I'm
pretty sure we don't want the same leader giving up ALL of these topics on a
single researching.
I had a couple thoughts on how to settle this. First, is put it in the
business rules (hardcode it) so that topics within an <xor> tag have a
higher priority than pure research ('item' tags). That way any available
topics will be discovered before the tactical data.
Next is just a variation of the first. Have the order in which elements are
listed in the <xor> tags determine priority. So the above example would
give you the topics first, but this:
<xor>
<item name="Alien Supply" />
<topic name="Psi Lab"/>
<topic name="The Martian Solution"/>
<item name="Alien Research" />
<item name="Alien Harvest" />
<item name="Alien Abduction" />
<item name="Alien Infiltration" />
<item name="Alien Base" />
<item name="Alien Terror" />
<item name="Alien Retaliation" />
</xor>
would give you the topics only after 'Alien Supply'. (just an example..not
one that makes sense)
The other thought makes it a bit more complicated, but again allows for more
flexibility. Add a 'priority' (values 1-10) attribute to each element
inside of <xor> tags. That way should a future version want something to
appear before a topic, it can be done without extensive rewriting. However,
it's one more thing for the code to keep track of.
3. Related to the use of <xor> tags in the <grants> field, I'd like to put
them in the <obsoletes> field as well. That way it's easier to code for
whether or not to just remove the topic right away.
The current method would require the code to always check the <grants> field
for unresolved <xor> elements (whether there were <xor> elements or not).
It's not a huge deal, but it's an extra step. It also blocks the use of
multiple topics under obsoletes (it's an all-or-nothing deal).
So rather than:
<obsoletes>
<topic name="Sectoid Leader"/>
</obsoletes>
it would read:
<obsoletes>
<xor>
<topic name="Sectoid Leader"/>
</xor>
</obsoletes>
Ideas, thoughts, comments on any of this?
Merry Christmas!
-The Captain
-----Original Message-----
From: xen...@li...
[mailto:xen...@li...]On Behalf Of
red...@pr...
Sent: December 19, 2003 6:50 AM
To: xen...@li...
Subject: RE: [Xenocide-programming] Tech Tree XML layout
Hi I am back from near death (not really), and ready to spice up this
discussion (not really :P ).
First, Cpt. try to avoid using underscores in tags like this:
research_topics
use researchtopics or just research. Another thing is that, when we
originally
think about the XML file with ShadowHawk (not ShadowHawk00) the idea of the
obsolete was to just flag some items (only) to be grayed out - or put in an
special place all toghether to easy up the interface only. Just as a hint
(it
is obsolete) if you really want to manufacture it, go find it in the
obsoletes
list. However I left you argue on it because you found a very intriguing way
to use the obsolete clause, and I wanted to see where you will take that
concept. So now that the discussion is over the original meaning was that,
but
dont worry, that was only for clarification.
Greetings
Red Knight
Quoting "Cpt. Boxershorts" <cpt...@te...>:
> Glad we could get it worked out, Mamutas...I got worried we were talking
in
> circles. I end up that way with my boss all time, and it drives me nuts.
> :P
>
> Okay, so here's the current tech tree layout, as per all the discussions
> over the past few weeks. If everybody likes it, I'll start working on a
> more complete, online version so people can step through it. I did have
dtd
> for this, but it seems to have wandered off.
>
> -The Captain
>
> <research_topics>
>
> <!--Plasma Weapons -->
> <topic name="Plasma Weapons" researchtime="200" > <!--general topic
> element.
> idname = name of topic
> researchtime = scientist hours required to research this topic -->
>
> <prerequisite> <!--items and/or topics required to research
this topic -->
> <topic/> <!--Required topic to have researched -->
> <item/> <!--required item (must have in inventory).
> This can be any item: equipment,
aliens (dead or alive), components,
> etc. -->
>
> <or><!--or-items allow for needing any one of several
items as a
> prerequiste -->
> <item name="Plasma Pistol"/>
> <item name="Plasma Rifle"/>
> <item name="Heavy Plasma"/>
> </or>
> </prerequisite>
>
> <!--If certain optional topics have been researched, a
percentage
> reduction in research hours may be available
> required prerequisites SHOULD NOT grant bonuses
> this allows better control of the research tree -->
> <researchbonus/>
>
> <grants> idtopics and items made available by researching this
topic.
> Better name?
> Note: anything in here must satisfy its own list of
prerequistes.
> This topic should be a prerequisite of any item in
this list-->
> <topic name="Plasma Pistol"/> <!--topics that can now
be
> searched. -->
> <topic name="Plasma Pistol Clip"/>
> <topic name="Plasma Rifle"/>
> <topic name="Plasma Rifle Clip"/>
> <topic name="Heavy Plasma"/>
> <topic name="Heavy Plasma Clip"/>
>
> <item/> <!--Items that can now be manufactured and/or
used (equipment,
> weapons, base facilities, etc.) -->
>
> <xor> <!-- topics that may become available, depending
on prior research,
> and in-game factors.
> Only one of these topics will become
available for any given research
> instance -->
> <topic/>
> </xor>
> </grants>
>
> <obsoletes> <!-- Topics only. Once the parent is researched,
any topics
> listed here cannot be researched. -->
> <topic name="Plasma Weapons"/> <!-- For Xenocide v1,
this will only
> contain a reference to the parent topic -->
> </obsoletes>
>
> </topic>
> </research_topics>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Xenocide-programming mailing list
Xen...@li...
https://lists.sourceforge.net/lists/listinfo/xenocide-programming
|