Results 1 to 8 of 8

Thread: Update v6.8 Scripting API Improvements & Fixed Performance Issues!

  1. #1
    Join Date
    Feb 2015
    Location
    The Internet
    Posts
    1,460

    Update v6.8 Scripting API Improvements & Fixed Performance Issues!

    Just a quick patch this week to fix up some performance issues that came up, improved the Scythe DLC, and added improvements to the Scripting API. Thanks everyone for bringing issues to our attention!

    Scythe Improvements

    • Optimized ram usage.
    • Fixed issue with hand zones and cards going into the table.
    • Fixed rotational snap points on the engineering player mat.
    • Moved all the hidden zones a little bit further from the card decks on the board to stop them swallowing mis-dropped cards.
    • Added a qualifier to the custom combat card (no other game rules apply to it).
    • Moved the second set of hand zones a bit further back to stop cards accidentally migrating into them.





    Battle For Souls Improvements


    • Fixed issue with a deck not being named.
    • Fixed rules in the Notebook.





    API Improvements
    • Overall API improvements and unification.
    • Will try to avoid breaking backwards compatibility on scripting for future patches.
    • Changed createButton(), takeCardFromDeck() removed, takeObject() works for all container.
    • Added clearButtons(), onDestroy(), onObjectDestroyed(), onPlayerTurnStart() and onPlayerTurnEnd().
    • You can now pull the last card out of a deck if done in the same frame.
    • Fixed many broken functions like printToColor().
    • Fixed auto run scripts checkbox causing errors.
    • Fixed broken tabs in script editor.
    • Fixed onload not being called for objects spawned after the initial load.
    • Fixed assigning table returned from our function to something else not working.
    • Check out our Chess Clock example script on the Workshop.
    • Check the updated API page for all the changes.
    • If you have any suggestions or find any issues for Scripting, please post in this thread




    .
    Improvements

    • Improved object spawning positioning (copy paste, saved objects, search, etc).
    • Added whispering to Teal and Brown players.
    • Increased chat history by 4 times the original amount.



    Fixes

    • Fixed issue with performance degradation after v6.7 (Ram and stuttering).
    • Fixed issue with Tooltip messages getting cut off due to resolution sizes above and below the norm.
    • Fixed chat tab lag with a lot of messages in history.
    • Fixed issue with digital counters not working after v6.7.
    • Fixed issue with Hand Zones are duplicating.
    • Fixed issue with cards in hand spazzing out.



    Stay up to date on development by following us on Twitter and Facebook!


  2. #2
    Wow - someone has been busy!

  3. #3
    Received another update this morning that also says it's version 6.8

    The blackjack scripting example is now broken, I discovered this while trying to debug why my 'createbutton' function didn't work after today's update. Quickly found out createbutton is also broken in the blackjack example.

  4. #4
    Join Date
    Feb 2016
    Location
    Sweden
    Posts
    77
    Quote Originally Posted by dizneyguy View Post
    Received another update this morning that also says it's version 6.8

    The blackjack scripting example is now broken, I discovered this while trying to debug why my 'createbutton' function didn't work after today's update. Quickly found out createbutton is also broken in the blackjack example.
    It works for me, try restarting the game or resubscribing when you don't have it up.

  5. #5
    You were right - I unsubscribed and then resubscribed and now it works. Now to figure out what's different about createbutton

  6. #6
    The createButton API is completely changed, with no attempt to ensure backwards compatibility, and has broken all my calls to createButton

    The current documentation for createButton does not fit in the html table of the current API page, and runs off out of view, but you can view the missing text by pasting it into notepad

    The fact that it has changed is not documented, and the old form of the function is no longer listed, so it is hard to translate the broken calls into the new API without guessing what each parameter meant. Did anyone keep a copy of the old API?
    Last edited by Arcuate; 03-06-2016 at 12:06 AM.

  7. #7
    Quote Originally Posted by Arcuate View Post
    The createButton API is completely changed, with no attempt to ensure backwards compatibility, and has broken all my calls to createButton

    Did anyone keep a copy of the old API?
    old format: createButton({'functionname','label'},owner, {xpos, ypos,zpos, xrot, yrot, zrot, width,height, fontsize})

    new format: createButton({functionname','label',owner, {xpos, ypos,zpos},{xrot, yrot, zrot}, width,height, fontsize})

  8. #8
    Join Date
    Mar 2016
    Posts
    182
    Quote Originally Posted by dizneyguy View Post
    old format: createButton({'functionname','label'},owner, {xpos, ypos,zpos, xrot, yrot, zrot, width,height, fontsize})

    new format: createButton({functionname','label',owner, {xpos, ypos,zpos},{xrot, yrot, zrot}, width,height, fontsize})
    I can't get this format to work (even with fixes to the missing quotes). The API documentation shows a completely different way for createButton now, which I realize is using a table variable and specific table value names, but didn't realize could somehow be coded in the old format. How do you do that? Are you sure your example code/syntax above works?

    This works for me:

    local button_parameters = {}
    button_parameters.click_function = 'starttraps'
    button_parameters.label = 'X'
    button_parameters.function_owner = self
    button_parameters.position = {-0.25, 0.3, 0}
    button_parameters.rotation = {0, 0, 0}
    button_parameters.width = 100
    button_parameters.height = 100
    button_parameters.font_size = 80

    self.createButton(button_parameters)

    This does not, giving the error: "Error in createButton: click_function was null or an empty string"

    self.createButton({'starttraps','X',self,{-0.25,0.3,0},{0,0,0},100,100,80})

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •