Class CipFileParser
Static class that parses Cip files.
Inheritance
Inherited Members
Namespace: Fibula.Parsing.CipFiles
Assembly: Fibula.Parsing.CipFiles.dll
Syntax
public static class CipFileParser
Fields
| Improve this Doc View SourceCloseCurly
The close curly brace character.
Declaration
public const char CloseCurly = '}'
Field Value
Type | Description |
---|---|
System.Char |
CloseParenthesis
The close parenthesis character.
Declaration
public const char CloseParenthesis = ')'
Field Value
Type | Description |
---|---|
System.Char |
Comma
The comma character.
Declaration
public const char Comma = ','
Field Value
Type | Description |
---|---|
System.Char |
ContentAttributeName
The name of the content attribute.
Declaration
public const string ContentAttributeName = "Content"
Field Value
Type | Description |
---|---|
System.String |
EqualsSign
The equals sign character.
Declaration
public const char EqualsSign = '='
Field Value
Type | Description |
---|---|
System.Char |
OpenCurly
The open curly brace character.
Declaration
public const char OpenCurly = '{'
Field Value
Type | Description |
---|---|
System.Char |
OpenParenthesis
The open parenthesis character.
Declaration
public const char OpenParenthesis = '('
Field Value
Type | Description |
---|---|
System.Char |
Space
The space character.
Declaration
public const char Space = ' '
Field Value
Type | Description |
---|---|
System.Char |
Methods
| Improve this Doc View SourceParse(String)
Attempts to parse a string into a CipElement.
Declaration
public static IEnumerable<CipElement> Parse(string inputStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | inputStr | The input string. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<CipElement> | A collection of CipElements parsed. |
ParseMonsterInventory(String)
Parses a monster's possible inventory items out of a string.
Declaration
public static IEnumerable<(ushort typeId, byte maxAmount, ushort dropChance)> ParseMonsterInventory(string inventoryStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | inventoryStr | The string to parse. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ValueTuple<System.UInt16, System.Byte, System.UInt16>> | A collection of tuples containing the possible inventory items of the monster. |
ParseMonsterOutfit(String)
Parses a monster outfit out of a string.
Declaration
public static (ushort lookTypeId, byte headColor, byte bodyColor, byte legsColor, byte feetColor) ParseMonsterOutfit(string outfitStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | outfitStr | The string to parse. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.UInt16, System.Byte, System.Byte, System.Byte, System.Byte> | A tuple containing the monster outfit values. |
ParseMonsterSkills(String)
Parses a monster's skills out of a string.
Declaration
public static IEnumerable<(string Name, int DefaultLevel, int CurrentLevel, int MaximumLevel, uint TargetCount, uint CountIncreaseFactor, byte IncreaserPerLevel)> ParseMonsterSkills(string skillsStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | skillsStr | The string to parse. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ValueTuple<System.String, System.Int32, System.Int32, System.Int32, System.UInt32, System.UInt32, System.Byte>> | A collection of tuples containing the skills information. |
ParseMonsterSpells(String)
Parses monster spells out of a string.
Declaration
public static IEnumerable<(IEnumerable<string> conditions, IEnumerable<string> effects, string chance)> ParseMonsterSpells(string spellsStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | spellsStr | The string to parse. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.ValueTuple<System.Collections.Generic.IEnumerable<System.String>, System.Collections.Generic.IEnumerable<System.String>, System.String>> | A collection of data containing the spell conditions, effects and an asociated chance. |
ParseMonsterStrategy(String)
Parses a monster's strategy values out of a string.
Declaration
public static (byte closest, byte lowestHp, byte mostDmgDealt, byte random) ParseMonsterStrategy(string strategyStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | strategyStr | The string to parse. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Byte, System.Byte, System.Byte, System.Byte> | A tuple containing the monster strategy chances. |
ParsePhrases(String)
Parses a creature's phrases out of a string.
Declaration
public static IEnumerable<string> ParsePhrases(string phrasesStr)
Parameters
Type | Name | Description |
---|---|---|
System.String | phrasesStr | The string to parse. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | A collection of strings, the phrases of the creature. |