Welcome to IOPWiki, Commander.
We are searching for new editors to keep track of Girls' Frontline 2 content, as well as veteran players to complete the data of Girls' Frontline and Project Neural Cloud characters.
You can contribute without an account. Learn how to contribute and join our Discord server.

Widget:chibiCommander: Difference between revisions

Welcome to IOP Wiki. This website is maintained by the Girls' Frontline community and is free to edit by anyone.
Jump to navigation Jump to search
Different loading order
Using colorkey for naming
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><script>
<includeonly><script>
function initSelects(resourcesUl) {
var resources = {};
var parts = resourcesUl;
parts.children('li').each(function() {
var part = $(this);
part.typ = part.contents().get(0).nodeValue.trim();
part.costumes = {};
part.children('ul').children('li').each(function() {
var costumeLi = $(this);
var costume = {};
costumeLi.children('ul').children('li').each(function() {
var dataLi = $(this);
var paramFull = dataLi.contents().get(0).nodeValue.trim();
if (paramFull === "colors") {
dataLi.children('ul').children('li').each(function() {
var colorLi = $(this);
costume.colors = costume.colors || [];
var colorLink = colorLi.children('a').first().attr('href');
var colorLinkParts = colorLink.split('/');
costume.colors.push(colorLinkParts[colorLinkParts.length-1]);
});
} else {
var paramName = paramFull.split(":")[0];
var paramLink = dataLi.children('a').first().attr('href');
var paramLinkParts = paramLink.split('/');
costume[paramName] = paramLinkParts[paramLinkParts.length-1];
}
});
costume.costumeId = costumeLi.contents().get(0).nodeValue.trim();
part.costumes[costume.costumeId] = costume;
});
resources[part.typ] = part;
});
for (var partKey in resources) {
var part = resources[partKey];
for (var costumeKey in part.costumes) {
var costume = part.costumes[costumeKey];
for (var colorKey in costume.colors) {
var color = costume.colors[colorKey];
var colName = "(" + colorKey + ")";
$('.commander-sim-option.' + part.typ).append($('<option>', {
value: costume.skel + ";" + costume.atlas + ";" + color,
text: costume.costumeId + " " + colName
}));
}
}
}
}
RLQ.push(['jquery', function () {
RLQ.push(['jquery', function () {
   $(document).ready(function() {
   $(document).ready(function() {
Line 7: Line 67:
       window.animations.PIXILoader.init().then(function() {
       window.animations.PIXILoader.init().then(function() {
           // Let's make sure the correct values are shown
           // Let's make sure the correct values are shown
          initSelects($('.commander-chibi-controls-panel-resources>ul'));
           $('.commander-sim-option').first().change();
           $('.commander-sim-option').first().change();
         }, function(x,y,z) {
         }, function(x,y,z) {
Line 32: Line 93:
<div class="commander-chibi-controls-panel">
<div class="commander-chibi-controls-panel">
                       <label class="commander-sim-option-label head">Head:
                       <label class="commander-sim-option-label head">Head:
<select class="gf-droplist commander-sim-option head" autocomplete="off">
<select class="gf-droplist commander-sim-option head" autocomplete="off"></select>
<option selected value="Commander_Initial_m_head_chibi_skel.skel;Commander_Initial_m_head_chibi_atlas.txt;Commander_Initial_m_head_chibi_spritemap.png">Default (m)</option>
<option value="Commander_Fury_Fantasy_female_head_chibi_skel.skel;Commander_Fury_Fantasy_female_head_chibi_atlas.txt;Commander_Fury_Fantasy_female_head_color_N_chibi_spritemap.png">Fury Fantasy (f) (Default)</option>
<option value="Commander_Fury_Fantasy_female_head_chibi_skel.skel;Commander_Fury_Fantasy_female_head_chibi_atlas.txt;Commander_Fury_Fantasy_female_head_color_0_chibi_spritemap.png">Fury Fantasy (f) 0</option>
<option value="Commander_Fury_Fantasy_female_head_chibi_skel.skel;Commander_Fury_Fantasy_female_head_chibi_atlas.txt;Commander_Fury_Fantasy_female_head_color_1_chibi_spritemap.png">Fury Fantasy (f) 1</option>
<option value="Commander_Fury_Fantasy_female_head_chibi_skel.skel;Commander_Fury_Fantasy_female_head_chibi_atlas.txt;Commander_Fury_Fantasy_female_head_color_2_chibi_spritemap.png">Fury Fantasy (f) 2</option>
<option value="Commander_Fury_Fantasy_female_head_chibi_skel.skel;Commander_Fury_Fantasy_female_head_chibi_atlas.txt;Commander_Fury_Fantasy_female_head_color_3_chibi_spritemap.png">Fury Fantasy (f) 3</option>
<option value="Commander_Fury_Fantasy_female_head_chibi_skel.skel;Commander_Fury_Fantasy_female_head_chibi_atlas.txt;Commander_Fury_Fantasy_female_head_color_4_chibi_spritemap.png">Fury Fantasy (f) 4</option>
</select>
                       </label>
                       </label>
                       <label class="commander-sim-option-label body">Body:
                       <label class="commander-sim-option-label body">Body:
<select class="gf-droplist commander-sim-option body" autocomplete="off">
<select class="gf-droplist commander-sim-option body" autocomplete="off"></select>
<option selected value="Commander_Initial_m_body_chibi_skel.skel;Commander_Initial_m_body_chibi_atlas.txt;Commander_Initial_m_body_chibi_spritemap.png">Default (m)</option>
<option value="Commander_Fury_Fantasy_female_body_chibi_skel.skel;Commander_Fury_Fantasy_female_body_chibi_atlas.txt;Commander_Fury_Fantasy_female_body_color_N_chibi_spritemap.png">Fury Fantasy (f) (Default)</option>
<option value="Commander_Fury_Fantasy_female_body_chibi_skel.skel;Commander_Fury_Fantasy_female_body_chibi_atlas.txt;Commander_Fury_Fantasy_female_body_color_0_chibi_spritemap.png">Fury Fantasy (f) 0</option>
<option value="Commander_Fury_Fantasy_female_body_chibi_skel.skel;Commander_Fury_Fantasy_female_body_chibi_atlas.txt;Commander_Fury_Fantasy_female_body_color_1_chibi_spritemap.png">Fury Fantasy (f) 1</option>
<option value="Commander_Fury_Fantasy_female_body_chibi_skel.skel;Commander_Fury_Fantasy_female_body_chibi_atlas.txt;Commander_Fury_Fantasy_female_body_color_2_chibi_spritemap.png">Fury Fantasy (f) 2</option>
<option value="Commander_Fury_Fantasy_female_body_chibi_skel.skel;Commander_Fury_Fantasy_female_body_chibi_atlas.txt;Commander_Fury_Fantasy_female_body_color_3_chibi_spritemap.png">Fury Fantasy (f) 3</option>
<option value="Commander_Fury_Fantasy_female_body_chibi_skel.skel;Commander_Fury_Fantasy_female_body_chibi_atlas.txt;Commander_Fury_Fantasy_female_body_color_4_chibi_spritemap.png">Fury Fantasy (f) 4</option>
</select>
                       </label>
                       </label>
                       <label class="commander-sim-option-label feet">Feet:
                       <label class="commander-sim-option-label feet">Feet:
<select class="gf-droplist commander-sim-option feet" autocomplete="off">
<select class="gf-droplist commander-sim-option feet" autocomplete="off"></select>
<option selected value="Commander_Initial_m_feet_chibi_skel.skel;Commander_Initial_m_feet_chibi_atlas.txt;Commander_Initial_m_feet_chibi_spritemap.png">Default (m)</option>
                      </label>
<option value="Commander_Fury_Fantasy_female_feet_chibi_skel.skel;Commander_Fury_Fantasy_female_feet_chibi_atlas.txt;Commander_Fury_Fantasy_female_feet_color_N_chibi_spritemap.png">Fury Fantasy (f) (Default)</option>
<option value="Commander_Fury_Fantasy_female_feet_chibi_skel.skel;Commander_Fury_Fantasy_female_feet_chibi_atlas.txt;Commander_Fury_Fantasy_female_feet_color_0_chibi_spritemap.png">Fury Fantasy (f) 0</option>
<option value="Commander_Fury_Fantasy_female_feet_chibi_skel.skel;Commander_Fury_Fantasy_female_feet_chibi_atlas.txt;Commander_Fury_Fantasy_female_feet_color_1_chibi_spritemap.png">Fury Fantasy (f) 1</option>
<option value="Commander_Fury_Fantasy_female_feet_chibi_skel.skel;Commander_Fury_Fantasy_female_feet_chibi_atlas.txt;Commander_Fury_Fantasy_female_feet_color_2_chibi_spritemap.png">Fury Fantasy (f) 2</option>
<option value="Commander_Fury_Fantasy_female_feet_chibi_skel.skel;Commander_Fury_Fantasy_female_feet_chibi_atlas.txt;Commander_Fury_Fantasy_female_feet_color_3_chibi_spritemap.png">Fury Fantasy (f) 3</option>
<option value="Commander_Fury_Fantasy_female_feet_chibi_skel.skel;Commander_Fury_Fantasy_female_feet_chibi_atlas.txt;Commander_Fury_Fantasy_female_feet_color_4_chibi_spritemap.png">Fury Fantasy (f) 4</option>
</select>
</div></includeonly><noinclude>{{#widget:chibiCommander}}</noinclude>
</div></includeonly><noinclude>{{#widget:chibiCommander}}</noinclude>

Latest revision as of 14:40, 28 November 2019