OCTGN.net Community Forums
News: OCTGN Alpha 2 has been released! Go to the Downloads Page to grab it!
 
*
Welcome, Guest. Please login or register. September 09, 2010, 05:58:30 PM


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Using CardFilter - Orientation  (Read 280 times)
0 Members and 1 Guest are viewing this topic.
SahuginDagon
Apprentice
*
Posts: 3


View Profile
« on: March 08, 2010, 12:28:04 AM »

Has anyone else had a problem getting the Orientation CardFilter property to work correctly? Or am I somehow using it incorrectly?

I keep getting errors every time I try and use it (while the rest of the game definition loads fine without it).

From the Game Definition:
  <xs:element name="orientation">
    <xs:complexType>
      <xs:group ref="cardFilter" />
      <xs:attribute name="rot" type="rotation" />
      <xs:attribute name="exact" type="xs:boolean" use="optional" default="false" />
    </xs:complexType>
  </xs:element>

Example Code: [trying to untap all non-Insane cards in the Call of Cthulhu CCG easily (without hitting Resources)]
    <groupaction menu="Untap All" shortcut="Ctrl+X">
      <mute />
      <setrot orientation="0">
        <controlled by="me">
          <faceup>
            <orientation rot="270">
              <all group="this" />
            </orientation>
          </faceup>
        </controlled>
      </setrot>
      <print text="{me} untaps all their cards." />
    </groupaction>
Logged
jods
Administrator
*****
Posts: 551


View Profile
« Reply #1 on: March 10, 2010, 11:26:41 PM »

What error exactly?
Your example code looks fine to me (I think it should load and run without any error).

But looking quickly at the source code, it may be that the "orientation" filter does exactly the opposite of what it should. (I.e. <orientation rot="270"> removes the cards at 270° rather than keeping them only. :-(
This would be a quick fix for me.
Logged
SahuginDagon
Apprentice
*
Posts: 3


View Profile
« Reply #2 on: March 11, 2010, 05:53:56 PM »

Hmm... guessed I confused the error. Sorry about that.

Thank you for the help.

While I'm thinking about it:
- Is there currently a way to play a card from the hand already oriented? To put it on the table at 180 degrees or so? I've tried to do it before by rotating the card after moving it in the hand-action, but that doesn't work correctly. The card shows up on the table with the image vertical (normal), but turns to 180 degrees whenever I try to move it. It doesn't particularly behave as any orientation either, with the usual table-rotations not working correctly on it.

Logged
jods
Administrator
*****
Posts: 551


View Profile
« Reply #3 on: March 13, 2010, 03:16:07 PM »

I am not sure I understood the status of the <orientation> tag problem. Did you fix your problem, does it work properly, or does it work as I said (that's the opposite of how it should) ? Tell me - especially in the later case - so that I could fix it (if it needs fixing).

You can move a card into play directly tapped, as it's easy to do so in 2 steps and adds no real value (unlike moving a card face down, which prevents other players from seeing it).
Logged
SahuginDagon
Apprentice
*
Posts: 3


View Profile
« Reply #4 on: March 13, 2010, 05:30:28 PM »

The problem with my loading game file was do to an error somewhere else in the file. That has been resolved.

The <orientation> tag does only affect the cards WITHOUT the orientation selected. For instance, <orientation rot="180" exact="true"> affects [0, 90, 270].

If you did fix this and set the <orientation> to work properly, is there a way for me to easily replicate the current behavior? Could a Boolean for reversing the behavior be added to the Game Definition schema? Or would a <not> somewhere up the XML chain suffice and I'm just not seeing it? I believe that this would allow for compactness in the game definitions in certain situations.
Logged
jods
Administrator
*****
Posts: 551


View Profile
« Reply #5 on: March 14, 2010, 11:35:31 AM »

That's what I thought when I saw the code. I'll fix this ASAP (watch my blog).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM