Crew Members cannot be equipped or obtained #669

Closed
opened 2024-12-30 11:13:42 -08:00 by Lead-V · 3 comments
Lead-V commented 2024-12-30 11:13:42 -08:00 (Migrated from github.com)
No description provided.
  "CrewMembers": [
	{
      "ItemType": "/Lotus/Types/Game/CrewShip/CrewMember/ArbitersCrewMemberGeneratorMediumVersionTwo",
      "NemesisFingerprint": 0,
      "Seed": 41721635238767290,
      "HireDate": 0,
      "AssignedRole": 4,
      "SkillEfficiency": {
        "PILOTING": {
          "Assigned": 5
        },
        "GUNNERY": {
          "Assigned": 5
        },
        "ENGINEERING": {
          "Assigned": 5
        },
        "COMBAT": {
          "Assigned": 5
        },
        "SURVIVABILITY": {
          "Assigned": 5
        }
      },
      "WeaponConfigIdx": 1,
      "WeaponId": {
        "$oid": "65a777d9d00b836339f6d1cd"
      },
      "XP": 9999981,
      "PowersuitType": "/Lotus/Powersuits/NpcPowersuits/CrewMemberMaleSuit",
      "Configs": [
        {
          "Upgrades": [],
          "PvpUpgrades": [],
          "Skins": [],
          "pricol": [],
          "attcol": [],
          "sigcol": [],
          "eyecol": [],
          "facial": [],
          "Songs": [],
          "AbilityOverride": {
            "Ability": "",
            "Index": 0
          }
        },
        {
          "AbilityOverride": {
            "Ability": "",
            "Index": 0
          }
        },
        {
          "AbilityOverride": {
            "Ability": "",
            "Index": 0
          }
        }
      ],
      "_id": {
        "$oid": "65bf30817895ccee222a3ca1"
      }
    }
  ],

CrewMembers template.
Just can't equip it for use yet.

``` "CrewMembers": [ { "ItemType": "/Lotus/Types/Game/CrewShip/CrewMember/ArbitersCrewMemberGeneratorMediumVersionTwo", "NemesisFingerprint": 0, "Seed": 41721635238767290, "HireDate": 0, "AssignedRole": 4, "SkillEfficiency": { "PILOTING": { "Assigned": 5 }, "GUNNERY": { "Assigned": 5 }, "ENGINEERING": { "Assigned": 5 }, "COMBAT": { "Assigned": 5 }, "SURVIVABILITY": { "Assigned": 5 } }, "WeaponConfigIdx": 1, "WeaponId": { "$oid": "65a777d9d00b836339f6d1cd" }, "XP": 9999981, "PowersuitType": "/Lotus/Powersuits/NpcPowersuits/CrewMemberMaleSuit", "Configs": [ { "Upgrades": [], "PvpUpgrades": [], "Skins": [], "pricol": [], "attcol": [], "sigcol": [], "eyecol": [], "facial": [], "Songs": [], "AbilityOverride": { "Ability": "", "Index": 0 } }, { "AbilityOverride": { "Ability": "", "Index": 0 } }, { "AbilityOverride": { "Ability": "", "Index": 0 } } ], "_id": { "$oid": "65bf30817895ccee222a3ca1" } } ], ``` CrewMembers template. Just can't equip it for use yet.

The crew members bought from Ticker have some stats generated based on the LocTagRandSeed. I think this should be a decently accurate replication of that:

// skillPointsToAssign is 12, 10, or 8 depending on the generator (strong, medium, or default)
const getCrewMemberSkills = (seed: bigint, skillPointsToAssign: number): Record<string, number> => {
    const rng = new SRng((0x33b81en << 32n) | seed);

    const skills = ["PILOTING", "GUNNERY", "ENGINEERING", "COMBAT", "SURVIVABILITY"];
    for (let i = 1; i != 5; ++i) {
        const swapIndex = rng.randomInt(0, i);
        if (swapIndex != i) {
            const tmp = skills[i];
            skills[i] = skills[swapIndex];
            skills[swapIndex] = tmp;
        }
    }

    rng.randomFloat(); // unused afaict

    const skillAssignments = [0, 0, 0, 0, 0];
    for (let skill = 0; skillPointsToAssign; skill = (skill + 1) % 5) {
        const maxIncrease = Math.min(5 - skillAssignments[skill], skillPointsToAssign);
        const increase = rng.randomInt(0, maxIncrease);
        skillAssignments[skill] += increase;
        skillPointsToAssign -= increase;
    }

    skillAssignments.sort((a, b) => b - a);

    const combined: Record<string, number> = {};
    for (let i = 0; i != 5; ++i) {
        combined[skills[i]] = skillAssignments[i];
    }
    return combined;
};

console.log(getCrewMemberSkills(4185144421n, 12)); // 5 Piloting, 4 Gunnery, 3 Engineering
console.log(getCrewMemberSkills(3890380934n, 10)); // 5 Endurance, 4 Engineering, 1 Gunnery
console.log(getCrewMemberSkills(356717213n, 8)); // 5 Engineering, 2 Endurance, 1 Gunnery
console.log(getCrewMemberSkills(1969797050n, 8)); // 5 Gunnery, 3 Combat
The crew members bought from Ticker have some stats generated based on the `LocTagRandSeed`. I think this should be a decently accurate replication of that: ```ts // skillPointsToAssign is 12, 10, or 8 depending on the generator (strong, medium, or default) const getCrewMemberSkills = (seed: bigint, skillPointsToAssign: number): Record<string, number> => { const rng = new SRng((0x33b81en << 32n) | seed); const skills = ["PILOTING", "GUNNERY", "ENGINEERING", "COMBAT", "SURVIVABILITY"]; for (let i = 1; i != 5; ++i) { const swapIndex = rng.randomInt(0, i); if (swapIndex != i) { const tmp = skills[i]; skills[i] = skills[swapIndex]; skills[swapIndex] = tmp; } } rng.randomFloat(); // unused afaict const skillAssignments = [0, 0, 0, 0, 0]; for (let skill = 0; skillPointsToAssign; skill = (skill + 1) % 5) { const maxIncrease = Math.min(5 - skillAssignments[skill], skillPointsToAssign); const increase = rng.randomInt(0, maxIncrease); skillAssignments[skill] += increase; skillPointsToAssign -= increase; } skillAssignments.sort((a, b) => b - a); const combined: Record<string, number> = {}; for (let i = 0; i != 5; ++i) { combined[skills[i]] = skillAssignments[i]; } return combined; }; console.log(getCrewMemberSkills(4185144421n, 12)); // 5 Piloting, 4 Gunnery, 3 Engineering console.log(getCrewMemberSkills(3890380934n, 10)); // 5 Endurance, 4 Engineering, 1 Gunnery console.log(getCrewMemberSkills(356717213n, 8)); // 5 Engineering, 2 Endurance, 1 Gunnery console.log(getCrewMemberSkills(1969797050n, 8)); // 5 Gunnery, 3 Combat ```
Sainan added the
pr'd for
label 2025-04-17 13:03:09 -07:00

Equipping crew members would have to be handled with the loadout save re #467

Equipping crew members would have to be handled with the loadout save re #467
Sign in to join this conversation.
No description provided.