Added option groups for careers and adventuring companies. They will now be grouped by publication.

This commit is contained in:
Yord 2015-10-11 13:54:09 +02:00
parent 4adbf7641d
commit f56676ab56
4 changed files with 79 additions and 21 deletions

View file

@ -773,33 +773,30 @@ tags: [Version 0.2 beta]
<h2>Character Generator <span style="font-size:13px;vertical-align:super;color:#d24d33;">BETA</span></h2> <h2>Character Generator <!--span style="font-size:13px;vertical-align:super;color:#d24d33;">BETA</span--></h2>
<p> <p>
We always loved creating diverse characters for role playing games. We always loved creating diverse characters for role playing games.
And (maybe much like yours?) the vast of our characters remained concepts and were never played. And (maybe much like yours?) the vast of our characters remain concepts and are never played.
So when you are creating lots and lots of characters you need tools that make your life easier. So when you are creating lots and lots of characters you need tools that make your life easier.
This character generator is built to support you in exactly this task! This character generator is built to support you in exactly that!
</p> </p>
<p> <p>
It allows you to fill out parts of the character sheet automatically instead of typing them yourself which will save you time in e.g. deciding which career combinations you want to have. It allows you to fill out parts of the character sheet automatically instead of filling all values yourself (e.g. it will autofill weapons and spells) which saves you time.
However, it is not meant to be a full blown character manager which helps you with spending XP over the lifetime of your character. However, it is not meant to be a full blown character manager that would help you spending XP after character creation.
This is what makes it different from the Excel Generator also available for IKRPG, but at the same time this focus makes it much easier to maintain. Here it differs from the Excel Generator also available for IKRPG.
Although it is still in beta, a lot of its features already work and much more features will be available in future versions. This is not an oversight but a design choice which makes it much easier to maintain and extend the generator.
So what does the generator help you with right now? Here is a list of what the character generator does for you:
</p> </p>
<p> <p>
<ul> <ul>
<li>It automatically enters all values for the chosen races, castes, archetypes, careers, and adventuring companies</li> <li>It fills all values for the chosen races, castes, archetypes, careers, and adventuring companies</li>
<li>It automatically computes DEF, ARM, Initiative, Command Range, Willpower, MAT, P+S, RAT, and Skill totals</li> <li>It computes DEF, ARM, Initiative, Command Range, Willpower, MAT, P+S, RAT, and Skill totals</li>
<li>It automatically fills out spell, skill, ranged weapon, melee weapon, and worn armor data (we use the respective names from our index!)</li> <li>It gives you dropdown menus for ranged/melee weapons, skills, abilities/benefits, worn armor, spells, rune plates, and capacitors (we use the names from our index, so a Tharn Axe is an "Axe, Tharn")</li>
<li>It autocompletes Ranged Weapons, Melee Weapons, Skills, Abilities, Worn Armor, and Spells.</li> <li>It includes all races, castes, archetypes, careers, career options, and adventuring companies from the index</li>
<li>The beta only supports the entries of the FMF Core Rules</li>
</ul> </ul>
</p> </p>
<p> <p>
We plan to include all other books as well in the future, when the generator is better tested. Have fun creating your IKRPG characters!
More features and data will be provided in the future in our free time.
But in the meantime: Have fun creating your Full Metal Fantasy characters!
</p> </p>
<p> <p>
<strong>Beware:</strong> <strong>Beware:</strong>

View file

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
# 2015-10-10 v4 # 2015-10-10 v5
CACHE: CACHE:

View file

@ -157,7 +157,7 @@ tags: [ Version 4 ]
</p> </p>
<p> <p>
Additionally, we offer a <a href="/Character-Generator/">character generator</a> for the character sheets that you can use to quickly test your character ideas! Additionally, we offer a <a href="/Character-Generator/">character generator</a> for the character sheets that you can use to quickly test your character ideas!
It is still in beta but already includes a lot of features and all character data from the Full Metal Fantasy Core Rules. It includes all races, castes, archetypes, careers, career options, and adventuring companies from the index.
Have fun creating your IK characters! Have fun creating your IK characters!
</p> </p>

View file

@ -5450,9 +5450,70 @@ var ikrpg = ikrpg || {};
$.each(ikrpg.generator.races, addOption("#race-select")); $.each(ikrpg.generator.races, addOption("#race-select"));
$.each(ikrpg.generator.castes, addOption("#caste-select")); $.each(ikrpg.generator.castes, addOption("#caste-select"));
$.each(ikrpg.generator.archetypes, addOption("#archetype-select")); $.each(ikrpg.generator.archetypes, addOption("#archetype-select"));
$.each(ikrpg.generator.careers, addOption("#career1-select"));
$.each(ikrpg.generator.careers, addOption("#career2-select"));
$.each(ikrpg.generator.adventuringCompanies, addOption("#adventuring-company-select")); var index = ikrpg.index.data;
function addOptionsGroupedByPublication(selector, data, publications, category, subcategories) {
var groups = { "Other Publications": [] };
$.each(publications, function(i, publication) {
groups[publication] = [];
});
$.each(index, function(i, entry) {
if(entry.category == category && $.inArray(entry.subcategory, subcategories) > -1 && data.hasOwnProperty(entry.name)) {
if(groups.hasOwnProperty(entry.publication)) {
groups[entry.publication].push(entry.name);
} else {
groups["Other Publications"].push(entry.name);
}
}
});
var html = "";
$.each($.merge(publications, ["Other Publications"]), function(i, publication) {
if(groups[publication]) {
html += '\n<optgroup label="'+publication+':">';
$.each(groups[publication].sort(), function(key, entry) {
html += '\n<option value="'+entry+'">'+entry+'</option>';
});
html += '\n</optgroup>';
}
});
var old = $(selector).html();
$(selector).html(old + html);
}
addOptionsGroupedByPublication(
"#adventuring-company-select",
ikrpg.generator.adventuringCompanies,
["Core Rules", "Urban Adventure", "Kings, Nations, and Gods", "Unleashed Core Rules", "Skorne Empire"],
"Character Creation",
["Adventuring Company"]
);
addOptionsGroupedByPublication(
"#career1-select",
ikrpg.generator.careers,
["Core Rules", "Urban Adventure", "Kings, Nations, and Gods", "Unleashed Core Rules", "Skorne Empire"],
"Character Creation",
["Career", "Career Option"]
);
addOptionsGroupedByPublication(
"#career2-select",
ikrpg.generator.careers,
["Core Rules", "Urban Adventure", "Kings, Nations, and Gods", "Unleashed Core Rules", "Skorne Empire"],
"Character Creation",
["Career", "Career Option"]
);
//$.each(ikrpg.generator.careers, addOption("#career1-select"));
//$.each(ikrpg.generator.careers, addOption("#career2-select"));
//$.each(ikrpg.generator.adventuringCompanies, addOption("#adventuring-company-select"));
})(); })();