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

Collection of War Stories skillbook proportional skill gain fix #15281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ababishka
Copy link

Collection of War Stories skillbook always adds 2 or less weapon skill regardless of the character's weapon skill and the quality of the skillbook.

securityofficer_talent_items.xml

<Item name="" identifier="skillbook_warstories" aliases="skillbooksubmarinewarfare_warstories" scale="0.5" cargocontaineridentifier="metalcrate" allowasextracargo="true" category="Misc" Tags="smallitem,skillbook" maxstacksize="8" impactsoundtag="impact_soft">
  <PreferredContainer primary="crewcab"/>
  <Price baseprice="200" sold="false" />
  <InventoryIcon texture="Content/Items/JobGear/TalentGear.png" sourcerect="476,295,35,52" origin="0.5,0.5" />
  <Sprite texture="Content/Items/JobGear/TalentGear.png" sourcerect="455,257,31,37" depth="0.6" origin="0.5,0.5" />
  <Body width="28" height="36" density="20" />
  <Holdable slots="Any,RightHand+LeftHand" aimable="false" aimpos="40,-20" handle1="5,0" aimangle="260" swingamount="0,3" swingspeed="0.5" swingwhenaiming="true" msg="ItemMsgPickUpSelect">
    <StatusEffect type="OnSecondaryUse" target="This" Condition="-10" />
    <StatusEffect type="OnSecondaryUse" target="This,Character" disabledeltatime="true" checkconditionalalways="true" comparison="And">
      <Conditional Condition="lte 0" />
      <!-- Normal quality -->
      <Conditional Quality="eq 0" />
      <GiveSkill skillidentifier="weapons" amount="180" triggertalents="false" proportional="true" proportionalmaxamount="3" AlwayShowNotification="true" />
      <RemoveItem />
    </StatusEffect>
    <StatusEffect type="OnSecondaryUse" target="This,Character" disabledeltatime="true" checkconditionalalways="true" comparison="And">
      <Conditional Condition="lte 0" />
      <!-- Good quality -->
      <Conditional Quality="eq 1" />
      <GiveSkill skillidentifier="weapons" amount="360" triggertalents="false" proportional="true" proportionalmaxamount="6" AlwayShowNotification="true" />
      <RemoveItem />
    </StatusEffect>
    <StatusEffect type="OnSecondaryUse" target="This,Character" disabledeltatime="true" checkconditionalalways="true" comparison="And">
      <Conditional Condition="lte 0" />
      <!-- Excellent quality -->
      <Conditional Quality="eq 2" />
      <GiveSkill skillidentifier="weapons" amount="720" triggertalents="false" proportional="true" proportionalmaxamount="12" AlwayShowNotification="true" />
      <RemoveItem />
    </StatusEffect>
    <StatusEffect type="OnSecondaryUse" target="This,Character" disabledeltatime="true" checkconditionalalways="true" comparison="And">
      <Conditional Condition="lte 0" />
      <!-- Masterwork quality -->
      <Conditional Quality="eq 3" />
      <GiveSkill skillidentifier="weapons" amount="1440" triggertalents="false" proportional="true" proportionalmaxamount="24" AlwayShowNotification="true" />
      <RemoveItem />
    </StatusEffect>
  </Holdable>
  <Quality>
    <QualityStat stattype="Condition" value="0.1" />
  </Quality>
</Item>

Copy link
Collaborator

@Regalis11 Regalis11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! I have to admit I don't quite understand the change: what is the intention here (why do you want it to always give 2 or less skill)?

@@ -396,6 +400,7 @@ public GiveSkill(ContentXElement element, string parentDebugName)
TriggerTalents = element.GetAttributeBool(nameof(TriggerTalents), true);
UseDeltaTime = element.GetAttributeBool(nameof(UseDeltaTime), false);
Proportional = element.GetAttributeBool(nameof(Proportional), false);
ProportionalMaxAmount = element.GetAttributeFloat(nameof(ProportionalMaxAmount), 2);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will cause backwards compatibility problems, because the value defaults to 2 (when previously there was no limit). Items that used to give more than 2 proportional skill will now only give up to 2.

@Regalis11 Regalis11 added Need more info Insufficient information to resolve the issue (e.g. steps to reproduce a bug) Code Programming task Design Design-related task labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Programming task Design Design-related task Need more info Insufficient information to resolve the issue (e.g. steps to reproduce a bug)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants