-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
289 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
using Lumina.Data; | ||
using Lumina.Excel; | ||
using Lobby = Lumina.Excel.GeneratedSheets.Lobby; | ||
using Lumina.Excel.Sheets; | ||
using VfxEditor.Utils; | ||
|
||
namespace VfxEditor.Data.Excel { | ||
// https://github.com/ktisis-tools/Ktisis/blob/748922b02395ef9a700e3fe446f2fa2d6db0a63f/Ktisis/Data/Excel/CharaMakeCustomize.cs | ||
|
||
[Sheet( "CharaMakeCustomize" )] | ||
public class CharaMakeCustomize : ExcelRow { | ||
public byte FeatureId { get; private set; } | ||
public uint Icon { get; private set; } | ||
public ushort Data { get; private set; } | ||
public bool IsPurchasable { get; private set; } | ||
public LazyRow<Lobby> Hint { get; private set; } = null!; | ||
public byte FaceType { get; private set; } | ||
public struct CharaMakeCustomize( uint row ) : IExcelRow<CharaMakeCustomize> { | ||
public readonly uint RowId => row; | ||
|
||
public override void PopulateData( RowParser parser, Lumina.GameData gameData, Language language ) { | ||
base.PopulateData( parser, gameData, language ); | ||
public string Name { get; set; } = ""; | ||
|
||
FeatureId = parser.ReadColumn<byte>( 0 ); | ||
Icon = parser.ReadColumn<uint>( 1 ); | ||
Data = parser.ReadColumn<ushort>( 2 ); | ||
IsPurchasable = parser.ReadColumn<bool>( 3 ); | ||
Hint = new LazyRow<Lobby>( gameData, parser.ReadColumn<uint>( 4 ), language ); | ||
FaceType = parser.ReadColumn<byte>( 6 ); | ||
public byte FeatureId { get; set; } | ||
public uint Icon { get; set; } | ||
public ushort Data { get; set; } | ||
public bool IsPurchasable { get; set; } | ||
public RowRef<Lobby> Hint { get; set; } | ||
public byte FaceType { get; set; } | ||
|
||
static CharaMakeCustomize IExcelRow<CharaMakeCustomize>.Create( ExcelPage page, uint offset, uint row ) { | ||
return new CharaMakeCustomize( row ) { | ||
FeatureId = page.ReadColumn<byte>( 0, offset ), | ||
Icon = page.ReadColumn<uint>( 1, offset ), | ||
Data = page.ReadColumn<ushort>( 2, offset ), | ||
IsPurchasable = page.ReadColumn<bool>( 3, offset ), | ||
Hint = page.ReadRowRef<Lobby>( 4, offset ), | ||
FaceType = page.ReadColumn<byte>( 6, offset ) | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,40 @@ | ||
using Lumina.Data; | ||
using Lumina.Excel; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using VfxEditor.Utils; | ||
|
||
namespace VfxEditor.Data.Excel { | ||
[Sheet( "HairMakeType" )] | ||
public class HairMakeType : ExcelRow { | ||
private const uint HAIR_LENGTH = 100; | ||
private const uint FACEPAINT_LENGTH = 50; | ||
public struct HairMakeType( uint row ) : IExcelRow<HairMakeType> { | ||
public readonly uint RowId => row; | ||
|
||
public uint HairStartIndex { get; set; } | ||
public uint FacepaintStartIndex { get; set; } | ||
// Properties | ||
|
||
public List<LazyRow<CharaMakeCustomize>> HairStyles { get; set; } = []; | ||
public List<LazyRow<CharaMakeCustomize>> Facepaints { get; set; } = []; | ||
public const uint HairLength = 100; | ||
public const uint FacepaintLength = 50; | ||
|
||
public override void PopulateData( RowParser parser, Lumina.GameData gameData, Language language ) { | ||
base.PopulateData( parser, gameData, language ); | ||
public uint HairStartIndex { get; set; } // 66 | ||
public uint FacepaintStartIndex { get; set; } // 82 | ||
|
||
HairStartIndex = parser.ReadColumn<uint>( 66 ); | ||
FacepaintStartIndex = parser.ReadColumn<uint>( 82 ); | ||
public List<RowRef<CharaMakeCustomize>> HairStyles { get; set; } | ||
public List<RowRef<CharaMakeCustomize>> Facepaints { get; set; } | ||
|
||
for( var i = HairStartIndex; i < HairStartIndex + HAIR_LENGTH; i++ ) HairStyles.Add( new LazyRow<CharaMakeCustomize>( gameData, i, language ) ); | ||
for( var i = FacepaintStartIndex; i < FacepaintStartIndex + FACEPAINT_LENGTH; i++ ) Facepaints.Add( new LazyRow<CharaMakeCustomize>( gameData, i, language ) ); | ||
// Build sheet | ||
|
||
static HairMakeType IExcelRow<HairMakeType>.Create( ExcelPage page, uint offset, uint row ) { | ||
var hairStartIndex = page.ReadColumn<uint>( 66, offset ); | ||
var facePaintStartIndex = page.ReadColumn<uint>( 82, offset ); | ||
return new HairMakeType( row ) { | ||
HairStartIndex = hairStartIndex, | ||
FacepaintStartIndex = facePaintStartIndex, | ||
HairStyles = GetRange( page, hairStartIndex, HairLength ).ToList(), | ||
Facepaints = GetRange( page, facePaintStartIndex, FacepaintLength ).ToList() | ||
}; | ||
} | ||
|
||
private static IEnumerable<RowRef<CharaMakeCustomize>> GetRange( ExcelPage page, uint start, uint length ) { | ||
for( var i = start; i < start + length; i++ ) | ||
yield return new RowRef<CharaMakeCustomize>( page.Module, i, page.Language ); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.