0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GOKI2で広げるゲーム性【ModSLG入門】第二弾:ユニット配置・マップイベントと出撃準備の実装

0
Posted at

ダウンロード

avalanches&goki2は以下サイトのリリースタグ(avalanches(goki2) release version 2.x.y.yという表記)からassetsにあるavalanches-goki2-release2.x.y.y.zipのリンクから最新の環境をダウンロードできます。

slgモジュール前回から続き

前回から引き続きSLGモジュールの設定を行っていきます。

@slgcharacterpos id=味方6 x=12 y=12

slgcharacterposタグはキャラクターの配置を行います。
キャラクターは読み込まれただけでは表示されません。
必ずこのタグで配置します。

@slgcharacter id=ハロ die_label=*ハロ死亡
@slgcharacter id=味方8 die_after_label=*シスター死亡後
@slgcharacter id=敵2 do_not_move
@slgcharacter id=敵4 die_label=*敵4死亡 attack_label=*敵4攻撃
@slgcharacter id=敵6 wait_turn=2 strikes_back

slgcharacterタグは配置されたキャラクターの設定を行います。
各種イベントが用意されているのでいつものようにシナリオファイル名とラベル名を指定します。(シナリオファイル名は省略すれば現在のシナリオとみなす)

@slgmap type="visit" x=13 y=5 label=*村訪問
@slgmap type="normal" x=13 y=5 label=*マップイベント
@slgmap type="destroy" x=13 y=5 label=*村破壊
@slgmap type="steal" x=15 y=7 label=*宝箱盗む item=薬草
@slgmap type="treasure" x=15 y=7 label=*宝箱獲得 item=薬草 no_key
@slgmap turn=1 label=*ターン1開始
@slgmap character=味方6 target=敵4 label=*話す
@slgmap door_x=14 door_y=9 label=*扉イベント
@slgmap exit_x=17 exit_y=0
@slgmap player_exit_x=11 player_exit_y=0 icon_storage=exiticon label=*離脱

次はマップ上にイベントを配置します。
slgmapタグはマップに関する設定を行うタグです。
イベントタイプとイベントが発生するマップ上の位置とイベント発生時にジャンプする先のラベルを指定しています。

@slgadditemtohangar item_name=鉄の剣
@slgadditemtohangar item_name=鉄の剣
@slgadditemtohangar item_name=パラメータ増加
@slgadditemtohangar item_name=ファイアの書
@slgadditemtohangar item_name=ファイアの書
@slgadditemtohangar item_name=薬草
@slgadditemtohangar item_name=薬草
@slgadditemtohangar item_name=ライブの杖
@slgadditemtohangar item_name=鉄の弓

メインキャラクターは倉庫が使えます。
slgadditemtohangarタグで倉庫に入れておくアイテムを指定する事ができます。

@slgadditem id=ハロ item_name=鉄の剣
@slgadditem id=ハロ item_name=エクスカリバー
@slgadditem id=ハロ item_name=薬草
@slgadditem id=ハロ item_name=パラメータ増加
@slgadditem id=ハロ item_name=クラスチェンジ
@slgadditem id=ハロ item_name=星のオーブ

続けて、キャラクターに持たせるアイテムを指定できます。
最大値までアイテムを追加する事ができます。

@slgshowmap time=200
@slgwaitshowmap

ここまで来たらマップを表示します。
表示待ちタグも活用するとよいでしょう。

@slgprepare record_width=380 record_height=40
@slgprepare left=200 top=150 width=400 height=300 character_list_left=10 character_list_top=25 character_list_width=380 character_list_height=220
@slgprepare name_left=0 name_top=0
@slgprepare level_left=80 level_top=0
@slgprepare exp_left=120 exp_top=0
@slgprepare id=HP hp_left=160 hp_top=0
@slgprepare id=SP sp_left=200 sp_top=0
@slgprepare hangar_caption="倉庫" hangar_left=280 hangar_top=0 hangar_width=40 hangar_height=20
@slgprepare index_left=330 index_top=0
@slgprepare game_start_caption="開始" game_start_left=350 game_start_top=240 game_start_width=40 game_start_height=20
@slgprepare show_map_caption="マップ" show_map_left=300 show_map_top=240 show_map_width=40 show_map_height=20

最後にキャラクター選択画面の設定を行います。
各種パラメータの表示位置などを設定します。

@slgprepare start

最後にゲームを開始します。
これでSLGの設定はほぼ完了しました。

他にもまだ色々な機能があるので次回に続きます。

関連する記事の一覧

goki2の関連する記事一覧

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?