Skip to content

Commit b9190b1

Browse files
committed
Custom ShortHelp text for boosts.
1 parent 5e4f3c5 commit b9190b1

File tree

5 files changed

+68
-30
lines changed

5 files changed

+68
-30
lines changed

Inventor/BoostSetData.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class BoostType
2323
{
2424
public string displayName { get; set; }
2525
public string description;
26+
public string shortHelp;
2627
public List<List<AttribMod>> attribMods;
2728
}
2829

@@ -51,6 +52,7 @@ class Boost
5152
public string name;
5253
public string displayName;
5354
public string description;
55+
public string shortHelp;
5456
public List<BoostType> aspects;
5557
}
5658

@@ -346,7 +348,7 @@ public string GetPowers(Boost boost, bool attuned, string prefix, string catalyz
346348
s += "\tMinSlotLevel " + (minSlotLevel - 1) + Environment.NewLine;
347349
s += "\tBoostAlwaysCountForSet True" + Environment.NewLine;
348350
if (attuned) s += "\tBoostLicenseLevel 0" + Environment.NewLine;
349-
s += "\tDisplayShortHelp \"" + PString("Set: " + displayName) + "\"" + Environment.NewLine;
351+
s += "\tDisplayShortHelp \"" + PString(boost.shortHelp) + "\"" + Environment.NewLine;
350352
s += "\tDisplayHelp \"" + PString(boost.description) + "\"" + Environment.NewLine;
351353
s += "\tIconName \"" + iconName + "\"" + Environment.NewLine;
352354
s += "\tTimeToConfirm 0" + Environment.NewLine + Environment.NewLine;

Inventor/Form1.Designer.cs

Lines changed: 43 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Inventor/Form1.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ private void boostLetter_TextChanged(object sender, EventArgs e)
233233
boostLetter.Text = boost.letter;
234234
boostName.Text = boost.name;
235235
boostDisplayName.Text = boost.displayName;
236+
boostShortHelp.Text = boost.shortHelp;
236237
boostAspectList.Items.Clear();
237238
if (boost.aspects != null) foreach (BoostType type in boost.aspects) boostAspectList.Items.Add(type);
238239
boostDescription.Text = boost.description;
@@ -242,15 +243,19 @@ private void boostLetter_TextChanged(object sender, EventArgs e)
242243
private void UpdateAspectList()
243244
{
244245
string boostList = String.Empty;
245-
string boostDescriptionList = String.Empty;
246+
string descriptionList = String.Empty;
247+
string shortHelpList = string.Empty;
246248
foreach (BoostType type in boostAspectList.Items)
247249
{
248250
boostList += type.displayName + "/";
249-
boostDescriptionList += type.description + " ";
251+
shortHelpList += type.shortHelp + ", ";
252+
descriptionList += type.description + " ";
250253
}
251254
if (boostList.EndsWith("/")) boostList = boostList.Substring(0, boostList.Length - 1);
255+
if (shortHelpList.EndsWith(", ")) shortHelpList = shortHelpList.Substring(0, shortHelpList.Length - 2);
252256
boostDisplayName.Text = boostList;
253-
boostDescription.Text = boostDescriptionList;
257+
boostShortHelp.Text = shortHelpList;
258+
boostDescription.Text = descriptionList;
254259
}
255260

256261
private void boostAddAspect_Click(object sender, EventArgs e)
@@ -271,9 +276,10 @@ private void boostAddNew_Click(object sender, EventArgs e)
271276

272277
boost.letter = boostLetter.Text.ToUpper();
273278
boost.name = boostName.Text.Trim();
274-
boost.displayName = boostDisplayName.Text.Trim();
275-
boost.description = boostDescription.Text.Trim();
276-
boost.aspects = new List<BoostType>();
279+
boost.displayName = boostDisplayName.Text.Trim();
280+
boost.description = boostDescription.Text.Trim();
281+
boost.shortHelp = boostShortHelp.Text.Trim();
282+
boost.aspects = new List<BoostType>();
277283
foreach (BoostType type in boostAspectList.Items) boost.aspects.Add(type);
278284

279285
// Rebuild the Enhancements list to keep it sorted and prevent duplicate letters.

Inventor/Resources/BoostTypes.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"displayName": "Accuracy",
44
"description": "Enhances accuracy by {Boost.Attrib.Accuracy.Scale}%.",
5+
"shortHelp": "+ACC",
56
"attribMods": [
67
[
78
{
@@ -40,6 +41,7 @@
4041
{
4142
"displayName": "Damage",
4243
"description": "Enhances damage by {Boost.Attrib.Damage.Scale}%.",
44+
"shortHelp": "+DMG",
4345
"attribMods": [
4446
[
4547
{
@@ -246,6 +248,7 @@
246248
{
247249
"displayName": "Endurance",
248250
"description": "Reduces endurance cost by {Boost.Attrib.Endurance.Scale}%.",
251+
"shortHelp": "-End Cost",
249252
"attribMods": [
250253
[
251254
{
@@ -284,6 +287,7 @@
284287
{
285288
"displayName": "Knockback",
286289
"description": "Increases knockback distance by {Boost.Attrib.Knockback.Scale}%.",
290+
"shortHelp": "+Knockback",
287291
"attribMods": [
288292
[
289293
{
@@ -346,6 +350,7 @@
346350
{
347351
"displayName": "Recharge",
348352
"description": "Increases recharge rate by {Boost.Attrib.Recharge.Scale}%.",
353+
"shortHelp": "+Rech",
349354
"attribMods": [
350355
[
351356
{
@@ -384,6 +389,7 @@
384389
{
385390
"displayName": "Knockback to Knockdown",
386391
"description": "Converts any Knockback this power deals into Knockdown. Some powers may have their chance to Knockdown reduced when this enhancement is slotted.",
392+
"shortHelp": "-Knockback",
387393
"attribMods": [
388394
[
389395
{

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
# Inventor
1+
Inventor
2+
========
23

34
This tool can create and edit Invention Sets in a format that the game client can read,
45
and will also generate recipe and enhancement thumbnail images to go with them.
56

6-
# Usage
7+
Usage
8+
-----
79

810
When you start the program, it will dump its configuration files to the "config" folder.
911
This is not very elegant and will be changed in the future, but it is a quick and dirty

0 commit comments

Comments
 (0)