1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Fixed [WIP] Officers do not spend Ability points

Discussion in 'Bug Archive' started by Jason, Oct 4, 2016.

  1. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    I quite like the AI armour. Mostly it's leather jerkins and sometimes leather cuirasses, which are worth next to nothing as loot but help make my crew tougher, so the whole lot goes into the weapons locker. I've seen the occasional cheap cuirass, the very occasional battle cuirass, and nobody with gold armour - which is just as well, that ought to be out of reach of random AI characters so that storyline and special quest characters can be made special. If this mod goes into general circulation and battle armour is available to general AI's, I'm half inclined to upgrade the Dark Teacher, the big boss bad guy near the end of "Strange Things Going On in the Archipelago", to use gold armour instead of the battle armour he uses now. (Which itself was an upgrade on my part some time ago, to make him more formidable - before I got to him, he was a wimp and you could kill him with one swipe from any half-decent weapon.)
     
    Tingyun and Pieter Boelen like this.
  2. Tingyun

    Tingyun Corsair Storm Modder

    Joined:
    Aug 8, 2016
    Messages:
    1,445
    Gender:
    Male
    @Grey Roger Thanks for that. :) Yes, gold armor is never possible before the AI enemy is level 31, and only even reaches a 1% chance at level 36. It maxes out at 2% for enemies above level 51, which presumably would be the highest level navy captains. Battle armor is a 1% chance at level 21, and maxes out at 17% at above level 51. Leather jerkins dominate the reasonable level enemies (ie, not high level navy). Armor is equiped to about 1/3 of enemies of the lowest level, with chance increasing as level gets higher.

    I would be very happy to have you make any adjustments you deem wise to the armor system, if for example when you play more you don't like how armor behaves at a certain level range (it is defined for every 5 level increment). You have a great deal more playing experience than I do, and can capture the proper feel better, and I won't be around for awhile anyway. :) For example, I made the decision to make the gorget rare, and the full leather cuirass less common, as they seemed likely to be less used in this time period compared to the leather jerkin and cheap cuirass (which are the respective staples of low level and high level enemies). That could of course be changed if your historical knowledge or playing experience indicates otherwise.

    The table is in LAi_equip, and very simple to make adjustments to for any given level range. I will include it below in a spoiler, so you can see all the chances for each level range. It is basically a dungeons and dragons equipment table.


    Did it this way because we need to run it on a different function than just rarity--it really needs to be tailored to the level of the enemy and carefully balanced against the types of armor that should be appearing in those groups.

    //TY adding below code to give armor to AI enemies characters, AD&D equipment table style. Balanced together with the weapon changes which should reduce AI damage dealing in the higher levels.
    float armorroll = frnd()
    if(isWeapons)
    {
    if(!CheckAttribute(chr,"isIndian"))
    {
    if(rank >= 1 && rank <= 10)
    { if (armorroll < 0.3)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.3 && armorroll < 0.34)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.34 && armorroll < 0.35)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.35 && armorroll < 0.36)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 11 && rank <= 15)
    { if (armorroll < 0.3)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.3 && armorroll < 0.4)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.4 && armorroll < 0.46)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.46 && armorroll < 0.47)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 16 && rank <= 20)
    { if (armorroll < 0.4)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.4 && armorroll < 0.5)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.5 && armorroll < 0.65)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.65 && armorroll < 0.66)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 21 && rank <= 25)
    { if (armorroll < 0.4)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.4 && armorroll < 0.47)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.47 && armorroll < 0.67)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.67 && armorroll < 0.68)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.68 && armorroll < 0.69)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 26 && rank <= 30)
    { if (armorroll < 0.35)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.35 && armorroll < 0.45)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.45 && armorroll < 0.75)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.75 && armorroll < 0.79)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.79 && armorroll < 0.80)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 31 && rank <= 35)
    { if (armorroll < 0.35)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.35 && armorroll < 0.45)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.45 && armorroll < 0.75)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.75 && armorroll < 0.81)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.81 && armorroll < 0.814)
    {
    GiveItem2Character(chr, "goldarmor");
    EquipCharacterByItem(chr, "goldarmor");
    }
    if (armorroll >= 0.814 && armorroll < 0.82)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 36 && rank <= 40)
    { if (armorroll < 0.35)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.35 && armorroll < 0.45)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.45 && armorroll < 0.75)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.75 && armorroll < 0.85)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.85 && armorroll < 0.86)
    {
    GiveItem2Character(chr, "goldarmor");
    EquipCharacterByItem(chr, "goldarmor");
    }
    if (armorroll >= 0.86 && armorroll < 0.87)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 41 && rank <= 45)
    { if (armorroll < 0.35)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.35 && armorroll < 0.45)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.45 && armorroll < 0.75)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.75 && armorroll < 0.88)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.88 && armorroll < 0.89)
    {
    GiveItem2Character(chr, "goldarmor");
    EquipCharacterByItem(chr, "goldarmor");
    }
    if (armorroll >= 0.89 && armorroll < 0.90)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 46 && rank <= 50)
    { if (armorroll < 0.25)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.25 && armorroll < 0.35)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.35 && armorroll < 0.75)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.75 && armorroll < 0.88)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.88 && armorroll < 0.89)
    {
    GiveItem2Character(chr, "goldarmor");
    EquipCharacterByItem(chr, "goldarmor");
    }
    if (armorroll >= 0.89 && armorroll < 0.90)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    if(rank >= 51)
    { if (armorroll < 0.2)
    {
    GiveItem2Character(chr, "jerkin");
    EquipCharacterByItem(chr, "jerkin");
    }
    if (armorroll >= 0.2 && armorroll < 0.27)
    {
    GiveItem2Character(chr, "cured");
    EquipCharacterByItem(chr, "cured");
    }
    if (armorroll >= 0.27 && armorroll < 0.80)
    {
    GiveItem2Character(chr, "cheaparmor");
    EquipCharacterByItem(chr, "cheaparmor");
    }
    if (armorroll >= 0.80 && armorroll < 0.97)
    {
    GiveItem2Character(chr, "commonarmor");
    EquipCharacterByItem(chr, "commonarmor");
    }
    if (armorroll >= 0.97 && armorroll < 0.99)
    {
    GiveItem2Character(chr, "goldarmor");
    EquipCharacterByItem(chr, "goldarmor");
    }
    if (armorroll >= 0.99 && armorroll < 0.995)
    {
    GiveItem2Character(chr, "gorget");
    EquipCharacterByItem(chr, "gorget");
    }
    }
    }
    }
     
  3. Cassadar

    Cassadar .apples{display:none;} Storm Modder

    Joined:
    May 31, 2013
    Messages:
    284
    Occupation:
    being a rough and grumpy person
    Okay, here's what I did:
    Went to Tortuga and made Mary Wood my companion. Like my officers her list was devided in contributing and non-contributing stuff and she was able to learn everything of the former, but nothing of the latter. I generally believe now, that something was forgotten here. And to correct myself: it was Musket Volley my bosun was able to learn, not Landing Party. I believe my brain wasn't functioning anymore.

    I wonder now if a companion would be able to execute a fire drill on his/her own ship; Mary Wood wasn't able to learn that.

    Nothing more to say here, but at least this time I've got a tiny error.log with 4 lines:
    Code:
    RUNTIME ERROR - file: Characters\perks\perks.c; line: 751
    missed attribute: officertype
    RUNTIME ERROR - file: Characters\perks\perks.c; line: 751
    no rAP data
    Apparently not intended then; case closed.
     
    Last edited: Oct 5, 2016
    Pieter Boelen and Tingyun like this.
  4. Levis

    Levis Find(Rum) = false; Staff Member Programmer Creative Support Storm Modder

    Joined:
    Oct 6, 2013
    Messages:
    6,705
    Gender:
    Male
    Occupation:
    ICT
    Location:
    University Twente (Netherlands)
    Okay so the problem is you can't allocate non-contributing perks to officers? That's an easy fix probably. Going to fix some bugs again tonight (hopefully) so please let me know if there was more than this issue.
     
    Pieter Boelen likes this.
  5. Levis

    Levis Find(Rum) = false; Staff Member Programmer Creative Support Storm Modder

    Joined:
    Oct 6, 2013
    Messages:
    6,705
    Gender:
    Male
    Occupation:
    ICT
    Location:
    University Twente (Netherlands)

Share This Page