Skip to content

Drag'n Wash ModFramework 1.4.3

Choose a tag to compare

@github-actions github-actions released this 21 Sep 04:48
· 206 commits to main since this release

Drag'n Wash ModFramework 1.4.3

The graphs editor as a tool somebody can work in, and a way into it from the game. On top of 1.4.2; additive, as before.

Plugin Version
Drag'n Wash ModFramework (core) 1.4.3 No change; follows the release
Preloader patcher 1.4.3 No change; follows the core
Bridge 0.1.2 Open page and Graphs buttons; the editor's own doing
Graphs 0.1.2 Rename, Delete, Reload, and Run on a graph that was stopped
Inspector 1.1.2 Opening a scene or a level from the console or the page
Everything else unchanged Same as 1.4.2

Getting to the editor

The page could only be opened from a method in the Inspector's Code view — which makes sense for reading the game's code, and none at all for writing a graph. The Bridge tab of the F1 window now has two buttons: Open page (the code graph, as before) and Graphs (the same page with the editor already in front). Both views still switch inside the page, and the row of buttons wraps instead of walking off the edge of a narrow window.

The editor, whole

Going through every button in it turned up a set of things that made it half a tool. All of them are here now:

  • Variables. A set statement may only use a name the graph declares, and there was no way to declare one — so set could not be used at all. The graph block now lists them, with what each starts as.
  • Rename and Delete. Renaming moves the file instead of leaving a copy behind, and Save always means "write this graph where it is". Delete keeps the file beside its mod as <name>.json.bak.
  • Reload, for files added, changed or removed outside the editor. A graph whose file has gone says so in the list instead of failing when it is opened.
  • Which handler Run starts — it was always the first one.
  • A handler's only if and again while running, and the graph's description for the Mods screen.
  • Clear for the log panel.
  • A colour picker beside a value that is a colour, and the type of the member (Color, Single) read from the game. Dragging the picker shows the colour in the game as you choose it.

Fixed while going through it: New graph kept the last graph's name, so Save wrote over it; a key.pressed handler drew F6 into its field without writing it into the file, so the check said the key was missing while it was there on screen (and F6 is Drag'n Wash Localization's dump key — the default is F8 now); fields were wide enough to push a block's own buttons onto a line of their own; after a save the bar still said not saved yet and Rename stayed off; Run refused a graph that had been stopped, which is right for an event arriving and wrong for a person pressing the button; and a new block's id climbed for ever, so a file whose blocks had all been removed started again at h12.

A page that fits its window

Below 1000 px the problems and the log go under the blocks; below 640 px it is one column, with the list of graphs on top. A window of 700 px used to leave the blocks 30 px wide.

Opening the place a graph is about

inspector.level.get (read), inspector.scene.load and inspector.level.start (writes): what the game is playing, and loading the scene or starting the level a graph is about without going back to the game to click through a menu. The two writes are for the console and the page alone — an AI client never sees them, and neither does a graph.

Who needs this

Anyone writing graphs. For playing, none of this is needed: developer tools are off by default, and so is the Bridge.

The full list of changes is in CHANGELOG.md. The artwork in the zip is not under the code's licence; CREDITS.txt says whose it is.


日本語

グラフのエディターを「実際に作業できる道具」にし、ゲームからそこへ入る道を付けました。1.4.2 に続く更新で、変更はすべて追加です。

プラグイン バージョン
Drag'n Wash ModFramework(中核) 1.4.3 変更なし。リリースに合わせる
プリローダーのパッチャー 1.4.3 変更なし。中核に合わせる
Bridge 0.1.2 Open page と Graphs のボタン、エディター本体
Graphs 0.1.2 Rename・Delete・Reload、止めたグラフの Run
Inspector 1.1.2 Console とページからシーン・レベルを開く
そのほか 変更なし 1.4.2 と同じ

エディターへの入り口

これまでページは、Inspector の Code 表示のメソッドからしか開けませんでした。ゲームのコードを読むにはそれでよいのですが、グラフを書きたい人には何の助けにもなりません。F1 のウィンドウの Bridge タブに、Open page(これまでどおりコードのグラフ)と Graphs(エディターを開いた状態)の 2 つを置きました。ページの中で表示は切り替えられます。ボタンの列も折り返すようにしました。

エディター、ひととおり

ボタンを端から押して回ったところ、「これが無いと成立しない」ものがいくつも見つかりました。全部入れてあります。

  • 変数。set 文はグラフが宣言した名前しか使えないのに、宣言する場所がありませんでした(=set が使えなかった)。グラフのブロックに、名前と初期値が並びます。
  • Rename と Delete。改名はファイルを移動します(複製が残りません)。Save は常に「いまの場所に書く」です。削除したファイルは <名前>.json.bak として同じ場所に残ります。
  • Reload。エディターの外で増減・変更されたファイルを読み直します。ファイルが消えたグラフは、開いて失敗する代わりに一覧でそう表示します。
  • どのハンドラーを Run するか(これまでは常に先頭でした)。
  • ハンドラーの only if(条件)と again while running(重なったときの動き)、グラフの 説明(Mods 画面に出ます)。
  • ログの Clear。
  • 値が色ならカラーピッカー、そして member の型(Color、Single)をゲームに聞いて表示します。ピッカーをドラッグすると、その色がゲームに即座に反映されます。

回りながら直したもの:New graph が前のグラフの名前を引き継いでいて、そのまま保存すると上書きになっていた/key.pressed のキーが画面に F6 と見えているのに、ファイルには書かれておらず「キーが無い」と検査で怒られた(しかも F6 は Drag'n Wash Localization のダンプキーなので、既定は F8 にしました)/入力欄が広すぎてブロックのボタンが次の行に落ちていた/保存後もバーが「not saved yet」のままで Rename も無効だった/Run が、止めたグラフを「このセッションはオフ」と断っていた(イベントが来たときは正しく、人がボタンを押したときには違います)/新しいブロックの id が増え続け、全部消したファイルで h12 から始まっていた。

窓の幅に合わせるページ

1000px を下回ると Problems と Log がブロックの下へ、640px を下回ると 1 カラムになり、グラフの一覧が上に来ます。700px の窓では、ブロックの領域が 30px しかありませんでした。

グラフが対象にしている場面を開く

inspector.level.get(読み取り)、inspector.scene.load と inspector.level.start(書き込み)。いまゲームが何を再生しているか、そしてグラフが対象にしているシーンやレベルを、ゲームに戻ってメニューを操作せずに開けます。書き込みの 2 つは Console とページ専用で、AI クライアントにもグラフにも出しません。

アップデートが必要な人

グラフを書く人です。遊ぶだけなら、ここにあるものは何も要りません。開発者ツールは既定でオフ、Bridge も既定でオフです。

変更の全部の一覧は CHANGELOG.md にあります。zip に入っている絵はコードのライセンスとは別のもので、誰のものかは CREDITS.txt に書いてあります。