空き瓶とお酒を増やす。
スクリプトのバグは置いておいて先に進めることにする。
空き瓶とお酒のデータをリストアップしてこれからどうするか考える。
Bottle
| 瓶の色 | コルク栓なし | コルク栓あり |
| 青1 | misc_com_bottle_01 | misc_com_bottle_10 |
| 青2 | misc_com_bottle_06 | misc_com_bottle_05 |
| 緑1 | misc_com_bottle_09 | Misc_Com_Bottle_04 |
| 緑2 | misc_com_bottle_02 | Misc_Com_Bottle_08 |
| 茶1 | misc_com_bottle_13 | misc_com_bottle_15 |
| 茶2 | misc_com_bottle_11 | misc_com_bottle_14 |
Jug
| 瓶の色 | コルク栓あり |
| 青 | misc_com_bottle_07 |
| 緑 | misc_com_bottle_03 |
| 茶 | misc_com_bottle_12 |
お酒
| 名前 | 種類 | 値段 |
| Mazte | 地元のビール | 10 |
| Sujamma | 地元のリキュール | 30 |
| Greef | 地元のブランデー | 30 |
| Shein | 地元のワイン | 10 |
| Flin | 大陸のウイスキー | 100 |
| Cyrodiilic Brandy | 大陸のブランデー | 100 |
| Vintage Brandy | 年代物のブランデー | 500 |
| Ancient Dagoth Brandy | 古代のブランデー | 1500 |
| Skooma | 違法なお酒 | 500 |
瓶とお酒の組み合わせ
瓶の種類によって、注げるお酒が限定されるようにする。
- Bottle にはGreef, Shein, Vintage Brandy, Cyrodiilic Brandy だけ注げるようにする。
- Jug には Sujamma, Flin, Ancient Dagoth Brandy だけ注げるようにする。
- Mazte はタンカード(大ジョッキ)に注げるようにする。
- Skooma は Skooma の空き瓶がゲーム中にあるのでこれを使う。
酒樽とお酒の組み合わせ
9種類のお酒を、2種類85個の酒樽から注げるような組み合わせを考える。
- お酒の種類がランダムに決まる。(不自然)
- 樽ごとに固定する。(めんどくさそう)
- 注げるお酒の種類が毎月変わる。(できるかどうか分からない)
現在の月を取得する方法が分からないので調べてみる。
Month でテキスト検索すると
short eventMonth
short currentDay
set eventMonth to Month
set currentDay to Day
こんなスクリプトが見つかった。変数に Month や Day を代入してるみたいだけど、 Month と Day 自体が何なのか分からない。
チュートリアルが載っているサイトを調べたら、
Morrowind Mod Library
の TUTORIALS -> CS Tutorials -> TES:CS Manual に "Month :This is the current month." とある、これは Global 変数というものらしい。
そーいえばダイアログ編集画面にあった気がする。
Construction Set を見てみると Month の値がなぜか 7 になってる、
またしばらく悩んだけど、ゲーム開始時の月(8月 Last Seed)だとわかった。
実験:月を表示するスクリプト
The Elder Scrolls 非公式ページ さんのカレンダーを見ながら、
現在の月をメッセージボックスに表示させるスクリプトを書いてみる。
Begin current_Month
short currentMonth
if ( OnActivate )
set currentMonth to Month
if ( currentMonth == 0 )
MessageBox, "Morning Star - 1st Month" ;メッセージボックス表示
elseif ( currentMonth == 1 )
MessageBox, "Sun's Dawn - 2nd Month"
elseif ( currentMonth == 2 )
MessageBox, "First Seed - 3rd Month"
elseif ( currentMonth == 3 )
MessageBox, "Rain's Hand - 4th Month"
elseif ( currentMonth == 4 )
MessageBox, "Second Seed - 5th Month"
elseif ( currentMonth == 5 )
MessageBox, "Mid Year - 6th Month"
elseif ( currentMonth == 6 )
MessageBox, "Sun's Height - 7th Month"
elseif ( currentMonth == 7 )
MessageBox, "Last Seed - 8th Month"
elseif ( currentMonth == 8 )
MessageBox, "Hearthfire - 9th Month"
elseif ( currentMonth == 9 )
MessageBox, "Frost Fall - 10th Month"
elseif ( currentMonth == 10 )
MessageBox, "Sun's Dusk - 11th Month"
elseif ( currentMonth == 11 )
MessageBox, "Evening Star - 12th Month"
endif
set currentMonth to 0
endif
End current_Month

このスクリプトを Kegstand に設定して動作確認してみた。牢屋に入ったり、古いセーブデータを使ったりして
数ヵ月分のメッセージを確認、1年分は見てないけど大丈夫そう。
上: 休息メニュー
下: メッセージボックス
どのお酒をいつ飲むべきか。
再び、The Elder Scrolls 非公式ページ さんのページに行ってお酒の解説を見て研究。
どういうお酒なのか詳しくわかったけど、よく考えたら私は全然飲まないので、
どのお酒を何月に設定したら雰囲気がでるのか見当がつかない。
ビールは夏、ウイスキーは冬、とかでいいのかな?
お酒と月の組み合わせ候補
| お酒 | 月 | お酒 | 月 |
| Greef | 1月 Morning Star | Mazte | 7月 Sun's Height |
| Greef | 2月 Sun's Dawn | Mazte | 8月 Last Seed |
| Sujamma | 3月 First Seed | Mazte | 9月 Hearthfire |
| Sujamma | 4月 Rain's Hand | Shein | 10月 Frost Fall |
| Shein | 5月 Second Seed | Sujamma | 11月 Sun's Dusk |
| Mazte | 6月 Mid Year | Greef | 12月 Evening Star |
Cyrodiilic Brandy は 4月から 9月の祝日限定、Flin は 10月から 3月の祝日限定にしてみたい。
そのためには現在の日にちを取得しないといけない。
Vintage Brandy、Ancient Dagoth Brandy、Skooma は条件をもっと厳しくするつもり。
(2つの月が満月の夜中だけ、とか)
ここで Love Beer!!MOD の作成を中断して、
しばらくは Global 変数でどんなことができるかいろいろ試してみることに決めた。
毎正午に教会の鐘が鳴る MOD とか、祝日にお祭りが開かれる MOD とかできるかもしれない。