Skip to content

Commit

Permalink
add support for more 0x0E FileTypes (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmriggs authored Aug 22, 2020
1 parent 954f07f commit 3ee8e6b
Show file tree
Hide file tree
Showing 26 changed files with 930 additions and 87 deletions.
20 changes: 20 additions & 0 deletions ACViewer/ACViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<Compile Include="Entity\BuildInfo.cs" />
<Compile Include="Entity\CellPortal.cs" />
<Compile Include="Entity\CellStruct.cs" />
<Compile Include="Entity\ChatEmoteData.cs" />
<Compile Include="Entity\ClothingBaseEffect.cs" />
<Compile Include="Entity\ClothingObjectEffect.cs" />
<Compile Include="Entity\ClothingSubPalette.cs" />
Expand All @@ -89,12 +90,15 @@
<Compile Include="Entity\ClothingTextureEffect.cs" />
<Compile Include="Entity\Color.cs" />
<Compile Include="Entity\CombatManeuver.cs" />
<Compile Include="Entity\Contract.cs" />
<Compile Include="Entity\CylSphere.cs" />
<Compile Include="Entity\DayGroup.cs" />
<Compile Include="Entity\GameTime.cs" />
<Compile Include="Entity\Generator.cs" />
<Compile Include="Entity\GfxObjInfo.cs" />
<Compile Include="Entity\LandDefs.cs" />
<Compile Include="Entity\LandSurf.cs" />
<Compile Include="Entity\NameFilterLanguageData.cs" />
<Compile Include="Entity\ObjectDesc.cs" />
<Compile Include="Entity\PhysicsScriptData.cs" />
<Compile Include="Entity\PhysicsScriptTableData.cs" />
Expand All @@ -104,13 +108,19 @@
<Compile Include="Entity\SceneType.cs" />
<Compile Include="Entity\ScriptMod.cs" />
<Compile Include="Entity\Season.cs" />
<Compile Include="Entity\SkillBase.cs" />
<Compile Include="Entity\SkillFormula.cs" />
<Compile Include="Entity\SkyDesc.cs" />
<Compile Include="Entity\SkyObject.cs" />
<Compile Include="Entity\SkyObjectReplace.cs" />
<Compile Include="Entity\SkyTimeOfDay.cs" />
<Compile Include="Entity\SoundData.cs" />
<Compile Include="Entity\SoundDesc.cs" />
<Compile Include="Entity\SoundTableData.cs" />
<Compile Include="Entity\SpellBase.cs" />
<Compile Include="Entity\SpellComponentBase.cs" />
<Compile Include="Entity\SpellSet.cs" />
<Compile Include="Entity\SpellSetTier.cs" />
<Compile Include="Entity\Stab.cs" />
<Compile Include="Entity\StringTableData.cs" />
<Compile Include="Entity\TerrainAlphaMap.cs" />
Expand All @@ -125,7 +135,9 @@
<Compile Include="Extensions\Vector2Extensions.cs" />
<Compile Include="Extensions\VertexExtensions.cs" />
<Compile Include="FileTypes\CellLandblock.cs" />
<Compile Include="FileTypes\ChatPoseTable.cs" />
<Compile Include="FileTypes\CombatTable.cs" />
<Compile Include="FileTypes\ContractTable.cs" />
<Compile Include="FileTypes\DegradeInfo.cs" />
<Compile Include="Entity\EyeStripCG.cs" />
<Compile Include="Entity\FaceStripCG.cs" />
Expand Down Expand Up @@ -163,9 +175,11 @@
<Compile Include="FileTypes\EnumMapper.cs" />
<Compile Include="FileTypes\EnvCell.cs" />
<Compile Include="FileTypes\Environment.cs" />
<Compile Include="FileTypes\GeneratorTable.cs" />
<Compile Include="FileTypes\GfxObj.cs" />
<Compile Include="FileTypes\LandblockInfo.cs" />
<Compile Include="FileTypes\MotionTable.cs" />
<Compile Include="FileTypes\NameFilterTable.cs" />
<Compile Include="FileTypes\ObjDesc.cs" />
<Compile Include="FileTypes\Palette.cs" />
<Compile Include="FileTypes\PaletteSet.cs" />
Expand All @@ -174,13 +188,19 @@
<Compile Include="FileTypes\PhysicsScriptTable.cs" />
<Compile Include="FileTypes\Region.cs" />
<Compile Include="FileTypes\Scene.cs" />
<Compile Include="FileTypes\SecondaryAttributeTable.cs" />
<Compile Include="FileTypes\Setup.cs" />
<Compile Include="FileTypes\SkillTable.cs" />
<Compile Include="FileTypes\Sound.cs" />
<Compile Include="FileTypes\SoundTable.cs" />
<Compile Include="FileTypes\SpellComponentsTable.cs" />
<Compile Include="FileTypes\SpellTable.cs" />
<Compile Include="FileTypes\StringTable.cs" />
<Compile Include="FileTypes\Surface.cs" />
<Compile Include="FileTypes\SurfaceTexture.cs" />
<Compile Include="FileTypes\TabooTable.cs" />
<Compile Include="FileTypes\Texture.cs" />
<Compile Include="FileTypes\XpTable.cs" />
<Compile Include="Image.cs" />
<Compile Include="MapViewer.cs" />
<Compile Include="ModelViewer.cs" />
Expand Down
28 changes: 28 additions & 0 deletions ACViewer/Entity/ChatEmoteData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
{
public class ChatEmoteData
{
public ACE.DatLoader.Entity.ChatEmoteData _chatEmoteData;

public ChatEmoteData(ACE.DatLoader.Entity.ChatEmoteData chatEmoteData)
{
_chatEmoteData = chatEmoteData;
}

public List<TreeNode> BuildTree()
{
var treeNode = new List<TreeNode>();

treeNode.Add(new TreeNode($"MyEmote: {_chatEmoteData.MyEmote}"));
treeNode.Add(new TreeNode($"OtherEmote: {_chatEmoteData.OtherEmote}"));

return treeNode;
}
}
}
52 changes: 52 additions & 0 deletions ACViewer/Entity/Contract.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using ACE.Entity.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
{
public class Contract
{
public ACE.DatLoader.Entity.Contract _contract;

public Contract(ACE.DatLoader.Entity.Contract contract)
{
_contract = contract;
}

public List<TreeNode> BuildTree()
{
var treeNode = new List<TreeNode>();

treeNode.Add(new TreeNode($"ContractId: {_contract.ContractId}"));
treeNode.Add(new TreeNode($"ContractName: {_contract.ContractName}"));
treeNode.Add(new TreeNode($"Version: {_contract.Version}"));
treeNode.Add(new TreeNode($"Description: {_contract.Description}"));
treeNode.Add(new TreeNode($"DescriptionProgress: {_contract.DescriptionProgress}"));
treeNode.Add(new TreeNode($"NameNPCStart: {_contract.NameNPCStart}"));
treeNode.Add(new TreeNode($"NameNPCEnd: {_contract.NameNPCEnd}"));
treeNode.Add(new TreeNode($"QuestflagStamped: {_contract.QuestflagStamped}"));
treeNode.Add(new TreeNode($"QuestflagStarted: {_contract.QuestflagStarted}"));
treeNode.Add(new TreeNode($"QuestflagFinished: {_contract.QuestflagFinished}"));
treeNode.Add(new TreeNode($"QuestflagProgress: {_contract.QuestflagProgress}"));
treeNode.Add(new TreeNode($"QuestflagTimer: {_contract.QuestflagTimer}"));
treeNode.Add(new TreeNode($"QuestflagRepeatTime: {_contract.QuestflagRepeatTime}"));

var locationNPCStart = new TreeNode($"LocationNPCStart");
locationNPCStart.Items = new Position(_contract.LocationNPCStart).BuildTree();
treeNode.Add(locationNPCStart);

var locationNPCEnd = new TreeNode($"LocationNPCEnd");
locationNPCEnd.Items = new Position(_contract.LocationNPCEnd).BuildTree();
treeNode.Add(locationNPCEnd);

var locationQuestArea = new TreeNode($"LocationQuestArea");
locationQuestArea.Items = new Position(_contract.LocationQuestArea).BuildTree();
treeNode.Add(locationQuestArea);

return treeNode;
}
}
}
48 changes: 48 additions & 0 deletions ACViewer/Entity/Generator.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ACE.Entity.Enum;

namespace ACViewer.Entity
{
public class Generator
{
public ACE.DatLoader.Entity.Generator _generator;

public Generator(ACE.DatLoader.Entity.Generator generator)
{
_generator = generator;
}

public List<TreeNode> BuildTree()
{
var treeNode = new List<TreeNode>();

/*if (_generator.Id != 0)
treeNode.Add(new TreeNode($"Id: {_generator.Id}"));
if (!string.IsNullOrEmpty(_generator.Name))
treeNode.Add(new TreeNode($"Name: {_generator.Name}"));*/

if (_generator.Items.Count > 0)
{
//var items = new TreeNode($"Items");

foreach (var item in _generator.Items)
{
var heading = item.Id != 0 ? $"{item.Id} - {item.Name}" : item.Name;

var subGenerator = new TreeNode(heading);
subGenerator.Items = new Generator(item).BuildTree();

//items.Items.Add(subGenerator);
treeNode.Add(subGenerator);
}
//treeNode.Add(items);
}
return treeNode;
}
}
}
38 changes: 38 additions & 0 deletions ACViewer/Entity/NameFilterLanguageData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
{
public class NameFilterLanguageData
{
public ACE.DatLoader.Entity.NameFilterLanguageData _nameFilterLanguageData;

public NameFilterLanguageData(ACE.DatLoader.Entity.NameFilterLanguageData nameFilterLanguageData)
{
_nameFilterLanguageData = nameFilterLanguageData;
}

public List<TreeNode> BuildTree()
{
var treeNode = new List<TreeNode>();

treeNode.Add(new TreeNode($"MaximumVowelsInARow: {_nameFilterLanguageData.MaximumVowelsInARow}"));
treeNode.Add(new TreeNode($"FirstNCharactersMustHaveAVowel: {_nameFilterLanguageData.FirstNCharactersMustHaveAVowel}"));
treeNode.Add(new TreeNode($"VowelContainingSubstringLength: {_nameFilterLanguageData.VowelContainingSubstringLength}"));
treeNode.Add(new TreeNode($"ExtraAllowedCharacters: {_nameFilterLanguageData.ExtraAllowedCharacters}"));
treeNode.Add(new TreeNode($"Unknown: {_nameFilterLanguageData.Unknown}"));

var compoundLetterGroups = new TreeNode($"CompoundLetterGrounds");

foreach (var compoundLetterGroup in _nameFilterLanguageData.CompoundLetterGroups)
compoundLetterGroups.Items.Add(new TreeNode(compoundLetterGroup));

treeNode.Add(compoundLetterGroups);

return treeNode;
}
}
}
50 changes: 50 additions & 0 deletions ACViewer/Entity/SkillBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
{
public class SkillBase
{
public enum SkillCategory
{
Undef = 0,
Combat = 1,
Other = 2,
Magic = 3
};

public ACE.DatLoader.Entity.SkillBase _skillBase;

public SkillBase(ACE.DatLoader.Entity.SkillBase skillBase)
{
_skillBase = skillBase;
}

public List<TreeNode> BuildTree()
{
var treeNode = new List<TreeNode>();

treeNode.Add(new TreeNode($"Name: {_skillBase.Name}"));
treeNode.Add(new TreeNode($"Description: {_skillBase.Description}"));
treeNode.Add(new TreeNode($"IconId: 0x{_skillBase.IconId:X8}"));
treeNode.Add(new TreeNode($"TrainedCost: {_skillBase.TrainedCost}"));
treeNode.Add(new TreeNode($"SpecializedCost: {_skillBase.SpecializedCost}"));
treeNode.Add(new TreeNode($"Category: {(SkillCategory)_skillBase.Category}"));
treeNode.Add(new TreeNode($"CharGenUse: {_skillBase.ChargenUse}"));
treeNode.Add(new TreeNode($"MinLevel: {_skillBase.MinLevel}"));

var skillFormula = new TreeNode($"SkillFormula");
skillFormula.Items = new SkillFormula(_skillBase.Formula).BuildTree();
treeNode.Add(skillFormula);

treeNode.Add(new TreeNode($"UpperBound: {_skillBase.UpperBound}"));
treeNode.Add(new TreeNode($"LowerBound: {_skillBase.LowerBound}"));
treeNode.Add(new TreeNode($"LearnMod: {_skillBase.LearnMod}"));

return treeNode;
}
}
}
33 changes: 33 additions & 0 deletions ACViewer/Entity/SkillFormula.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using ACE.Entity.Enum.Properties;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ACViewer.Entity
{
public class SkillFormula
{
public ACE.DatLoader.Entity.SkillFormula _skillFormula;

public SkillFormula(ACE.DatLoader.Entity.SkillFormula skillFormula)
{
_skillFormula = skillFormula;
}

public List<TreeNode> BuildTree()
{
var treeNode = new List<TreeNode>();

treeNode.Add(new TreeNode($"Attr1: {(PropertyAttribute)_skillFormula.Attr1}"));
treeNode.Add(new TreeNode($"Attr2: {(PropertyAttribute)_skillFormula.Attr2}"));
treeNode.Add(new TreeNode($"W: {_skillFormula.W}"));
treeNode.Add(new TreeNode($"X: {_skillFormula.X}"));
treeNode.Add(new TreeNode($"Y: {_skillFormula.Y}"));
treeNode.Add(new TreeNode($"Z (divisor): {_skillFormula.Z}"));

return treeNode;
}
}
}
Loading

0 comments on commit 3ee8e6b

Please sign in to comment.