Skip to content

v1.9

Compare
Choose a tag to compare
@db0 db0 released this 14 Mar 23:18
· 236 commits to main since this release

Important for Upgrades

Main.tcsn has been modified with a new node called FocusInfo which shows card details under the viewport focus. For this scene, the "Info Panel Scene" to use needs to be specified. It is an exported variable so you can set it in the inspector.
A sample such scene has been provided in res://src/custom/CGFInfoPanel.tcsn. If this is not set, the game will crash when mousing over the cards.

If the deckbuilder is also inherited in a custom scene, it will likewise has the same FocusInfo node for which the "Info Panel Scene" has to be specified in the inspector.

New mandatory CardConfig property added: TYPES_TO_HIDE_IN_DECKBUILDER (Array). Any card type specified here will not be shown in the deckbuilder.
New mandatory CardConfig property added: EXPLANATIONS (Dictionary). It stores details about tags and keywords that you want to display under your card popups in game or deckbuilder.

You will need to specify these new CardConfig properties, even if they're empty

New CFConst poperty added: VIEWPORT_FOCUS_ZOOM_TYPE. Set to either "resize" or "scale" (default = "resize"). If set to scale, will magnify the card during viewport focus using godot scaling. If set to resize, will resize the card's viewport dupe's dimentions. This prevent blurry text, but needs more setup in the card's front script.

Game has been adjusted to allow the ScriptingEngine to work non-Card classes. To enable this the following changes have been made which might affect your game if you've extended the Card or ScriptingEngine classes

  • Card card_name property has been renamed to canonical_name
  • Card retrieve_card_scripts function has been renamed to retrieve_scripts
  • ScriptingEngine and ScriptObject owner_card variable has been renamed to owner and is not expected that it be a Card class

Bugs

  • Fixed crash when window x-axis resized to minimum
  • Improved readability of card text in viewport focus

New Features

  • Can now mark card definitions with a new meta_property: "_hide_in_deckbuilder": true. If you do, they will not be shown in the deckbuilder.
  • Can now mark card types as not visible in deckbuilder.
  • Deckbuilder will now display the total or filtered count of cards shown
  • Added new class: GameStats, which can be used to submit stats to your own instance of CGF-Stats
  • Can now show extra info below card focus viewport, such as keyword explanations or illustrator info
  • Can now extend deckbuilder DBListCardObject and

ScriptingEngine

  • spawn_card task now expects a card name, instead of a scene path. Spawned cards have to be defined along with the other cards for this purpose. The card name will be used to setup the spawned card.