KCDS 1.2.2

KCDS 1.2.2

Client scripts can call the game screens' own ActionScript functions, so a server can switch off the recipe book's tabs its smithing recipes leave empty, and open the menu's crafting page.

New for server owners

  • NativeElement.invoke(clip, method, args): calls an ActionScript method of a clip of one of the game's screens, or a function of its movie with clip '', and returns its answer (null for none). Unlike NativeElement.call, it also reaches the movie's own functions the screen does not declare. Every instance of the screen that has the clip gets the call, as NativeElement.load does. In JS, TS, Lua and C#.
  • Recipe book tabs: the book's tabs are the game's own (short swords, long swords, axes, other; potions, poisons and herbs for alchemy) and each recipe sits on the tab of its category. A client script switches off the tabs your recipes leave empty each time the book opens: on nativeScreenOpened for 'ApseCraftingList', NativeUI.element('ApseCraftingList').invoke('', 'SetEnableTabButton', [tab, false]) for each empty tab (0 short swords, 1 long swords, 2 axes, 3 other, 4 potions, 5 poisons, 6 herbs). A switched-off tab loses its label and cannot be chosen. The Crafting guide has the example in every language.
  • NativeUI.openMenu('crafting'): opens the menu's crafting page. The game has no key for that page, so the menu opens at the inventory and moves to crafting as its tab does. 'inventory', 'player' and 'map' open as before.

Known limits

  • The recipe book's tab names and icons are the game's; they cannot be renamed yet.