戦略シミュレーション 試作品のデータファイル書式
    
    
    全体
    ヘッダ部(1行目)
    フィールドデータ
    城データ(フィールドデータの後に書く)
    武将データ
    兵種データ
    国家データ(最後に書く)
    (イメージ番号の並び順)
    (HTMLファイル書式)
    ヘッダ部
    fieldName
    
    フィールドデータ
    
    
      
      	 | 
      	"field" | 
      	フィールドデータ定義部開始のキーワード | 
      
      
      	| int | 
      	ifield | 
      	フィールド部品データの数 | 
      
    
    
      
      	| fieldName | 
      	id | 
      	move | 
      	effect | 
      	ambush | 
      	image | 
      	red | 
      	green | 
      	blue | 
      	- ifield個 | 
      
    
    
      
      	| String | 
      	fieldName | 
      	フィールド部品の名前 | 
      
      
      	| int | 
      	id | 
      	フィールド部品番号 | 
      
      
      	| int | 
      	move | 
      	移動に必要な機動力 | 
      
      
      	| int | 
      	effect | 
      	地形効果 | 
      
      
      	| int | 
      	ambush | 
      	0 - 伏兵不可 others - 伏兵可能 | 
      
      
      	| int | 
      	image | 
      	フィールド部品イメージ番号 | 
      
      
      	| int | 
      	red,green,blue | 
      	全体マップ表示での表示色のRGB成分(0〜255) | 
      
    
    
      
      	| nx | 
      	ny | 
      
      
      	| number | 
      	id | 
      	- 全マップを埋めるまで | 
      
    
    
      
      	| int | 
      	nx,ny | 
      	フィールドのグリッド数 | 
      
      
      	| int | 
      	number | 
      	塗潰すグリッドの数 | 
      
      
      	| int | 
      	id | 
      	フィールド部品番号 | 
      
    
    城データ
    castle
    
    
      
      	| castleName | 
      	id | 
      	x | 
      	y | 
      	move | 
      	image | 
      	red | 
      	green | 
      	blue | 
      
      
      	 | 
      	food | 
      	money | 
      	foodProduct | 
      	moneyProduct | 
      	castleClass | 
      
    
    
      
      	| String | 
      	castleName | 
      	城の名前 | 
      
      
      	| int | 
      	id | 
      	城番号 | 
      
      
      	| int | 
      	x,y | 
      	城の座標位置 | 
      
      
      	| int | 
      	move | 
      	移動に必要な機動力 | 
      
      
      	| int | 
      	image | 
      	城イメージ番号 | 
      
      
      	| int | 
      	red,green,blue | 
      	全体マップ表示での表示色のRGB成分(0〜255) | 
      
      
      	| int | 
      	food | 
      	初期兵糧 | 
      
      
      	| int | 
      	money | 
      	初期資金 | 
      
      
      	| int | 
      	foodProduct | 
      	農業生産 | 
      
      
      	| int | 
      	moneyProduct | 
      	商業生産 | 
      
      
      	| int | 
      	castleClass | 
      	城郭規模 | 
      
      
    
    end
    
    武将データ
    general
    
      
      	| "general" | 
      	武将データ定義部開始のキーワード | 
      
    
    
      
      	| id | 
      	generalName | 
      	politics | 
      	strategy | 
      	command | 
      	strength | 
      	charisma | 
      
    
    
      
      	| int | 
      	id | 
      	武将番号 | 
      
      
      	| String | 
      	generalName | 
      	武将の名前 | 
      
      
      	| int | 
      	politics | 
      	武将の政略 | 
      
      
      	| int | 
      	strategy | 
      	武将の知略 | 
      
      
      	| int | 
      	command | 
      	武将の指揮 | 
      
      
      	| int | 
      	strength | 
      	武将の武力 | 
      
      
      	| int | 
      	charisma | 
      	武将の魅力 | 
      
    
    end
    
    兵種データ
    weapon
    
      
      	| "weapon" | 
      	兵種データ定義部開始のキーワード | 
      
    
    
      
      	| id | 
      	weaponName | 
      	move | 
      	attack | 
      	attackRange | 
      	counter | 
      	defence | 
      	cost | 
      
    
    
      
      	| int | 
      	id | 
      	兵種番号 | 
      
      
      	| String | 
      	weaponName | 
      	兵種の名前 | 
      
      
      	| int | 
      	move | 
      	基本機動力 | 
      
      
      	| int | 
      	attack | 
      	基本攻撃力 | 
      
      
      	| int | 
      	attackRange | 
      	攻撃射程 | 
      
      
      	| int | 
      	counter | 
      	0 - 反撃を受けない others - 反撃される | 
      
      
      	| int | 
      	defense | 
      	基本防御力 | 
      
      
      	| int | 
      	cost | 
      	募兵のコスト | 
      
    
    end
    
    国家データ
    nation
    
      
      	| "nation" | 
      	国家データ定義部開始のキーワード | 
      
    
    
      
      	| nationName | 
      	king | 
      	castleNumber | 
      	divisionNumber | 
      	red | 
      	green | 
      	blue | 
      
      
      	 | 
      	castle | 
      	...... | 
      	 | 
      	 | 
      	 | 
      	 | 
      	- castleNumber個 | 
      
    
    
      
      	| String | 
      	nationName | 
      	国家の名前 | 
      
      
      	| int | 
      	king | 
      	王の武将番号 | 
      
      
      	| int | 
      	castleNumber | 
      	初期状態で領有する城の数 | 
      
      
      	| int | 
      	divisionNumber | 
      	初期状態の部隊数 | 
      
      
      	| int | 
      	red,green,blue | 
      	国家表示色のRGB成分(0〜255) | 
      
      
      	| int | 
      	castle | 
      	領有している城番号 | 
      
    
    
      
      	| divisionName | 
      	number | 
      	training | 
      	weapon | 
      	food | 
      	money | 
      	generalNumber | 
      	x | 
      	y | 
      	- divisionNumber個 | 
      
      
      	 | 
      	general | 
      	...... | 
      	 | 
      	 | 
      	 | 
      	 | 
      	 | 
      	 | 
      	- generalNumber個 | 
      
    
    
      
      	| String | 
      	divisionName | 
      	部隊の名前 | 
      
      
      	| int | 
      	number | 
      	初期兵数 | 
      
      
      	| int | 
      	training | 
      	初期訓練度 | 
      
      
      	| int | 
      	weapon | 
      	部隊の兵種番号 | 
      
      
      	| int | 
      	food | 
      	初期兵糧 | 
      
      
      	| int | 
      	money | 
      	初期資金 | 
      
      
      	| int | 
      	generalNumber | 
      	初期状態の所属武将数 | 
      
      
      	| int | 
      	x,y | 
      	部隊の初期配置位置 | 
      
      
      	| int | 
      	general | 
      	所属している武将番号 | 
      
    
    end
    
    イメージ番号の並び順
    横にN1個、縦にN2個並んでいる場合
    
      
      	| 0 | 
      	1 | 
      	...... | 
      	N1-1 | 
      
      
      	| N1 | 
      	N1+1 | 
      	...... | 
      	2N1-1 | 
      
      
      	 | 
      	・ | 
      	 | 
      	 | 
      
      
      	 | 
      	・ | 
      	 | 
      	 | 
      
      
      	 | 
      	・ | 
      	 | 
      	 | 
      
      
      	| N1(N2-1) | 
      	N1(N2-1)+1 | 
      	...... | 
      	N1N2-1 | 
      
    
    今回の場合はN1=10、N2=1で
    
      
      	| 0 | 
      	1 | 
      	2 | 
      	3 | 
      	4 | 
      	5 | 
      	6 | 
      	7 | 
      	8 | 
      	9 | 
      
      
      	| カーソル | 
      	範囲表示 | 
      	海 | 
      	草原 | 
      	森 | 
      	山 | 
      	高山 | 
      	川 | 
      	砂漠 | 
      	城 | 
      
    
    HTMLファイルの書式
    HTMLファイルのアプレットを使う部分の書式は以下のようになっています。
    <applet code="WCP.class"
      	archive="WCP.jar"
      	width=620 height=400>
    <param name="data" value="chuhan.dat">
    <param name="image" value="template.gif">
    <param name="imagesize" value="40">
    <param name="fontname" value="Monospaced">
    <param name="fontsize" value="10">
    </APPLET>
    順に説明しますと
    
      
      	| applet タグ | 
      	アプレットを呼び出しています。 width と height は表示の大きさです。
        画像部品と文字フォントの大きさによっては変える必要があります。 | 
      
      
      	| data | 
      	データファイル名です。 | 
      
      
      	| image | 
      	テンプレートイメージファイル名です。 | 
      
      
      	| imagesize | 
      	イメージの部品一つ当りの大きさです。 | 
      
      
      	| font | 
      	文字フォント名です。JAVAでは、
        Dialog, DialogInput, Monospaced, Serif, SansSerif, Symbolが使用できます。 | 
      
      
      	| fontsize | 
      	文字フォントの大きさです。 | 
      
    
    
    W.C.P.トップページに戻る
    シムやのトップページに戻る