Post by 無限 on Jan 8, 2016 0:01:09 GMT
this file is what is loaded first out of all the nsd files. i put comments in to describe each part.
//dofile(g_Path + "../Common.nut");
//basic info such as health, cost and etc
RoboData.ModelName = "Klamath";
RoboData.SetName("ウィンダム・クラマス");
RoboData.Hp=1330;
// hp amount
//RoboData.Hp=133;
RoboData.Generator=1000;
//RoboData.Energy=1000;
RoboData.Score=1000;
RoboData.Cost=2500;
RoboData.LockDist=25;
//ai info for weapons
RoboData.AIWeaponSetting(0, 10, 80, 50, 0); //ショット(0),使用距離(近),遠,頻度(%),使用エネルギ判定
RoboData.AIWeaponSetting(1, 1, 10, 60, 0); //近接,使用距離(近),遠,頻度(%),使用エネルギ判定
RoboData.AIWeaponSetting(2, 1, 5, 50, 0); //サブ1(2),使用距離(近),遠,頻度(%),使用エネルギ判定
RoboData.AIWeaponSetting(3, 1, 10, 30, 0); //サブ2(2),使用距離(近),遠,頻度(%),使用エネルギ判定
RoboData.AIWeaponSetting(4, 1, 5, 60, 0); //サブ3(2),使用距離(近),遠,頻度(%),使用エネルギ判定
// 実行スクリプトファイル群
set nsd script files necessary for mech.
RoboData.SetScriptFiles([
"../../Common/BasicData.nsd",
"../../Common/Effect.nsd",
"../../Common/Task.nsd",
"../RobotCommon.nsd",
"Defs.nsd",
"Datas.nsd",
"Script.nsd"
]);
//print(g_Path);
// aniロード前
loads before start of match to setup the mech. here you could possible add texture, sound and projectile data.
function LoadBefore()
{
/*
ResMgr.LoadTexture(g_Path + "weapongauge.png");
ResMgr.LoadTexture(g_Path + "weapongauge_cs.png");
ResMgr.LoadTexture(g_Path + "weapongaugew1.png");
ResMgr.LoadGameTexture(g_Path+"Texture/sabel_line.png");
ResMgr.LoadGameTexture("Texture/explode1.png");
ResMgr.LoadGameTexture("Texture/GSmoke.png");
ResMgr.LoadGameTexture("Texture/burner.png");
ResMgr.LoadXData(g_Path + "Hit.x");
ResMgr.LoadXData(g_Path + "HitUp.x");
ResMgr.LoadXData(g_Path + "Shield_point.x");
*/
//==========================================
// 画像データ読み込み&登録
// 実際のキャラではg_TexTblが作成される
//==========================================
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/UI/weapongauge.png", "weapongauge");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/UI/weapongauge_cs.png", "weapongauge_cs");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/UI/weapongaugew1.png", "weapongaugew1");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/UI/CS_gaugeW.png", "CS_gaugeW");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/UI/CS_gauge.png", "CS_gauge");
ResRegist.LoadAndRegistGameTex(ResMgr, g_Path+"Texture/sabel_line.png", "SwordLine");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/explode1.png", "Explosion");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/GSmoke.png", "GSmoke");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/Burner/burner.png", "Burner");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/Beam1/BeamHit.png", "BeamHit");
ResRegist.LoadAndRegistGameTex(ResMgr, "Texture/Bullet1/hit.png", "BulletHit");
ResRegist.LoadAndRegistGameTex(ResMgr, g_Path+"Texture/Beam/Beam2.bmp", "Beam2");
//==========================================
// メッシュデータ読み込み&登録
// 実際のキャラではg_XTblが作成される
//==========================================
ResRegist.LoadAndRegistXData(ResMgr, g_Path + "Hit.x", "Hit");
ResRegist.LoadAndRegistXData(ResMgr, g_Path + "HitUp.x", "HitUp");
ResRegist.LoadAndRegistXData(ResMgr, g_Path + "Shield_point.x", "Shield_point");
//==========================================
// エフェクトデータ
//==========================================
// Beam用
ResRegist.SetEffectData(0,
ResMgr,
[0, "Texture/Beam1/Beam.png", 10,"Texture/Beam1/BeamHit.png", 11,"Texture/Beam1/effect.png"], // Texture
[] // Mesh
);
// Bullet用
ResRegist.SetEffectData(1,
ResMgr,
[0, "Texture/Bullet1/bullet.png", 10,"Texture/Bullet1/Hit.png", 11,"Texture/Bullet1/bullet.png"], // Texture
[] // Mesh
);
//==========================================
// サウンドデータ読み込み&登録
// 実際のキャラではg_SndTblが作成される
//==========================================
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/shot.wav", "shot", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/asioto.wav", "Asioto", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/BeamHit.wav", "BeamHit", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/tyakuti.wav", "Tyakuti", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/down.wav", "Down", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/SwordHit.wav", "SwordHit", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr,"Sound/bullet2.wav", "bullet2", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr, "Sound/burner.wav", "burner", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr, "Sound/burner2.wav", "burner2", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr, "Sound/explode_l.wav", "explode_l", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr, "Sound/explode2.wav", "explode2", 5, 1000);
// bullet
ResRegist.LoadAndRegistSound3D(ResMgr, "Sound/BulletHit.wav", "BulletHit", 5, 1000);
ResRegist.LoadAndRegistSound3D(ResMgr, "Sound/BulletHit2.wav", "BulletHit2", 5, 1000);
/*
ResMgr.LoadSound3D("Sound/shot.wav", 5, 1000);
ResMgr.LoadSound3D("Sound/asioto.wav", 5, 1000);
ResMgr.LoadSound3D("Sound/BeamHit.wav", 5, 1000);
ResMgr.LoadSound3D("Sound/tyakuti.wav", 5, 1000);
*/
}
// aniロード後
this loads after
function LoadAfter()
{
RoboData.CreateFaceData("Shield_point.x");
}