Testing Notepad

From FreeOrionWiki
Revision as of 16:28, 14 October 2005 by Tzlaine (Talk | contribs) (VisibleToEmpire Condition Broken)

Jump to: navigation, search

Unresolved Issues

Stockpile Condition Includes Unrelated Planets

Replace your techs.xml with this:

<?xml version="1.0"?>
 <GG::XMLDoc>
 <Category>LEARNING_CATEGORY</Category>
 <Tech>
   <name>STACKING_TEST</name>
   <description>STACKING_TEST_DESC</description>
   <type>TT_THEORY</type>
   <category>LEARNING_CATEGORY</category>
   <research_cost>3</research_cost>
   <research_turns>1</research_turns>
   <effects>
     <EffectsGroup>
       <scope>
         <Condition::EmpireStockpileValue>
           <stockpile>ST_FOOD</stockpile>
           <low>45</low>
           <high>999</high>
         </Condition::EmpireStockpileValue></scope>
       <activation><Condition::Self/></activation>
       <stacking_group>STACKTEST</stacking_group>
       <effects>
         <Effect::SetPlanetSize>SZ_TINY</Effect::SetPlanetSize>
       </effects>
     </EffectsGroup>
   </effects>
   <prerequisites></prerequisites>
   <unlocked_items></unlocked_items> 
 </Tech>
</GG::XMLDoc>

Start a game and set your homeworld to Farming/Farming focus, and research the tech. Send your ships to a system that has a planet that's not owned by any empire, either in a system that has an owned planet as well, or a system that has no owned planets. End your turn until you research the tech and build up your food stockpile. When the effect executes, apparently all planets (owned by you, or another empire, or unowned, regardless of system) have their size changed to SZ_TINY, when it should be just planets owned by the empire whose food stockpile is above 45.


Debatably Issues or Not

AddOwner Effect Needs Tweaking...

Swap out your current techs.xml for the following:

<?xml version="1.0"?>
 <GG::XMLDoc>
 <Category>LEARNING_CATEGORY</Category>
  <Tech>
    <name>LRN_PHYS_BRAIN</name>
    <description>LRN_PHYS_BRAIN_DESC</description>
    <type>TT_THEORY</type>
    <category>LEARNING_CATEGORY</category>
    <research_cost>10</research_cost>
    <research_turns>1</research_turns>
    <effects>
      <EffectsGroup>
        <scope>
          <Condition::All/>
        </scope>
        <activation>
          <Condition::Self/>
        </activation>
        <effects>
          <Effect::AddOwner>Source.Owner</Effect::AddOwner>
        </effects>
      </EffectsGroup>
    </effects>
    <prerequisites></prerequisites>
    <unlocked_items></unlocked_items>
  </Tech>
</GG::XMLDoc>

Start a game, research the tech, end the turn.

A large number of sitrep reports are generated about your population at various planets having starved and that the planet is lost. This includes planets in systems you haven't explored and don't know the name of, which are reported as ERROR in the sitrep. You also gain control over all populated systems and all fleets in the game universe. However the previous owners still retain control as well, as can be seen on the map with multiple coloured system names.

Planets that have no population should not be fired upon by this effect, as they are incapable of being owned by a player without population on them.

There can be multiple owners for systems, since multiple empires can colonize planets in the same system. There also could be joint ownership of planets (or even fleets, etc., who knows?) in a future version. Therefore, SetOwner will not work as an effect, in general. Again, this looks to me like just an Effect that does what it is supposed to do, if not what is desired. --Zach

UI Response...

After doing the above test case, you may notice that the UI response time slows drastically for scrolling the map or moving around the sitrep. I'm not sure if this is a bug or just a major bottleneck. In either case, it needs fixing. This probably occurs in other situations as well, but I haven't noticed it at any other time.

This is wierd and needs further investigation. -- Zach