Skip to content

Commit

Permalink
Updated FAQ (#608)
Browse files Browse the repository at this point in the history
* Updated AIV editor example video in FAQ

* Converted faq to load q&a from json file for easy editing
  • Loading branch information
patel-nikhil authored Jun 20, 2020
1 parent 7cdb065 commit 72d56e6
Show file tree
Hide file tree
Showing 14 changed files with 174 additions and 190 deletions.
2 changes: 1 addition & 1 deletion aic/detailed.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ <h4 class="text-center">Description of AI Character Parameters</h4>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="../assets/js/index.js"></script>
<script src="../assets/js/aic.js"></script>

</html>
2 changes: 1 addition & 1 deletion aic/field-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,6 @@ <h5 class="mb-0">
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="../assets/js/index.js"></script>
<script src="../assets/js/aic.js"></script>

</html>
2 changes: 1 addition & 1 deletion aic/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ <h5>Income</h5>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="../assets/js/index.js"></script>
<script src="../assets/js/aic.js"></script>

</html>
1 change: 0 additions & 1 deletion aiv.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,5 @@ <h5>Customizing the AI's castles</h5>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="assets/js/index.js"></script>

</html>
38 changes: 38 additions & 0 deletions assets/doc/faq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"question":"Does this work in multiplayer?",
"answer":"Yes, multiplayer works fine with the UCP installed as long as everyone playing has the same options selected.<br>However, certain features such as changing Player 1's color or Activate Spectator Mode will cause crash or desync in multiplayer!"
},
{
"question":"Can you change the map size?",
"answer":"No we are not able to change it. Firefly isn`t able to change it either, without a big amount of work."
},
{
"question":"Can you include <i>&lt;insert feature name&gt;</i> feature?",
"answer":"Search in the issue section, and if it hasn't been asked, ask away. If a developer likes the idea they may look into it, no promises though."
},
{
"question":"I'm a programmer how can I get involved?",
"answer":"Look through the issues and find ideas you want to fix or implement. Follow this <a href=\"contributing.html\">link</a> to a getting started article for our codebase."
},
{
"question":"I'm not a programmer, is there any other way I can help?",
"answer":"Testers are always welcome. Let us know in discord if you want to test. If you follow this github repository you will get an alert when someone submits new code to be used. See what the code is supposed to do, ask for an installer, and test the changes in game to ensure it works as intended."
},
{
"question":"Am I allowed to modify this for personal use?",
"answer":"Of course!"
},
{
"question":"Where can I get community-developed AIs?",
"answer":"There are a few bundled with the installer, or you can check out the content creation channel on our discord"
},
{
"question":"Is there a tutorial on how to make my own AIs?",
"answer":"There are a few, check out the <a href=\"aic/overview.html\">AI Character Introduction</a> for an overview on how to make your own AIs. For a video quickstart feel free to watch this tutorial made by Krarilotus<br><br>English:<br><b>SHC AI character design basics with UCP (ft wolfkiller rat)</b><br><iframe width=\"900\" height=\"500\" src=\"https://www.youtube.com/embed/8WgSMmWNzvQ\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
},
{
"question":"Is there a tutorial on how to make my own castles?",
"answer":"There are many tutorials available on Youtube, and you can check out the <a href=\"aiv/overview.html\">AI Castle Introduction</a> for a brief overview on how the game uses AI castles. For a video quickstart feel free to watch this tutorial made by Krarilotus.<br><br>English:<br><b>SHC AIV Editor setup, tips & tricks</b><br><iframe width=\"900\" height=\"500\" src=\"https://www.youtube.com/embed/xKEmaIit8vE\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"
}
]
60 changes: 60 additions & 0 deletions assets/js/aic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
$(".list-group-item").on("click", function() {
$(".list-group-item").removeClass("active");
$(this).addClass("active");
});

$(function(){
$("#aic-table").load("aic-description.html");
});

$(function(){
$("#aic-popularity").load("res/popularity.html");
});

$(function(){
$("#aic-taxes").load("res/taxes.html");
});

$(function(){
$("#aic-food").load("res/food.html");
});

$(function(){
$("#aic-farms").load("res/farms.html");
});

$(function(){
$("#aic-buildings").load("res/buildings.html");
});

$(function(){
$("#aic-build-efficiency").load("res/build-efficiency.html");
});

$(function(){
$("#aic-resource-management").load("res/resource-management.html");
});

$(function(){
$("#aic-weapons").load("res/weapons.html");
});

$(function(){
$("#aic-recruiting").load("res/recruiting.html");
});

$(function(){
$("#aic-attacking").load("res/attacking.html");
});

$(function(){
$("#aic-attack-siege").load("res/attack-siege.html");
});

$(function(){
$("#aic-defense").load("res/defense.html");
});

$(function(){
$("#aic-uncategorized").load("res/uncategorized.html");
});
31 changes: 31 additions & 0 deletions assets/js/faq.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
window.onload = function(e){
$.getJSON("assets/doc/faq.json", function(data){
var faq = document.getElementById('faq-alt');
faq.classList.add('d-none');

var faq = document.getElementById('faq-content');
var items = []
$.each( data, function( index, item ) {
let question = document.createElement('div');
question.classList.add('card');
question.classList.add('faq-question');

let header = document.createElement('h5');
header.innerHTML = item['question'];

let divider = document.createElement('hr');
divider.classList.add('faq-question-divider');

let answer = document.createElement('div');
answer.classList.add('card-body');
answer.classList.add('faq-question-body');
answer.innerHTML = item['answer'];

question.appendChild(header);
question.appendChild(divider);
question.appendChild(answer);

faq.appendChild(question);
})
});
}
32 changes: 32 additions & 0 deletions assets/js/features.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$(document).on('click', '.feature-filter', function (e) {
e.stopPropagation();

if ($("#feature-filter-bugfix")[0].checked != true){
$("#feature-bugfix-header").addClass("d-none");
$(".row.feature-bugfix").addClass("d-none");
} else {
$("#feature-bugfix-header").removeClass("d-none");
$(".row.feature-bugfix").removeClass("d-none");
}
if ($("#feature-filter-ai")[0].checked != true){
$("#feature-ai-header").addClass("d-none");
$(".row.feature-ai").addClass("d-none");
} else {
$("#feature-ai-header").removeClass("d-none");
$(".row.feature-ai").removeClass("d-none");
}
if ($("#feature-filter-unit")[0].checked != true){
$("#feature-unit-header").addClass("d-none");
$(".row.feature-unit").addClass("d-none");
} else {
$("#feature-unit-header").removeClass("d-none");
$(".row.feature-unit").removeClass("d-none");
}
if ($("#feature-filter-misc")[0].checked != true){
$("#feature-misc-header").addClass("d-none");
$(".row.feature-misc").addClass("d-none");
} else {
$("#feature-misc-header").removeClass("d-none");
$(".row.feature-misc").removeClass("d-none");
}
});
97 changes: 1 addition & 96 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,6 @@
// }, 500);
// });

$(".list-group-item").on("click", function() {
$(".list-group-item").removeClass("active");
$(this).addClass("active");
});

$(document).on('click', '.feature-filter', function (e) {
e.stopPropagation();
console.log("test");
if ($("#feature-filter-bugfix")[0].checked != true){
$("#feature-bugfix-header").addClass("d-none");
$(".row.feature-bugfix").addClass("d-none");
} else {
$("#feature-bugfix-header").removeClass("d-none");
$(".row.feature-bugfix").removeClass("d-none");
}
if ($("#feature-filter-ai")[0].checked != true){
$("#feature-ai-header").addClass("d-none");
$(".row.feature-ai").addClass("d-none");
} else {
$("#feature-ai-header").removeClass("d-none");
$(".row.feature-ai").removeClass("d-none");
}
if ($("#feature-filter-unit")[0].checked != true){
$("#feature-unit-header").addClass("d-none");
$(".row.feature-unit").addClass("d-none");
} else {
$("#feature-unit-header").removeClass("d-none");
$(".row.feature-unit").removeClass("d-none");
}
if ($("#feature-filter-misc")[0].checked != true){
$("#feature-misc-header").addClass("d-none");
$(".row.feature-misc").addClass("d-none");
} else {
$("#feature-misc-header").removeClass("d-none");
$(".row.feature-misc").removeClass("d-none");
}
});



// var aicFieldList = $.getJSON("res/fields.json");
Expand Down Expand Up @@ -81,61 +43,4 @@ function download(data, filename, type) {
window.URL.revokeObjectURL(url);
}, 0);
}
}


$(function(){
$("#aic-table").load("aic-description.html");
});

$(function(){
$("#aic-popularity").load("res/popularity.html");
});

$(function(){
$("#aic-taxes").load("res/taxes.html");
});

$(function(){
$("#aic-food").load("res/food.html");
});

$(function(){
$("#aic-farms").load("res/farms.html");
});

$(function(){
$("#aic-buildings").load("res/buildings.html");
});

$(function(){
$("#aic-build-efficiency").load("res/build-efficiency.html");
});

$(function(){
$("#aic-resource-management").load("res/resource-management.html");
});

$(function(){
$("#aic-weapons").load("res/weapons.html");
});

$(function(){
$("#aic-recruiting").load("res/recruiting.html");
});

$(function(){
$("#aic-attacking").load("res/attacking.html");
});

$(function(){
$("#aic-attack-siege").load("res/attack-siege.html");
});

$(function(){
$("#aic-defense").load("res/defense.html");
});

$(function(){
$("#aic-uncategorized").load("res/uncategorized.html");
});
}
1 change: 0 additions & 1 deletion contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,5 @@ <h5>Summary</h5>
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="assets/js/index.js"></script>

</html>
Loading

0 comments on commit 72d56e6

Please sign in to comment.