Lua Effect Documentation v1.4
WARNING: There's a special random algorithm inside the engine. It is impossible to use lua or any other random inside the script without breaking a game while running your script.

Changes in 1.4

  1. divide(intDividendExpression, intDivisorExpression) added
  1. selector.avg(intCardExpression) added
  1. showTextExpressionEffect added
  1. Dynamic layouts - see “Dynamic string generation” section

Changes in 1.3

  1. getHeroLevel intExpression added
  1. getCardPrintedCost intExpression added
  1. intExpression players slots added

Changes in 1.2

  1. More ability triggers
  1. Custom ability triggers

Changes in 1.1

  1. IMPORTANT - set of mandatory player buffs changed. Check updated example scripts and update your scripts correspondingly
  1. transformTarget now properly changes card face on the board
  1. nuUndoEffect renamed to noUndoEffect
  1. createNoStunSlot added
  1. createNoDamageSlot added
  1. onZeroHealthTrigger added
  1. onLeavePlay trigger added
  1. drawToLocation can now directly accept integer
  1. createLayout(t) is now only way to create layouts for all types of items - cards, abilities, choices
  1. deck management fixed and should be more flexible now. you may easily clear hero deck on start now. See example_script_vs_ai_advanced_deck_management.lua for reference
  1. more frames. Frames with faction icon on another side added
  1. storytelling effects section added
  1. coop scenarios development support (see coop_pirates_example.lua)
  1. new card formatting option in “xmltext” field. See examples below. You may still use “text” for simple things, but for complex formatting - only xmltext
  1. new arts available

Requirements

Minimal requirements:
  • Steam - no other platform supports development mode
  • basic knowledge of script programming
  • any text editor (notepad works just fine)

Optimal requirements:
  • Steam - no other platform supports development mode
  • LUA scripting language experience
  • text editor with syntax highlight support (notepad++, sublime)

How to start

Development

  1. Have a text editor installed. Any editor works for this, but better grab one with LUA syntax highlight support.
  1. Set up a folder for your scripts on hard drive. For best results, try not to include any special symbols in either directory name/path and file name. Do not rename or move the folder after creation, as path to the script on your hard drive is used for versioning. If your script changes path of file name, it will be recognised as a new script.
  1. Put a sample script into that folder
  1. in the app, open settings and navigate to game tab. There - set development mode to ON. NOTE: it’s visible only on desktop.

  1. Now you have “Develop” menu item in main menu