Exemplo n.º 1
0
        protected override bool LoadInternal()
        {
            String[] strings = EmbadedSentenseLoader.LoadSentense(_embadedPath);

            _setter(strings);
            return(true);
        }
Exemplo n.º 2
0
        protected override TxtEntry[] PrepareEntries()
        {
            String[] abilityNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.AbilityNames);
            String[] abilityHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.AbilityHelps);

            return(AbilityFormatter.Build(Prefix, abilityNames, abilityHelps));
        }
Exemplo n.º 3
0
        protected override TxtEntry[] PrepareEntries()
        {
            String[] itemNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemNames);
            String[] itemHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemHelps);
            String[] itemDescs = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemDescriptions);

            return(KeyItemFormatter.Build(Prefix, itemNames, itemHelps, itemDescs));
        }
Exemplo n.º 4
0
        protected override TxtEntry[] PrepareEntries()
        {
            String[] itemNames  = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.ItemNames);
            String[] itemHelps  = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.ItemHelps);
            String[] itemBattle = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.ItemBattle);

            return(ItemFormatter.Build(Prefix, itemNames, itemHelps, itemBattle));
        }
Exemplo n.º 5
0
        protected override Boolean LoadInternal()
        {
            String[] abilityNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.AbilityNames);
            String[] abilityHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.AbilityHelps);

            FF9TextToolAccessor.SetSupportAbilityName(abilityNames);
            FF9TextToolAccessor.SetSupportAbilityHelpDesc(abilityHelps);
            return(true);
        }
Exemplo n.º 6
0
        protected override Boolean LoadInternal()
        {
            String[] commandNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.CommandNames);
            String[] commandHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.CommandHelps);

            FF9TextToolAccessor.SetCommandName(commandNames);
            FF9TextToolAccessor.SetCommandHelpDesc(commandHelps);
            return(true);
        }
Exemplo n.º 7
0
        protected override Boolean LoadInternal()
        {
            String[] skillNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.SkillNames);
            String[] skillHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.SkillHelps);

            FF9TextToolAccessor.SetActionAbilityName(skillNames);
            FF9TextToolAccessor.SetActionAbilityHelpDesc(skillHelps);
            return(true);
        }
Exemplo n.º 8
0
        protected override Boolean LoadInternal()
        {
            String[] itemNames  = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.ItemNames);
            String[] itemHelps  = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.ItemHelps);
            String[] itemBattle = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.ItemBattle);

            FF9TextToolAccessor.SetItemName(itemNames);
            FF9TextToolAccessor.SetItemHelpDesc(itemHelps);
            FF9TextToolAccessor.SetItemBattleDesc(itemBattle);
            return(true);
        }
Exemplo n.º 9
0
        protected override Boolean LoadInternal()
        {
            String[] itemNames = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemNames);
            String[] itemHelps = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemHelps);
            String[] itemDescs = EmbadedSentenseLoader.LoadSentense(EmbadedTextResources.KeyItemDescriptions);

            FF9TextToolAccessor.SetImportantItemName(itemNames);
            FF9TextToolAccessor.SetImportantItemHelpDesc(itemHelps);
            FF9TextToolAccessor.SetImportantSkinDesc(itemDescs);
            return(true);
        }
Exemplo n.º 10
0
        protected override Boolean LoadInternal()
        {
            Int32  battleZoneId = FF9TextToolAccessor.GetBattleZoneId();
            String path         = EmbadedTextResources.GetCurrentPath("/Battle/" + battleZoneId + ".mes");

            String[] text = EmbadedSentenseLoader.LoadSentense(path);
            if (text != null)
            {
                FF9TextToolAccessor.SetBattleText(text);
            }
            return(true);
        }
Exemplo n.º 11
0
        private void Initialize()
        {
            Dictionary <String, String> dic;

            if (!TryLoadReplacements(out dic))
            {
                return;
            }

            Log.Message($"[{TypeName}] Loading...");

            foreach (KeyValuePair <String, Int32> pair in FF9BattleDB.SceneData)
            {
                Int32 index = pair.Value;
                if (index == 220 || index == 238) // Junk?
                {
                    continue;
                }

                String   path = EmbadedTextResources.GetCurrentPath("/Battle/" + index + ".mes");
                String[] text = EmbadedSentenseLoader.LoadSentense(path);
                if (text != null)
                {
                    for (Int32 i = 0; i < text.Length; i++)
                    {
                        String key = BattleFormatter.GetKey(text[i]);
                        String value;
                        if (dic.TryGetValue(key, out value))
                        {
                            text[i] = value;
                        }
                    }
                }

                _cache[index] = text;
            }

            _initialized = true;
        }
Exemplo n.º 12
0
        protected override TxtEntry[] PrepareEntries()
        {
            Dictionary <String, String> dic = new Dictionary <String, String>(1024);

            foreach (KeyValuePair <String, Int32> pair in FF9BattleDB.SceneData)
            {
                Int32 index = pair.Value;
                if (index == 220 || index == 238) // Junk?
                {
                    continue;
                }

                String   path = EmbadedTextResources.GetCurrentPath("/Battle/" + index + ".mes");
                String[] text = EmbadedSentenseLoader.LoadSentense(path);
                if (text == null)
                {
                    continue;
                }

                foreach (String line in text)
                {
                    if (String.IsNullOrEmpty(line))
                    {
                        continue;
                    }

                    String key = BattleFormatter.GetKey(line);
                    if (!dic.ContainsKey(key))
                    {
                        dic.Add(key, BattleFormatter.GetValue(line));
                    }
                }
            }

            return(dic.Select(p => new TxtEntry {
                Prefix = p.Key, Value = p.Value
            }).ToArray());
        }
Exemplo n.º 13
0
        private static void ExportSceneSafe(String battleSceneName)
        {
            try
            {
                String relativePath    = "BattleMap/BattleScene/EVT_BATTLE_" + battleSceneName + '/';
                String outputDirectory = Path.Combine(Configuration.Export.Path, relativePath);
                String outputPath      = outputDirectory + "Main.json";
                if (File.Exists(outputPath))
                {
                    //Log.Warning($"[BattleSceneExporter] Export was skipped bacause a file already exists: [{outputPath}].");
                    //return;
                }

                Log.Message("[BattleSceneExporter] Exporting [{0}]...", battleSceneName);

                Int32    battleZoneId    = FF9BattleDB.SceneData["BSC_" + battleSceneName];
                String   textEmbadedPath = EmbadedTextResources.GetCurrentPath("/Battle/" + battleZoneId + ".mes");
                String[] text            = EmbadedSentenseLoader.LoadSentense(textEmbadedPath);

                BTL_SCENE btlScene = new BTL_SCENE();
                btlScene.ReadBattleScene(battleSceneName);

                String directoryPath = Path.GetDirectoryName(outputPath);
                if (directoryPath != null)
                {
                    Directory.CreateDirectory(directoryPath);
                }

                SerializeScene(btlScene, outputDirectory, text);
                CompileScene(outputDirectory);

                Log.Message("[BattleSceneExporter] Exporting completed successfully.");
            }
            catch (Exception ex)
            {
                Log.Error(ex, "[BattleSceneExporter] Failed to export map [{0}].", battleSceneName);
            }
        }
Exemplo n.º 14
0
 protected override TxtEntry[] PrepareEntries()
 {
     String[] itemNames = EmbadedSentenseLoader.LoadSentense(_embadedPath);
     return(EtcFormatter.Build(_prefix, itemNames));
 }