Skip to content

New framework functions

gumi requested to merge gumiko/serverdata:debug into master

selectd

Now we have a simple, convenient way to add debug to any npc that uses select (meaning old npcs that use menu still need a rewrite). I added selectd, which is a drop-in replacement for select. It works the same way as select except it gives an extra [debug] option if the debug flag is on. The return value and @menu have the same values as with select.

This means in any npc that uses select you can just add a d and bingo, you've got a debug. You can either pass the quest ID as first argument or set it in OnInit with .quest_debug = <id>;.

Examples

    mes "Please choose an option:";
    selectd
        "Foo",
        "Bar";

OnInit:
    .quest_debug = ShipQuests_Nard;

is equivalent to:

    mes "Please choose an option:";
    selectd ShipQuests_Nard,
        "Foo",
        "Bar";

Also in this MR

  • Many many scripts use close; or closedialog; incorrectly. This MR fixes some
  • savepointparticle can now be used without giving a map, x, y
  • bedClic can now be used without giving a map, x, y
  • goodbye; can send now an emote (first param).
  • new function: bye;. It is a shorthand for closedialog; close;. Can also send an emote (first param).
  • new function: cwarp;. Properly closes the dialog, then warps the player.
  • new function: cshop;. Properly closes the dialog, then opens a shop.
  • new function: cstorage;. Properly closes the dialog, then opens the storage.
  • new function: goodbye2;. Waits for the player to click close, then displays a canned message (like goodbye but waits for the player). Can also send an emote (first param).

Merge request reports

Loading