MODの入れ方

Last-modified: 2018-02-22 (木) 14:15:47

■MODが消えてしまう場合は
・baseなどを変更してるとアプデで消えることがある
・\SteamLibrary\steamapps\common\King Arthur's Goldの中にある
「autoupdate_ignore_custom.cfg(←customじゃない方はアプデで戻ってしまう)」を開く
・消えてほしくないファイルを指定する
 ・フォルダは指定できるか?
◇その2
・バニラのKAG.asのonInitの最後らへんにthis.AddScript("NHM_Logic.as");っていうのを追加すると
 もしかしたら大丈夫?
 ・変更したkag.asもticketフォルダ直下においておく

◇よく使いそうなカスタムファイル
Base/Entities/Characters/Sprites/Heads.png キャラクターのhead画像
\steamapps\common\King Arthur's Gold\Base\Entities\Common\Emotes エモート
■MODの仕様
・他のMOD入りサーバーでDLされたMODファイルは「\King Arthur's Gold\Mods」に入っている
・自分のサーバーにMODを入れる場合も同じ場所
・自分のサーバーに入れるMODはMOD.cfgで設定する
・新規に追加するMODは自分のMODフォルダに入れる
 (例:\King Arthur's Gold\Mods\自分のMODフォルダ名\追加MODファイル)
・剣士の動きなど、既存のデータを上書きする場合は構成を同じにする
 (例:\King Arthur's Gold\Mods\自分のMODフォルダ名\Base\Characters\knight

MODの追加は下の公式から?
https://forum.thd.vg/resources/
MODをDLする場合はKAG公式にアカウント登録しなければならない(ログインするとDLボタンが緑になる)

もしくはKAGフォルダの「MOD」フォルダ内に過去に遊んだMODが入っているのでつかえるかも?


・過去にプレイしたMODをそのまま使うこともできる?<ライセンス関係ある?
・DLした場合は自分のMODフォルダの中にDLした中身を入れる


KAG/MOD.cfg を開き、MODのアドレスを記入する
・ここで入れたアドレスはMODフォルダ直下のフォルダのみ適応される
 (MOD/ticket/bunnyなど、2つ以下のフォルダに入れると読み込まない。
 (ただし、ticketを読み込めば、自動的にbunnyも読み込まれる)


・サーバーを立ち上げる
・確認する場合は黒い画面部分を右クリック>検索>「modded」の下らへんに
 MOD追加の情報がある(failedとかだと失敗してる)


(MODフォルダの中に入っている説明テキストより)
README FILE ABOUT MODS FOLDER AND HOW TO USE IT

Add folder names to {KAG}/mods.cfg to use the specific mod

Example of usage on server:

うさぎMODを追加したい場合は
1. Say you want to add bunnies on your server.

下のアドレスからMODをDLしてきて
2. Go to this thread (https://forum.kag2d.com/threads/king-arthurs-armory.15559/) and download the bunny rabbit mod by Skinney from the modding forums.

解凍したフォルダをKAG>MODsフォルダの中に入れて(MODsは自分でつけたMODファイル名でOK)
3. Unpack the bunny into {KAG}/Mods/Bunny

KAG>mods.cfgをさくらエディタ等で開いて、一番下に書き足す
4. Open {KAG}/mods.cfg and add the line Bunny at the bottom of the file

サーバーを建てて
5. Start your dedicated server

誰かサーバーに入ったらその人はMODをDLすることになり、
6. Wait for people to join (it will autodownload the bunny for them)

MODが適用されていればゲーム中に「!bunny」と発言すればウサギが生まれる
7. Spawn bunnies for them with the chat command !bunny

SCRIPTS DOCUMENTATION is available at: https://doc.kag2d.com

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
引用元:https://forum.thd.vg/threads/howto-getting-mods-to-run-in-your-server.16474/

MODからMODへ変化する手段は多数あります。 The steps can vary from mod to mod,
しかし、全てのケースでMODを追加する場合 
but in all cases: all modifications or additions should be placed into their own folder,
CFG<キャプチャーフラッグ)のフォルダを元に稼働することができます

then inside the Mods folder and finally activated via the mods.cfg file.

マップMODを除いて The exception is maps,
which can go in the Base/Maps folder.
どのMODでも接続した側にMODをDLさせてそれで稼働します?
Any activated mods will be transfered to the clients 

when they connect to your server.!

MODパスの例→
Mod path example: "/KAG-Beta/Mods/YourMod/YourScript.as"

■過去にプレイしたのスクリプトからMODを作成する Overriding default scripts
(過去にプレイしたことのあるMODを探して)
(その中の剣士の設定をコピーして、デフォルトの設定に上書きしてしまおう?)
 Consider YourMod folder as if it actually were the Base folder.
Files in YourMod folder will 'override' default Base files if they have matching relative paths.

So if you modify an existing file, such as KnightLogic.as you should place it in "../Mods/YourMod/Entities/Characters/Knight/" for it to run over the default script.

In this case it would be a good practice for modders to provide a zip file with all the files in their corresponding folders so it's just necessary to unzip it @ the Mods folder.

■デフォルトのスクリプトから変更する
(ここではCFG(旗取りモード)を例に)
(そのフォルダの中にあるスクリプトリストを見てみましょう)
New, non-default scripts
For new scripts you need to specify when they are ran inside an appropriate cfg file, usually gamemode.cfg or class.cfg/item.cfg such as Archer.cfg or Ballista.cfg. Look for the "scripts =" list and add the script filename there. The modder should clarify which scripts (if any) got to be added to the lists.

Let's take as an example Dash.as. It's a class-related script that adds a new ability and we want to enable it for Knights and Archers, so we will include "Dash.as;" in the scripts list of copies of Archer.cfg and Knight.cfg that will be placed in their respective relative paths inside "../Mods/Dash/".

We end up with:
"../Mods/Dash/Entities/Characters/Knight/Knight.cfg" <- add Dash.as in the scripts list
"../Mods/Dash/Entities/Characters/Archer/Archer.cfg" <- add Dash.as in the scripts list
"../Mods/Dash/Dash.as" <- Path doesn't matter because it's not replacing any default file

Loading custom Gamemode Rules
This doesn't work for now using the Mods folder because server_autostart.as won't find rules there. It's possible to use a custom DefaultStart.as script, but it's hackish and at the moment I can't get it to work for clients.

Activating the Mod(s)
Pretty straight forward: edit mods.cfg and add to the list the folder name of each of the mods you want to enable.

Starting the server
Once the files are in place and the mod activated you can start your server using the default autoconfig and autostart. It should automatically detect the mods and send them to clients when they join.

~

This is guide is bound to contain errors, but hopefully it helped more than confused. I will be updating/extending it.

  • MODの追加方法
    ※MODのDLにはKAGのアカウント登録が必要な場合があります。>アカウント登録

Add folder names to {KAG}/mods.cfg to use the specific mod

  • mods.cfgの内容
    Add mods (directory names) from /Mods directory to be used by this game
    use line breaks between mods eg.
     (modsごとに改行して記入してください)
    Optionally add " = devName:modName" after the directory (where devName and
     (追加情報として、「= devName:modName」の形でmodsのファイル名の後に記入してください
               = 開発者名:MOD名)
    modName refer to the mod's registration info - the developer and the modURL)
     (※サーバー選択後に、サーバー情報の右下らへんに出るMOD情報に表示される?)
    to enable auto-updating via the Web API (if that is available for the mod)
     (WebAPIなら自動更新できる?)

※MODのデータを変更する場合はバックアップ推奨。
 連動して他のデータも書き変わるみたいなので変更した場所だけでは治らないことも

※他のMODが多くて見分けつきづらい場合は
フォルダを右クリック>アイコンの変更で分かりやすくしておこう

■MOD編集用テキストエディタ
https://techacademy.jp/magazine/986 紹介ページ
ATOMとか便利そう・・?
サクラエディタがシンプルで使い勝手がいいところ

■MOD入れ方
https://forum.thd.vg/threads/howto-getting-mods-to-run-in-your-server.16474/ 参考:

・入れたいMODをmodsフォルダ内にフォルダとして作成
例:\SteamLibrary\steamapps\common\King Arthur's Gold\Mods\tickets と、tiketフォルダを入れておく
・マップはmodフォルダではなく、Base / Mapsの、対応したゲームモードの
 マップファイルに入れ替えて置く
 ・同様にゲーム開始時間などもbaseフォルダ上書きがてっとりばやい
・上書き仕様:modsフォルダ以降の構成がbaseフォルダと同じなら上書きされてサーバー上で動く
・新規スクリプト:baseに無い機能を追加するには(例:アーチャーにダッシュ機能)
 gamemode.cfgなどの、
 scripts= のリストにデータ名を追加する