Esempio n. 1
0
        static void AddItem(string codeName, DDLItem instance)
        {
            DDLString str;

            if (!instance.TryGetValue("visual", out str))
            {
                return;
            }

            string modelName = Path.GetFileNameWithoutExtension(str.Value);

            ModelDef model;

            if (!ModelDef.TryGetModel(modelName, out model))
            {
                model = new ModelDef(modelName, str.Value);
                model.Create();
            }

            ItemDef item = ItemDef.Get(codeName);

            if (item == null)
            {
                item = new ItemDef(codeName);
            }
            else
            {
                item.Delete();
            }

            item.Model = model;

            if (instance.TryGetValue("name", out str))
            {
                item.Name = str.Value;
            }
            if (string.IsNullOrWhiteSpace(item.Name))
            {
                item.Name = "no name (" + codeName + ")";
            }

            if (instance.TryGetValue("effect", out str))
            {
                item.Effect = str.Value;
            }

            item.Create();
        }
Esempio n. 2
0
        public void BuildDefinition()
        {
            // Dragon
            ModelDef m = new ModelDef("Dragon", "Dragon.mds");

            m.SetAniCatalog(new NPCCatalog());

            var aniJob = new ScriptAniJob("fistattack_fwd0", "s_FistAttack", new ScriptAni(0, 40));

            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 24);
            m.AddAniJob(aniJob);

            // strafe anis for block
            aniJob = new ScriptAniJob("fist_parade", "t_FistRunStrafeL", new ScriptAni(0, 50));
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_jumpback", "t_FistRunStrafeR", new ScriptAni(0, 50));
            m.AddAniJob(aniJob);

            m.Radius       = 120;
            m.HalfHeight   = 200;
            m.FistRange    = 300;
            m.CenterOffset = 20;
            m.Create();

            // NPCs
            NpcDef npcDef = new NpcDef("dragon_fire", _BaseDefFactory, _Registration);

            npcDef.Name     = "Feuerdrache";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Dragon_FIRE_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 47;
            npcDef.Create();

            npcDef          = new NpcDef("dragon_undead", _BaseDefFactory, _Registration);
            npcDef.Name     = "Untoter Drache";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Dragon_Undead_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 47;
            npcDef.Create();
        }
Esempio n. 3
0
        public void BuildDefinition()
        {
            // Lurker
            ModelDef m = new ModelDef("Lurker", "Lurker.mds");

            m.SetAniCatalog(new NPCCatalog());

            var aniJob = new ScriptAniJob("fistattack_fwd0", "s_FistAttack", new ScriptAni(0, 20));

            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 9);
            m.AddAniJob(aniJob);

            aniJob       = new ScriptAniJob("fistattack_run", "t_FistAttackMove", new ScriptAni(1, 15));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 16);
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_parade", "t_FistParade_0", new ScriptAni(0, 29));
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_jumpback", "t_FistParadeJumpB", new ScriptAni(1, 20));
            m.AddAniJob(aniJob);

            m.Radius       = 60;
            m.HalfHeight   = 30;
            m.CenterOffset = 50;
            m.FistRange    = 100;
            m.Create();

            // NPCs
            NpcDef npcDef = new NpcDef("lurker", _BaseDefFactory, _Registration);

            npcDef.Name     = "Lurker";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Lur_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 30;
            npcDef.Create();
        }
Esempio n. 4
0
        public void BuildDefinition()
        {
            // Bloodfly
            ModelDef m = new ModelDef("Bloodfly", "Bloodfly.mds");

            m.SetAniCatalog(new NPCCatalog());

            var aniJob = new ScriptAniJob("fistattack_fwd0", "s_FistAttack", new ScriptAni(0, 59));

            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 9);
            m.AddAniJob(aniJob);

            aniJob       = new ScriptAniJob("fistattack_run", "t_FistAttackMove", new ScriptAni(0, 29));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 16);
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_parade", "t_FistParade_0", new ScriptAni(0, 29));
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_jumpback", "t_FistParadeJumpB", new ScriptAni(1, 19));
            m.AddAniJob(aniJob);

            m.Radius     = 40;
            m.HalfHeight = 40;
            m.FistRange  = 60;
            m.Create();

            // NPCs
            NpcDef npcDef = new NpcDef("bloodfly", _BaseDefFactory, _Registration);

            npcDef.Name     = "Blutfliege";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Blo_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 25;
            npcDef.Create();
        }
Esempio n. 5
0
        public void BuildDefinition()
        {
            ModelDef m = new ModelDef("draconian", "draconian.mds");

            m.SetAniCatalog(new NPCCatalog());

            #region Draw

            // Draw 2h
            ScriptAniJob aniJob1 = new ScriptAniJob("draw2h_part0", "t_Run_2_2h");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 5)
            {
                { SpecialFrame.Draw, 5 }
            });

            ScriptAniJob aniJob2 = new ScriptAniJob("draw2h_part1", "s_2h");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("draw2h_part2", "t_2h_2_2hRun");
            m.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 12));
            aniJob2.NextAni = aniJob3;

            // Draw 2h running
            ScriptAniJob aniJob = new ScriptAniJob("draw2h_running", "t_Move_2_2hMove", new ScriptAni(0, 20));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 7);
            m.AddAniJob(aniJob);

            // Undraw 2h
            aniJob1 = new ScriptAniJob("undraw2h_part0", "t_2hRun_2_2h");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 12)
            {
                { SpecialFrame.Draw, 12 }
            });

            aniJob2 = new ScriptAniJob("undraw2h_part1", "s_2h");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undraw2h_part2", "t_2h_2_Run");
            m.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 5));
            aniJob2.NextAni = aniJob3;

            // Undraw 2h running
            aniJob       = new ScriptAniJob("undraw2h_running", "t_2hMove_2_Move", new ScriptAni(0, 20));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 13);
            m.AddAniJob(aniJob);

            #endregion

            #region Fighting

            // Fwd attack 1
            ScriptAniJob job = new ScriptAniJob("2hattack_fwd0", "s_2hattack");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 11 }
            });

            // fwd combo 2
            job = new ScriptAniJob("2hattack_fwd1", "s_2hattack");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(25, 70)
            {
                { SpecialFrame.Hit, 20 }
            });

            // left attack
            job = new ScriptAniJob("2hattack_left", "t_2hAttackL");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 8 }
            });

            // right attack
            job = new ScriptAniJob("2hattack_right", "t_2hAttackR");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 8 }
            });

            // run attack
            job       = new ScriptAniJob("2hattack_run", "t_2hAttackMove");
            job.Layer = 2;
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 19)
            {
                { SpecialFrame.Hit, 13 }
            });

            // parades
            job = new ScriptAniJob("2h_parade0", "t_2hParade_0");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 30));

            // dodge
            job = new ScriptAniJob("2h_dodge", "t_2hParadeJumpB");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 14));

            #endregion

            #region Jump Anis

            m.AddAniJob(new ScriptAniJob("jump_fwd", "t_Stand_2_Jump"));
            m.AddAniJob(new ScriptAniJob("jump_run", "t_RunL_2_Jump"));


            #endregion

            #region Climb Anis

            var ani1 = new ScriptAniJob("climb_low", "t_Stand_2_JumpUpLow", new ScriptAni(0, 10));
            var ani2 = new ScriptAniJob("climb_low1", "s_JumpUpLow", new ScriptAni(0, 4));
            var ani3 = new ScriptAniJob("climb_low2", "t_JumpUpLow_2_Stand", new ScriptAni(0, 15));

            m.AddAniJob(ani1);
            m.AddAniJob(ani2);
            m.AddAniJob(ani3);

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;

            ani1 = new ScriptAniJob("climb_mid", "t_Stand_2_JumpUpMid", new ScriptAni(0, 10));
            ani2 = new ScriptAniJob("climb_mid1", "s_JumpUpMid", new ScriptAni(0, 2));
            ani3 = new ScriptAniJob("climb_mid2", "t_JumpUpMid_2_Stand", new ScriptAni(0, 23));

            m.AddAniJob(ani1);
            m.AddAniJob(ani2);
            m.AddAniJob(ani3);

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;

            ani1 = new ScriptAniJob("climb_high", "t_Stand_2_JumpUp", new ScriptAni(0, 9));
            ani2 = new ScriptAniJob("climb_high1", "t_JumpUp_2_Hang", new ScriptAni(0, 2));
            ani3 = new ScriptAniJob("climb_high2", "t_Hang_2_Stand", new ScriptAni(0, 40));

            m.AddAniJob(ani1);
            m.AddAniJob(ani2);
            m.AddAniJob(ani3);

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;

            #endregion

            m.Radius       = 80;
            m.HalfHeight   = 100;
            m.CenterOffset = 20;
            m.Create();

            // NPCs
            NpcDef npcDef = new NpcDef("draconian", _BaseDefFactory, _Registration);
            npcDef.Name     = "Echsenmensch";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Draconian_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 62;
            npcDef.Create();
        }
Esempio n. 6
0
        static void AddNPC(string codeName, DDLNpc instance)
        {
            DDLString str;

            if (!instance.TryGetValue("visual", out str))
            {
                return;
            }

            string modelName = Path.GetFileNameWithoutExtension(str.Value);

            ModelDef model;

            if (!ModelDef.TryGetModel(modelName, out model))
            {
                model = new ModelDef(modelName, str.Value);
                model.Create();
            }

            NPCDef npc = NPCDef.Get(codeName);

            if (npc == null)
            {
                npc = new NPCDef(codeName);
            }
            else
            {
                npc.Delete();
            }

            npc.Model = model;

            if (instance.TryGetValue("name", out str))
            {
                npc.Name = str.Value;
            }
            if (string.IsNullOrWhiteSpace(npc.Name))
            {
                npc.Name = "no name (" + codeName + ")";
            }

            if (instance.TryGetValue("bodymesh", out str))
            {
                npc.BodyMesh = str.Value;
            }
            if (instance.TryGetValue("headmesh", out str))
            {
                npc.HeadMesh = str.Value;
            }

            DDLInt dint;

            if (instance.TryGetValue("bodytex", out dint))
            {
                npc.BodyTex = dint.Value;
            }
            if (instance.TryGetValue("headtex", out dint))
            {
                npc.HeadTex = dint.Value;
            }

            npc.Create();
        }
Esempio n. 7
0
        public void BuildDefinition()
        {
            // TEMPLER MINE

            ModelDef m = new ModelDef("leichter_zweihaender", "ItMw_032_2h_sword_light_01.3DS");

            m.Create();
            ItemDef itemDef = new ItemDef("leichter_zweihaender", _BaseDefFactory, _Registration);

            itemDef.Name     = "Leichter Zweihänder";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Range    = 100;
            itemDef.Damage   = 50;
            itemDef.Create();

            m = new ModelDef("ITAR_templer", "ARMOR_TPLM.3DS");
            m.Create();
            itemDef              = new ItemDef("ITAR_templer", _BaseDefFactory, _Registration);
            itemDef.Name         = "Templerrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.Protection   = 35;
            itemDef.VisualChange = "ARMOR_TPLM.ASC";
            itemDef.Model        = m;
            itemDef.Create();

            // GARDIST MINE

            m = new ModelDef("grobes_schwert", "ItMw_025_1h_sld_sword_01.3DS");
            m.Create();
            itemDef          = new ItemDef("grobes_schwert", _BaseDefFactory, _Registration);
            itemDef.Name     = "Grobes Schwert";
            itemDef.ItemType = ItemTypes.Wep1H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 45;
            itemDef.Range    = 70;
            itemDef.Create();

            m = new ModelDef("ITAR_garde_l", "ARMOR_GRDL.3DS");
            m.Create();
            itemDef              = new ItemDef("ITAR_garde_l", _BaseDefFactory, _Registration);
            itemDef.Name         = "Leichte Garderüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.Protection   = 40;
            itemDef.VisualChange = "ARMOR_GRDL.ASC";
            itemDef.InvOffset    = new Vec3f(0, -20, -20);
            itemDef.Model        = m;
            itemDef.Create();

            // GARDIST BURG

            m = new ModelDef("2hschwert", "ItMw_060_2h_sword_01.3DS");
            m.Create();
            itemDef          = new ItemDef("2hschwert", _BaseDefFactory, _Registration);
            itemDef.Name     = "Zweihänder";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Range    = 110;
            itemDef.Damage   = 50;
            itemDef.Create();

            m = new ModelDef("ITAR_Garde", "ItAr_Bloodwyn_ADDON.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_Garde", _BaseDefFactory, _Registration);
            itemDef.Name         = "Gardistenrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.Protection   = 40;
            itemDef.VisualChange = "Armor_Bloodwyn_ADDON.asc";
            itemDef.InvOffset    = new Vec3f(0, -20, -20);
            itemDef.Model        = m;
            itemDef.Create();

            // SCHATTEN BURG

            m = new ModelDef("1hschwert", "Itmw_025_1h_Mil_Sword_broad_01.3DS");
            m.Create();
            itemDef          = new ItemDef("1hschwert", _BaseDefFactory, _Registration);
            itemDef.Name     = "Breitschwert";
            itemDef.ItemType = ItemTypes.Wep1H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 45;
            itemDef.Range    = 80;
            itemDef.Create();

            m = new ModelDef("ITAR_Schatten", "ItAr_Diego.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_Schatten", _BaseDefFactory, _Registration);
            itemDef.Name         = "Schattenrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Diego.asc";
            itemDef.Protection   = 35;
            itemDef.Model        = m;
            itemDef.Create();

            // SÖLDNER BURG

            m = new ModelDef("2haxt", "ItMw_060_2h_axe_heavy_01.3DS");
            m.Create();
            itemDef          = new ItemDef("2haxt", _BaseDefFactory, _Registration);
            itemDef.Name     = "Söldneraxt";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 50;
            itemDef.Range    = 100;
            itemDef.Create();

            m = new ModelDef("ITAR_Söldner", "ItAr_Sld_M.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_Söldner", _BaseDefFactory, _Registration);
            itemDef.Name         = "Söldnerrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Sld_M.asc";
            itemDef.Protection   = 40;
            itemDef.Model        = m;
            itemDef.Create();

            // BANDIT BURG

            m = new ModelDef("1haxt", "ItMw_025_1h_sld_axe_01.3DS");
            m.Create();
            itemDef          = new ItemDef("1haxt", _BaseDefFactory, _Registration);
            itemDef.Name     = "Grobes Kriegsbeil";
            itemDef.ItemType = ItemTypes.Wep1H;
            itemDef.Material = ItemMaterials.Wood;
            itemDef.Damage   = 45;
            itemDef.Model    = m;
            itemDef.Range    = 80;
            itemDef.Create();

            m = new ModelDef("ITAR_bandit", "ItAr_Bdt_H.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_bandit", _BaseDefFactory, _Registration);
            itemDef.Name         = "Banditenrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Bdt_H.asc";
            itemDef.Protection   = 35;
            itemDef.Model        = m;
            itemDef.Create();

            // PFEIL
            m = new ModelDef("itrw_arrow", "ItRw_Arrow.3ds");
            m.Create();
            itemDef          = new ItemDef("itrw_arrow", _BaseDefFactory, _Registration);
            itemDef.Name     = "Pfeil";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.AmmoBow;
            itemDef.Model    = m;
            itemDef.Create();

            var projDef = new ProjDef("arrow", _BaseDefFactory, _Registration);

            projDef.Create();

            // BOGEN
            m = new ModelDef("itrw_longbow", "ItRw_Bow_M_01.mms");
            m.Create();
            itemDef          = new ItemDef("itrw_longbow", _BaseDefFactory, _Registration);
            itemDef.Name     = "Langbogen";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.WepBow;
            itemDef.Damage   = 50;
            itemDef.Model    = m;
            itemDef.Create();

            m = new ModelDef("itrw_shortbow", "ItRw_Bow_L_01.mms");
            m.Create();
            itemDef          = new ItemDef("itrw_shortbow", _BaseDefFactory, _Registration);
            itemDef.Name     = "Kurzbogen";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.WepBow;
            itemDef.Damage   = 45;
            itemDef.Model    = m;
            itemDef.Create();

            // BOLZEN
            m = new ModelDef("itrw_bolt", "ItRw_Bolt.3ds");
            m.Create();
            itemDef          = new ItemDef("itrw_Bolt", _BaseDefFactory, _Registration);
            itemDef.Name     = "Bolzen";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.AmmoXBow;
            itemDef.Model    = m;
            itemDef.Create();

            // ARMBRUST
            m = new ModelDef("light_xbow", "ItRw_Crossbow_L_01.mms");
            m.Create();
            itemDef          = new ItemDef("light_xbow", _BaseDefFactory, _Registration);
            itemDef.Name     = "Leichte Armbrust";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.WepXBow;
            itemDef.Damage   = 45;
            itemDef.Model    = m;
            itemDef.Create();

            m = new ModelDef("war_xbow", "ItRw_Crossbow_M_02.mms");
            m.Create();
            itemDef          = new ItemDef("war_xbow", _BaseDefFactory, _Registration);
            itemDef.Name     = "Kriegsarmbrust";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.WepXBow;
            itemDef.Damage   = 50;
            itemDef.Model    = m;
            itemDef.Create();

            m = new ModelDef("heavy_xbow", "ItRw_Crossbow_H_02.mms");
            m.Create();
            itemDef          = new ItemDef("heavy_xbow", _BaseDefFactory, _Registration);
            itemDef.Name     = "Schwere Armbrust";
            itemDef.Material = ItemMaterials.Wood;
            itemDef.ItemType = ItemTypes.WepXBow;
            itemDef.Damage   = 50;
            itemDef.Model    = m;
            itemDef.Create();

            // HOSE
            m = new ModelDef("ITAR_Prisoner", "ItAr_Prisoner.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_Prisoner", _BaseDefFactory, _Registration);
            itemDef.Name         = "Malaks letzte Hose";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.Protection   = 10;
            itemDef.VisualChange = "Armor_Prisoner.asc";
            itemDef.Model        = m;
            itemDef.Create();

            // SCHWERER AST
            m = new ModelDef("ItMw_1h_Bau_Mace", "ItMw_010_1h_Club_01.3DS");
            m.Create();
            itemDef          = new ItemDef("ItMw_1h_Bau_Mace", _BaseDefFactory, _Registration);
            itemDef.Name     = "Sehr schwerer Ast";
            itemDef.ItemType = ItemTypes.Wep1H;
            itemDef.Material = ItemMaterials.Wood;
            itemDef.Model    = m;
            itemDef.Damage   = 15;
            itemDef.Range    = 50;
            itemDef.Create();

            // ORK WAFFEN
            m = new ModelDef("krush_pach", "ItMw_2H_OrcAxe_02.3DS");
            m.Create();
            itemDef          = new ItemDef("krush_pach", _BaseDefFactory, _Registration);
            itemDef.Name     = "Krush Pach";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 45;
            itemDef.Range    = 80;
            itemDef.Create();

            m = new ModelDef("orc_sword", "ItMw_2H_OrcSword_02.3DS");
            m.Create();
            itemDef          = new ItemDef("orc_sword", _BaseDefFactory, _Registration);
            itemDef.Name     = "Orkisches Kriegsschwert";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 50;
            itemDef.Range    = 100;
            itemDef.Create();

            m = new ModelDef("echsenschwert", "ItMw_2H_OrcSword_01.3DS");
            m.Create();
            itemDef          = new ItemDef("echsenschwert", _BaseDefFactory, _Registration);
            itemDef.Name     = "Echsenschwert";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 45;
            itemDef.Range    = 80;
            itemDef.Create();

            // Miliz
            m = new ModelDef("ITAR_miliz_s", "ItAr_MIL_M.3DS");
            m.Create();
            itemDef              = new ItemDef("ITAR_miliz_s", _BaseDefFactory, _Registration);
            itemDef.Name         = "Schwere Milizrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_MIL_M.asc";
            itemDef.Protection   = 35;
            itemDef.Model        = m;
            itemDef.Create();

            // Ritter
            m = new ModelDef("ITAR_ritter", "ItAr_Pal_M.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_ritter", _BaseDefFactory, _Registration);
            itemDef.Name         = "Ritterrüstung";
            itemDef.Material     = ItemMaterials.Metal;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Pal_M.asc";
            itemDef.Protection   = 40;
            itemDef.Model        = m;
            itemDef.Create();


            // Tempel
            m = new ModelDef("ITAR_bandit_m", "ItAr_Bdt_M.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_bandit_m", _BaseDefFactory, _Registration);
            itemDef.Name         = "mittlere Banditenrüstung";
            itemDef.Material     = ItemMaterials.Leather;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Bdt_M.asc";
            itemDef.Protection   = 35;
            itemDef.Model        = m;
            itemDef.Create();

            m = new ModelDef("grober_2h", "ItMw_035_2h_sld_sword_01.3DS");
            m.Create();
            itemDef          = new ItemDef("grober_2h", _BaseDefFactory, _Registration);
            itemDef.Name     = "Grober Zweihänder";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 50;
            itemDef.Range    = 110;
            itemDef.Create();

            m = new ModelDef("ITAR_pal_skel", "ItAr_Pal_H.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_pal_skel", _BaseDefFactory, _Registration);
            itemDef.Name         = "Alte Paladinrüstung";
            itemDef.Material     = ItemMaterials.Metal;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Pal_Skeleton.asc";
            itemDef.Protection   = 40;
            itemDef.Model        = m;
            itemDef.Create();

            m = new ModelDef("ITAR_pal_h", "ItAr_Pal_H.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_pal_h", _BaseDefFactory, _Registration);
            itemDef.Name         = "Paladinrüstung";
            itemDef.Material     = ItemMaterials.Metal;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Pal_H.asc";
            itemDef.Protection   = 50;
            itemDef.Model        = m;
            itemDef.Create();

            // trank
            m = new ModelDef("hptrank", "ItPo_Health_01.3ds");
            m.Create();
            itemDef          = new ItemDef("hptrank", _BaseDefFactory, _Registration);
            itemDef.Name     = "Heiltrank";
            itemDef.ItemType = ItemTypes.Drinkable;
            itemDef.Material = ItemMaterials.Glass;
            itemDef.Model    = m;
            itemDef.Create();

            m = new ModelDef("itmw_schlachtaxt", "ItMw_070_2h_axe_heavy_03.3DS");
            m.Create();
            itemDef          = new ItemDef("itmw_schlachtaxt", _BaseDefFactory, _Registration);
            itemDef.Name     = "Schlachtaxt";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 50;
            itemDef.Range    = 100;
            itemDef.Create();

            m = new ModelDef("ITAR_garde_h", "ItAr_Thorus_ADDON.3ds");
            m.Create();
            itemDef              = new ItemDef("ITAR_garde_h", _BaseDefFactory, _Registration);
            itemDef.Name         = "Schwere Gardistenrüstung";
            itemDef.Material     = ItemMaterials.Metal;
            itemDef.ItemType     = ItemTypes.Armor;
            itemDef.VisualChange = "Armor_Thorus_ADDON.asc";
            itemDef.Protection   = 50;
            itemDef.InvOffset    = new Vec3f(0, -20, -20);
            itemDef.Model        = m;
            itemDef.Create();

            //ItLs_Torch_01.3ds
            //ITLSTORCHBURNING.ZEN
            m = new ModelDef("torch_burning", "ITLSTORCHBURNING.ZEN");
            m.Create();
            itemDef          = new ItemDef("torch_burning", _BaseDefFactory, _Registration);
            itemDef.Name     = "Brennende Fackel";
            itemDef.ItemType = ItemTypes.Torch;
            itemDef.Material = ItemMaterials.Wood;
            itemDef.Model    = m;
            itemDef.Create();

            m = new ModelDef("paladinschwert", "ItMw_030_1h_PAL_Sword_02.3DS");
            m.Create();
            itemDef          = new ItemDef("paladinschwert", _BaseDefFactory, _Registration);
            itemDef.Name     = "Paladinschwert";
            itemDef.ItemType = ItemTypes.Wep1H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 45;
            itemDef.Range    = 60;
            itemDef.Create();

            m = new ModelDef("paladin2h", "ItMw_040_2h_PAL_Sword_03.3DS");
            m.Create();
            itemDef          = new ItemDef("paladin2h", _BaseDefFactory, _Registration);
            itemDef.Name     = "Paladinzweihänder";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Range    = 100;
            itemDef.Damage   = 50;
            itemDef.Create();

            m = new ModelDef("rostiger2h", "ItMw_025_2h_Sword_old_01.3DS");
            m.Create();
            itemDef          = new ItemDef("rostiger2h", _BaseDefFactory, _Registration);
            itemDef.Name     = "rostiger Zweihänder";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Range    = 100;
            itemDef.Damage   = 30;
            itemDef.Create();

            m = new ModelDef("rostigeaxt", "ItMw_025_2h_Misc_Axe_old_01.3DS");
            m.Create();
            itemDef          = new ItemDef("rostigeaxt", _BaseDefFactory, _Registration);
            itemDef.Name     = "rostige Axt";
            itemDef.ItemType = ItemTypes.Wep2H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Range    = 70;
            itemDef.Damage   = 35;
            itemDef.Create();

            m = new ModelDef("rostiger1h", "ItMw_020_1h_sword_old_01.3DS");
            m.Create();
            itemDef          = new ItemDef("rostiger1h", _BaseDefFactory, _Registration);
            itemDef.Name     = "rostiges Schwert";
            itemDef.ItemType = ItemTypes.Wep1H;
            itemDef.Material = ItemMaterials.Metal;
            itemDef.Model    = m;
            itemDef.Damage   = 20;
            itemDef.Range    = 50;
            itemDef.Create();
        }
Esempio n. 8
0
        public void BuildDefinition()
        {
            // HUMAN MODEL
            ModelDef m = new ModelDef("crawler", "crawler.mds");

            m.SetAniCatalog(new NPCCatalog());

            var aniJob = new ScriptAniJob("fistattack_fwd0", "s_FistAttack", new ScriptAni(0, 20));

            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 9);
            m.AddAniJob(aniJob);

            aniJob       = new ScriptAniJob("fistattack_run", "t_FistAttackMove", new ScriptAni(0, 29));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 16);
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_parade", "t_FistParade_0", new ScriptAni(0, 29));
            m.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_jumpback", "t_FistParadeJumpB", new ScriptAni(0, 29));
            m.AddAniJob(aniJob);

            m.Radius       = 130;
            m.HalfHeight   = 80;
            m.FistRange    = 40;
            m.CenterOffset = 50;
            m.Create();

            // NPCs
            NpcDef npcDef = new NpcDef("minecrawler", _BaseDefFactory, _Registration);

            npcDef.Name     = "Minecrawler";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Crw_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 29;
            npcDef.Create();

            npcDef          = new NpcDef("minecrawler_warrior", _BaseDefFactory, _Registration);
            npcDef.Name     = "Minecrawler-Krieger";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Cr2_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 29;
            npcDef.Create();

            // CRAWLER KÖNIGIN
            m = new ModelDef("crawler_queen", "CRWQUEEN.mds");
            m.SetAniCatalog(new NPCCatalog());

            aniJob = new ScriptAniJob("fistattack_fwd0", "s_FistAttack", new ScriptAni(0, 24));
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 13);
            m.AddAniJob(aniJob);

            m.Radius     = 250;
            m.HalfHeight = 300;
            m.FistRange  = 100;
            m.Create();

            // NPCs
            npcDef          = new NpcDef("crawler_queen", _BaseDefFactory, _Registration);
            npcDef.Name     = "Minecrawler-Königin";
            npcDef.Model    = m;
            npcDef.BodyMesh = "CrQ_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 29;
            npcDef.Create();
        }
Esempio n. 9
0
        public void BuildDefinition()
        {
            ModelDef m = new ModelDef("orc", "orc.mds");

            m.SetAniCatalog(new NPCCatalog());

            #region Draw

            // Draw 2h
            ScriptAniJob aniJob1 = new ScriptAniJob("draw2h_part0", "t_Run_2_2h");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 5)
            {
                { SpecialFrame.Draw, 5 }
            });

            ScriptAniJob aniJob2 = new ScriptAniJob("draw2h_part1", "s_2h");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("draw2h_part2", "t_2h_2_2hRun");
            m.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 12));
            aniJob2.NextAni = aniJob3;

            // Draw 2h running
            ScriptAniJob aniJob = new ScriptAniJob("draw2h_running", "t_Move_2_2hMove", new ScriptAni(0, 20));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 7);
            m.AddAniJob(aniJob);

            // Undraw 2h
            aniJob1 = new ScriptAniJob("undraw2h_part0", "t_2hRun_2_2h");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 12)
            {
                { SpecialFrame.Draw, 12 }
            });

            aniJob2 = new ScriptAniJob("undraw2h_part1", "s_2h");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undraw2h_part2", "t_2h_2_Run");
            m.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 5));
            aniJob2.NextAni = aniJob3;

            // Undraw 2h running
            aniJob       = new ScriptAniJob("undraw2h_running", "t_2hMove_2_Move", new ScriptAni(0, 20));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 13);
            m.AddAniJob(aniJob);

            #endregion

            #region Fighting

            // Fwd attack 1
            ScriptAniJob job = new ScriptAniJob("2hattack_fwd0", "s_2hattack");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 11 }
            });

            // fwd combo 2
            job = new ScriptAniJob("2hattack_fwd1", "s_2hattack");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(25, 70)
            {
                { SpecialFrame.Hit, 20 }
            });

            // left attack
            job = new ScriptAniJob("2hattack_left", "t_2hAttackL");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 8 }
            });

            // right attack
            job = new ScriptAniJob("2hattack_right", "t_2hAttackR");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 8 }
            });

            // run attack
            job       = new ScriptAniJob("2hattack_run", "t_2hAttackMove");
            job.Layer = 2;
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 19)
            {
                { SpecialFrame.Hit, 13 }
            });

            // parades
            job = new ScriptAniJob("2h_parade0", "t_2hParade_0");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 30));

            // dodge
            job = new ScriptAniJob("2h_dodge", "t_2hParadeJumpB");
            m.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 14));

            #endregion

            #region XBow anis

            #region Draw

            aniJob1 = new ScriptAniJob("drawXbow_part0", "t_Run_2_Cbow");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 4)
            {
                { SpecialFrame.Draw, 4 }
            });

            aniJob2 = new ScriptAniJob("drawXbow_part1", "s_Cbow");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("drawXbow_part2", "t_Cbow_2_CbowRun");
            m.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 34));
            aniJob2.NextAni = aniJob3;

            aniJob       = new ScriptAniJob("drawXbow_running", "t_Move_2_CBowMove", new ScriptAni(0, 20));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 7);
            m.AddAniJob(aniJob);

            aniJob1 = new ScriptAniJob("undrawXbow_part0", "t_CBowRun_2_CBow");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 34)
            {
                { SpecialFrame.Draw, 34 }
            });

            aniJob2 = new ScriptAniJob("undrawXbow_part1", "s_CBow");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undrawXbow_part2", "t_Cbow_2_Run");
            m.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 4));
            aniJob2.NextAni = aniJob3;

            aniJob       = new ScriptAniJob("undrawXbow_running", "t_CBowMove_2_Move", new ScriptAni(0, 20));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 14);
            m.AddAniJob(aniJob);

            #endregion

            #region Fight

            aniJob1 = new ScriptAniJob("aim_xbow", "t_cbowwalk_2_cbowaim");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 11));

            aniJob2 = new ScriptAniJob("aiming_xbow", "s_CBowAim");
            m.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni());
            aniJob1.NextAni = aniJob2;

            // fixme: add s_bowshoot too?
            aniJob1 = new ScriptAniJob("reload_xbow", "t_CBowReload");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 20));
            aniJob1.NextAni = aniJob2;

            aniJob1 = new ScriptAniJob("unaim_xbow", "t_CBowAim_2_CBowwalk");
            m.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 11));

            #endregion

            #endregion

            #region Jump Anis

            m.AddAniJob(new ScriptAniJob("jump_fwd", "t_Stand_2_Jump"));
            m.AddAniJob(new ScriptAniJob("jump_run", "t_RunL_2_Jump"));


            #endregion

            #region Climb Anis

            var ani1 = new ScriptAniJob("climb_low", "t_Stand_2_JumpUpLow", new ScriptAni(0, 10));
            var ani2 = new ScriptAniJob("climb_low1", "s_JumpUpLow", new ScriptAni(0, 4));
            var ani3 = new ScriptAniJob("climb_low2", "t_JumpUpLow_2_Stand", new ScriptAni(0, 15));

            m.AddAniJob(ani1);
            m.AddAniJob(ani2);
            m.AddAniJob(ani3);

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;

            ani1 = new ScriptAniJob("climb_mid", "t_Stand_2_JumpUpMid", new ScriptAni(0, 10));
            ani2 = new ScriptAniJob("climb_mid1", "s_JumpUpMid", new ScriptAni(0, 2));
            ani3 = new ScriptAniJob("climb_mid2", "t_JumpUpMid_2_Stand", new ScriptAni(0, 23));

            m.AddAniJob(ani1);
            m.AddAniJob(ani2);
            m.AddAniJob(ani3);

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;

            ani1 = new ScriptAniJob("climb_high", "t_Stand_2_JumpUp", new ScriptAni(0, 9));
            ani2 = new ScriptAniJob("climb_high1", "t_JumpUp_2_Hang", new ScriptAni(0, 2));
            ani3 = new ScriptAniJob("climb_high2", "t_Hang_2_Stand", new ScriptAni(0, 40));

            m.AddAniJob(ani1);
            m.AddAniJob(ani2);
            m.AddAniJob(ani3);

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;

            #endregion

            m.Radius       = 80;
            m.HalfHeight   = 100;
            m.CenterOffset = 20;
            m.Create();

            // NPCs
            NpcDef npcDef = new NpcDef("orc_scout", _BaseDefFactory, _Registration);
            npcDef.Name     = "Ork-Späher";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Orc_BodyWarrior";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "Orc_HeadWarrior";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 59;
            npcDef.Create();

            // NPCs
            npcDef          = new NpcDef("orc_warrior", _BaseDefFactory, _Registration);
            npcDef.Name     = "Ork-Krieger";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Orc_BodyWarrior";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "Orc_HeadWarrior";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 59;
            npcDef.Create();

            npcDef          = new NpcDef("orc_elite", _BaseDefFactory, _Registration);
            npcDef.Name     = "Ork-Elite";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Orc_BodyElite";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "Orc_HeadWarrior";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 59;
            npcDef.Create();

            npcDef          = new NpcDef("orc_oberst", _BaseDefFactory, _Registration);
            npcDef.Name     = "Orkischer Oberst";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Orc_BodyElite";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "Orc_HeadWarrior";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 59;
            npcDef.Create();
        }
Esempio n. 10
0
        public void BuildDefinition()
        {
            ModelDef m = new ModelDef("trollpalisade");

            m.Visual = "OW_TROLLPALISSADE.3DS";
            m.Create();

            VobDef vobDef = new VobDef("trollpalisade", _BaseDefFactory, _Registration);

            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("invwall");
            m.Visual = "TRANS_WAND.3DS";
            m.Create();

            vobDef       = new VobDef("invwall", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("irdorathwall");
            m.Visual = "NW_DRAGONISLE_INVISIBLEORCWALL_01.3DS";
            m.Create();

            vobDef       = new VobDef("irdorathwall", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();


            m        = new ModelDef("gate");
            m.Visual = "OC_LOB_GATE_BIG.3DS";
            m.Create();

            vobDef       = new VobDef("gate", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();


            m        = new ModelDef("bridge");
            m.Visual = "NW_DRAGONISLE_BIGBRIDGE_01.3DS";
            m.Create();

            vobDef       = new VobDef("bridge", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();


            m        = new ModelDef("door");
            m.Visual = "DOOR_NW_DRAGONISLE_02.MDS";
            m.Create();

            vobDef       = new VobDef("door", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();


            m        = new ModelDef("door_puzzle_left");
            m.Visual = "EVT_MAINHALL_DOOR_LEFT_01.3DS";
            m.Create();

            vobDef       = new VobDef("door_puzzle_left", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("door_puzzle_right");
            m.Visual = "EVT_MAINHALL_DOOR_RIGHT_01.3DS";
            m.Create();
            vobDef       = new VobDef("door_puzzle_right", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("redeye");
            m.Visual = "THEREDEYE.pfx";
            m.Create();
            vobDef       = new VobDef("redeye", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = false;
            vobDef.Create();

            m        = new ModelDef("bigdoor_head_right");
            m.Visual = "NW_DRAGONISLE_BIGDOOR_HEAD_RIGHT_01.3DS";
            m.Create();
            vobDef       = new VobDef("bigdoor_head_right", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("bigdoor_head_left");
            m.Visual = "NW_DRAGONISLE_BIGDOOR_HEAD_LEFT_01.3DS";
            m.Create();
            vobDef       = new VobDef("bigdoor_head_left", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("bigdoor_right");
            m.Visual = "NW_DRAGONISLE_BIGDOOR_RIGHT_01.3DS";
            m.Create();
            vobDef       = new VobDef("bigdoor_right", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();

            m        = new ModelDef("bigdoor_left");
            m.Visual = "NW_DRAGONISLE_BIGDOOR_LEFT_01.3DS";
            m.Create();
            vobDef       = new VobDef("bigdoor_left", _BaseDefFactory, _Registration);
            vobDef.Model = m;
            vobDef.CDDyn = vobDef.CDStatic = true;
            vobDef.Create();
        }
Esempio n. 11
0
        public void BuildDefinition()
        {
            // HUMAN MODEL
            ModelDef m = new ModelDef("humans", "HUMANS.MDS");

            m.SetAniCatalog(new NPCCatalog());
            AddFistAnis(m);
            Add1HAnis(m);
            Add2hAnis(m);
            AddJumpAnis(m);
            AddClimbAnis(m);
            AddBowAnis(m);
            AddXBowAnis(m);
            AddUnconsciousAnis(m);
            AddItemAnis(m);
            AddGestureAnis(m);

            m.AddOverlay(new ScriptOverlay("Humans_Torch", "Humans_Torch.mds"));
            m.AddOverlay(new ScriptOverlay("Humans_Skeleton", "Humans_Skeleton.mds"));

            m.Radius     = 40;
            m.HalfHeight = 90;
            m.FistRange  = 40;
            m.Create();


            // NPCs
            NpcDef npcDef = new NpcDef("maleplayer", _BaseDefFactory, _Registration);

            npcDef.Name     = "Spieler";
            npcDef.Model    = m;
            npcDef.BodyMesh = HumBodyMeshs.HUM_BODY_NAKED0.ToString();
            npcDef.BodyTex  = (int)HumBodyTexs.G1Hero;
            npcDef.HeadMesh = HumHeadMeshs.HUM_HEAD_PONY.ToString();
            npcDef.HeadTex  = (int)HumHeadTexs.Face_N_Player;
            npcDef.Guild    = 1;
            npcDef.Create();

            npcDef          = new NpcDef("femaleplayer", _BaseDefFactory, _Registration);
            npcDef.Name     = "Spielerin";
            npcDef.Model    = m;
            npcDef.BodyMesh = HumBodyMeshs.HUM_BODY_BABE0.ToString();
            npcDef.BodyTex  = (int)HumBodyTexs.F_Babe1;
            npcDef.HeadMesh = HumHeadMeshs.HUM_HEAD_BABE.ToString();
            npcDef.HeadTex  = (int)HumHeadTexs.FaceBabe_N_Anne;
            npcDef.Guild    = 1;
            npcDef.Create();

            npcDef          = new NpcDef("skeleton", _BaseDefFactory, _Registration);
            npcDef.Name     = "Skelett";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Ske_Body";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 31;
            npcDef.Create();

            npcDef          = new NpcDef("skeleton2", _BaseDefFactory, _Registration);
            npcDef.Name     = "Skelett";
            npcDef.Model    = m;
            npcDef.BodyMesh = "Ske_Body2";
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 31;
            npcDef.Create();

            npcDef          = new NpcDef("skeleton_lord", _BaseDefFactory, _Registration);
            npcDef.Name     = "Schattenlord";
            npcDef.Model    = m;
            npcDef.BodyMesh = HumBodyMeshs.HUM_BODY_NAKED0.ToString();
            npcDef.BodyTex  = 0;
            npcDef.HeadMesh = "Ske_Head";
            npcDef.HeadTex  = 0;
            npcDef.Guild    = 31;
            npcDef.Create();
        }
Esempio n. 12
0
        public static void ParseMDS(FileInfo fileInfo, bool isOverlay = false)
        {
            if (isOverlay)
            {
                return;
            }

            try
            {
                if (fileInfo == null)
                {
                    Logger.LogError("AniParser: FileInfo is null!");
                    return;
                }

                if (!fileInfo.Exists)
                {
                    Logger.LogError("AniParser: {0} does not exist!", fileInfo.FullName);
                    return;
                }

                if (string.Compare(fileInfo.Extension, ".mds", true) != 0)
                {
                    Logger.LogError("AniParser: {0} is no MDS file!", fileInfo.FullName);
                    return;
                }

                string name = Path.GetFileNameWithoutExtension(fileInfo.Name);

                int newAnis = 0;
                int newJobs = 0;

                ModelDef modelDef = new ModelDef(name, fileInfo.Name);
                modelDef.SetAniCatalog(new Visuals.AniCatalogs.NPCCatalog());
                ScriptOverlay overlay = null;

                using (StreamReader sr = new StreamReader(fileInfo.OpenRead()))
                {
                    string line = null;
                    try
                    {
                        while ((line = sr.ReadLine()) != null)
                        {
                            string[] strs = line.Split(seperators, StringSplitOptions.RemoveEmptyEntries);
                            if (strs.Length < 9)
                            {
                                continue;
                            }

                            string type = strs[0].Trim(seperators);
                            if (string.Compare(type, "ani", true) == 0)
                            {
                                ReadAni(modelDef, overlay, strs, ref newAnis, ref newJobs);
                            }
                            else if (string.Compare(type, "aniAlias", true) == 0)
                            {
                                ReadAniAlias(modelDef, overlay, strs, ref newAnis, ref newJobs);
                            }
                        }

                        modelDef.Create();
                    }
                    catch (Exception e)
                    {
                        File.WriteAllText("lastline.txt", line == null ? "" : line);
                        Logger.Log(e);
                    }
                }

                if (isOverlay)
                {
                    Logger.Log("AniParser: Overlay '{0}': {1} jobs and {2} anis parsed.", overlay.CodeName, newJobs, newAnis);
                }
                else
                {
                    Logger.Log("AniParser: ModelDef '{0}': {1} jobs and {2} anis parsed.", modelDef.CodeName, newJobs, newAnis);
                }
            }
            catch (Exception e)
            {
                Logger.Log("AniParser: {0} excepted!", fileInfo.FullName);
                Logger.Log(e);
            }
        }