Important note for game authors

This is an important follow-up for game author. I forgot one important point when I wrote my previous post:

When you switch to Python as a scripting language, make sure that you set the “octgnVersion” attribute on your game to “0.9” at least.

This is because:

  • Your game wouldn’t run properly on 0.8 anyway;
  • For the first time I am going to remove features (xml scripts) from OCTGN and break compatibility. For that reason, future OCTGN releases will be marked as incompatible with games requiring any version less than 0.9.

In other news the 0.9 update is now published.

Explore posts in the same categories:

5 Comments on “Important note for game authors”

  1. brine Says:

    looks beautiful so far 🙂

    Just 1 question though. I have the “draw a card” script below.

    def draw(group = me.library):
    if len(group) == 0: return
    notify(“{} draws a card.”.format(me))

    Now, this script works fine when the mouse is over the library pile. However, it doesn’t work when the mouse is on another pile, or the table (in the last several OCTGN versions, this was possible). How do I get the script to tell OCTGN to allow the action in all zones?

  2. jods Says:

    I just opened a new board on the forum, which is going to be a better place to ask such questions:

    Regarding your question, it depends on what you mean by “work when the mouse is on another pile”.

    Clearly, there’s an inconsistency between:
    if len(group) == 0: return
    Which checks whether the group you’re executing this action on is empty; and:
    Which always draws the top library card, whatever the group is.

    I would either change the first line to:
    if len(me.hand) == 0: return
    If you want to always draw from hand; Or the second to:
    If you want to draw from the current group.

    Please note that the .top() function is only available on piles. Although you could do that in all groups, including hand and table:
    (index 0 is the top of piles, leftmost card in hand and card with the lowest Z-index on the table)

    Finally, if you want your action to be callable on the table, add two optional x,y parameters like this:
    def draw(group = me.library, x = 0, y = 0):

    If you have more questions, feel free to ask in the forum!

  3. brinelol Says:

    I don’t know if you’ve seen my bug ticket yet, but there’s a huge problem with the python shuffle code right now. If a player uses the shuffle action faster than OCTGN can process the shuffle, then all python actions lock up and the player can’t use any card or group actions until they reload OCTGN.

  4. Etienne Says:

    Its been in dev for 5 years…. just get it done

  5. makkert Says:

    Jods, I just want to say how impressed I am is that you still are the watch on OCTGN.
    Every now and then I visit this website to take a peek on the status. Curious when it will hit version 1.00 …. 🙂

    good luck, and all the best for 2011!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: