Example #1
0
        public void Perform()
        {
            if (!_v.Target.CheckUnsafetyOrMiss() || !_v.Target.CanBeAttacked() || _v.Target.HasCategory(EnemyCategory.Humanoid))
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.CannotEat);
                return;
            }

            if (_v.Target.CurrentHp > _v.Target.MaximumHp / _v.Command.Power)
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.CannotEatStrong);
                return;
            }

            BattleEnemyPrototype enemyPrototype = BattleEnemyPrototype.Find(_v.Target);
            Byte blueMagicId = enemyPrototype.BlueMagicId;

            _v.Target.Kill();

            if (blueMagicId == 0 || ff9abil.FF9Abil_IsMaster(_v.Caster.PlayerIndex, blueMagicId))
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.TasteBad);
                return;
            }

            ff9abil.FF9Abil_SetMaster(_v.Caster.PlayerIndex, blueMagicId);
            BattleState.RaiseAbilitiesAchievement(blueMagicId);
            UiState.SetBattleFollowFormatMessage(BattleMesages.Learned, FF9TextTool.ActionAbilityName(blueMagicId));
        }
Example #2
0
        protected override Boolean LoadExternal()
        {
            try
            {
                if (!_initialized)
                {
                    return(false);
                }

                Int32 battleZoneId = FF9TextTool.BattleZoneId;

                String[] result;
                if (!_cache.TryGetValue(battleZoneId, out result))
                {
                    return(false);
                }

                if (result != null)
                {
                    FF9TextTool.SetBattleText(result);
                }

                return(true);
            }
            catch (Exception ex)
            {
                Log.Error(ex, $"[{TypeName}] Failed to import resource.");
                return(false);
            }
        }
Example #3
0
    private static String FormatMagicSwordAbility(CMD_DATA pCmd)
    {
        // TODO: Move it to an external file
        String abilityName = FF9TextTool.ActionAbilityName(pCmd.sub_no);

        String result;

        if (TryFormatRussianMagicSwordAbility(abilityName, out result))
        {
            return(result);
        }

        String commandTitle = FF9TextTool.BattleCommandTitleText(0);

        switch (Localization.GetSymbol())
        {
        case "JP":
            return($"{abilityName}{commandTitle}");

        case "FR":
        case "IT":
        case "ES":
            return($"{commandTitle}{abilityName}");

        default:
            return($"{abilityName} {commandTitle}");
        }
    }
Example #4
0
    private void GetDefaultName(out String mainName, out String altName)
    {
        CharacterPresetId presetId = PresetId;

        if (presetId == CharacterPresetId.Cinna1 || presetId == CharacterPresetId.Cinna2 || presetId == CharacterPresetId.StageCinna)
        {
            mainName = FF9TextTool.CharacterDefaultName(CharacterPresetId.Quina);
            altName  = FF9TextTool.CharacterDefaultName(info.menu_type);
            return;
        }
        if (presetId == CharacterPresetId.Marcus1 || presetId == CharacterPresetId.Marcus2 || presetId == CharacterPresetId.StageMarcus)
        {
            mainName = FF9TextTool.CharacterDefaultName(CharacterPresetId.Eiko);
            altName  = FF9TextTool.CharacterDefaultName(info.menu_type);
            return;
        }
        if (presetId == CharacterPresetId.Blank1 || presetId == CharacterPresetId.Blank2 || presetId == CharacterPresetId.StageBlank)
        {
            mainName = FF9TextTool.CharacterDefaultName(CharacterPresetId.Amarant);
            altName  = FF9TextTool.CharacterDefaultName(info.menu_type);
            return;
        }

        mainName = FF9TextTool.CharacterDefaultName(info.menu_type);
        altName  = FF9TextTool.CharacterDefaultName(info.menu_type);
    }
Example #5
0
    private void DisplayKeyItemDetail(Transform item, ListDataTypeBase data, Int32 index, Boolean isInit)
    {
        FieldKeyItemListData fieldKeyItemListData = (FieldKeyItemListData)data;
        KeyItemDetailHUD     keyItemDetailHud     = new KeyItemDetailHUD(item.gameObject);

        if (isInit)
        {
            DisplayWindowBackground(item.gameObject, null);
        }
        if (fieldKeyItemListData.KeyItemId == FF9FITEM_RARE_NONE)
        {
            keyItemDetailHud.Button.Help.Enable       = false;
            keyItemDetailHud.NewIconSprite.spriteName = String.Empty;
            keyItemDetailHud.NewIconLabelSprite.gameObject.SetActive(false);
            keyItemDetailHud.NameLabel.gameObject.SetActive(false);
        }
        else
        {
            keyItemDetailHud.NameLabel.gameObject.SetActive(true);
            keyItemDetailHud.NameLabel.text = FF9TextTool.ImportantItemName(fieldKeyItemListData.KeyItemId);
            if (ff9item.FF9Item_IsUsedImportant(fieldKeyItemListData.KeyItemId))
            {
                keyItemDetailHud.NewIconSprite.spriteName = String.Empty;
                keyItemDetailHud.NewIconLabelSprite.gameObject.SetActive(false);
            }
            else
            {
                keyItemDetailHud.NewIconSprite.spriteName = "icon_new_exclamation";
                keyItemDetailHud.NewIconLabelSprite.gameObject.SetActive(true);
            }
            keyItemDetailHud.Button.Help.Enable = true;
            keyItemDetailHud.Button.Help.Text   = FF9TextTool.ImportantItemHelpDescription(fieldKeyItemListData.KeyItemId);
        }
    }
Example #6
0
    private void DisplayItemDetail(Transform item, ListDataTypeBase data, Int32 index, Boolean isInit)
    {
        FieldItemListData fieldItemListData = (FieldItemListData)data;
        ItemDetailHUD     itemDetailHud     = new ItemDetailHUD(item.gameObject);

        if (isInit)
        {
            UIEventListener uiEventListener = UIEventListener.Get(itemDetailHud.ManualButton.gameObject);
            uiEventListener.Select += itemDetailHud.Self.GetComponent <ScrollItemKeyNavigation>().OnOtherObjectSelect;
            DisplayWindowBackground(item.gameObject, null);
        }
        if (ButtonGroupState.ActiveGroup == ItemArrangeGroupButton)
        {
            if (_currentItemIndex == index && !_switchingItem)
            {
                if (isInit)
                {
                    ButtonGroupState.HoldActiveStateOnGroup(item.gameObject, ItemGroupButton);
                }
                ButtonGroupState.SetButtonAnimation(item.gameObject, false);
                ButtonGroupState.SetOutsideLimitRectBehavior(PointerManager.LimitRectBehavior.Hide, ItemGroupButton);
            }
            else
            {
                ButtonGroupState.SetButtonAnimation(item.gameObject, true);
            }
        }
        FF9UIDataTool.DisplayItem(fieldItemListData.ItemId, itemDetailHud.IconSprite, itemDetailHud.NameLabel, fieldItemListData.Enable);
        itemDetailHud.NumberLabel.text         = fieldItemListData.ItemCount.ToString();
        itemDetailHud.NumberLabel.color        = !fieldItemListData.Enable ? FF9TextTool.Gray : FF9TextTool.White;
        itemDetailHud.Button.Help.Enable       = true;
        itemDetailHud.Button.Help.Text         = FF9TextTool.ItemHelpDescription(fieldItemListData.ItemId);
        itemDetailHud.ManualButton.Help.Enable = true;
        itemDetailHud.ManualButton.Help.Text   = FF9TextTool.ItemHelpDescription(fieldItemListData.ItemId);
    }
Example #7
0
        private void StealItem(BattleEnemy enemy, Int32 itemIndex)
        {
            Byte itemId = enemy.StealableItems[itemIndex];

            if (itemId == Byte.MaxValue)
            {
                UiState.SetBattleFollowFormatMessage(BattleMesages.CouldNotStealAnything);
                return;
            }

            enemy.StealableItems[itemIndex] = Byte.MaxValue;
            GameState.Thefts++;

            BattleItem.AddToInventory(itemId);
            UiState.SetBattleFollowFormatMessage(BattleMesages.Stole, FF9TextTool.ItemName(itemId));
            if (_v.Caster.HasSupportAbility(SupportAbility2.Mug))
            {
                _v.Target.Flags   |= CalcFlag.HpAlteration;
                _v.Target.HpDamage = (Int16)(GameRandom.Next16() % (_v.Caster.Level * _v.Target.Level >> 1));
            }

            if (_v.Caster.HasSupportAbility(SupportAbility1.StealGil))
            {
                GameState.Gil += (UInt32)(GameRandom.Next16() % (1 + _v.Caster.Level * _v.Target.Level / 4));
            }
        }
Example #8
0
 private void DisplayChocographList()
 {
     for (Int32 i = 0; i < this.chocographItemList.Count; i++)
     {
         ChocographUI.ChocographItem chocographItem = this.chocographItemList[i];
         if (!this.hasMap[i])
         {
             chocographItem.Button.Help.Enable = false;
         }
         else
         {
             Boolean flag = this.ability > this.GetIconType(i);
             chocographItem.Content.SetActive(true);
             String iconSprite = this.GetIconSprite((ChocographUI.Icon)((!this.hasGem[i]) ? ((ChocographUI.Icon)((!flag) ? ChocographUI.Icon.BoxDisableClose : ChocographUI.Icon.BoxClose)) : ((ChocographUI.Icon)((!flag) ? ChocographUI.Icon.BoxDisableOpen : ChocographUI.Icon.BoxOpen))));
             chocographItem.IconSprite.spriteName = iconSprite;
             chocographItem.ItemName.text         = FF9TextTool.ChocoboUIText(i + (Int32)FF9TextTool.ChocographNameStartIndex);
             chocographItem.ItemName.color        = ((!flag) ? FF9TextTool.Gray : FF9TextTool.White);
             chocographItem.Button.Help.Enable    = true;
             chocographItem.Button.Help.TextKey   = String.Empty;
             if (flag)
             {
                 chocographItem.Button.Help.TextKey = FF9TextTool.ChocoboUIText(i + (Int32)FF9TextTool.ChocographHelpStartIndex);
             }
             else
             {
                 chocographItem.Button.Help.TextKey = FF9TextTool.ChocoboUIText(5);
             }
         }
     }
 }
Example #9
0
    private IEnumerator ApDraw(Int32 id)
    {
        Int32 abilId = this.abilityLearned[id][0];

        this.abilityLearned[id].RemoveAt(0);
        String abilName;
        String spriteName;

        if (abilId < 192)
        {
            abilName   = FF9TextTool.ActionAbilityName(abilId);
            spriteName = "ability_stone";
        }
        else
        {
            abilName = FF9TextTool.SupportAbilityName(abilId - 192);
            PLAYER player = FF9StateSystem.Common.FF9.party.member[id];
            spriteName = ((!ff9abil.FF9Abil_IsEnableSA(player.sa, abilId)) ? "skill_stone_off" : "skill_stone_on");
        }
        this.characterBRInfoHudList[id].AbiltySprite.spriteName = spriteName;
        this.characterBRInfoHudList[id].AbilityLabel.text       = abilName;
        this.abilityLearnedPanelTween[id].TweenIn((Action)null);
        yield return(new WaitForSeconds(1f));

        this.abilityLearnedPanelTween[id].TweenOut(delegate
        {
            this.isReadyToShowNextAbil[id] = true;
        });
        yield break;
    }
Example #10
0
    public static void FF9Play_New(int slot_id)
    {
        PLAYER play = FF9StateSystem.Common.FF9.player[slot_id];

        PLAYER_INFO[] playerInfoArray =
        {
            new PLAYER_INFO(0,  1, 1, 1, 0,  0),
            new PLAYER_INFO(1,  2, 0, 1, 0,  1),
            new PLAYER_INFO(2,  3, 0, 1, 0,  2),
            new PLAYER_INFO(3,  7, 1, 1, 0,  3),
            new PLAYER_INFO(4, 12, 0, 1, 0,  4),
            new PLAYER_INFO(5, 14, 1, 1, 0,  8),
            new PLAYER_INFO(6, 15, 1, 1, 0, 10),
            new PLAYER_INFO(7, 16, 1, 1, 0, 12),
            new PLAYER_INFO(8, 18, 1, 1, 0, 14)
        };
        play.info     = playerInfoArray[slot_id];
        play.status   = 0;
        play.category = (byte)FF9Play_GetCategory(play.info.menu_type);
        play.bonus    = new FF9LEVEL_BONUS();
        int charId3 = FF9Play_GetCharID3(play);

        play.name = FF9TextTool.CharacterDefaultName(play.info.menu_type);
        FF9Play_SetDefEquips(play.equip, charId3);
        play.info.serial_no = (byte)FF9Play_GetSerialID(play.info.slot_no, (play.category & 16) != 0, play.equip);
        FF9Play_Build(slot_id, 1, playerInfoArray[slot_id], false);
        play.cur.hp   = play.max.hp;
        play.cur.mp   = play.max.mp;
        play.cur.capa = play.max.capa;
    }
Example #11
0
    private void DisplayCardDetail()
    {
        Int32 num = (Int32)this.count[this.currentCardId];

        if (num > 0)
        {
            this.cardInfoContentGameObject.SetActive(true);
            this.ShowCardDetailHudNumber(num);
            FF9UIDataTool.DisplayCard(QuadMistDatabase.MiniGame_GetCardInfoPtr(this.currentCardId, this.offset[this.currentCardId]), this.cardDetailHudList[0], false);
            this.cardNameLabel.text = FF9TextTool.CardName(this.currentCardId);
            if (num > 1)
            {
                this.cardNumberGameObject.SetActive(true);
                this.currentCardNumberLabel.text = (this.offset[this.currentCardId] + 1).ToString();
                this.totalCardNumberLabel.text   = num.ToString();
                for (Int32 i = 1; i < Math.Min(num, 5); i++)
                {
                    FF9UIDataTool.DisplayCard(QuadMistDatabase.MiniGame_GetCardInfoPtr(this.currentCardId, 0), this.cardDetailHudList[i], true);
                }
            }
            else
            {
                this.cardNumberGameObject.SetActive(false);
            }
        }
        else
        {
            this.cardInfoContentGameObject.SetActive(false);
        }
    }
Example #12
0
 private void DisplayGilAndItemInfo()
 {
     this.EXPAndAPPhrasePanel.SetActive(false);
     this.GilAndItemPhrasePanel.SetActive(true);
     this.receiveGilLabel.text = (this.gilValue.value - this.gilValue.current).ToString() + "[YSUB=1.3][sub]G";
     this.currentGilLabel.text = Mathf.Min(FF9StateSystem.Common.FF9.party.gil, 9999999f).ToString() + "[YSUB=1.3][sub]G";
     FF9UIDataTool.DisplayTextLocalize(this.infoLabelGameObject, "BattleResultInfoGilItem");
     if (this.itemList.Count > 0)
     {
         this.ItemDetailPanel.SetActive(true);
         this.noItemLabel.SetActive(false);
         Int32 num = 0;
         foreach (FF9ITEM ff9ITEM in this.itemList)
         {
             ItemListDetailWithIconHUD itemListDetailWithIconHUD = this.itemHudList[num];
             itemListDetailWithIconHUD.Self.SetActive(true);
             FF9UIDataTool.DisplayItem((Int32)ff9ITEM.id, itemListDetailWithIconHUD.IconSprite, itemListDetailWithIconHUD.NameLabel, true);
             itemListDetailWithIconHUD.NumberLabel.text = ff9ITEM.count.ToString();
             num++;
         }
     }
     else
     {
         this.ItemDetailPanel.SetActive(false);
         this.noItemLabel.SetActive(true);
     }
     if (this.defaultCard != 255)
     {
         this.ItemDetailPanel.SetActive(true);
         this.cardHud.Self.SetActive(true);
         this.cardHud.NameLabel.text = FF9TextTool.CardName(this.defaultCard);
     }
 }
Example #13
0
 private void DisplayKeyItemSkin(Boolean visibility)
 {
     if (visibility)
     {
         Int32 keyItemId = _keyItemIdList[_currentItemIndex];
         _keyItemDetailName.text            = FF9TextTool.ImportantItemName(keyItemId);
         _keyItemDetailDescription.spacingY = _defaultSkinLabelSpacingY;
         String text            = FF9TextTool.ImportantItemSkin(keyItemId);
         Single additionalWidth = 0.0f;
         _keyItemDetailDescription.text = _keyItemDetailDescription.PhrasePreOpcodeSymbol(text, ref additionalWidth);
         Loading = true;
         // ISSUE: method pointer
         _keyItemSkinTransition.TweenIn(new Byte[1], () =>
         {
             Loading = false;
             _isShowingKeyItemDesp = true;
         });
         ButtonGroupState.DisableAllGroup(false);
         ButtonGroupState.HoldActiveStateOnGroup(KeyItemGroupButton);
     }
     else
     {
         Loading = true;
         _isShowingKeyItemDesp = false;
         // ISSUE: method pointer
         _keyItemSkinTransition.TweenOut(new Byte[1], () =>
         {
             Loading = false;
             ButtonGroupState.ActiveGroup = KeyItemGroupButton;
             Singleton <PointerManager> .Instance.SetPointerBlinkAt(ButtonGroupState.ActiveButton, false);
         });
         ff9item.FF9Item_UseImportant(_keyItemIdList[_currentItemIndex]);
         DisplayKeyItem();
     }
 }
Example #14
0
    public void SetBattlePeeping(BattleUnit pBtl)
    {
        if (pBtl.IsPlayer)
        {
            return;
        }

        _peepingEnmData = pBtl.Enemy;

        Boolean flag = false;

        for (Int32 index = 0; index < 4; ++index)
        {
            if (_peepingEnmData.StealableItems[index] == Byte.MaxValue)
            {
                continue;
            }

            flag = true;
            break;
        }

        if (!flag)
        {
            SetBattleMessage(FF9TextTool.BattleLibraText(9), 2);
            _currentPeepingMessageCount = 5;
        }
        else
        {
            _currentPeepingMessageCount = 1;
            DisplayMessagePeeping();
        }
    }
Example #15
0
    private void DisplayCardDetail()
    {
        Int32 num = (Int32)this.count[this.currentCardId];

        if (num > 0)
        {
            this.cardInfoContentGameObject.SetActive(true);
            this.ShowCardDetailHudAmount(num);
            this.cardIdLabel.text = "No" + (this.currentCardId + 1).ToString("0#");
            FF9UIDataTool.DisplayCard(this.GetCardInfo(this.currentCardId, this.currentCardOffset), this.cardDetailHudList[0], false);
            this.cardNameLabel.text = FF9TextTool.CardName(this.currentCardId);
            if (num > 1)
            {
                this.cardNumberGameObject.SetActive(true);
                this.currentCardNumberLabel.text = (this.currentCardOffset + 1).ToString();
                this.totalCardNumberLabel.text   = num.ToString();
                for (Int32 i = 1; i < Math.Min(num, 5); i++)
                {
                    FF9UIDataTool.DisplayCard(this.GetCardInfo(this.currentCardId, 0), this.cardDetailHudList[i], true);
                }
            }
            else
            {
                this.cardNumberGameObject.SetActive(false);
            }
        }
        else
        {
            this.cardInfoContentGameObject.SetActive(false);
        }
    }
Example #16
0
    public static Int32 SeqExecMessage(SEQ_WORK pSeqWork, BTL_DATA pMe)
    {
        btlseq.BattleLog("SeqExecMessage");
        UInt16 num = (UInt16)btlseq.sequenceReader.ReadByte();

        if ((num & 128) != 0)
        {
            btlseq.BattleLog("wOfs " + pSeqWork.CmdPtr.aa.Name);
            UIManager.Battle.SetBattleTitle(pSeqWork.CmdPtr.aa.Name, 1);
        }
        else
        {
            num = (UInt16)(num + (UInt16)FF9StateSystem.Battle.FF9Battle.enemy[(Int32)pMe.bi.slot_no].et.mes);
            btlseq.BattleLog("wMsg " + num);
            if (btlseq.wSeqCode == 33)
            {
                String str = FF9TextTool.BattleText((Int32)num);
                UIManager.Battle.SetBattleTitle(str, 3);
            }
            else
            {
                String str2 = FF9TextTool.BattleText((Int32)num);
                UIManager.Battle.SetBattleMessage(str2, 3);
            }
        }
        pSeqWork.CurPtr += 2;
        return(1);
    }
Example #17
0
        protected override void ProcessEntries(TxtEntry[] entreis)
        {
            String[] commandNames, commandHelps;
            AbilityFormatter.Parse(entreis, out commandNames, out commandHelps);

            FF9TextTool.SetCommandName(commandNames);
            FF9TextTool.SetCommandHelpDesc(commandHelps);
        }
Example #18
0
        protected override void ProcessEntries(TxtEntry[] entreis)
        {
            String[] abilityNames, abilityHelps;
            AbilityFormatter.Parse(entreis, out abilityNames, out abilityHelps);

            FF9TextTool.SetSupportAbilityName(abilityNames);
            FF9TextTool.SetSupportAbilityHelpDesc(abilityHelps);
        }
Example #19
0
        protected override void ProcessEntries(TxtEntry[] entreis)
        {
            String[] skillNames, skillHelps;
            AbilityFormatter.Parse(entreis, out skillNames, out skillHelps);

            FF9TextTool.SetActionAbilityName(skillNames);
            FF9TextTool.SetActionAbilityHelpDesc(skillHelps);
        }
Example #20
0
    private static void LogDiscardingCard(QuadMistCard card)
    {
        String cardName    = FF9TextTool.CardName(card.id);
        String displayInfo = card.ToString();
        Int32  arrowCount  = MathEx.BitCount(card.arrow);

        Log.Message($"Discard the card: {cardName} ({displayInfo}, {arrowCount} arrows) [Id: {card.id}, Type: {card.type}, Attack: {card.atk}, P.Def: {card.pdef}, M.Def: {card.mdef}]");
    }
Example #21
0
    private IEnumerator ShowDialogWithCoroutine(Hand playerHand)
    {
        this.isReady = false;
        if (this.dialog != (UnityEngine.Object)null)
        {
            Singleton <DialogManager> .Instance.ReleaseDialogToPool(this.dialog);
        }
        String  text        = FF9TextTool.CardName((Int32)playerHand.SelectedUI.Data.id);
        UILabel dialogLabel = Singleton <DialogManager> .Instance.GetDialogLabel();

        Int32 oldWidth = dialogLabel.width;

        dialogLabel.width = Convert.ToInt32(UIManager.UIContentSize.x);
        dialogLabel.ProcessText();
        dialogLabel.UpdateNGUIText();
        Int32 width = Convert.ToInt32((NGUIText.CalculatePrintedSize2(text).x + Dialog.DialogPhraseXPadding * 2f) / UIManager.ResourceXMultipier) + 1;

        dialogLabel.width = oldWidth;
        this.dialog       = Singleton <DialogManager> .Instance.AttachDialog(String.Concat(new Object[]
        {
            "[STRT=",
            width,
            ",1][CENT][NANI][IMME]",
            text,
            "[TIME=-1]"
        }), 0, 1, Dialog.TailPosition.AutoPosition, Dialog.WindowStyle.WindowStylePlain, new Vector2(10000f, 10000f), Dialog.CaptionType.None);

        this.dialog.Panel.depth       -= 2;
        this.dialog.phrasePanel.depth -= 2;
        while (this.dialog.CurrentState != Dialog.State.CompleteAnimation)
        {
            yield return(new WaitForEndOfFrame());
        }
        Vector2       targetPosition = this.CalculateDialogTargetPosition(playerHand.Select, playerHand.Count);
        TweenPosition tweenPos       = this.dialog.GetComponent <TweenPosition>();

        if (tweenPos == (UnityEngine.Object)null)
        {
            tweenPos = this.dialog.gameObject.AddComponent <TweenPosition>();
        }
        tweenPos.ignoreTimeScale = false;
        tweenPos.from            = new Vector3(targetPosition.x + 800f, targetPosition.y);
        tweenPos.to = targetPosition;
        tweenPos.ResetToBeginning();
        tweenPos.duration       = 0.3f;
        tweenPos.enabled        = true;
        tweenPos.animationCurve = this.AnimationCurv;
        Single countDown = tweenPos.duration;

        while (countDown >= 0f)
        {
            countDown -= Time.deltaTime;
            yield return(new WaitForEndOfFrame());
        }
        UnityEngine.Object.Destroy(tweenPos);
        this.isReady = true;
        yield break;
    }
Example #22
0
        protected override Boolean LoadInternal()
        {
            String[] commandNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.CommandNames);
            String[] commandHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.CommandHelps);

            FF9TextTool.SetCommandName(commandNames);
            FF9TextTool.SetCommandHelpDesc(commandHelps);
            return(true);
        }
Example #23
0
        protected override void ProcessEntries(TxtEntry[] entreis)
        {
            String[] itemNames, itemHelps, itemBattle;
            ItemFormatter.Parse(entreis, out itemNames, out itemHelps, out itemBattle);

            FF9TextTool.SetItemName(itemNames);
            FF9TextTool.SetItemHelpDesc(itemHelps);
            FF9TextTool.SetItemBattleDesc(itemBattle);
        }
Example #24
0
        protected override Boolean LoadInternal()
        {
            String[] abilityNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.AbilityNames);
            String[] abilityHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.AbilityHelps);

            FF9TextTool.SetSupportAbilityName(abilityNames);
            FF9TextTool.SetSupportAbilityHelpDesc(abilityHelps);
            return(true);
        }
Example #25
0
        protected override Boolean LoadInternal()
        {
            String[] skillNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.SkillNames);
            String[] skillHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.SkillHelps);

            FF9TextTool.SetActionAbilityName(skillNames);
            FF9TextTool.SetActionAbilityHelpDesc(skillHelps);
            return(true);
        }
Example #26
0
 private void SetData()
 {
     Background.sprite2D    = Resources.Load <Sprite>("EmbeddedAsset/UI/Sprites/" + GetBackgroundSpritePath());
     MaxCharacterLabel.text = Localization.Get("MaxCharacters") + (Application.platform != RuntimePlatform.WindowsPlayer ? String.Empty : Localization.Get("MaxCharacters2"));
     CharacterProfile.text  = FF9TextTool.CharacterProfile(_currentCharId);
     NameInputField.value   = _isDefaultName
                                ? FF9TextTool.CharacterDefaultName(_currentCharId)
                                : FF9StateSystem.Common.FF9.player[_currentSlotId].name;
 }
Example #27
0
        protected override void ProcessEntries(TxtEntry[] entreis)
        {
            String[] itemNames, itemHelps, itemDescs;
            KeyItemFormatter.Parse(entreis, out itemNames, out itemHelps, out itemDescs);

            FF9TextTool.SetImportantItemName(itemNames);
            FF9TextTool.SetImportantItemHelpDesc(itemHelps);
            FF9TextTool.SetImportantSkinDesc(itemDescs);
        }
Example #28
0
        public void Export()
        {
            try
            {
                Log.Message($"[{nameof(LocationNameExporter)}] Exporting...");
                Int32 skipped = 0;

                String text = EmbadedSentenseLoader.LoadText(EmbadedTextResources.LocationNames);

                Dictionary <Int32, String> locationNames = new Dictionary <Int32, String>();
                String[] array = text.Split('\r');
                for (Int32 i = 0; i < array.Length; i++)
                {
                    String str = array[i];
                    str = str.Replace("\n", String.Empty);
                    if (!String.IsNullOrEmpty(str))
                    {
                        String key   = str.Split(':')[0];
                        String value = str.Split(':')[1];
                        locationNames[Int32.Parse(key)] = FF9TextTool.RemoveOpCode(value);
                    }
                }

                Dictionary <String, LinkedList <TxtEntry> > entries = LocationNameFormatter.Build(locationNames);

                String directory = ModTextResources.Export.LocationNamesDirectory;
                Directory.CreateDirectory(directory);

                Char[] invalidChars = Path.GetInvalidFileNameChars();
                foreach (KeyValuePair <String, LinkedList <TxtEntry> > pair in entries)
                {
                    String outputPath = Path.Combine(directory, "Names of " + pair.Key.ReplaceChars("_", invalidChars) + ".strings");
                    if (File.Exists(outputPath))
                    {
                        skipped++;
                        continue;
                    }

                    TxtWriter.WriteStrings(outputPath, pair.Value.ToArray());
                }

                if (skipped > 0)
                {
                    Log.Warning($"[{nameof(LocationNameExporter)}] Exporting completed but [{skipped}/{entries.Count}] files has been skipped because already exists.");
                }
                else
                {
                    Log.Message($"[{nameof(LocationNameExporter)}] Exporting completed successfully.");
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex, $"[{nameof(LocationNameExporter)}] Failed to export resource.");
            }
        }
Example #29
0
    public String BtlGetAttrName(Int32 pAttr)
    {
        Int32 id = 0;

        while ((pAttr >>= 1) != 0)
        {
            ++id;
        }

        return(FF9TextTool.BattleFollowText(id));
    }
Example #30
0
        protected override Boolean LoadInternal()
        {
            String[] itemNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemNames);
            String[] itemHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemHelps);
            String[] itemDescs = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemDescriptions);

            FF9TextTool.SetImportantItemName(itemNames);
            FF9TextTool.SetImportantItemHelpDesc(itemHelps);
            FF9TextTool.SetImportantSkinDesc(itemDescs);
            return(true);
        }