コード例 #1
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, T8BTTA strategy, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            StringBuilder sb = new StringBuilder();

            //sb.Append( RefString );
            sb.Append("<tr>");

            int colspan = websiteLanguage.WantsBoth() ? 5 : 10;

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }
            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }
            sb.Append("</tr>");

            sb.Append("<tr>");
            sb.Append("<td>");
            sb.Append("</td>");
            for (int i = 0; i < StrategyDefaults.GetLength(1); ++i)
            {
                sb.Append("<td class=\"strategychar\">");
                Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, 1u << i, websiteLanguage.MainJp());
                sb.Append("</td>");
            }
            sb.Append("</tr>");
            for (uint xRaw = 0; xRaw < StrategyDefaults.GetLength(0); ++xRaw)
            {
                uint x = xRaw;
                // swap around OVL and FS because they're stored the wrong way around compared to how they show up ingame
                if (x == 6)
                {
                    x = 7;
                }
                else if (x == 7)
                {
                    x = 6;
                }
                sb.Append("<tr>");
                sb.Append("<td>");
                sb.Append("<span class=\"strategycat\">");
                sb.Append(GetCategoryName(x, version, websiteLanguage, inGameIdDict));
                sb.Append("</span>");
                sb.Append("</td>");
                for (uint y = 0; y < StrategyDefaults.GetLength(1); ++y)
                {
                    if (y == 8 && !version.HasPS3Content())
                    {
                        continue;
                    }                                                                           // skip patty strategy if we don't have her
                    sb.Append("<td>");
                    var option = strategy.StrategyOptionDict[StrategyDefaults[x, y]];
                    sb.Append(inGameIdDict[option.NameStringDicID].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage));
                    sb.Append("</td>");
                }
                sb.Append("</tr>");
            }

            //sb.Append( "<td>" );
            //for ( int i = 0; i < UnknownFloats1.Length; ++i ) {
            //    sb.Append( UnknownFloats1[i] + " / " );
            //}
            //sb.Append( "<br>" );
            //for ( int i = 0; i < UnknownFloats2.Length; ++i ) {
            //    sb.Append( UnknownFloats2[i] + " / " );
            //}
            //sb.Append( "</td>" );

            return(sb.ToString());
        }
コード例 #2
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            StringBuilder sb = new StringBuilder();

            //sb.Append( RefString );
            sb.Append("<tr id=\"strategyoption" + InGameID + "\">");
            sb.Append("<td>");
            sb.Append(StrategySet.GetCategoryName(Category, version, websiteLanguage, inGameIdDict));
            sb.Append("</td>");

            int colspan = websiteLanguage.WantsBoth() ? 1 : 2;

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, Characters, websiteLanguage.MainJp());
            sb.Append("</td>");

            sb.Append("</tr>");
            return(sb.ToString());
        }
コード例 #3
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            var nameEn = inGameIdDict[NameStringDicID].StringEng;
            var nameJp = inGameIdDict[NameStringDicID].StringJpn;

            StringBuilder sb = new StringBuilder();

            sb.Append("<tr>");
            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, 1u << (int)(Character - 1), websiteLanguage.MainJp());
            sb.Append("</td>");

            int colspan = websiteLanguage.WantsBoth() ? 1 : 2;

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");

                if (nameEn.Contains("\x06(COS)") && !nameJp.Contains("\x06(COS)"))
                {
                    sb.Append(nameEn.Replace("\x06(COS)", "").ToHtmlEng(inGameIdDict, version));
                    Console.WriteLine("Removed EN costume icon for " + nameEn);
                }
                else
                {
                    sb.Append(inGameIdDict[NameStringDicID].StringEngHtml(version, inGameIdDict));
                }

                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            sb.Append("<td>");
            sb.Append(BunnyGuildPointsMaybe + " Fame point" + (BunnyGuildPointsMaybe != 1 ? "s" : ""));
            sb.Append("</td>");

            return(sb.ToString());
        }
コード例 #4
0
ファイル: SkitInfo.cs プロジェクト: asker1982/HyoutaTools
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, TO8CHLI skits, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(RefString);
            if (websiteLanguage.WantsJp())
            {
                sb.Append("<br>");
                sb.Append(inGameIdDict[StringDicIdName].StringJpnHtml(version, inGameIdDict));
                sb.Append("<br>");
                sb.Append(inGameIdDict[StringDicIdCondition].StringJpnHtml(version, inGameIdDict));
            }
            if (websiteLanguage.WantsEn())
            {
                sb.Append("<br>");
                sb.Append(inGameIdDict[StringDicIdName].StringEngHtml(version, inGameIdDict));
                sb.Append("<br>");
                sb.Append(inGameIdDict[StringDicIdCondition].StringEngHtml(version, inGameIdDict));
            }
            sb.Append("<br>Category: ");
            sb.Append(CategoryString);
            sb.Append("<br>Available after event: ");
            sb.Append(FlagTrigger);
            if (FlagCancel == 9999999)
            {
                sb.Append("<br>Never expires.");
            }
            else
            {
                sb.Append("<br>Expires after event: ");
                sb.Append(FlagCancel);
            }
            if (SkitConditionForwarderReference == 0xFFFFFFFF)
            {
                Util.Assert(SkitConditionRelated == 0);
                sb.Append("<br>No special condition.");
            }
            else
            {
                Util.Assert(SkitConditionRelated > 0);
                var fw = skits.SkitConditionForwarderList[(int)SkitConditionForwarderReference];

                /*
                 * sb.AppendLine();
                 * sb.Append( "<br>Trigger Condition #" + SkitConditionForwarderReference );
                 * sb.Append( " / Condition: " + fw.SkitConditionReference );
                 * sb.Append( " / Count: " + fw.SkitConditionCount );
                 * //*/
                for (uint i = 0; i < fw.SkitConditionCount; ++i)
                {
                    var c = skits.SkitConditionList[(int)(fw.SkitConditionReference + i)];
                    sb.Append("<br>");
                    c.GetDataAsHtml(sb, version, websiteLanguage, inGameIdDict);
                }
                sb.Append("~SkitConditionRelated: " + SkitConditionRelated);
            }

            sb.Append("<br>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, CharacterBitmask, websiteLanguage.MainJp());

            sb.Append("<br>");
            sb.Append("~4: 0x" + Unknown4.ToString("X8"));
            sb.Append("<br>");

            return(sb.ToString());
        }
コード例 #5
0
ファイル: SkitInfo.cs プロジェクト: asker1982/HyoutaTools
        public string GetIndexDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, TO8CHLI skits, Dictionary <uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false)
        {
            StringBuilder sb = new StringBuilder();

            string url = HyoutaTools.Tales.Vesperia.Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Skit, version, versionPostfix, locale, websiteLanguage, phpLinks, extra: RefString);

            sb.Append("<tr>");

            sb.Append("<td>");
            sb.Append(CategoryString);
            sb.Append("</td>");
            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td>");
                sb.Append("<a href=\"" + url + "\">");
                sb.Append(inGameIdDict[StringDicIdName].StringJpnHtml(version, inGameIdDict));
                sb.Append("</a>");
                sb.Append("</td>");
            }
            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td>");
                sb.Append("<a href=\"" + url + "\">");
                sb.Append(inGameIdDict[StringDicIdName].StringEngHtml(version, inGameIdDict));
                sb.Append("</a>");
                sb.Append("</td>");
            }
            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, CharacterBitmask, websiteLanguage.MainJp());
            sb.Append("</td>");

            sb.Append("</tr>");

            return(sb.ToString());
        }
コード例 #6
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, COOKDAT recipes, ItemDat.ItemDat items, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("<tr id=\"recipe" + ID + "\"><td>");
            sb.Append("<img src=\"recipes/U_" + RefString + ".png\">");
            sb.Append("</td><td>");
            if (websiteLanguage.WantsJp())
            {
                sb.Append("<span class=\"itemname\">" + inGameIdDict[NameStringDicID].StringJpnHtml(version, inGameIdDict) + "</span><br>");
                sb.Append(inGameIdDict[DescriptionStringDicID].StringJpnHtml(version, inGameIdDict) + "<br>");
                sb.Append(inGameIdDict[EffectStringDicID].StringJpnHtml(version, inGameIdDict));
            }
            if (websiteLanguage.WantsBoth())
            {
                sb.Append("<br>");
                sb.Append("<br>");
            }
            if (websiteLanguage.WantsEn())
            {
                sb.Append("<span class=\"itemname\">" + inGameIdDict[NameStringDicID].StringEngHtml(version, inGameIdDict) + "</span><br>");
                sb.Append(inGameIdDict[DescriptionStringDicID].StringEngHtml(version, inGameIdDict) + "<br>");
                sb.Append(inGameIdDict[EffectStringDicID].StringEngHtml(version, inGameIdDict));
            }

            sb.Append("</td><td>");
            for (int i = 0; i < IngredientGroups.Length; ++i)
            {
                if (IngredientGroups[i] != 0)
                {
                    uint stringDicId;
                    stringDicId = IngredientGroupDict[IngredientGroups[i]];
                    var entry = inGameIdDict[stringDicId];
                    sb.Append("<img src=\"item-icons/ICON" + IngredientGroups[i] + ".png\" height=\"16\" width=\"16\"> ");
                    sb.Append(entry.StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage) + " x" + IngredientGroupCount[i] + "<br>");
                }
            }
            for (int i = 0; i < Ingredients.Length; ++i)
            {
                if (Ingredients[i] != 0)
                {
                    var item = items.itemIdDict[Ingredients[i]];
                    sb.Append("<img src=\"item-icons/ICON" + item.Data[(int)ItemData.Icon] + ".png\" height=\"16\" width=\"16\"> ");
                    sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Item, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)item.Data[(int)ItemData.ID], icon: (int)item.Data[(int)ItemData.Icon]) + "\">");
                    sb.Append(inGameIdDict[item.NamePointer].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage) + "</a> x" + IngredientCount[i] + "<br>");
                }
            }

            sb.Append("</td><td>");
            if (HP > 0)
            {
                sb.Append("HP Heal: " + HP + "%<br>");
            }
            if (TP > 0)
            {
                sb.Append("TP Heal: " + TP + "%<br>");
            }

            if (PhysicalAilmentHeal > 0 || DeathHeal > 0)
            {
                sb.Append("Cures Ailments: ");
                if (DeathHeal > 0)
                {
                    sb.Append("<img src=\"text-icons/icon-status-13.png\" height=\"16\" width=\"16\" title=\"Death\">");
                }
                if ((PhysicalAilmentHeal & 1) == 1)
                {
                    sb.Append("<img src=\"text-icons/icon-status-01.png\" height=\"16\" width=\"16\" title=\"Poison\">");
                }
                if ((PhysicalAilmentHeal & 2) == 2)
                {
                    sb.Append("<img src=\"text-icons/icon-status-07.png\" height=\"16\" width=\"16\" title=\"Contamination\">");
                }
                if ((PhysicalAilmentHeal & 4) == 4)
                {
                    sb.Append("<img src=\"text-icons/icon-status-02.png\" height=\"16\" width=\"16\" title=\"Paralysis\">");
                }
                if ((PhysicalAilmentHeal & 8) == 8)
                {
                    sb.Append("<img src=\"text-icons/icon-status-03.png\" height=\"16\" width=\"16\" title=\"Petrification\">");
                }
                if ((PhysicalAilmentHeal & 16) == 16)
                {
                    sb.Append("<img src=\"text-icons/icon-status-04.png\" height=\"16\" width=\"16\" title=\"Weakness\">");
                }
                if ((PhysicalAilmentHeal & 32) == 32)
                {
                    sb.Append("<img src=\"text-icons/icon-status-05.png\" height=\"16\" width=\"16\" title=\"Sealed Artes\">");
                }
                if ((PhysicalAilmentHeal & 64) == 64)
                {
                    sb.Append("<img src=\"text-icons/icon-status-06.png\" height=\"16\" width=\"16\" title=\"Sealed Skills\">");
                }
                sb.Append("<br>");
            }

            if (StatValue > 0)
            {
                //sb.Append( "Stat Type: " + StatType + "<br>" );
                switch (StatType)
                {
                case 1: sb.Append("P. ATK"); break;

                case 2: sb.Append("P. DEF"); break;

                case 3: sb.Append("M. ATK"); break;

                case 4: sb.Append("M. DEF"); break;

                case 5: sb.Append("AGL"); break;

                case 11: sb.Append("Over Limit gauge increases<br>"); break;
                }
                if (StatType != 11)
                {
                    sb.Append(" +" + StatValue + (StatType < 5 ? "%" : "") + "<br>");
                    sb.Append("Duration: " + StatTime + " seconds<br>");
                }
            }

            if (RecipeCreationCharacter.Count(x => x != 0) > 0)
            {
                sb.Append("Recipe Evolutions:<br>");
                for (int i = 0; i < RecipeCreationCharacter.Length; ++i)
                {
                    if (RecipeCreationCharacter[i] != 0)
                    {
                        var otherRecipe = recipes.RecipeList[(int)RecipeCreationRecipe[i]];
                        Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, (uint)(1 << (int)(RecipeCreationCharacter[i] - 1)), websiteLanguage.MainJp());
                        sb.Append(" <a href=\"" + Vesperia.Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Recipe, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)otherRecipe.ID) + "\">");
                        sb.Append(inGameIdDict[otherRecipe.NameStringDicID].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage));
                        sb.Append("</a>");
                        sb.Append("<br>");
                    }
                }
            }

            sb.Append("<table class=\"element\">");
            sb.Append("<tr>");
            sb.Append("<td>Likes</td>");
            sb.Append("<td>Dislikes</td>");
            sb.Append("</tr>");

            sb.Append("<tr>");
            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, CharactersLike, websiteLanguage.MainJp());
            sb.Append("</td>");
            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, CharactersDislike, websiteLanguage.MainJp());
            sb.Append("</td>");
            sb.Append("</tr>");
            sb.Append("<tr>");
            sb.Append("<td>Good at</td>");
            sb.Append("<td>Bad at</td>");
            sb.Append("</tr>");
            sb.Append("<tr>");
            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, CharactersGoodAtMaking, websiteLanguage.MainJp());
            sb.Append("</td>");
            sb.Append("<td>");
            Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, CharactersBadAtMaking, websiteLanguage.MainJp());
            sb.Append("</td>");
            sb.Append("</tr>");

            sb.Append("</table>");

            sb.Append("</td></tr>");
            return(sb.ToString());
        }
コード例 #7
0
        public static string GetItemDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, ItemDat items, ItemDatSingle item, T8BTSK.T8BTSK skills, T8BTEMST.T8BTEMST enemies, COOKDAT.COOKDAT Recipes, WRLDDAT.WRLDDAT Locations, ShopData.ShopData shopData, TOVSEAF.TOVSEAF searchPoints, TSS.TSSFile tss, Dictionary <uint, TSS.TSSEntry> dict, bool phpLinks = false)
        {
            if (dict == null)
            {
                dict = tss.GenerateInGameIdDictionary();
            }
            bool trustItemBookForShops   = true;           // true to use the values of the item book for shop locations; false to parse it out from the actual data
            bool trustItemBookForEnemies = false;          // true to use the values of the item book for enemy drop/steal lists; false to parse it out from the actual data

            var sb = new StringBuilder();

            sb.Append("<tr id=\"item" + item.Data[(int)ItemData.ID] + "\">");
            sb.Append("<td rowspan=\"3\">");

            sb.Append("<img src=\"items/U_" + item.ItemString.TrimNull() + ".png\" height=\"128\" width=\"128\">");
            sb.Append("</td><td colspan=\"2\">");

            uint equip = item.Data[(int)ItemData.EquippableByBitfield];

            if (equip > 0)
            {
                sb.Append("<span class=\"equip\">");
                Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, dict, version, equip, websiteLanguage.MainJp());
                sb.Append("</span>");
            }


            var nameEntry = dict[item.NamePointer];
            var descEntry = dict[item.DescriptionPointer];

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<img src=\"item-icons/ICON" + item.Data[(int)ItemData.Icon] + ".png\" height=\"16\" width=\"16\"> ");
                sb.Append("<span class=\"itemname\">");
                sb.Append(nameEntry.StringJpnHtml(version, dict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append("<span class=\"itemdesc\">");
                sb.Append(descEntry.StringJpnHtml(version, dict));
                sb.Append("</span>");
            }

            if (websiteLanguage.WantsBoth())
            {
                sb.Append("<br>");
                sb.Append("<br>");
            }

            if (websiteLanguage.WantsEn())
            {
                sb.Append("<img src=\"item-icons/ICON" + item.Data[(int)ItemData.Icon] + ".png\" height=\"16\" width=\"16\"> ");
                sb.Append("<span class=\"itemname\">");
                sb.Append(nameEntry.StringEngHtml(version, dict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append("<span class=\"itemdesc\">");
                sb.Append(descEntry.StringEngHtml(version, dict));
                sb.Append("</span>");
            }

            sb.Append("<span class=\"special\">");
            if (item.Data[(int)ItemData.UsableInBattle] > 0)
            {
                sb.Append("Usable in battle");
            }
            ;
            if (item.Data[(int)ItemData.InCollectorsBook] == 0)
            {
                sb.Append("Not in Collector's Book");
            }
            sb.Append("</span>");
            sb.Append("</td>");

            uint synthCount = item.Data[(int)ItemData.SynthRecipeCount];

            switch (synthCount)
            {
            case 0: break;

            case 1: sb.Append("<td colspan=\"2\">"); break;

            default: sb.Append("<td>"); break;
            }
            for (int j = 0; j < synthCount; ++j)
            {
                uint synthItemCount = item.Data[(int)ItemData.Synth1ItemSlotCount + j * 16];
                sb.Append("Synthesis Level: " + item.Data[(int)ItemData._Synth1Level + j * 16]);
                sb.Append("<br>");
                sb.Append("Price: " + item.Data[(int)ItemData.Synth1Price + j * 16] + " Gald");
                for (int i = 0; i < synthItemCount; ++i)
                {
                    sb.Append("<br>");
                    var    otherItem          = items.itemIdDict[item.Data[(int)ItemData.Synth1Item1Type + i * 2 + j * 16]];
                    var    otherItemNameEntry = dict[otherItem.NamePointer];
                    string otherItemName      = otherItemNameEntry.StringEngOrJpnHtml(version, dict, websiteLanguage);
                    sb.Append("<img src=\"item-icons/ICON" + otherItem.Data[(int)ItemData.Icon] + ".png\" height=\"16\" width=\"16\"> ");
                    sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Item, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)otherItem.Data[(int)ItemData.ID], icon: (int)otherItem.Data[(int)ItemData.Icon]) + "\">");
                    sb.Append(otherItemName + "</a> x" + item.Data[(int)ItemData.Synth1Item1Count + i * 2 + j * 16]);
                }
                if (synthCount > 1 && j == 0)
                {
                    sb.Append("</td><td>");
                }
            }

            sb.Append("</td></tr><tr>");

            uint category = item.Data[(int)ItemData.Category];

            switch (category)
            {
            case 2:
            default:
                sb.Append("<td colspan=\"2\">");
                if (item.Data[(int)ItemData.MDEF_or_HPHealPercent] > 0)
                {
                    sb.Append("HP Heal %: " + item.Data[(int)ItemData.MDEF_or_HPHealPercent] + "<br>");
                }
                if (item.Data[(int)ItemData.AGL_TPHealPercent] > 0)
                {
                    sb.Append("TP Heal %: " + item.Data[(int)ItemData.AGL_TPHealPercent] + "<br>");
                }

                // why is this here twice?
                uint physAilAlt = item.Data[(int)ItemData.PDEF];
                uint physAil    = item.Data[(int)ItemData._LUCK];
                if (physAil != physAilAlt)
                {
                    throw new Exception();
                }

                if (physAil > 0)
                {
                    sb.Append("Cures physical ailments: ");
                    if ((physAil & 1) == 1)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-13.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 2) == 2)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-01.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 4) == 4)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-02.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 8) == 8)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-03.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 16) == 16)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-04.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 32) == 32)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-05.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 64) == 64)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-06.png\" height=\"32\" width=\"32\">");
                    }
                    if ((physAil & 128) == 128)
                    {
                        sb.Append("<img src=\"text-icons/icon-status-07.png\" height=\"32\" width=\"32\">");
                    }
                    sb.Append("<br>");
                }

                if (item.Data[(int)ItemData._AGL_Again] > 0)
                {
                    sb.Append("Cures magical ailments<br>");
                }

                if (item.Data[(int)ItemData.PermanentPAtkIncrease] > 0)
                {
                    sb.Append("Permanent PATK increase: " + item.Data[(int)ItemData.PermanentPAtkIncrease] + "<br>");
                }
                if (item.Data[(int)ItemData.PermanentPDefIncrease] > 0)
                {
                    sb.Append("Permanent PDEF increase: " + item.Data[(int)ItemData.PermanentPDefIncrease] + "<br>");
                }
                if (item.Data[(int)ItemData.AttrFire] > 0)
                {
                    sb.Append("Permanent MATK increase: " + item.Data[(int)ItemData.AttrFire] + "<br>");
                }
                if (item.Data[(int)ItemData.AttrWater] > 0)
                {
                    sb.Append("Permanent MDEF increase: " + item.Data[(int)ItemData.AttrWater] + "<br>");
                }
                if (item.Data[(int)ItemData.AttrWind] > 0)
                {
                    sb.Append("Permanent AGL increase: " + item.Data[(int)ItemData.AttrWind] + "<br>");
                }
                if (item.Data[(int)ItemData.Skill1] > 0)
                {
                    sb.Append("Max HP increase: " + item.Data[(int)ItemData.Skill1] + "<br>");
                }
                if (item.Data[(int)ItemData.Skill1Metadata] > 0)
                {
                    sb.Append("Max TP increase: " + item.Data[(int)ItemData.Skill1Metadata] + "<br>");
                }

                for (int i = 0; i < 8; ++i)
                {
                    int recipeId = (int)item.Data[(int)ItemData.UsedInRecipe1 + i];
                    if (recipeId != 0)
                    {
                        var recipe          = Recipes.RecipeList[recipeId];
                        var recipeNameEntry = dict[recipe.NameStringDicID];
                        sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Recipe, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)recipe.ID) + "\">" + recipeNameEntry.StringEngOrJpnHtml(version, dict, websiteLanguage) + "</a><br>");
                    }
                }

                sb.Append("</td>");
                break;

            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
                sb.Append("<td>");
                if ((int)item.Data[(int)ItemData.PATK] > 0)
                {
                    sb.Append("PATK: " + (int)item.Data[(int)ItemData.PATK] + "<br>");
                }
                if ((int)item.Data[(int)ItemData.MATK] > 0)
                {
                    sb.Append("MATK: " + (int)item.Data[(int)ItemData.MATK] + "<br>");
                }
                if ((int)item.Data[(int)ItemData.PDEF] > 0)
                {
                    sb.Append("PDEF: " + (int)item.Data[(int)ItemData.PDEF] + "<br>");
                }
                if ((int)item.Data[(int)ItemData.MDEF_or_HPHealPercent] > 0)
                {
                    sb.Append("MDEF: " + (int)item.Data[(int)ItemData.MDEF_or_HPHealPercent] + "<br>");
                }

                int agl1 = (int)item.Data[(int)ItemData.AGL_TPHealPercent];
                int agl2 = (int)item.Data[(int)ItemData._AGL_Again];

                if (agl2 > 0)
                {
                    sb.Append("AGL: " + agl2 + "<br>");
                }

                if ((int)item.Data[(int)ItemData._LUCK] > 0)
                {
                    sb.Append("LUCK: " + (int)item.Data[(int)ItemData._LUCK] + "<br>");
                }


                int attackElementCount  = 0;
                int defenseElementCount = 0;
                for (int i = 0; i < 6; ++i)
                {
                    if ((int)item.Data[(int)ItemData.AttrFire + i] > 0)
                    {
                        attackElementCount++;
                    }
                    if ((int)item.Data[(int)ItemData.AttrFire + i] < 0)
                    {
                        defenseElementCount++;
                    }
                }

                if (attackElementCount > 0 || defenseElementCount > 0)
                {
                    int fire = (int)item.Data[(int)ItemData.AttrFire];
                    int watr = (int)item.Data[(int)ItemData.AttrWater];
                    int wind = (int)item.Data[(int)ItemData.AttrWind];
                    int eart = (int)item.Data[(int)ItemData.AttrEarth];
                    int lght = (int)item.Data[(int)ItemData.AttrLight];
                    int dark = (int)item.Data[(int)ItemData.AttrDark];
                    if (defenseElementCount > 0)
                    {
                        sb.Append("<table class=\"element\"><tr>");
                        sb.Append("<td colspan=\"" + defenseElementCount + "\">Resistance</td>");
                        sb.Append("</tr><tr>");
                        if (fire < 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-02.png\"></td>");
                        }
                        if (eart < 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-04.png\"></td>");
                        }
                        if (wind < 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-01.png\"></td>");
                        }
                        if (watr < 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-05.png\"></td>");
                        }
                        if (lght < 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-03.png\"></td>");
                        }
                        if (dark < 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-06.png\"></td>");
                        }
                        sb.Append("</tr><tr>");
                        if (fire < 0)
                        {
                            sb.Append("<td>" + -fire + "%</td>");
                        }
                        if (eart < 0)
                        {
                            sb.Append("<td>" + -eart + "%</td>");
                        }
                        if (wind < 0)
                        {
                            sb.Append("<td>" + -wind + "%</td>");
                        }
                        if (watr < 0)
                        {
                            sb.Append("<td>" + -watr + "%</td>");
                        }
                        if (lght < 0)
                        {
                            sb.Append("<td>" + -lght + "%</td>");
                        }
                        if (dark < 0)
                        {
                            sb.Append("<td>" + -dark + "%</td>");
                        }
                        sb.Append("</tr></table>");
                    }
                    if (attackElementCount > 0)
                    {
                        sb.Append("<table class=\"element\"><tr>");
                        if (category == 3 || category == 4)
                        {
                            // weapons and sub-weapons add elemental attributes to your attack
                            sb.Append("<td colspan=\"" + attackElementCount + "\">Attack Element</td>");
                        }
                        else
                        {
                            // defensive equipment instead uses this field as a weak/resist, with weak as positive and resist as negative values
                            sb.Append("<td colspan=\"" + attackElementCount + "\">Weakness</td>");
                        }
                        sb.Append("</tr><tr>");
                        if (fire > 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-02.png\"></td>");
                        }
                        if (eart > 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-04.png\"></td>");
                        }
                        if (wind > 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-01.png\"></td>");
                        }
                        if (watr > 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-05.png\"></td>");
                        }
                        if (lght > 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-03.png\"></td>");
                        }
                        if (dark > 0)
                        {
                            sb.Append("<td><img src=\"text-icons/icon-element-06.png\"></td>");
                        }
                        if (!(category == 3 || category == 4))
                        {
                            // weapons always have a "1" here, don't print that, it's not useful
                            sb.Append("</tr><tr>");
                            if (fire > 0)
                            {
                                sb.Append("<td>" + fire + "%</td>");
                            }
                            if (eart > 0)
                            {
                                sb.Append("<td>" + eart + "%</td>");
                            }
                            if (wind > 0)
                            {
                                sb.Append("<td>" + wind + "%</td>");
                            }
                            if (watr > 0)
                            {
                                sb.Append("<td>" + watr + "%</td>");
                            }
                            if (lght > 0)
                            {
                                sb.Append("<td>" + lght + "%</td>");
                            }
                            if (dark > 0)
                            {
                                sb.Append("<td>" + dark + "%</td>");
                            }
                        }
                        sb.Append("</tr></table>");
                    }
                }

                sb.Append("</td><td>");

                for (int i = 0; i < 3; ++i)
                {
                    uint skillId = item.Data[(int)ItemData.Skill1 + i * 2];
                    if (skillId != 0)
                    {
                        var    skill          = skills.SkillIdDict[skillId];
                        var    skillNameEntry = dict[skill.NameStringDicID];
                        string skillName      = skillNameEntry.StringEngOrJpnHtml(version, dict, websiteLanguage);
                        string skillCat       = "<img src=\"skill-icons/category-" + skill.Category.ToString() + ".png\" height=\"16\" width=\"16\">";
                        sb.Append(skillCat);
                        sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Skill, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)skill.InGameID) + "\">");
                        sb.Append(skillName);
                        sb.Append("</a>, " + item.Data[(int)ItemData.Skill1Metadata + i * 2] + "<br>");
                    }
                }
                sb.Append("</td>");
                break;
            }



            sb.Append("<td>");


            sb.Append(item.Data[(int)ItemData.ShopPrice] + " Gald");

            if (trustItemBookForShops)
            {
                if (item.Data[(int)ItemData.BuyableIn1] > 0 || item.Data[(int)ItemData.BuyableIn2] > 0 || item.Data[(int)ItemData.BuyableIn3] > 0)
                {
                    //sb.Append( "<br>Available at shops in:" );
                    for (int i = 0; i < 3; ++i)
                    {
                        if (item.Data[(int)ItemData.BuyableIn1 + i] > 0)
                        {
                            var loc = Locations.LocationIdDict[item.Data[(int)ItemData.BuyableIn1 + i]];
                            sb.Append("<br><a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Location, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)loc.LocationID) + "\">");
                            sb.Append(loc.GetLastValidName(dict).StringEngOrJpnHtml(version, dict, websiteLanguage) + "</a>");
                        }
                    }
                }
            }
            else
            {
                List <ShopData.ShopDefinition> shops = new List <ShopData.ShopDefinition>();
                foreach (var kvp in shopData.ShopDictionary)
                {
                    ShopData.ShopDefinition shop = kvp.Value;
                    foreach (var shopItem in shop.ShopItems)
                    {
                        if (shopItem.ItemID == item.Data[(int)ItemData.ID])
                        {
                            shops.Add(shop);
                            break;
                        }
                    }
                }

                bool printShopsDirectly = false;
                if (printShopsDirectly)
                {
                    foreach (var shop in shops)
                    {
                        sb.Append("<br><a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Shop, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)shop.InGameID) + "\">");
                        sb.Append(dict[shop.StringDicID].StringEngOrJpnHtml(version, dict, websiteLanguage) + "</a>");
                    }
                }
                else
                {
                    foreach (var shop in shops)
                    {
                        WRLDDAT.Location loc = FindLocationOfShop(shop, shopData, Locations);
                        if (loc != null)
                        {
                            sb.Append("<br><a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Location, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)loc.LocationID) + "\">");
                            sb.Append(loc.GetLastValidName(dict).StringEngOrJpnHtml(version, dict, websiteLanguage) + "</a>");
                        }
                        else
                        {
                            sb.Append("<br><a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Shop, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)shop.InGameID) + "\">");
                            sb.Append(dict[shop.StringDicID].StringEngOrJpnHtml(version, dict, websiteLanguage) + "</a>");
                        }
                    }
                }
            }

            sb.Append("</td><td>");

            List <uint> itemsRequireSynth = FindItemsThatRequireForSynth(item.Data[(int)ItemData.ID], items);

            if (itemsRequireSynth.Count > 0)
            {
                sb.Append("Can be used to synthesize");
                foreach (uint otherItemId in itemsRequireSynth)
                {
                    ItemDatSingle otherItem = items.itemIdDict[otherItemId];
                    sb.Append("<br>");
                    var    otherItemNameEntry = dict[otherItem.NamePointer];
                    string otherItemName      = otherItemNameEntry.StringEngOrJpnHtml(version, dict, websiteLanguage);
                    sb.Append("<img src=\"item-icons/ICON" + otherItem.Data[(int)ItemData.Icon] + ".png\" height=\"16\" width=\"16\"> ");
                    sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Item, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)otherItem.Data[(int)ItemData.ID], icon: (int)otherItem.Data[(int)ItemData.Icon]) + "\">");
                    sb.Append(otherItemName + "</a>");
                }
            }

            sb.Append("</td></tr><tr>");

            // drops and steals
            List <(uint enemyId, uint dropChance, uint?fatalType, uint?fatalIncrease)>[] enemyIds = new List <(uint enemyId, uint dropChance, uint?fatalType, uint?fatalIncrease)> [3];
コード例 #8
0
ファイル: Arte.cs プロジェクト: asker1982/HyoutaTools
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, Dictionary <uint, Arte> arteIdDict, T8BTEMST.T8BTEMST enemies, T8BTSK.T8BTSK skills, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("<tr id=\"arte" + InGameID + "\">");
            sb.Append("<td style=\"text-align: right;\">");
            //sb.Append( RefString + "<br>" );
            if (Character > 0 && Character <= 9)
            {
                Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, 1u << (int)(Character - 1), websiteLanguage.MainJp());
            }
            if (Character > 9)
            {
                var enemy = enemies.EnemyIdDict[Character];
                sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Enemy, version, versionPostfix, locale, websiteLanguage, phpLinks, category: (int)enemy.Category, id: (int)enemy.InGameID) + "\">");
                sb.Append("<img src=\"monster-icons/48px/monster-" + enemy.IconID.ToString("D3") + ".png\" width=\"32\" height=\"32\" title=\"" + inGameIdDict[enemy.NameStringDicID].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage) + "\">");
                sb.Append("</a>");
            }
            sb.Append("<img src=\"menu-icons/artes-");
            switch (Type)
            {
            case ArteType.Base: sb.Append("00"); break;

            case ArteType.Arcane: sb.Append("01"); break;

            case ArteType.Altered: sb.Append("12"); break;

            case ArteType.AlteredSpell: sb.Append("12"); break;

            case ArteType.NoviceSpell: sb.Append("04"); break;

            case ArteType.IntermediateSpell: sb.Append("05"); break;

            case ArteType.AdvancedSpell: sb.Append("06"); break;

            case ArteType.Burst: sb.Append("02"); break;

            case ArteType.BurstSpell: sb.Append("02"); break;

            case ArteType.AlteredBurst: sb.Append("02"); break;

            case ArteType.AlteredBurstSpell: sb.Append("02"); break;

            case ArteType.Mystic: sb.Append("02"); break;
            }
            sb.Append(".png\" width=\"32\" height=\"32\">");
            sb.Append("</td>");

            int colspan = websiteLanguage.WantsBoth() ? 1 : 2;

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicId].StringJpnHtml(version, inGameIdDict) + "</span><br>");
                sb.Append(inGameIdDict[DescStringDicId].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }
            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicId].StringEngHtml(version, inGameIdDict) + "</span><br>");
                sb.Append(inGameIdDict[DescStringDicId].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }
            sb.Append("<td>");
            //sb.Append( Type + "<br>" );

            bool iconsInserted = false;

            if (Character <= 9)
            {
                switch (FatalStrikeType)
                {
                case 0: sb.Append("<img src=\"menu-icons/artes-13.png\" width=\"16\" height=\"16\">"); iconsInserted = true; break;

                case 1: sb.Append("<img src=\"menu-icons/artes-15.png\" width=\"16\" height=\"16\">"); iconsInserted = true; break;

                case 2: sb.Append("<img src=\"menu-icons/artes-14.png\" width=\"16\" height=\"16\">"); iconsInserted = true; break;
                }
            }
            if (ElementFire > 0)
            {
                sb.Append("<img src=\"text-icons/icon-element-02.png\" width=\"16\" height=\"16\">"); iconsInserted = true;
            }
            if (ElementEarth > 0)
            {
                sb.Append("<img src=\"text-icons/icon-element-04.png\" width=\"16\" height=\"16\">"); iconsInserted = true;
            }
            if (ElementWind > 0)
            {
                sb.Append("<img src=\"text-icons/icon-element-01.png\" width=\"16\" height=\"16\">"); iconsInserted = true;
            }
            if (ElementWater > 0)
            {
                sb.Append("<img src=\"text-icons/icon-element-05.png\" width=\"16\" height=\"16\">"); iconsInserted = true;
            }
            if (ElementLight > 0)
            {
                sb.Append("<img src=\"text-icons/icon-element-03.png\" width=\"16\" height=\"16\">"); iconsInserted = true;
            }
            if (ElementDarkness > 0)
            {
                sb.Append("<img src=\"text-icons/icon-element-06.png\" width=\"16\" height=\"16\">"); iconsInserted = true;
            }
            if (iconsInserted)
            {
                sb.Append("<br>");
            }
            if (TPUsage > 0)
            {
                sb.Append("TP usage: " + TPUsage + "<br>");
            }

            for (int i = 0; i < LearnRequirementsOtherArtesType.Length; ++i)
            {
                if (LearnRequirementsOtherArtesType[i] > 0)
                {
                    switch (LearnRequirementsOtherArtesType[i])
                    {
                    case 1:                             // Level
                        if (LearnRequirementsOtherArtesId[i] == 300)
                        {
                            sb.Append("Learn via Event");
                        }
                        else
                        {
                            sb.Append("Level " + LearnRequirementsOtherArtesId[i]);
                        }
                        break;

                    case 2:                             // Other Arte
                        var otherArte = arteIdDict[LearnRequirementsOtherArtesId[i]];
                        if (otherArte.ID != this.ID)
                        {
                            sb.Append("<img src=\"menu-icons/artes-" + otherArte.GetIconNumber() + ".png\" width=\"16\" height=\"16\">");
                            sb.Append("<a href=\"" + Vesperia.Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Arte, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)otherArte.InGameID) + "\">" + inGameIdDict[otherArte.NameStringDicId].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage));
                            sb.Append("</a>, ");
                        }
                        else
                        {
                            sb.Append("Learn with ");
                        }
                        sb.Append(LearnRequirementsOtherArtesUsageCount[i] + " uses");

                        break;

                    case 3:                             // appears on Rita and Repede's Burst Artes in 360 only, appears to be unused
                        break;

                    default:
                        sb.Append("##Unknown Learn Type: " + LearnRequirementsOtherArtesType[i] + "<br>");
                        sb.Append("##Value 1: " + LearnRequirementsOtherArtesId[i] + "<br>");
                        sb.Append("##Value 2: " + LearnRequirementsOtherArtesUsageCount[i] + "<br>");
                        break;
                    }
                    sb.Append("<br>");
                }
            }
            for (int i = 0; i < AlteredArteRequirementType.Length; ++i)
            {
                if (AlteredArteRequirementType[i] > 0)
                {
                    switch (AlteredArteRequirementType[i])
                    {
                    case 1:                             // original arte
                        var otherArte = arteIdDict[AlteredArteRequirementId[i]];
                        sb.Append("Alters from ");
                        sb.Append("<img src=\"menu-icons/artes-" + otherArte.GetIconNumber() + ".png\" width=\"16\" height=\"16\">");
                        sb.Append("<a href=\"" + Vesperia.Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Arte, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)otherArte.InGameID) + "\">" + inGameIdDict[otherArte.NameStringDicId].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage) + "</a>");
                        break;

                    case 3:                             // skill
                        var skill = skills.SkillIdDict[AlteredArteRequirementId[i]];
                        sb.Append("<img src=\"skill-icons/category-" + skill.Category + ".png\" width=\"16\" height=\"16\">");
                        sb.Append("<a href=\"" + Website.WebsiteGenerator.GetUrl(Website.WebsiteSection.Skill, version, versionPostfix, locale, websiteLanguage, phpLinks, id: (int)skill.InGameID) + "\">" + inGameIdDict[skill.NameStringDicID].StringEngOrJpnHtml(version, inGameIdDict, websiteLanguage) + "</a>");
                        break;

                    default:
                        sb.Append("##Unknown Altered Type: " + AlteredArteRequirementType[i] + "<br>");
                        sb.Append("##Value: " + AlteredArteRequirementId[i] + "<br>");
                        break;
                    }
                    sb.Append("<br>");
                }
            }

            if (UsableInMenu > 0)
            {
                sb.Append("Usable outside of battle");
            }

            sb.Append("</td>");

            /*
             * sb.Append( "<td>" );
             * sb.AppendLine();
             * sb.AppendLine( "~" + 9 + ": " + Data[9] + "<br>" );
             * for ( int i = 16; i < 22; ++i ) {
             *      sb.AppendLine( "~" + i + ": " + Data[i] + "<br>" );
             * }
             * for ( int i = 40; i < 69; ++i ) {
             *      if ( i == 44 ) continue;
             *      if ( i == 42 || i == 66 ) {
             *              sb.AppendLine( "~" + i + ": " + Data[i].UIntToFloat() + "<br>" );
             *      } else {
             *              sb.AppendLine( "~" + i + ": " + Data[i] + "<br>" );
             *      }
             * }
             * for ( int i = 79; i < 95; ++i ) {
             *      if ( i == 83 ) continue;
             *      sb.AppendLine( "~" + i + ": " + Data[i] + "<br>" );
             * }
             * sb.Append( "</td>" );
             * //*/

            sb.Append("</tr>");
            return(sb.ToString());
        }
コード例 #9
0
        public void GetDataAsHtml(StringBuilder sb, GameVersion version, WebsiteLanguage websiteLanguage, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            switch (Type)
            {
            case SkitConditionType.AllPartyMemberLevels:
                sb.AppendFormat("All Party Member Levels {0} {1}", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.TotalEnemyEncounters:
                sb.AppendFormat("Total Enemy Encounters {0} {1}", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.EventFlag:
                sb.AppendFormat("Event Flag {0} {1}", Value1, MathOp == 0 ? "on" : "off");
                Util.Assert((MathOp == 0 || MathOp == 1) && Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.SeenSkit:
                sb.AppendFormat("Have seen other skit ({0} ????)", Value1);
                Util.Assert(MathOp == 0 && Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.OnShip:
                sb.Append("Currently on Ship");
                Util.Assert(MathOp == 0 && Value1 == 0 && Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.InArea:
                sb.AppendFormat("Currently in area {0}", Value1);
                Util.Assert(MathOp == 0 && Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.TimeSpentInArea:
                sb.AppendFormat("Spent {0} {2} frames in area {1}", MathOpString, Value1, Value2);
                Util.Assert(Value3 == 0);
                return;

            case SkitConditionType.GigantosKilled:
                sb.AppendFormat("Defeated {0} {1} Giganto Monsters", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.AllGigantosKilled:
                sb.Append("Defeated all Giganto Monsters");
                Util.Assert(MathOp == 0 && Value1 == 0 && Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.ArteUsage:
                sb.AppendFormat("Character {1} used Arte {2} {0} {3} times", MathOpString, Value1, Value2, Value3);
                return;

            case SkitConditionType.TotalSearchPointCollected:
                sb.AppendFormat("Collected {0} {1} Items from Search Points", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.BattleLength:
                sb.AppendFormat("(last? shortest?) Battle lasted {0} {1} frames", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.BattleParticipation:
                sb.AppendFormat("Character {1} has been in {0} {2} battles", MathOpString, Value1, Value2);
                Util.Assert(Value3 == 0);
                return;

            case SkitConditionType.BattleParticipationPercent:
                sb.AppendFormat("Character {1} has been in {0} {2}% of battles", MathOpString, Value1, Value2);
                Util.Assert(Value3 == 0);
                return;

            case SkitConditionType.CookingSkill:
                sb.AppendFormat("Character {1}'s cooking skill for recipe {2} is {0} {3}", MathOpString, Value1, Value2, Value3);
                return;

            case SkitConditionType.CookingCharacterBitmask:
                sb.Append("Characters ");
                Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, (uint)Value1, websiteLanguage.MainJp());
                sb.AppendFormat(" have cooked {0} {1} times", MathOpString, Value2);
                Util.Assert(Value3 == 0);
                return;

            case SkitConditionType.NotCookedTime:
                sb.AppendFormat("{0} {1} frames since last cooking", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.NotAirshipTime:
                sb.AppendFormat("{0} {1} frames since last time flying on Ba'ul", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.TotalPlaytime:
                sb.AppendFormat("{0} {1} frames total playtime", MathOpString, Value1);
                Util.Assert(Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.NewGamePlus:
                sb.Append("In New Game Plus");
                Util.Assert(MathOp == 0 && Value1 == 0 && Value2 == 0 && Value3 == 0);
                return;

            case SkitConditionType.TitleEquipped:
                sb.AppendFormat("Character {0} has title {1} equipped", Value1, Value2);
                Util.Assert(MathOp == 0 && Value3 == 0);
                return;

            case SkitConditionType.AttachmentEquipped:
                sb.AppendFormat("Character {0} has attachment {1} equipped", Value1, Value2);
                Util.Assert(MathOp == 0 && Value3 == 0);
                return;

            case SkitConditionType.PartySlot1:
                sb.AppendFormat("Character {0} in 1st party slot", Value1);
                Util.Assert(MathOp == 0 && Value2 == 0 && Value3 == 0);
                return;
            }

            sb.Append(" ========== #type: " + (ushort)Type);
            sb.Append(" / #math: " + MathOp);
            sb.Append(" / #val1: " + Value1);
            sb.Append(" / #val2: " + Value2);
            sb.Append(" / #val3: " + Value3);
        }
コード例 #10
0
        public string GetDataAsHtml(GameVersion version, string versionPostfix, GameLocale locale, WebsiteLanguage websiteLanguage, TSS.TSSFile stringDic, Dictionary <uint, TSS.TSSEntry> inGameIdDict)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("<tr id=\"skill" + InGameID + "\">");
            //sb.Append( RefString + "<br>" );

            sb.Append("<td>");
            sb.Append("<img src=\"skill-icons/category-" + Category + ".png\" width=\"32\" height=\"32\">");
            sb.Append("</td>");

            int colspan = websiteLanguage.WantsBoth() ? 1 : 2;

            if (websiteLanguage.WantsJp())
            {
                sb.Append("<td colspan=\"" + colspan + "\" class=\"skilljpn\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringJpnHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            if (websiteLanguage.WantsEn())
            {
                sb.Append("<td colspan=\"" + colspan + "\">");
                sb.Append("<span class=\"itemname\">");
                sb.Append(inGameIdDict[NameStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</span>");
                sb.Append("<br>");
                sb.Append(inGameIdDict[DescStringDicID].StringEngHtml(version, inGameIdDict));
                sb.Append("</td>");
            }

            sb.Append("<td class=\"skilldata\">");
            if (LearnableByBitmask > 0)
            {
                sb.Append("<span class=\"equip\">");
                Website.WebsiteGenerator.AppendCharacterBitfieldAsImageString(sb, inGameIdDict, version, LearnableByBitmask, websiteLanguage.MainJp());
                sb.Append("</span>");
            }
            sb.Append(EquipCost + "&nbsp;SP<br>");
            sb.Append(LearnCost + "&nbsp;LP<br>");
            sb.Append("Symbol Weight: " + SymbolValue + "<br>");

            //sb.Append( "~7: " + Unknown7 + "<br>" );
            //sb.Append( "~13: " + Unknown13 + "<br>" );
            //sb.Append( "~14: " + Unknown14 + "<br>" );
            //sb.Append( "~15: " + Unknown15 + "<br>" );
            if (Inactive == 0)
            {
                sb.Append("Unusable<br>");
            }
            sb.Append("</td>");
            sb.Append("</tr>");
            return(sb.ToString());
        }