private static void BranchsOnInit(CharacterCreation characterCreation)
        {
            //Init
            List <FaceGenChar> list           = new List <FaceGenChar>();
            BodyProperties     bodyProperties = CharacterObject.PlayerCharacter.GetBodyProperties(CharacterObject.PlayerCharacter.Equipment, -1);

            bodyProperties = FaceGen.GetBodyPropertiesWithAge(ref bodyProperties, 23f);
            list.Add(new FaceGenChar(bodyProperties, CharacterObject.PlayerCharacter.Equipment, CharacterObject.PlayerCharacter.IsFemale, "act_childhood_schooled"));
            characterCreation.ChangeFaceGenChars(list);
            //Doing this to add menus late to allow previous selections to work. But have to make sure it's not already added. No good way in menu class so forced to use text
            TextObject backstory;
            TextObject backstory2;

            backstory  = new TextObject("{=jg3T5AyE}Like many families in Calradia, your life was upended by war. Your home was ravaged by the passage of army after army. Eventually, you sold your property and set off with your father, mother, brother, and your two younger siblings to a new town you'd heard was safer. But you did not make it. Along the way, the inn at which you were staying was attacked by raiders. Your parents were slain and your two youngest siblings seized, but you and your brother survived because...", null);
            backstory2 = new TextObject("{=jg3T5AyE} During your journies you were ambushed by raiders you survived because...", null);

            List <CharacterCreationMenu> CurMenus = (List <CharacterCreationMenu>)AccessTools.Field(typeof(CharacterCreation), "CharacterCreationMenu").GetValue(characterCreation);
            bool loaded = false;

            foreach (CharacterCreationMenu x in CurMenus)
            {
                if (x.Text.ToString() == backstory.ToString() || x.Text.ToString() == backstory2.ToString())
                {
                    loaded = true;
                    break;
                }
            }
            ;
            if (!loaded)
            {
                CharacterCreationContent.Instance.GetType().GetMethod("AddEscapeMenu", BindingFlags.NonPublic | BindingFlags.Static).Invoke(CharacterCreationContent.Instance, new object[] { characterCreation });
            }
        }
Ejemplo n.º 2
0
    void Start()
    {
        gm                     = FindObjectOfType <GM>();
        creaPersonajes         = FindObjectOfType <CharacterCreation>();
        intentoCompraRealizado = false;

        EstrategiaIA = "Neutral";

        //Recoger todas las unidades en el inicio
        todos = FindObjectsOfType <IA_UnitControl>();
        //foreach(IA_UnitControl unidad in todos)
        for (int i = 0; i < todos.Length; i++)
        {
            //if(todos[i].unit.tipoUnidad=="rey" && todos[i].unit.playerNumber==1)
            //    jugadorRey = todos[i];
            if (todos[i].unit.tipoUnidad == "rey" && todos[i].unit.playerNumber == 2)
            {
                iaRey = todos[i];
            }
        }
        //Encontrar al rey del jugador
        Unit [] listaUnidades = FindObjectsOfType <Unit>();
        for (int i = 0; i < listaUnidades.Length; i++)
        {
            if (listaUnidades[i].tipoUnidad == "rey" && listaUnidades[i].playerNumber == 1)
            {
                jugadorRey = listaUnidades[i];
            }
        }


        cuentaTurno = 0;
    }
        private static void ParentsOnInit(CharacterCreation characterCreation)
        {
            characterCreation.ClearFaceGenMounts();
            characterCreation.ClearFaceGenPrefab();
            FaceGenChar mother;
            FaceGenChar father;

            BodyProperties player = CharacterObject.PlayerCharacter.GetBodyProperties(CharacterObject.PlayerCharacter.Equipment, -1);
            BodyProperties motherBodyProperties = player;
            BodyProperties fatherBodyProperties = player;

            FaceGen.GenerateParentKey(player, ref motherBodyProperties, ref fatherBodyProperties);
            motherBodyProperties = new BodyProperties(new DynamicBodyProperties(33f, 0.3f, 0.2f), motherBodyProperties.StaticProperties);
            fatherBodyProperties = new BodyProperties(new DynamicBodyProperties(33f, 0.5f, 0.5f), fatherBodyProperties.StaticProperties);
            CharacterObject characterObject1 = Game.Current.ObjectManager.GetObject <CharacterObject>("village_woman_empire");
            CharacterObject characterObject2 = Game.Current.ObjectManager.GetObject <CharacterObject>("townsman_empire");

            mother = new FaceGenChar(motherBodyProperties, characterObject1.Equipment, true, "anim_mother_1");
            father = new FaceGenChar(fatherBodyProperties, characterObject2.Equipment, false, "anim_father_1");

            CharacterCreation  characterCreation1 = characterCreation;
            List <FaceGenChar> faceGenCharList    = new List <FaceGenChar>();

            faceGenCharList.Add(mother);
            faceGenCharList.Add(father);
            characterCreation1.ChangeFaceGenChars(faceGenCharList);
            ChangeParentsOutfit(characterCreation);
            ChangeParentsAnimation(characterCreation);
        }
        public static void AddGameOption(CharacterCreation characterCreation)
        {
            //Adding this menu to choose start option type to leave story options story only
            CharacterCreationMenu characterCreationMenu = new CharacterCreationMenu(new TextObject("{=peNBA0WW}Quest Start Options", null), new TextObject("{=1g3T5AyE}How do you want to handle your Quests", null), new CharacterCreationOnInit(GameOptionOnInit), CharacterCreationMenu.MenuTypes.MultipleChoice);
            //Free Play add this
            CharacterCreationCategory characterCreationCategory = characterCreationMenu.AddMenuCategory(new CharacterCreationOnCondition(FreePlayLoadedOnCondition));

            //characterCreationCategory.AddCategoryOption(new TextObject(("{=5vCHolsH} Tutorial Skip (Default Quests)"), null), new List<SkillObject> { DefaultSkills.Roguery }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(FPDefaultOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CvfRsafv} Default start of the game just without Tutorial", null), null, 0, 0, 0);
            //characterCreationCategory.AddCategoryOption(new TextObject(("{=5vCHolsH} Neretzes's Folly (Skips First Quest)"), null), new List<SkillObject> { DefaultSkills.Roguery }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(FPSkipOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CvfRsafv} First Non Quest Noble you talk to completes the quest.", null), null, 0, 0, 0);
            characterCreationCategory.AddCategoryOption(new TextObject(("{=1vCHolsH} Sandbox Start *Just Let Me Play*"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(FPSandBoxOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS11g3T5AyE} No Story quests but still able to create New Kingdom", null), null, 0, 0, 0);
            //No Free Play Load this
            CharacterCreationCategory characterCreationCategory2 = characterCreationMenu.AddMenuCategory(new CharacterCreationOnCondition(NotFreePlayLoadedOnCondition));

            characterCreationCategory2.AddCategoryOption(new TextObject(("{=5vCHolsH} Tutorial Skip (Default Quests)"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(DefaultOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS12g3T5AyE} Default start of the game just without Tutorial", null), null, 0, 0, 0);
            characterCreationCategory2.AddCategoryOption(new TextObject(("{=2vCHolsH} Neretzes's Folly Skip (Skips First Quest)"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(SkipOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS13g3T5AyE} First Non Quest Noble you talk to completes the quest.", null), null, 0, 0, 0);
            characterCreationCategory2.AddCategoryOption(new TextObject(("{=3vCHolsH} Sandbox"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(SandBoxOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS14g3T5AyE} No Quests, now with kingdoms thanks to ability to create your own from base game", null), null, 0, 0, 0);
            characterCreation.AddNewMenu(characterCreationMenu);
        }
        public static void AddtlCultures(CharacterCreation characterCreation)
        {
            List <string> gamecultures = new List <string>()
            {
                "sturgia", "aserai", "vlandia", "battania", "khuzait", "empire"
            };
            CharacterCreationMenu     characterCreationMenu     = new CharacterCreationMenu(new TextObject("{=CS1eA0WW}Mod Cultures", null), new TextObject("{=5g3T5AyE}Additional Cultures From Mods", null), new CharacterCreationOnInit(AddtlCulturesOnInit), CharacterCreationMenu.MenuTypes.MultipleChoice);
            CharacterCreationCategory characterCreationCategory = characterCreationMenu.AddMenuCategory(null);
            List <CultureObject>      AddtlCulturesList         = new List <CultureObject>();

            foreach (CultureObject cultureObject in MBObjectManager.Instance.GetObjectTypeList <CultureObject>())
            {
                if (cultureObject.IsMainCulture)
                {
                    if (!gamecultures.Contains(cultureObject.StringId))
                    {
                        characterCreationCategory.AddCategoryOption(cultureObject.Name, new List <SkillObject> {
                            DefaultSkills.Roguery
                        }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(CSAddtCultureOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), cultureObject.EncyclopediaText, null, 0, 0, 0);
                        AddtlCulturesList.Add(cultureObject);
                    }
                }
            }
            characterCreationCategory.AddCategoryOption(new TextObject("{=CS13HolsH}None"), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(CSAddtDonothingOnConsequence), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS14HolsH}Will use original selection"), null, 0, 0, 0);
            characterCreation.AddNewMenu(characterCreationMenu);
            CSCharCreationOption.AddtlCulturesList = AddtlCulturesList;
        }
Ejemplo n.º 6
0
        private static bool Prefix(CharacterCreation characterCreation)
        //private static void Test(CharacterCreation characterCreation)
        {
            //Change here to make addtl cultures first one to load
            int maincultures = 0;

            foreach (CultureObject cultureObject in MBObjectManager.Instance.GetObjectTypeList <CultureObject>())
            {
                if (cultureObject.IsMainCulture)
                {
                    maincultures++;
                }
            }
            if (maincultures == 6)
            {
                CultureStartOptions.AddGameOption(characterCreation);
            }
            else
            {
                CultureStartOptions.AddtlCultures(characterCreation);
                CultureStartOptions.AddGameOption(characterCreation);
            }

            //CultureStartOptions.AddStartOption(characterCreation, CharacterCreationContent.Instance);

            //CultureStartOptions.AddStartLocation(characterCreation);
            return(true);
        }
Ejemplo n.º 7
0
    private void Start()
    {
        _state        = "Normal";
        _ch_Craeation = GetComponent <CharacterCreation>();

        FogTiles();
        Unit[]  units = FindObjectsOfType <Unit>();
        House[] bases = FindObjectsOfType <House>();
        foreach (House b in bases)
        {
            if (b.playerNumber == 2)
            {
                _ia_house = b;
            }
            else
            {
                _player_house = b;
            }
        }
        House[]   houses   = FindObjectsOfType <House>();
        Village[] villages = FindObjectsOfType <Village>();
        MostrarUnidadesJugador(units, villages, houses);
        CompruebaVisionUnidades(units, villages, houses);

        _ia_units = new List <Unit>();
        source    = GetComponent <AudioSource>();
        camAnim   = Camera.main.GetComponent <Animator>();
        GetGoldIncome(1);
    }
        public static bool CharacterCreation_PushedButton(CharacterCreation __instance, ButtonHelper myButton)
        {
            bool debug = RogueFramework.IsDebugEnabled(DebugFlags.UnlockMenus);

            if (__instance.selectedSpace == "Load")
            {
                if (debug)
                {
                    RogueFramework.LogDebug("Redirecting the button push to the original method.");
                }
                return(true);
            }

            if (debug)
            {
                RogueFramework.LogDebug($"Pressing \"{myButton.myText.text}\" ({myButton.scrollingButtonNum}, {myButton.scrollingButtonType}) button.");
            }

            string            type        = myButton.scrollingButtonUnlock.unlockType;
            List <ButtonData> buttonsData = type == UnlockTypes.Item ? __instance.buttonsDataItems
                                : type == UnlockTypes.Trait ? __instance.buttonsDataTraits
                                : type == UnlockTypes.Ability ? __instance.buttonsDataAbilities
                                : type == UnlockTypes.BigQuest ? __instance.buttonsDataBigQuests : null;

            ButtonData      buttonData = buttonsData[myButton.scrollingButtonNum];
            DisplayedUnlock du         = (DisplayedUnlock)buttonData.__RogueLibsCustom;

            try { du.OnPushedButton(); }
            catch (Exception e) { RogueFramework.LogError(e, "DisplayedUnlock.OnPushedButton", du, du.Menu); }
            __instance.curSelectedButton    = myButton;
            __instance.curSelectedButtonNum = myButton.scrollingButtonNum;
            return(false);
        }
Ejemplo n.º 9
0
        static void CreatePlayer()
        {
            Console.WriteLine("Choose a Class:");
            Console.WriteLine("1.Warrior");
            Console.WriteLine("2.Mage");
            Console.WriteLine("3.Ranger");
            Console.WriteLine("0.Exit Game");

            var cki = Console.ReadKey();

            if (cki.Key == ConsoleKey.D1 || cki.Key == ConsoleKey.NumPad1)
            {
                _player = CharacterCreation.CreateWarrior();
            }
            else if (cki.Key == ConsoleKey.D2 || cki.Key == ConsoleKey.NumPad2)
            {
                _player = CharacterCreation.CreateMage();
            }
            else if (cki.Key == ConsoleKey.D3 || cki.Key == ConsoleKey.NumPad3)
            {
                _player = CharacterCreation.CreateRanger();
            }
            else if (cki.Key == ConsoleKey.D4 || cki.Key == ConsoleKey.NumPad4)
            {
                _player = null;
            }
        }
Ejemplo n.º 10
0
        private static void ParseSpecial(string name, bool useSpecial)
        {
            PlayerCreator     pc      = useSpecial ? SpecialCharacters.specialCharacterLookup[name]() : new PlayerCreator(name);
            CharacterCreation creator = new CharacterCreation(currentDisplay, pc);

            creator.SetGenderSpecial(useSpecial);
        }
Ejemplo n.º 11
0
 private static void ChooseName()
 {
     if (string.IsNullOrWhiteSpace(currentDisplay.GetOutput()))
     {
         return;
     }
     else
     {
         currentDisplay.ClearOutput();
         string        playerName = currentDisplay.GetOutput().Trim();
         string        check      = playerName.CapitalizeFirstLetter();
         PlayerCreator pc;
         if (!SpecialCharacters.specialCharacterLookup.ContainsKey(check))
         {
             pc = new PlayerCreator(playerName);
             CharacterCreation creator = new CharacterCreation(currentDisplay, pc);
             creator.SetGenderGeneric();
         }
         else
         {
             PromptSpecial(check);
         }
         currentDisplay.ClearInputData();
     }
 }
Ejemplo n.º 12
0
        public void hookUpInterface()
        {
            inGameScreen = new inGame(ref p1);
            charCreation = new CharacterCreation(ref p1);
            startScreen  = new StartScreen();
            deathScreen  = new DeathScreen();

            startScreen.NewGame.Click  += NewGame_Click;
            startScreen.LoadGame.Click += loadGame_Click;

            deathScreen.StartScreen.Click += StartGame_Click;
            deathScreen.EndGame.Click     += EndGame_Click;

            charCreation.strUp.Click          += plusStr_Click;
            charCreation.dexUp.Click          += plusDex_Click;
            charCreation.intUp.Click          += plusInt_Click;
            charCreation.strdwn.Click         += strdwn_Click;
            charCreation.dexdwn.Click         += dexdwn_Click;
            charCreation.intdwn.Click         += intdwn_Click;
            charCreation.completeButton.Click += completeButton_Click;

            inGameScreen.muteButton.Click += muteSound_Click;

            inGameScreen.armorBox.SelectionChanged  += armorBox_SelectionChanged;
            inGameScreen.weaponBox.SelectionChanged += weaponBox_SelectionChanged;
            inGameScreen.useConsumable.Click        += useConsumable_Click;

            inGameScreen.plusDex.Click += plusDex_Click;
            inGameScreen.plusInt.Click += plusInt_Click;
            inGameScreen.plusStr.Click += plusStr_Click;

            inGameScreen.Shop1.sellWeapon.Click     += sellWeapon_Click;
            inGameScreen.Shop1.sellArmor.Click      += sellArmor_Click;
            inGameScreen.Shop1.sellConsumable.Click += sellConsumable_Click;

            inGameScreen.Shop1.buyWeapon.Click     += buyWeapon_Click;
            inGameScreen.Shop1.buyArmor.Click      += buyArmor_Click;
            inGameScreen.Shop1.buyConsumable.Click += buyConsumable_Click;

            inGameScreen.Shop1.weaponBox.ItemsSource  = p1.weaponInventory;
            inGameScreen.Shop1.armorBox.ItemsSource   = p1.armorInventory;
            inGameScreen.Shop1.consumeBox.ItemsSource = p1.itemInventory;

            inGameScreen.Shop1.weaponBox.SelectionChanged  += storeWeaponBox_SelectionChanged;
            inGameScreen.Shop1.armorBox.SelectionChanged   += storeArmorBox_SelectionChanged;
            inGameScreen.Shop1.consumeBox.SelectionChanged += storeConsumeBox_SelectionChanged;

            inGameScreen.Shop1.shopWeaponBox.SelectionChanged  += shopWeaponBox_SelectionChanged;
            inGameScreen.Shop1.shopArmorBox.SelectionChanged   += shopArmorBox_SelectionChanged;
            inGameScreen.Shop1.shopConsumeBox.SelectionChanged += shopConsumeBox_SelectionChanged;

            inGameScreen.Shop1.shopWeaponBox.ItemsSource  = shopWeaponInventory;
            inGameScreen.Shop1.shopArmorBox.ItemsSource   = shopArmorInventory;
            inGameScreen.Shop1.shopConsumeBox.ItemsSource = shopConsumableInventory;

            inGameScreen.Shop1.playerGold.DataContext = p1;

            inGameScreen.Shop1.Visibility = Visibility.Hidden;
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        ///
        protected override void Initialize()
        {
            //
            base.Initialize();
            myManager                = new SceneManager(this);
            IsMouseVisible           = true;
            Window.AllowUserResizing = true;
            Communications           = new CommunicationManager();
            Nez.Core.services.AddService(Communications);
            RaceIntermediateText MyTexture = new RaceIntermediateText();

            MyTexture.FemaleBodies    = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText[1];
            MyTexture.FemaleBodies[0] = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText();

            MyTexture.MaleBodies    = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText[1];
            MyTexture.MaleBodies[0] = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText();

            MyTexture.Bones    = new PipelineExtension.IntermediateFiles.Characters.Bones.BoneIntermediateText[1];
            MyTexture.Bones[0] = new PipelineExtension.IntermediateFiles.Characters.Bones.BoneIntermediateText();



            MyTexture.Hair    = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText[2];
            MyTexture.Hair[0] = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText();
            MyTexture.Hair[1] = new PipelineExtension.IntermediateFiles.Characters.TextureIntermediateText();

            MyTexture.Organs    = new PipelineExtension.IntermediateFiles.Characters.Organs.OrganIntermediateText[1];
            MyTexture.Organs[0] = new PipelineExtension.IntermediateFiles.Characters.Organs.OrganIntermediateText();

            MyTexture.RaceName = "Example";
            string myRet = Newtonsoft.Json.JsonConvert.SerializeObject(MyTexture, Newtonsoft.Json.Formatting.Indented);

            File.WriteAllText("./RaceExample.race", myRet);

            ClothingText myText = new ClothingText();

            myText.myLocalPosition     = new Vector3();
            myText.RoleName            = null;
            myText.TexturePath         = "D:\\";
            myText.myDamageResistances = new ItemAttributes.DamageResistanceHolder();
            myText.myDamageResistances.AddArmorResistance(new ItemAttributes.DamageResistance()
            {
                percentAmount  = 1f,
                ResistanceType = "Ehcid"
            });
            myRet = Newtonsoft.Json.JsonConvert.SerializeObject(myText, Newtonsoft.Json.Formatting.Indented);
            File.WriteAllText("./ClothExample.cloth", myRet);

            myAudioHandler = new AudioSystem();
            myManager.AddSceneToList(new LoginScene(), "LoginScene");
            var Scene = new CharacterCreation(); //Used for debug

            //Scene.SetPlayerData(new DedicatedServer.GameDataClasses.Entities.PlayerData());
            myManager.AddSceneToList(Scene, "CharacterCreator");
            myManager.AddSceneToList(new MainWorldViewScene(), "MainWorldViewScene");
            SceneManager.ChangeScenes("LoginScene");
        }
Ejemplo n.º 14
0
      private static void EscapeOnInit(CharacterCreation characterCreation)   //Different from Base
      {
          //Use these to get private fields
          FaceGenChar mother = (FaceGenChar)CharacterCreationContent.Instance.GetType().GetField("_mother", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(CharacterCreationContent.Instance);
          FaceGenChar father = (FaceGenChar)CharacterCreationContent.Instance.GetType().GetField("_father", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(CharacterCreationContent.Instance);

          characterCreation.CurrentStage = CharacterCreation.Stages.EscapeMenu;
          characterCreation.ClearFaceGenPrefab();
          ClearCharacters(characterCreation);
          ClearMountEntity(characterCreation);
          Hero @object                      = MBObjectManager.Instance.GetObject <Hero>("tutorial_npc_brother");
          List <FaceGenChar> list           = new List <FaceGenChar>();
          BodyProperties     bodyProperties = CharacterObject.PlayerCharacter.GetBodyProperties(CharacterObject.PlayerCharacter.Equipment, -1);

          bodyProperties = FaceGen.GetBodyPropertiesWithAge(ref bodyProperties, 23f);
          BodyProperties randomBodyProperties = BodyProperties.GetRandomBodyProperties(CharacterObject.PlayerCharacter.IsFemale, mother.BodyProperties, father.BodyProperties, 1, Hero.MainHero.Mother.CharacterObject.GetDefaultFaceSeed(1), Hero.MainHero.Father.CharacterObject.HairTags, Hero.MainHero.Father.CharacterObject.BeardTags, Hero.MainHero.Father.CharacterObject.TattooTags);

          randomBodyProperties = new BodyProperties(new DynamicBodyProperties(randomBodyProperties.Age, 0.5f, 0.5f), randomBodyProperties.StaticProperties);
          @object.ModifyPlayersFamilyAppearance(randomBodyProperties.StaticProperties);
          @object.DynamicBodyProperties = randomBodyProperties.DynamicProperties;
          list.Add(new FaceGenChar(bodyProperties, new Equipment(), CharacterObject.PlayerCharacter.IsFemale, "act_childhood_schooled"));
          //
          if (CSCharCreationOption.CSWithFamily)
          {
              list.Add(new FaceGenChar(@object.BodyProperties, new Equipment(), @object.CharacterObject.IsFemale, "act_brotherhood_schooled"));
              characterCreation.ChangeFaceGenChars(list);
              characterCreation.ChangeCharsAnimation(new List <string>
                {
                    "act_childhood_schooled",
                    "act_brotherhood_schooled"
                });
          }
          else
          {
              characterCreation.ChangeFaceGenChars(list);
              characterCreation.ChangeCharsAnimation(new List <string>
                {
                    "act_childhood_schooled",
                });
          }

          //CharacterCreationContent.Instance.GetType().GetMethod("ChangeStoryStageEquipments", BindingFlags.NonPublic | BindingFlags.Static).Invoke(CharacterCreationContent.Instance, new object[] { characterCreation }); **Cant invoke due to Hardcoded change brother
          ChangeStoryStageEquipments(characterCreation);
          List <FaceGenMount> list2 = new List <FaceGenMount>();

          if (CharacterObject.PlayerCharacter.HasMount())
          {
              ItemObject item = CharacterObject.PlayerCharacter.Equipment[EquipmentIndex.ArmorItemEndSlot].Item;
              list2.Add(new FaceGenMount(MountCreationKey.FromString(MountCreationKey.GetRandomMountKey(item, 2)), CharacterObject.PlayerCharacter.Equipment[EquipmentIndex.ArmorItemEndSlot].Item, CharacterObject.PlayerCharacter.Equipment[EquipmentIndex.HorseHarness].Item, "act_inventory_idle_start"));
          }
          if (@object.CharacterObject.HasMount())
          {
              ItemObject item2 = @object.CharacterObject.Equipment[EquipmentIndex.ArmorItemEndSlot].Item;
              list2.Add(new FaceGenMount(MountCreationKey.FromString(MountCreationKey.GetRandomMountKey(item2, 2)), @object.CharacterObject.Equipment[EquipmentIndex.ArmorItemEndSlot].Item, @object.CharacterObject.Equipment[EquipmentIndex.HorseHarness].Item, "act_inventory_idle_start"));
          }
      }
Ejemplo n.º 15
0
Archivo: ECTD.cs Proyecto: Cuber01/ECTD
        public static void CharacterCreation_LoadCharacter2(CharacterCreation __instance, string characterName, bool secondTry, bool foundFile, object mySaveObject)
        {
            CharacterCreation cc = __instance;

            #region part from original code
            cc.gc = GameController.gameController;
            string str = Application.persistentDataPath;
            if ((!cc.gc.consoleVersion || cc.gc.fakeConsole) && cc.gc.usingMyDocuments && !cc.gc.macVersion && !cc.gc.linuxVersion)
            {
                str = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/" + cc.gc.dataFolder;
            }
            string text = string.Concat(new string[]
            {
                "/CloudData/Characters/",
                characterName,
                "/",
                characterName,
                ".dat"
            });
            if (secondTry)
            {
                text = "/BackupData/Backup" + characterName + "2.dat";
            }
            SaveCharacterData saveCharacterData = null;
            cc.loadedCharacter = true;
            if (foundFile)
            {
                FileStream fileStream = null;
                try
                {
                    if (cc.gc.consoleVersion && !cc.gc.fakeConsole)
                    {
                        saveCharacterData = (SaveCharacterData)mySaveObject;
                    }
                    else
                    {
                        BinaryFormatter binaryFormatter = new BinaryFormatter();
                        fileStream        = File.Open(str + text, FileMode.Open);
                        saveCharacterData = (SaveCharacterData)binaryFormatter.Deserialize(fileStream);
                        fileStream.Close();
                    }
                }
                catch
                {
                    try
                    {
                        fileStream?.Close();
                    }
                    catch
                    {
                    }
                }
            }
            #endregion
        }
Ejemplo n.º 16
0
        private static bool Prefix(CharacterCreation characterCreation)
        {
            CharacterObject.PlayerCharacter.Culture = CharacterCreationContent.Instance.Culture;
            Clan.PlayerClan.Culture = CharacterCreationContent.Instance.Culture;
            Settlement settlement = CSCharCreationOption.cultureSettlement(Hero.MainHero);

            Clan.PlayerClan.UpdateHomeSettlement(settlement);
            Hero.MainHero.BornSettlement = Clan.PlayerClan.HomeSettlement;

            return(false);
        }
Ejemplo n.º 17
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 18
0
 private void AddCharacterButton_Click(object sender, RoutedEventArgs e)
 {
     if (AccountListView.SelectedItem == null)
     {
         MessageBox.Show("Choose what to modify first.", "Mu Editor");
     }
     else
     {
         CharacterCreation window1 = new CharacterCreation(((Account)AccountListView.SelectedItem));
         window1.Show();
     }
 }
        public static void AddStartLocation(CharacterCreation characterCreation)
        {
            //Default option CSDefault
            //CSCharCreationOption csOptions;
            CharacterCreationMenu     characterCreationMenu     = new CharacterCreationMenu(new TextObject("{=2eNBA0WW}Starting Location", null), new TextObject("{=2g3T5AyE}Beginning your new adventure", null), new CharacterCreationOnInit(LocationOnInit), CharacterCreationMenu.MenuTypes.MultipleChoice);
            CharacterCreationCategory characterCreationCategory = characterCreationMenu.AddMenuCategory(null);

            characterCreationCategory.AddCategoryOption(new TextObject(("{=20CHolsH} At your castle"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, new CharacterCreationOnCondition(AtCastleOnCondition), new CharacterCreationOnSelect(AtCastleOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS15g3T5AyE} At your newly aquired castle", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject(("{=21CHolsH} Escaping from your captor"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, new CharacterCreationOnCondition(EscapingOnCondition), new CharacterCreationOnSelect(EscapingOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS16g3T5AyE} Having just escaped", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject(("{=18CHolsH} Near your home in the city where your journey began"), null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(HomeOnConsequnce), new CharacterCreationApplyFinalEffects(HomeOnAction), new TextObject("{=CS17g3T5AyE} Back to where you started", null), null, 0, 0, 0);



            characterCreationCategory.AddCategoryOption(new TextObject("{=6vCHolsH} In a strange new city (Random).", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(RandStartOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS18g3T5AyE} Travelling wide and far you arrive at an unknown city", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject("{=7vCHolsH} In a caravan to the Aserai city of Qasira.", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(QasariOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS19g3T5AyE} You leave the caravan right at the gates", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject("{=8vCHolsH} In a caravan to the Battania city of Dunglanys.", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(DunglanysOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS20g3T5AyE} You leave the caravan right at the gates", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject("{=9vCHolsH} On a ship to the Empire city of Zeonica.", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(ZeonicaOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS21g3T5AyE} You leave the ship and arrive right at the games", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject("{=0vCHolsH} In a caravan to the Sturgia city of Balgard.", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(BalgardOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS22g3T5AyE}  You leave the caravan right at the gates", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject("{=4vCHolsH} In a caravan to the Khuzait city of Ortongard.", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(OrtongardOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS23g3T5AyE}  You leave the caravan right at the gates", null), null, 0, 0, 0);

            characterCreationCategory.AddCategoryOption(new TextObject("{=11CHolsH} In a river boat to the Vlandia city of Pravend.", null), new List <SkillObject> {
                DefaultSkills.Roguery
            }, 0, 0, 0, 0, null, new CharacterCreationOnSelect(PravendOnConsequnce), new CharacterCreationApplyFinalEffects(CSDoNothingOnApply), new TextObject("{=CS24g3T5AyE} You arrive right at the gates", null), null, 0, 0, 0);


            characterCreation.AddNewMenu(characterCreationMenu);
        }
Ejemplo n.º 20
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Debug.Log("Instance already exist, destroying object!");

            Destroy(this.gameObject);
        }
    }
 private static bool Prefix(CharacterCreation characterCreation, CharacterCreationContent __instance)
 //private static void Test(CharacterCreation characterCreation)
 {
     CharacterCreationContent.AddParentsMenu(characterCreation);
     CharacterCreationContent.AddChildhoodMenu(characterCreation);
     CharacterCreationContent.AddEducationMenu(characterCreation);
     CharacterCreationContent.AddYouthMenu(characterCreation);
     CharacterCreationContent.AddAdulthoodMenu(characterCreation);
     CultureStartOptions.AddStartOption(characterCreation);
     CharacterCreationContent.Instance.GetType().GetMethod("AddEscapeMenu", BindingFlags.NonPublic | BindingFlags.Static).Invoke(CharacterCreationContent.Instance, new object[] { characterCreation });
     //CultureStartOptions.AddStartOption2(characterCreation);
     return(false);
 }
Ejemplo n.º 22
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            if (from == null)
            {
                return;
            }

            Container pack = from.Backpack;

            string name = GetString(info, 1);

            if (name != null)
            {
                name = name.Trim();
            }

            if (name == "Type here...")
            {
            }
            else if (name != "")
            {
                if (!NameVerification.Validate(name, 2, 16, true, false, true, 1, NameVerification.SpaceOnly))
                {
                    from.SendMessage(0X22, "That name is unacceptable or already taken.");
                    return;
                }
                else if (CharacterCreation.CheckDupe(from, name) && pack.ConsumeTotal(typeof(Gold), 2000))
                {
                    from.SendMessage(0X22, "Your name is now {0}.", name);
                    from.Name     = name;
                    from.CantWalk = false;
                    return;
                }
                else if (CharacterCreation.CheckDupe(from, name) && !(pack.ConsumeTotal(typeof(Gold), 2000)))
                {
                    from.SendMessage(0X22, "You do not have enough gold!");
                    return;
                }
                else
                {
                    from.SendMessage(0X22, "That name is unacceptable or already taken.");
                    return;
                }
            }
            else
            {
                from.SendMessage(0X22, "You must enter a name.");
            }
        }
Ejemplo n.º 23
0
 private void NewCharacter_Click_1(object sender, EventArgs e)
 {
     using (var form = new CharacterCreation())
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             this.New = form.NewCharacter;          //values preserved after close
             Roster.Add(this.New);
             CharacterScrollList.Clear();
             update_List();
         }
     }
 }
Ejemplo n.º 24
0
 private void NewNPC_Click(object sender, EventArgs e)
 {
     using (var form = new CharacterCreation())
     {
         var result = form.ShowDialog();
         if (result == DialogResult.OK)
         {
             Character C = form.NewCharacter;          //values preserved after close
             FULL_Roster.Add(C);
             PartyRoster.Clear();
             update_List();
         }
     }
 }
Ejemplo n.º 25
0
        private void OnClientEventTriggerHandler(Client sender, string eventName, params object[] args)
        {
            switch (eventName)
            {
            case "loginCheck":
            {
                if (DatabaseHandler.IsPasswordValid(sender, args[0].ToString()))
                {
                    sender.triggerEvent("loginGranted");
                    InitializePlayer(sender);
                    sender.freeze(false);
                    Player player = Player.Find(sender);
                    if (player.Firstlogin)
                    {
                        CharacterCreation.InitializeCreator(player);
                    }
                }
                else
                {
                    sender.triggerEvent("loginDenied");
                }
                break;
            }

            case "creatingFactionForPlayer":
            {
                bool flag = false;
                foreach (EdenFaction cf in FactionList)
                {
                    if (cf.fName == args[0].ToString())
                    {
                        flag = true;
                        API.sendChatMessageToPlayer(Player.Find((int)args[1]).Client, "~r~Bu isimde bir oluşum zaten bulunuyor, ismi değiştirin.");
                        break;
                    }
                }

                if (!flag)
                {
                    EdenFaction newfaction = new EdenFaction(args[0].ToString(), EdenCore.FactionList.Count + 1, (int)args[1]);
                    EdenCore.FactionList.Add(newfaction);
                    API.sendChatMessageToPlayer(Player.Find((int)args[1]).Client, "~g~" + newfaction.fName + " isimli yeni bir oluşum oluşturdunuz.");
                    API.sendChatMessageToPlayer(Player.Find((int)args[1]).Client, "~g~Oluşumunuz ile ilgili ayarlar için /olusumduzenle komutunu kullanınız.");
                    Player.Find((int)args[1]).Faction = EdenCore.FactionList.Count;
                    break;
                }
                break;
            }
            }
        }
Ejemplo n.º 26
0
        public static void NewGamePlus(PlayerBase currentPlayer)
        {
            if (currentDisplay == null)
            {
                currentDisplay = new StandardDisplay();
            }
            currentDisplay.ClearOutput();

            //parse the current player to New Game Plus related PlayerCreator;
            PlayerCreator     pc      = new PlayerCreator(currentPlayer.name);
            CharacterCreation creator = new CharacterCreation(currentDisplay, pc, true);

            creator.SetGenderGeneric();
            throw new Backend.Tools.InDevelopmentExceptionThatBreaksOnRelease();
        }
Ejemplo n.º 27
0
      // Token: 0x0600023D RID: 573 RVA: 0x0000D174 File Offset: 0x0000B374
      private static void EscapeDrawArrowsOnConsequence(CharacterCreation characterCreation)
      {
          List <string> Anims = new List <string>();

          if (CSCharCreationOption.CSWithFamily)
          {
              Anims.Add("act_childhood_ready");
              Anims.Add("act_brotherhood_fierce");
          }
          else
          {
              Anims.Add("act_childhood_ready");
          }
          characterCreation.ChangeCharsAnimation(Anims);
      }
Ejemplo n.º 28
0
      // Token: 0x0600023E RID: 574 RVA: 0x0000D197 File Offset: 0x0000B397
      private static void EscapeFastHorseOnConsequence(CharacterCreation characterCreation)
      {
          List <string> Anims = new List <string>();

          if (CSCharCreationOption.CSWithFamily)
          {
              Anims.Add("act_childhood_fox");
              Anims.Add("act_brotherhood_gracious");
          }
          else
          {
              Anims.Add("act_childhood_fox");
          }
          characterCreation.ChangeCharsAnimation(Anims);
      }
Ejemplo n.º 29
0
      // Token: 0x0600023F RID: 575 RVA: 0x0000D1BA File Offset: 0x0000B3BA
      private static void EscapeRoadOffWithBrotherOnConsequence(CharacterCreation characterCreation)
      {
          List <string> Anims = new List <string>();

          if (CSCharCreationOption.CSWithFamily)
          {
              Anims.Add("act_childhood_tough");
              Anims.Add("act_brotherhood_clever");
          }
          else
          {
              Anims.Add("act_childhood_tough");
          }
          characterCreation.ChangeCharsAnimation(Anims);
      }
Ejemplo n.º 30
0
      // Token: 0x06000240 RID: 576 RVA: 0x0000D1DD File Offset: 0x0000B3DD
      private static void EscapeOrganizeTravellersOnConsequence(CharacterCreation characterCreation)
      {
          List <string> Anims = new List <string>();

          if (CSCharCreationOption.CSWithFamily)
          {
              Anims.Add("act_childhood_schooled");
              Anims.Add("act_brotherhood_manners");
          }
          else
          {
              Anims.Add("act_childhood_schooled");
          }
          characterCreation.ChangeCharsAnimation(Anims);
      }