예제 #1
0
    public Transform GetModelPart(ModelDef def)
    {
        switch (def)
        {
        case ModelDef.Head:
            return(Head);

        case ModelDef.Left_Hand:
            return(Left_Hand);

        case ModelDef.Right_Hand:
            return(Right_Hand);

        case ModelDef.Chest:
            return(Chest);

        case ModelDef.Fore_Chest:
            return(Fore_Chest);

        case ModelDef.Left_Foot:
            return(Left_Foot);

        case ModelDef.Right_Foot:
            return(Right_Foot);

        default:
            return(tran);
        }
    }
예제 #2
0
        void AddClimbAnis(ModelDef model)
        {
            var ani1 = new ScriptAniJob("climb_low", "t_Stand_2_JumpUpLow", new ScriptAni(0, 4));
            var ani2 = new ScriptAniJob("climb_low1", "s_JumpUpLow", new ScriptAni(0, 1));
            var ani3 = new ScriptAniJob("climb_low2", "t_JumpUpLow_2_Stand", new ScriptAni(0, 9));

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

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

            ani1 = new ScriptAniJob("climb_mid", "t_Stand_2_JumpUpMid", new ScriptAni(0, 9));
            ani2 = new ScriptAniJob("climb_mid1", "s_JumpUpMid", new ScriptAni(0, 1));
            ani3 = new ScriptAniJob("climb_mid2", "t_JumpUpMid_2_Stand", new ScriptAni(0, 20));

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

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

            ani1 = new ScriptAniJob("climb_high", "t_Jump_2_Hang", new ScriptAni(0, 17));
            ani2 = new ScriptAniJob("climb_high1", "s_hang", new ScriptAni(0, 1));
            ani3 = new ScriptAniJob("climb_high2", "t_Hang_2_Stand", new ScriptAni(0, 25));

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

            ani1.NextAni = ani2;
            ani2.NextAni = ani3;
        }
예제 #3
0
        void AddUnconsciousAnis(ModelDef model)
        {
            var ani1 = new ScriptAniJob("uncon_dropfront", "t_Stand_2_Wounded", new ScriptAni(0, 20));

            ani1.DefaultAni.FPS = 10;

            var ani2 = new ScriptAniJob("uncon_front", "s_wounded", new ScriptAni());

            model.AddAniJob(ani1);
            model.AddAniJob(ani2);
            ani1.NextAni = ani2;

            ani1 = new ScriptAniJob("uncon_dropback", "t_Stand_2_Woundedb", new ScriptAni(0, 14));
            ani1.DefaultAni.FPS = 10;

            ani2 = new ScriptAniJob("uncon_back", "s_woundedb", new ScriptAni());

            model.AddAniJob(ani1);
            model.AddAniJob(ani2);

            ani1.NextAni = ani2;

            // STAND UP
            var ani = new ScriptAniJob("uncon_standupfront", "t_Wounded_2_Stand", new ScriptAni(0, 34));

            ani.DefaultAni.FPS = 10;
            model.AddAniJob(ani);

            ani = new ScriptAniJob("uncon_standupback", "t_Woundedb_2_Stand", new ScriptAni(0, 40));
            ani.DefaultAni.FPS = 10;
            model.AddAniJob(ani);
        }
예제 #4
0
        void AddItemAnis(ModelDef m)
        {
            // take item
            ScriptAniJob aniJob1 = new ScriptAniJob("take_item", "t_Stand_2_IGet", new ScriptAni(0, 9)
            {
                { SpecialFrame.ItemHandle, 9 }
            });

            m.AddAniJob(aniJob1);

            ScriptAniJob aniJob2 = new ScriptAniJob("take_item2", "s_IGet", new ScriptAni(0, 1));

            m.AddAniJob(aniJob2);
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("take_item3", "t_IGet_2_Stand", new ScriptAni(0, 9));

            m.AddAniJob(aniJob3);
            aniJob2.NextAni = aniJob3;


            // drop item
            aniJob1 = new ScriptAniJob("drop_item", "t_Stand_2_IDrop", new ScriptAni(0, 6)
            {
                { SpecialFrame.ItemHandle, 6 }
            });
            m.AddAniJob(aniJob1);

            aniJob2 = new ScriptAniJob("drop_item2", "s_IDrop", new ScriptAni(0, 1));
            m.AddAniJob(aniJob2);
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("drop_item3", "t_IDrop_2_Stand", new ScriptAni(0, 6));
            m.AddAniJob(aniJob3);
            aniJob2.NextAni = aniJob3;


            // drink potion
            aniJob1 = new ScriptAniJob("chug_potion", "t_potionfast_Stand_2_S0", new ScriptAni(0, 5)
            {
                { SpecialFrame.ItemHandle, 30 }
            });
            m.AddAniJob(aniJob1);

            aniJob2 = new ScriptAniJob("chug_potion2", "s_potionfast_S0", new ScriptAni(0, 1));
            m.AddAniJob(aniJob2);
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("chug_potion3", "t_potionfast_S0_2_Stand", new ScriptAni(0, 32));
            m.AddAniJob(aniJob3);
            aniJob2.NextAni = aniJob3;
        }
예제 #5
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();
        }
예제 #6
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();
        }
예제 #7
0
        void CreateRateParameters(ModelDef _modelDef)
        {
            GameObject prefab = Resources.Load("UI/RateParameter") as GameObject;

            if (prefab == null)
            {
                Debug.LogWarning("RateParameter prefab not found in Resources/UI");
                return;
            }

            foreach (ReactionRateParameter parameter in _modelDef.adjustableParameters)
            {
                RateParameter rateParameter = (Instantiate(prefab, parameterViewport) as GameObject).GetComponent <RateParameter>();
                rateParameter.GetComponent <RectTransform>().localPosition = new Vector3(125f, -55f - parameterContentHeight, 0);
                rateParameter.Init(parameter);
                parameterContentHeight += parameterPrefabHeight;
            }
        }
예제 #8
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();
        }
예제 #9
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();
        }
예제 #10
0
 static void ReadAniAlias(ModelDef modelDef, ScriptOverlay overlay, string[] strs, ref int newAnis, ref int newJobs)
 {
     //newJobs++;
     //newAnis++;
 }
예제 #11
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();
        }
예제 #12
0
        void AddFistAnis(ModelDef model)
        {
            // Draw Fists
            ScriptAniJob aniJob1 = new ScriptAniJob("drawfists_part0", "t_Run_2_Fist", new ScriptAni(0, 3));

            aniJob1.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 2);
            ScriptAniJob aniJob2 = new ScriptAniJob("drawfists_part1", "s_Fist", new ScriptAni(0, 1));
            ScriptAniJob aniJob3 = new ScriptAniJob("drawfists_part2", "t_Fist_2_FistRun", new ScriptAni(0, 3));

            model.AddAniJob(aniJob1);
            model.AddAniJob(aniJob2);
            model.AddAniJob(aniJob3);

            aniJob1.NextAni = aniJob2;
            aniJob2.NextAni = aniJob3;

            // Draw Fists running
            ScriptAniJob aniJob = new ScriptAniJob("drawfists_running", "t_Move_2_FistMove", new ScriptAni(0, 14));

            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 5);
            aniJob.Layer = 2;

            model.AddAniJob(aniJob);

            // Undraw fists
            aniJob1 = new ScriptAniJob("undrawfists_part0", "t_FistRun_2_Fist", new ScriptAni(0, 3));
            aniJob1.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 2);
            aniJob2 = new ScriptAniJob("undrawfists_part1", "s_Fist", new ScriptAni(0, 1));
            aniJob3 = new ScriptAniJob("undrawfists_part2", "t_Fist_2_Run", new ScriptAni(0, 3));

            model.AddAniJob(aniJob1);
            model.AddAniJob(aniJob2);
            model.AddAniJob(aniJob3);

            aniJob1.NextAni = aniJob2;
            aniJob2.NextAni = aniJob3;

            // Undraw Fists running
            aniJob       = new ScriptAniJob("undrawfists_running", "t_FistMove_2_Move", new ScriptAni(0, 14));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 5);
            aniJob.Layer = 2;

            model.AddAniJob(aniJob);

            // Fight Animations
            aniJob = new ScriptAniJob("fistattack_fwd0", "s_FistAttack", new ScriptAni(0, 15));
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Combo, 9);
            model.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fistattack_fwd1", "s_FistAttack", new ScriptAni(15, 29));
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Hit, 9);
            model.AddAniJob(aniJob);

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

            aniJob = new ScriptAniJob("fist_parade", "t_FistParade_0", new ScriptAni(0, 12));
            model.AddAniJob(aniJob);

            aniJob = new ScriptAniJob("fist_jumpback", "t_FistParadeJumpB", new ScriptAni(0, 12));
            model.AddAniJob(aniJob);
        }
예제 #13
0
 void AddJumpAnis(ModelDef model)
 {
     model.AddAniJob(new ScriptAniJob("jump_fwd", "t_Stand_2_Jump"));
     model.AddAniJob(new ScriptAniJob("jump_run", "t_RunL_2_Jump"));
     model.AddAniJob(new ScriptAniJob("jump_up", "t_Stand_2_JumpUp"));
 }
예제 #14
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();
        }
예제 #15
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);
            }
        }
예제 #16
0
 public Transform getModelPart(ModelDef def)
 {
     return(modelInfo.GetModelPart(def));
 }
예제 #17
0
 public void CreateCustomUI(ModelDef _modelDef)
 {
     CreateTimeParameter(_modelDef.scale);
     CreateRateParameters(_modelDef);
     parameterViewport.sizeDelta = new Vector2(parameterViewport.sizeDelta.x, parameterContentHeight);
 }
예제 #18
0
        void Add1HAnis(ModelDef model)
        {
            var ov1 = new ScriptOverlay("1HST1", "Humans_1hST1"); model.AddOverlay(ov1);
            var ov2 = new ScriptOverlay("1HST2", "Humans_1hST2"); model.AddOverlay(ov2);

            // Draw 1h
            ScriptAniJob aniJob1 = new ScriptAniJob("draw1h_part0", "t_Run_2_1h");

            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 2)
            {
                { SpecialFrame.Draw, 2 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 3)
            {
                { SpecialFrame.Draw, 3 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 1)
            {
                { SpecialFrame.Draw, 1 }
            }, ov2);

            ScriptAniJob aniJob2 = new ScriptAniJob("draw1h_part1", "s_1h");

            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("draw1h_part2", "t_1h_2_1hRun");

            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 12));
            aniJob3.AddOverlayAni(new ScriptAni(0, 6), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 8), ov2);
            aniJob2.NextAni = aniJob3;

            // Draw 1h running
            ScriptAniJob aniJob = new ScriptAniJob("draw1h_running", "t_Move_2_1hMove", new ScriptAni(0, 24));

            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 6);
            model.AddAniJob(aniJob);

            // Undraw 1h
            aniJob1 = new ScriptAniJob("undraw1h_part0", "t_1hRun_2_1h");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 12)
            {
                { SpecialFrame.Draw, 12 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 6)
            {
                { SpecialFrame.Draw, 6 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 8)
            {
                { SpecialFrame.Draw, 8 }
            }, ov2);

            aniJob2 = new ScriptAniJob("undraw1h_part1", "s_1h");
            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undraw1h_part2", "t_1h_2_Run");
            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 2));
            aniJob3.AddOverlayAni(new ScriptAni(0, 3), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob2.NextAni = aniJob3;

            // Undraw 1h running
            aniJob       = new ScriptAniJob("undraw1h_running", "t_1hMove_2_Move", new ScriptAni(0, 24));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 18);
            model.AddAniJob(aniJob);

            // Fwd attack 1
            ScriptAniJob job = new ScriptAniJob("1hattack_fwd0", "s_1hattack");

            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 23)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 15 }
            });
            job.AddOverlayAni(new ScriptAni(0, 33)
            {
                { SpecialFrame.Hit, 4 }, { SpecialFrame.Combo, 14 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(0, 29)
            {
                { SpecialFrame.Hit, 4 }, { SpecialFrame.Combo, 10 }
            }, ov2);

            // fwd combo 2
            job = new ScriptAniJob("1hattack_fwd1", "s_1hattack");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(26, 40)
            {
                { SpecialFrame.Hit, 7 }
            });
            job.AddOverlayAni(new ScriptAni(33, 68)
            {
                { SpecialFrame.Hit, 4 }, { SpecialFrame.Combo, 15 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(33, 60)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 9 }
            }, ov2);

            // fwd combo 3
            job = new ScriptAniJob("1hattack_fwd2", "s_1hattack");
            model.AddAniJob(job);
            job.AddOverlayAni(new ScriptAni(68, 103)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 17 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(65, 92)
            {
                { SpecialFrame.Hit, 8 }, { SpecialFrame.Combo, 13 }
            }, ov2);

            // fwd combo 4
            job = new ScriptAniJob("1hattack_fwd3", "s_1hattack");
            model.AddAniJob(job);
            job.AddOverlayAni(new ScriptAni(103, 120)
            {
                { SpecialFrame.Hit, 7 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(97, 113)
            {
                { SpecialFrame.Hit, 10 }
            }, ov2);

            // left attack
            job = new ScriptAniJob("1hattack_left", "t_1HAttackL");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 30)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 15 }
            });
            job.AddOverlayAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 4 }, { SpecialFrame.Combo, 10 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(0, 20)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 8 }
            }, ov2);

            // right attack
            job = new ScriptAniJob("1hattack_right", "t_1HAttackR");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 30)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 15 }
            });
            job.AddOverlayAni(new ScriptAni(0, 24)
            {
                { SpecialFrame.Hit, 4 }, { SpecialFrame.Combo, 10 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(0, 20)
            {
                { SpecialFrame.Hit, 3 }, { SpecialFrame.Combo, 8 }
            }, ov2);

            // run attack
            job       = new ScriptAniJob("1hattack_run", "t_1HAttackMove");
            job.Layer = 2;
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 29)
            {
                { SpecialFrame.Hit, 16 }
            });

            // parades
            job = new ScriptAniJob("1h_parade0", "t_1HParade_0");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 15));

            job = new ScriptAniJob("1h_parade1", "t_1HParade_0_A2");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 15));

            job = new ScriptAniJob("1h_parade2", "t_1HParade_0_A3");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 15));

            // dodge
            job = new ScriptAniJob("1h_dodge", "t_1HParadeJumpB");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 14));
        }
예제 #19
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();
        }
예제 #20
0
        void Add2hAnis(ModelDef model)
        {
            var ov1 = new ScriptOverlay("2HST1", "Humans_2hST1"); model.AddOverlay(ov1);
            var ov2 = new ScriptOverlay("2HST2", "Humans_2hST2"); model.AddOverlay(ov2);

            // Draw 2h
            ScriptAniJob aniJob1 = new ScriptAniJob("draw2h_part0", "t_Run_2_2h");

            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 4)
            {
                { SpecialFrame.Draw, 4 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 4)
            {
                { SpecialFrame.Draw, 4 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 3)
            {
                { SpecialFrame.Draw, 3 }
            }, ov2);

            ScriptAniJob aniJob2 = new ScriptAniJob("draw2h_part1", "s_2h");

            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("draw2h_part2", "t_2h_2_2hRun");

            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 15));
            aniJob3.AddOverlayAni(new ScriptAni(0, 15), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 10), ov2);
            aniJob2.NextAni = aniJob3;

            // Draw 2h running
            ScriptAniJob aniJob = new ScriptAniJob("draw2h_running", "t_Move_2_2hMove", new ScriptAni(0, 24));

            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 6);
            model.AddAniJob(aniJob);

            // Undraw 2h
            aniJob1 = new ScriptAniJob("undraw2h_part0", "t_2hRun_2_2h");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 15)
            {
                { SpecialFrame.Draw, 15 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 15)
            {
                { SpecialFrame.Draw, 15 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 10)
            {
                { SpecialFrame.Draw, 10 }
            }, ov2);

            aniJob2 = new ScriptAniJob("undraw2h_part1", "s_2h");
            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undraw2h_part2", "t_2h_2_Run");
            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 4));
            aniJob3.AddOverlayAni(new ScriptAni(0, 4), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 3), ov2);
            aniJob2.NextAni = aniJob3;

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

            // Fwd attack 1
            ScriptAniJob job = new ScriptAniJob("2hattack_fwd0", "s_2hattack");

            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 26)
            {
                { SpecialFrame.Hit, 8 }, { SpecialFrame.Combo, 14 }
            });
            job.AddOverlayAni(new ScriptAni(0, 35)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 16 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(0, 34)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 13 }
            }, ov2);

            // fwd combo 2
            job = new ScriptAniJob("2hattack_fwd1", "s_2hattack");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(31, 50)
            {
                { SpecialFrame.Hit, 6 }
            });
            job.AddOverlayAni(new ScriptAni(40, 75)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 16 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(39, 75)
            {
                { SpecialFrame.Hit, 4 }, { SpecialFrame.Combo, 12 }
            }, ov2);

            // fwd combo 3
            job = new ScriptAniJob("2hattack_fwd2", "s_2hattack");
            model.AddAniJob(job);
            job.AddOverlayAni(new ScriptAni(80, 114)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 16 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(79, 118)
            {
                { SpecialFrame.Hit, 9 }, { SpecialFrame.Combo, 17 }
            }, ov2);

            // fwd combo 4
            job = new ScriptAniJob("2hattack_fwd3", "s_2hattack");
            model.AddAniJob(job);
            job.AddOverlayAni(new ScriptAni(124, 146)
            {
                { SpecialFrame.Hit, 12 }
            }, ov2);

            // left attack
            job = new ScriptAniJob("2hattack_left", "t_2hAttackL");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 36)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 18 }
            });
            job.AddOverlayAni(new ScriptAni(0, 28)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 14 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(0, 26)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 14 }
            }, ov2);

            // right attack
            job = new ScriptAniJob("2hattack_right", "t_2hAttackR");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 36)
            {
                { SpecialFrame.Hit, 6 }, { SpecialFrame.Combo, 18 }
            });
            job.AddOverlayAni(new ScriptAni(0, 29)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 14 }
            }, ov1);
            job.AddOverlayAni(new ScriptAni(0, 26)
            {
                { SpecialFrame.Hit, 5 }, { SpecialFrame.Combo, 14 }
            }, ov2);

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

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

            job = new ScriptAniJob("2h_parade1", "t_2hParade_0_A2");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 15));

            job = new ScriptAniJob("2h_parade2", "t_2hParade_0_A3");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 15));

            // dodge
            job = new ScriptAniJob("2h_dodge", "t_2hParadeJumpB");
            model.AddAniJob(job);
            job.SetDefaultAni(new ScriptAni(0, 24));
        }
예제 #21
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();
        }
예제 #22
0
        void AddBowAnis(ModelDef model)
        {
            var ov1 = new ScriptOverlay("BowT1", "Humans_BowT1"); model.AddOverlay(ov1);
            var ov2 = new ScriptOverlay("BowT2", "Humans_BowT2"); model.AddOverlay(ov2);

            ScriptAniJob aniJob1 = new ScriptAniJob("drawbow_part0", "t_Run_2_bow");

            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 5)
            {
                { SpecialFrame.Draw, 5 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 5)
            {
                { SpecialFrame.Draw, 5 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 5)
            {
                { SpecialFrame.Draw, 5 }
            }, ov2);

            ScriptAniJob aniJob2 = new ScriptAniJob("drawbow_part1", "s_bow");

            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("drawbow_part2", "t_bow_2_bowRun");

            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 12));
            aniJob3.AddOverlayAni(new ScriptAni(0, 10), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 8), ov2);
            aniJob2.NextAni = aniJob3;

            ScriptAniJob aniJob = new ScriptAniJob("drawbow_running", "t_Move_2_BowMove", new ScriptAni(0, 19));

            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 7);
            model.AddAniJob(aniJob);

            aniJob1 = new ScriptAniJob("undrawbow_part0", "t_BowRun_2_Bow");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 12)
            {
                { SpecialFrame.Draw, 12 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 10)
            {
                { SpecialFrame.Draw, 10 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 8)
            {
                { SpecialFrame.Draw, 8 }
            }, ov2);

            aniJob2 = new ScriptAniJob("undrawbow_part1", "s_Bow");
            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undrawbow_part2", "t_bow_2_Run");
            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 5));
            aniJob3.AddOverlayAni(new ScriptAni(0, 5), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 5), ov2);
            aniJob2.NextAni = aniJob3;

            aniJob       = new ScriptAniJob("undrawbow_running", "t_BowMove_2_Move", new ScriptAni(0, 19));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 12);
            model.AddAniJob(aniJob);

            aniJob1 = new ScriptAniJob("aim_bow", "t_bowwalk_2_bowaim");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 11));
            aniJob1.AddOverlayAni(new ScriptAni(0, 11), ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 11), ov2);

            aniJob2 = new ScriptAniJob("aiming_bow", "s_BowAim");
            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni());
            aniJob2.AddOverlayAni(new ScriptAni(), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(), ov2);
            aniJob1.NextAni = aniJob2;

            // fixme: add s_bowshoot too?
            aniJob1 = new ScriptAniJob("reload_bow", "t_BowReload");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 28));
            aniJob1.AddOverlayAni(new ScriptAni(0, 26), ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 22), ov2);
            aniJob1.NextAni = aniJob2;

            aniJob1 = new ScriptAniJob("unaim_bow", "t_BowAim_2_Bowwalk");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 11));
            aniJob1.AddOverlayAni(new ScriptAni(0, 11), ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 11), ov2);
        }
예제 #23
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();
        }
예제 #24
0
        void AddXBowAnis(ModelDef model)
        {
            var ov1 = new ScriptOverlay("XBowT1", "Humans_CBowT1"); model.AddOverlay(ov1);
            var ov2 = new ScriptOverlay("XBowT2", "Humans_CBowT2"); model.AddOverlay(ov2);

            ScriptAniJob aniJob1 = new ScriptAniJob("drawXbow_part0", "t_Run_2_Cbow");

            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 4)
            {
                { SpecialFrame.Draw, 4 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 4)
            {
                { SpecialFrame.Draw, 4 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 4)
            {
                { SpecialFrame.Draw, 4 }
            }, ov2);

            ScriptAniJob aniJob2 = new ScriptAniJob("drawXbow_part1", "s_Cbow");

            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            ScriptAniJob aniJob3 = new ScriptAniJob("drawXbow_part2", "t_Cbow_2_CbowRun");

            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 33));
            aniJob3.AddOverlayAni(new ScriptAni(0, 29), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 25), ov2);
            aniJob2.NextAni = aniJob3;

            ScriptAniJob aniJob = new ScriptAniJob("drawXbow_running", "t_Move_2_CBowMove", new ScriptAni(0, 39));

            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 7);
            model.AddAniJob(aniJob);

            aniJob1 = new ScriptAniJob("undrawXbow_part0", "t_CBowRun_2_CBow");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 33)
            {
                { SpecialFrame.Draw, 33 }
            });
            aniJob1.AddOverlayAni(new ScriptAni(0, 29)
            {
                { SpecialFrame.Draw, 29 }
            }, ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 25)
            {
                { SpecialFrame.Draw, 25 }
            }, ov2);

            aniJob2 = new ScriptAniJob("undrawXbow_part1", "s_CBow");
            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni(0, 1));
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 1), ov2);
            aniJob1.NextAni = aniJob2;

            aniJob3 = new ScriptAniJob("undrawXbow_part2", "t_Cbow_2_Run");
            model.AddAniJob(aniJob3);
            aniJob3.SetDefaultAni(new ScriptAni(0, 4));
            aniJob3.AddOverlayAni(new ScriptAni(0, 4), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(0, 4), ov2);
            aniJob2.NextAni = aniJob3;

            aniJob       = new ScriptAniJob("undrawXbow_running", "t_CBowMove_2_Move", new ScriptAni(0, 39));
            aniJob.Layer = 2;
            aniJob.DefaultAni.SetSpecialFrame(SpecialFrame.Draw, 32);
            model.AddAniJob(aniJob);

            aniJob1 = new ScriptAniJob("aim_xbow", "t_cbowwalk_2_cbowaim");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 5));
            aniJob1.AddOverlayAni(new ScriptAni(0, 6), ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 6), ov2);

            aniJob2 = new ScriptAniJob("aiming_xbow", "s_CBowAim");
            model.AddAniJob(aniJob2);
            aniJob2.SetDefaultAni(new ScriptAni());
            aniJob2.AddOverlayAni(new ScriptAni(), ov1);
            aniJob2.AddOverlayAni(new ScriptAni(), ov2);
            aniJob1.NextAni = aniJob2;

            // fixme: add s_bowshoot too?
            aniJob1 = new ScriptAniJob("reload_xbow", "t_CBowReload");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 32));
            aniJob1.AddOverlayAni(new ScriptAni(0, 29), ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 23), ov2);
            aniJob1.NextAni = aniJob2;

            aniJob1 = new ScriptAniJob("unaim_xbow", "t_CBowAim_2_CBowwalk");
            model.AddAniJob(aniJob1);
            aniJob1.SetDefaultAni(new ScriptAni(0, 6));
            aniJob1.AddOverlayAni(new ScriptAni(0, 6), ov1);
            aniJob1.AddOverlayAni(new ScriptAni(0, 6), ov2);
        }
예제 #25
0
        void AddGestureAnis(ModelDef m)
        {
            m.AddAniJob(new ScriptAniJob("gesture_dontknow", "t_dontknow", new ScriptAni(0, 10)));

            m.AddAniJob(new ScriptAniJob("plunder", "t_plunder", new ScriptAni(0, 75)));
        }
예제 #26
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();
        }
예제 #27
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();
        }
예제 #28
0
        static void ReadAni(ModelDef modelDef, ScriptOverlay overlay, string[] strs, ref int newAnis, ref int newJobs)
        {
            string aniName = ExtractString(strs[1]);

            int layer;

            if (!int.TryParse(strs[2], out layer))
            {
                return;
            }

            string nextAni = ExtractString(strs[3]);

            int startFrame;

            if (!int.TryParse(strs[9], out startFrame))
            {
                return;
            }

            int endFrame;

            if (!int.TryParse(strs[10], out endFrame) || endFrame < 0)
            {
                return;
            }

            float fps = 25;

            if (strs.Length > 11)
            {
                float.TryParse(strs[11].Substring("FPS:".Length), out fps);
            }

            ScriptAniJob aniJob;

            if (!modelDef.TryGetAniJob(aniName, out aniJob))
            {
                aniJob = new ScriptAniJob(aniName, aniName);
                if (!modelDef.Catalog.ContainsPropertyForJob(aniJob))
                {
                    return;
                }

                modelDef.AddAniJob(aniJob);
                newJobs++;
            }
            aniJob.Layer = layer;

            ScriptAni ani = new ScriptAni(startFrame, endFrame);

            ani.FPS = fps;
            if (overlay == null)
            {
                aniJob.SetDefaultAni(ani);
            }
            else
            {
                aniJob.AddOverlayAni(ani, overlay);
            }
            newAnis++;
        }