Top Downloads&ScreenShots 掲示板 Love Beer!! 家具MODを修正 日時を取得する練習 四季の変化 木のカタログ

空き瓶とお酒を増やす。

スクリプトのバグは置いておいて先に進めることにする。 空き瓶とお酒のデータをリストアップしてこれからどうするか考える。
Bottle
瓶の色コルク栓なしコルク栓あり
青1misc_com_bottle_01misc_com_bottle_10
青2misc_com_bottle_06misc_com_bottle_05
緑1misc_com_bottle_09Misc_Com_Bottle_04
緑2misc_com_bottle_02Misc_Com_Bottle_08
茶1misc_com_bottle_13 misc_com_bottle_15
茶2misc_com_bottle_11misc_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

瓶とお酒の組み合わせ

瓶の種類によって、注げるお酒が限定されるようにする。

酒樽とお酒の組み合わせ

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 変数というものらしい。 そーいえばダイアログ編集画面にあった気がする。
glovals
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
Month
このスクリプトを Kegstand に設定して動作確認してみた。牢屋に入ったり、古いセーブデータを使ったりして 数ヵ月分のメッセージを確認、1年分は見てないけど大丈夫そう。

上: 休息メニュー
下: メッセージボックス

どのお酒をいつ飲むべきか。

再び、The Elder Scrolls 非公式ページ さんのページに行ってお酒の解説を見て研究。 どういうお酒なのか詳しくわかったけど、よく考えたら私は全然飲まないので、 どのお酒を何月に設定したら雰囲気がでるのか見当がつかない。 ビールは夏、ウイスキーは冬、とかでいいのかな?
お酒と月の組み合わせ候補
お酒お酒
Greef1月 Morning StarMazte7月 Sun's Height
Greef2月 Sun's DawnMazte8月 Last Seed
Sujamma3月 First SeedMazte9月 Hearthfire
Sujamma4月 Rain's HandShein10月 Frost Fall
Shein5月 Second SeedSujamma11月 Sun's Dusk
Mazte6月 Mid YearGreef12月 Evening Star
Cyrodiilic Brandy は 4月から 9月の祝日限定、Flin は 10月から 3月の祝日限定にしてみたい。
そのためには現在の日にちを取得しないといけない。
Vintage Brandy、Ancient Dagoth Brandy、Skooma は条件をもっと厳しくするつもり。
(2つの月が満月の夜中だけ、とか)
ここで Love Beer!!MOD の作成を中断して、 しばらくは Global 変数でどんなことができるかいろいろ試してみることに決めた。
毎正午に教会の鐘が鳴る MOD とか、祝日にお祭りが開かれる MOD とかできるかもしれない。
Top Downloads&ScreenShots 掲示板 Love Beer!! 家具MODを修正 日時を取得する練習 四季の変化 木のカタログ