Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persona 5 randomizer improvements #1

Merged
merged 15 commits into from
Apr 24, 2021
383 changes: 202 additions & 181 deletions Dependencies/AtlusTableLib/AtlusTableLib.csproj

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Dependencies/AtlusTableLib/Persona5/AICalculationTable.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AtlusTableLib.Serialization;
using static AtlusTableLib.Persona5.Constants;

namespace AtlusTableLib.Persona5
{
[Table(Game.Persona5PS3JP, Game.Persona5PS3NA, Game.Persona5PS3EU, Game.Persona5PS4JP, Game.Persona5PS4NA, Game.Persona5PS4EU, Name = TABLE_NAME_ENCOUNT)]
public class AICalculationTable
{
[TableMember(TableMemberType.Segment, FixedArrayLength = UNIT_COUNT)]
public ElsAISegment1Entry[] Segment1 { get; set; }
}
}
13 changes: 13 additions & 0 deletions Dependencies/AtlusTableLib/Persona5/AffinityFlags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

namespace AtlusTableLib.Persona5
{
public enum AffinityFlags : ushort
{
None = 20,
Null = 256,
Repel = 512,
Drain = 1024,
Weak = 2048,
Strong = 4096,
}
}
17 changes: 15 additions & 2 deletions Dependencies/AtlusTableLib/Persona5/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,28 @@ public static class Constants
public const int ARCANA_COUNT = 32;

public const int SKILL_COUNT = 1000;
public const int SKILL_COUNT_REAL = 440;
public const int SKILL_COUNT_REAL = 800;

public const int ITEM_COUNT = 1000;
public const int ITEM_ACCESSORY_COUNT = 256;
public const int ITEM_ARMOR_COUNT = 301;
public const int ITEM_CONSUMABLE_COUNT = 512;
public const int ITEM_KEYITEM_COUNT = 256;
public const int ITEM_MATERIAL_COUNT = 256;
public const int ITEM_MELEEWEAPON_COUNT = 256;
public const int ITEM_OUTFIT_COUNT = 182;
public const int ITEM_SKILLCARD_COUNT = 387;
public const int ITEM_TREASURE_COUNT = 256;
public const int ITEM_RANGEDWEAPON_COUNT = 256;

public const int UNIT_COUNT = 351;
public const int UNIT_MAX_ANIM = 19;
public const int UNIT_MAX_SKILL = 8;

public const int PERSONA_COUNT = 463;
public const int PERSONA_COUNT = 464;
public const int PERSONA_MAX_ANIM = 6;
public const int PERSONA_MAX_SKILL = 16;
public const int PERSONA_PARTY_MAX_SKILL = 32;

public const int PARTY_COUNT = 11;
public const int PARTY_MAX_CRIT = 8;
Expand Down
17 changes: 17 additions & 0 deletions Dependencies/AtlusTableLib/Persona5/ElsAISegment1Entry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using AtlusTableLib.Serialization;
using static AtlusTableLib.Persona5.Constants;

namespace AtlusTableLib.Persona5
{
public struct ElsAISegment1Entry
{
[TableMember]
public ushort Field00 { get; set; }

[TableMember]
public ushort AiId { get; set; }

[TableMember(FixedArrayLength = 10)]
public int[] Unknown { get; set; }
}
}
11 changes: 11 additions & 0 deletions Dependencies/AtlusTableLib/Persona5/ElsAISegment2Entry.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using AtlusTableLib.Serialization;
using static AtlusTableLib.Persona5.Constants;

namespace AtlusTableLib.Persona5
{
public struct ElsAISegment2Entry
{
[TableMember(FixedArrayLength = 160)]
public ushort[] Data { get; set; }
}
}
15 changes: 9 additions & 6 deletions Dependencies/AtlusTableLib/Persona5/ElsaiTable.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AtlusTableLib.Serialization;
using static AtlusTableLib.Persona5.Constants;

namespace AtlusTableLib.Persona5
{
[Table(Game.Persona5PS3JP, Game.Persona5PS3NA, Game.Persona5PS3EU, Game.Persona5PS4JP, Game.Persona5PS4NA, Game.Persona5PS4EU, Name = TABLE_NAME_ENCOUNT)]
public class ElsaiTable
{
[TableMember(TableMemberType.Segment, FixedArrayLength = UNIT_COUNT)]
public ElsAISegment1Entry[] Segment1 { get; set; }

[TableMember(TableMemberType.Segment, FixedArrayLength = 931)]
public ElsAISegment2Entry[] Segment2 { get; set; }
}
}
}
Loading