8000 Improvement: Added Tooltips that Explain the Skill When Viewing a Person in the Personnel Tab or Purchasing/Improving Skills by IllianiBird · Pull Request #6839 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improvement: Added Tooltips that Explain the Skill When Viewing a Person in the Personnel Tab or Purchasing/Improving Skills #6839

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

Merged
merged 10 commits into from
May 7, 2025
Merged
75 changes: 63 additions & 12 deletions MekHQ/resources/mekhq/resources/SkillType.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ GunneryBattleArmor.flavorText=Used for gunnery skill checks while piloting Battl
GunneryProtoMek.flavorText=Used for gunnery skill checks while piloting a ProtoMek.
Artillery.flavorText=Used for gunnery skill checks with artillery weapons.
SmallArms.flavorText=Used for non-Battle Armor infantry gunnery skill checks.
AntiMek.flavorText=Used by infantry for Anti-Mek attacks. Also used in infantry piloting skill checks. Corresponds to\
AntiMekClimbing.flavorText=Used by infantry for Anti-Mek attacks. Also used in infantry piloting skill checks. Corresponds to\
\ the ATOW skill 'climbing.'
TechMek.flavorText=Used to repair and maintain 'Meks.
TechMechanic.flavorText=Used to repair and maintain Vehicles.
Expand All @@ -24,10 +24,10 @@ TechBattleArmor.flavorText=Used to repair and maintain Battle Armor.
TechVessel.flavorText=Used to repair and maintain Spacecraft, such as WarShips or DropShips.
Astech.flavorText=Required for the Astech role and grants eligibility for the Vehicle Crewmember role. Otherwise, no\
\ mechanical effects.
Doctor.flavorText=Used to heal injured personnel.
MedTech.flavorText=Required for the Medic role and grants eligibility for the Vehicle Crewmember role. Otherwise, no\
SurgeryAny.flavorText=Used to heal injured personnel.
MedTechAny.flavorText=Required for the Medic role and grants eligibility for the Vehicle Crewmember role. Otherwise, no\
\ mechanical effects.
HyperspaceNavigation.flavorText=Required for the Navigator role, otherwise no mechanical effects.
NavigationAny.flavorText=Required for the Navigator role, otherwise no mechanical effects.
Administration.flavorText=Used by the different Admin professions (see documentation). Depending on campaign options may\
\ also affect the number of patients a doctor can attend per day and how many minutes per day a tech has.
Negotiation.flavorText=Used by the different Admin professions (see documentation). Used by the campaign commander to\
Expand All @@ -36,7 +36,7 @@ Leadership.flavorText=May reduce Turnover target numbers (see documentation). Al
\ in additional units when deploying to a scenario (StratCon only).
Scrounge.flavorText=Deprecated and scheduled for removal.
Strategy.flavorText=Reduces the arrival time of reinforcements.
Tactics.flavorText=Depending on campaign options may increase Initiative rolls. Increases the number of additional infantry\
TacticsAny.flavorText=Depending on campaign options may increase Initiative rolls. Increases the number of additional infantry\
\ units (or minefields) that can be deployed to a scenario while in the Frontline combat role (StratCon Only). Increases\
\ the number of times scenario attributes (weather, map, etc.) can be rerolled (AtB & StratCon Only).
Acrobatics.flavorText=No mechanical effects.
Expand All @@ -48,8 +48,14 @@ ArtDancing.flavorText=No mechanical effects.
ArtDrawing.flavorText=No mechanical effects.
ArtPainting.flavorText=No mechanical effects.
ArtWriting.flavorText=No mechanical effects.
ArtPoetry.flavorText=No mechanical effects.
ArtCooking.flavorText=No mechanical effects.
ArtInstrument.flavorText=No mechanical effects.
ArtSculpture.flavorText=No mechanical effects.
ArtSinging.flavorText=No mechanical effects.
ArtOther.flavorText=Represents talent in an unspecified art. No mechanical effects.
Climbing.flavorText=Deprecated and scheduled for removal.
Communications.flavorText=Grants eligibility for the Vehicle Crewmember role. Otherwise, no mechanical effects.
CommunicationsAny.flavorText=Grants eligibility for the Vehicle Crewmember role. Otherwise, no mechanical effects.
Computers.flavorText=No mechanical effects.
Cryptography.flavorText=No mechanical effects.
Demolitions.flavorText=No mechanical effects.
Expand All @@ -60,22 +66,67 @@ InterestHistory.flavorText=No mechanical effects.
InterestLiterature.flavorText=No mechanical effects.
InterestHoloGames.flavorText=No mechanical effects.
InterestSports.flavorText=No mechanical effects.
InterestAntiques.flavorText=No mechanical effects.
InterestArcheology.flavorText=No mechanical effects.
InterestAstrology.flavorText=No mechanical effects.
InterestCartography.flavorText=No mechanical effects.
InterestEconomics.flavorText=No mechanical effects.
InterestExoticAnimals.flavorText=No mechanical effects.
InterestFashion.flavorText=No mechanical effects.
InterestFishing.flavorText=No mechanical effects.
InterestGambling.flavorText=No mechanical effects.
InterestHoloCinema.flavorText=No mechanical effects.
InterestMilitary.flavorText=No mechanical effects.
InterestMusic.flavorText=No mechanical effects.
InterestMythology.flavorText=No mechanical effects.
InterestPhilosophy.flavorText=No mechanical effects.
InterestPolitics.flavorText=No mechanical effects.
InterestPopCulture.flavorText=No mechanical effects.
InterestTheology.flavorText=No mechanical effects.
InterestOther.flavorText=Represents knowledge in an unspecified interest. No mechanical effects.
Interrogation.flavorText=No mechanical effects.
Investigation.flavorText=No mechanical effects.
Languages.flavorText=No mechanical effects.
LanguageAny.flavorText=No mechanical effects.
MartialArts.flavorText=No mechanical effects.
Perception.flavorText=No mechanical effects.
SleightofHand.flavorText=No mechanical effects.
Protocols.flavorText=No mechanical effects.
SleightofHandAny.flavorText=No mechanical effects.
ProtocolsAny.flavorText=No mechanical effects.
ScienceBiology.flavorText=No mechanical effects.
ScienceChemistry.flavorText=No mechanical effects.
ScienceMathematics.flavorText=No mechanical effects.
SciencePhysics.flavorText=No mechanical effects.
ScienceGenetics.flavorText=No mechanical effects.
ScienceGeology.flavorText=No mechanical effects.
ScienceMilitary.flavorText=No mechanical effects.
SciencePharmacology.flavorText=No mechanical effects.
SciencePsychology.flavorText=No mechanical effects.
ScienceXenobiology.flavorText=No mechanical effects.
ScienceOther.flavorText=Represents expertise in an unspecified scientific discipline. No mechanical effects.
SecuritySystemsElectronic.flavorText=No mechanical effects.
SecuritySystemsMechanical.flavorText=No mechanical effects.
SensorOperations.flavorText=Grants eligibility for the Vehicle Crewmember role. Otherwise, no mechanical effects.
Stealth.flavorText=No mechanical effects.
Streetwise.flavorText=No mechanical effects.
Survival.flavorText=No mechanical effects.
Tracking.flavorText=No mechanical effects.
StreetwiseAny.flavorText=No mechanical effects.
SurvivalAny.flavorText=No mechanical effects.
TrackingAny.flavorText=No mechanical effects.
Training.flavorText=No mechanical effects.
CareerAny.flavorText=No mechanical effects.
Running.flavorText=No mechanical effects.
Swimming.flavorText=No mechanical effects.
ZeroGOperations.flavorText=No mechanical effects.
Archery.flavorText=No mechanical effects.\
<br>\
<br>MegaMek handles combat at the Total Warfare scale where Small Arms largely handles weapon skills. However, we have\
\ included this specialized weapon skill to assist players tracking ATOW characters in MekHQ.
ThrownWeapons.flavorText=No mechanical effects.\
<br>\
<br>MegaMek handles combat at the Total Warfare scale where Small Arms largely handles weapon skills. However, we have\
\ included this specialized weapon skill to assist players tracking ATOW characters in MekHQ.
SupportWeapons.flavorText=No mechanical effects.\
<br>\
<br>MegaMek handles combat at the Total Warfare scale where Small Arms largely handles weapon skills. However, we have\
\ included this specialized weapon skill to assist players tracking ATOW characters in MekHQ.
MeleeWeapons.flavorText=No mechanical effects.\
<br>\
<br>MegaMek handles combat at the Total Warfare scale where Small Arms largely handles weapon skills. However, we have\
\ included this specialized weapon skill to assist players tracking ATOW characters in MekHQ.
25 changes: 25 additions & 0 deletions MekHQ/src/mekhq/campaign/personnel/skills/Attributes.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
*
* Catalyst Game Labs and the Catalyst Game Labs logo are trademarks of
* InMediaRes Productions, LLC.
*
* MechWarrior Copyright Microsoft Corporation. MekHQ was created under
* Microsoft's "Game Content Usage Rules"
* <https://www.xbox.com/en-US/developers/rules> and it is not endorsed by or
* affiliated with Microsoft.
*/
package mekhq.campaign.personnel.skills;

Expand All @@ -36,6 +41,7 @@
import static mekhq.campaign.personnel.PersonnelOptions.EXCEPTIONAL_ATTRIBUTE_STRENGTH;
import static mekhq.campaign.personnel.PersonnelOptions.EXCEPTIONAL_ATTRIBUTE_WILLPOWER;
import static mekhq.campaign.personnel.PersonnelOptions.MUTATION_FREAKISH_STRENGTH;
import static mekhq.campaign.personnel.skills.Skill.getIndividualAttributeModifier;

import java.io.PrintWriter;

Expand Down Expand Up @@ -204,6 +210,25 @@ public int getAttribute(SkillAttribute attribute) {
};
}

/**
* Calculates and returns the modifier for the specified skill attribute.
*
* <p>This method first retrieves the score for the given {@code attribute} by calling
* {@code getAttribute(attribute)}, and then computes the associated modifier using
* {@code getIndividualAttributeModifier(int attributeScore)}.</p>
*
* @param attribute the skill attribute for which the modifier is to be calculated
*
* @return the modifier value corresponding to the specified attribute
*
* @author Illiani
* @since 0.50.06
*/
public int getAttributeModifier(SkillAttribute attribute) {
int attributeScore = getAttribute(attribute);
return getIndividualAttributeModifier(attributeScore);
}

/**
* Retrieves the score for a given attribute.
*
Expand Down
Loading
Loading
0