Skip to content

Commit

Permalink
[0.7.6.14] STABLE. 13 Reduce enemy limits. Fix ch12 bulwarker spawn a…
Browse files Browse the repository at this point in the history
…nd syphax fight. LR Add DLC option. Reduce equipment and adornment pools in shops. Allow for duplicate equipment
  • Loading branch information
Bartz24 committed Jan 7, 2024
1 parent e8c5d15 commit 83328fb
Show file tree
Hide file tree
Showing 17 changed files with 202 additions and 170 deletions.
2 changes: 1 addition & 1 deletion FF13Rando/Randomizers/BattleRando.cs
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ private int GetMaxCountAllowed()
{
0 => 0,
1 => 0,
2 => 40,
2 => 36,
_ => 16,
};
}
Expand Down
4 changes: 2 additions & 2 deletions FF13Rando/bin/build/FF13RandomizerPreview.7z
Git LFS file not shown
19 changes: 8 additions & 11 deletions FF13Rando/bin/data/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
0.7.5 Changelog:
-Added TP border rando
-Added run speed multiplier
-Added equipment stat and passive rando
-Added new CP cost options and overall CP cost multiplier
-Replaced quit game text with softlock text
-Improved item location documentation
-Fixed Ch 2 looping
-Fixed Ch 10 enemy rando crash
-Fixed incorrect item names
-Pressing enter to save custom presets is possible now
0.7.6 Changelog:
-Added a new shortcut to return to the Lindblum to get out of previously softlocking areas (L3+R3+R1)
-Fixed softlock/freeze when selecting Quit to title
-New enemy rando system. Base option will also replace enemies on the field 1-to-1 for the area. Additional options are available to randomize enemies individually
-Mission enemies can now be unique rather than pulling a random enemy from the area
-Moved enemies which can hover to their own pool (uhlans, chonchons, etc)
-Improved load and save times
-Various enemy rando crash fixes
110 changes: 55 additions & 55 deletions FF13Rando/bin/data/charasets.csv
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
ID,Limit
chset_z016_def,44
chset_z016_defd,44
chset_z016_def0,44
chset_z016_def2,44
chset_z016_defh,44
chset_z016_def5,44
chset_z016_def7,44
chset_z016_defe,44
chset_z016_def8,44
chset_z016_def9,44
chset_z016_def,36
chset_z016_defd,36
chset_z016_def0,36
chset_z016_def2,36
chset_z016_defh,36
chset_z016_def5,36
chset_z016_def7,36
chset_z016_defe,36
chset_z016_def8,36
chset_z016_def9,36
chset_z017_def1,16
chset_z017_def3,16
chset_z017_def4,16
chset_z017_def2,44
chset_z017_def5,44
chset_z002def_0,44
chset_z017_def2,36
chset_z017_def5,36
chset_z002def_0,36
chset_z002def_1,20
chset_z002def_2,44
chset_z002def_2,36
chset_z002def_3,24
chset_z002def_5,44
chset_z002def_5,36
chset_z002def_6,24
chset_z002chpt,44
chset_z004_def0,44
chset_z002chpt,36
chset_z004_def0,36
chset_z004_def1,32
chset_z004_def4,44
chset_z004_def6,44
chset_z004_def4,36
chset_z004_def6,36
chset_z004_def5,32
chset_z004_def7,44
chset_z015_140,44
chset_z004_def7,36
chset_z015_140,36
chset_z015_160,32
chset_z015_200,32
chset_z015_300,32
chset_z015_400,32
chset_z015_500,32
chset_z015_700,32
chset_z010_def,32
chset_z010_def2,32
chset_z010_def,24
chset_z010_def2,24
chset_z008_def,24
chset_z008_c012,24
chset_z008_c014,24
chset_z008_c020,24
chset_z008_c030,24
chset_z008_c060,44
chset_z008_c060,36
chset_z008_c075,32
chset_z008_c100,44
chset_z008_c130,44
chset_z008_c150,44
chset_z008_c192,44
chset_z008_c100,36
chset_z008_c130,36
chset_z008_c150,36
chset_z008_c192,36
chset_z006_tok,20
chset_z006_tok2,20
chset_z003_e070,20
Expand Down Expand Up @@ -83,12 +83,12 @@ chset_z029_def2,20
chset_z029_def3,24
chset_z021_ev2,24
chset_z021_def2,24
chset_z023_de6b,48
chset_z023_def6,48
chset_z023_de1b,48
chset_z023_def1,48
chset_z023_de8b,48
chset_z023_def8,48
chset_z023_de6b,36
chset_z023_def6,36
chset_z023_de1b,36
chset_z023_def1,36
chset_z023_de8b,36
chset_z023_def8,36
chset_z022_def1,24
chset_z022_a021,24
chset_z022_def8,24
Expand All @@ -108,30 +108,30 @@ chset_z020_def2,24
chset_z020_def3,24
chset_z020_def4,24
chset_z020_def5,24
chset_z023_def4,48
chset_z023_a031,48
chset_z023_def2,48
chset_z023_def4,36
chset_z023_a031,36
chset_z023_def2,36
chset_z023_def3,24
chset_z022_def2,24
chset_z022_def7,24
chset_z022_def6,24
chset_z030_b2,48
chset_z030_b4,48
chset_z030_b5b,48
chset_z030_b8,48
chset_z030_b9f,48
chset_z030_b7,48
chset_z030_b9c,48
chset_z030_b9a,48
chset_z030_b6a,48
chset_z030_b5c,48
chset_z030_b9d,48
chset_z030_b9b,48
chset_z030_b3,48
chset_z030_b5a,48
chset_z030_b6b,48
chset_z030_b9e,48
chset_z030_b9g,48
chset_z023_a018,48
chset_z030_b2,36
chset_z030_b4,36
chset_z030_b5b,36
chset_z030_b8,36
chset_z030_b9f,36
chset_z030_b7,36
chset_z030_b9c,36
chset_z030_b9a,36
chset_z030_b6a,36
chset_z030_b5c,36
chset_z030_b9d,36
chset_z030_b9b,36
chset_z030_b3,36
chset_z030_b5a,36
chset_z030_b6b,36
chset_z030_b9e,36
chset_z030_b9g,36
chset_z023_a018,36
chset_z020_def6,24
chset_z020_def7,24
6 changes: 3 additions & 3 deletions FF13Rando/bin/data/enemies.csv
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ m109,Nelapsi,Flying,10,
m110,Pijavica,Flying,14,
m111,Varcolaci,Flying,9,
m115,Uhlan,SmallHover,5,
m116,Bulwarker,SmallHover,18,
m116,Bulwarker,SmallHover,18,19
m117,Ciconia Velocycle,Flying,4,
m118,Milvus Velocycle,Flying,5,
m119,Falco Velocycle,Flying,5,
Expand Down Expand Up @@ -145,13 +145,13 @@ m213,Svarog,LargeHover,14,
m214,Circuitron,,5,
m215,Cryohedron,,10,
m216,Juggernaut,,25,
m222,Syphax,Ignore,26,
m222,Syphax,Ignore,26,22
m229,PSICOM Bombardier,,5,
m230,PSICOM Destroyer,,6,
m231,Sanctum Celebrant,,18,
m235,Bandersnatch,,24,
m236,Jabberwocky,,24,
m241,Numidia,SmallHover,14,
m241,Numidia,SmallHover,14,22
m242,Wladislaus,,24,
m243,Lodestar Behemoth,,6,
m250,Sacrifice,,20,
Expand Down
Binary file modified FF13Rando/bin/data/modpack/modconfig.ini
Binary file not shown.
Binary file modified FF13Rando/bin/data/modpack/readme.txt
Binary file not shown.
10 changes: 9 additions & 1 deletion LRRando/Data/LRFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public class Items
public static Flag Treasures;
public static Flag Shops;
public static Flag CoPReqs;
public static ToggleFlagProperty EPMissable, IDCardBuy, KeyPlaceTreasure, KeyPlaceQuest, KeyPlaceCoP, KeyPlaceGrindy, KeyPlaceSuperboss, ReplaceAny;
public static ToggleFlagProperty EPMissable, IDCardBuy, KeyPlaceTreasure, KeyPlaceQuest, KeyPlaceCoP, KeyPlaceGrindy, KeyPlaceSuperboss, ReplaceAny, IncludeDLCItems;
public static ComboBoxFlagProperty KeyDepth;
public static DictListBoxFlagProperty<string> KeyItems;
public static NumberFlagProperty ReplaceRank;
Expand Down Expand Up @@ -412,6 +412,14 @@ internal static void Init()
Description = "Allow 'Junk' items (consumables, weapons, shields, garbs, accessories, and materials) to be replaced by items of other types.\n" +
"Ex: Potions can be replaced with Bronze Malistones."
}.Register(Treasures);

IncludeDLCItems = new ToggleFlagProperty()
{
Text = "Include DLC Items",
ID = "IncludeDLC",
Description = "Include DLC equipment and adornments in the item pool.\n" +
"Note: Be sure to also enable the DLC content in the in-game settings menu."
}.Register(Treasures);
}
}
public class Other
Expand Down
7 changes: 6 additions & 1 deletion LRRando/Randomizers/EquipRando.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ public override void Load()
itemData.Values.Where(i => i.OverrideBuyGil != -1).ForEach(i => items[i.ID].uPurchasePrice = i.OverrideBuyGil);
itemData.Values.Where(i => i.OverrideBuyEP != -1).ForEach(i => items[i.ID].uGpCost = i.OverrideBuyEP * 1000);

RemainingEquip = itemData.Values.Where(i => (i.Category == "Weapon" || i.Category == "Shield" || i.Category == "Garb" || i.Category == "Accessory") && !i.Traits.Contains("Key")).Select(i => i.ID).ToList();
RemainingEquip = itemData.Values.Where(i => (i.Category == "Weapon" || i.Category == "Shield" || i.Category == "Garb" || i.Category == "Accessory") && !i.Traits.Contains("Key")).Select(i => i.ID).ToList();
RemainingAdorn = itemData.Values.Where(i => i.Category == "Adornment" && !i.Traits.Contains("Remove")).Select(i => i.ID).ToList();
if (!LRFlags.Items.IncludeDLCItems.Enabled)
{
RemainingEquip.RemoveAll(i => itemData[i].Traits.Contains("DLC"));
RemainingAdorn.RemoveAll(i => itemData[i].Traits.Contains("DLC"));
}
}
public override void Randomize()
{
Expand Down
60 changes: 42 additions & 18 deletions LRRando/Randomizers/ShopRando.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,33 +85,31 @@ shopsOrig[k].u3Category is ((int)ShopCategory.Ark) or ((int)ShopCategory.Items)
shopsOrig.Values.Where(s => s.u3Category == (int)ShopCategory.Libra && shopsDict.ContainsKey(s.name)).ForEach(s => shopsDict[s.name].Add("mat_cus_0_0" + n));
}

foreach (string equip in equipRando.RemainingEquip)
foreach (string equip in equipRando.RemainingEquip.Where(a => equipRando.itemData[a].Category != "Accessory").ToList())
{
string next = shopsDict.Keys.Where(k => shopsDict[k].Count < 32 && IsValid(equip, (ShopCategory)shopsOrig[k].u3Category)).Shuffle().First();
shopsDict[next].Add(equip);
string unique = uniqueShops.Keys.Where(k => next.StartsWith(k)).FirstOrDefault();
if (!string.IsNullOrEmpty(unique))
{
uniqueShops[unique].Add(equip);
}
AddToRandomShop(uniqueShops, shopsDict, equip, true);
equipRando.RemainingEquip.Remove(equip);
}

foreach (string adorn in equipRando.RemainingAdorn)
foreach (string equip in equipRando.RemainingEquip.Shuffle().Take((int)(equipRando.RemainingEquip.Count * 0.4)))
{
string next = shopsDict.Keys.Where(k => shopsDict[k].Count < 32 && IsValid(adorn, (ShopCategory)shopsOrig[k].u3Category)).Shuffle().First();
shopsDict[next].Add(adorn);
string unique = uniqueShops.Keys.Where(k => next.StartsWith(k)).FirstOrDefault();
if (!string.IsNullOrEmpty(unique))
{
uniqueShops[unique].Add(adorn);
}
AddToRandomShop(uniqueShops, shopsDict, equip, true);
}

foreach (string adorn in equipRando.RemainingAdorn.Where(a => equipRando.itemData[a].Traits.Contains("Always")).ToList())
{
AddToRandomShop(uniqueShops, shopsDict, adorn);
equipRando.RemainingAdorn.Remove(adorn);
}

foreach (string adorn in equipRando.RemainingAdorn.Shuffle().Take((int)(equipRando.RemainingAdorn.Count * 0.2)))
{
AddToRandomShop(uniqueShops, shopsDict, adorn);
}

Randomizers.SetUIProgress("Randomizing Shop Data...", 70, 100);

List<string> possibleItems = new();
possibleItems.AddRange(equipRando.RemainingEquip);
possibleItems.AddRange(equipRando.RemainingAdorn);
possibleItems.AddRange(equipRando.itemData.Values.Where(i => i.Category == "Item").Select(i => i.ID));
foreach (string shop in shopsDict.Keys.Shuffle().OrderBy(s => s != "shop_ptl_pt00"))
{
Expand Down Expand Up @@ -159,6 +157,32 @@ shopsOrig[k].u3Category is ((int)ShopCategory.Ark) or ((int)ShopCategory.Items)

RandomNum.ClearRand();
}

void AddToRandomShop(Dictionary<string, List<string>> uniqueShops, Dictionary<string, List<string>> shopsDict, string equip, bool multiple = false)
{
// Get the next shop to add to
string next = shopsDict.Keys.Where(k => shopsDict[k].Count < 32 && IsValid(equip, (ShopCategory)shopsOrig[k].u3Category) && !shopsDict[k].Contains(equip)).Shuffle().FirstOrDefault();

if (next == null)
{
return;
}

// Add to random shop
shopsDict[next].Add(equip);

// Add to unique shop if this is a unique shop
string unique = uniqueShops.Keys.Where(k => next.StartsWith(k)).FirstOrDefault();
if (!string.IsNullOrEmpty(unique))
{
uniqueShops[unique].Add(equip);
}
// Otherwise, have a chance to add to another shop
else if (multiple && RandomNum.RandInt(0, 99) < 60)
{
AddToRandomShop(uniqueShops, shopsDict, equip, true);
}
}
}

private bool IsValid(string item, ShopCategory shop)
Expand Down
4 changes: 2 additions & 2 deletions LRRando/bin/build/LRRandomizerPreview.7z
Git LFS file not shown
14 changes: 6 additions & 8 deletions LRRando/bin/data/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
0.7.5 Changelog:
-Added random equipment upgrading, available from the start
-Added all upgrade materials to shops and reduced their prices
-Improved equipment stat rando
-Improved selection of key items and bosses for randomization
-Reverted Final Day Sets fight to vanilla to avoid softlock
-Fixed Saint's Crux softlock
-Pressing enter to save custom presets is possible now
0.7.6 Changelog:
-Added junk item range and category swap flags
-Changed gil and EP prices for items
-Reduced the adornment pool to avoid clutter
-Added upgrade materials to the pool
-Added an option to include DLC equipment in the pool
Loading

0 comments on commit 83328fb

Please sign in to comment.