From 72d56e6c23bbe24e79c84c3da732bb3f8075a0c0 Mon Sep 17 00:00:00 2001 From: Nikhil <12703092+patel-nikhil@users.noreply.github.com> Date: Sat, 20 Jun 2020 08:12:52 -0400 Subject: [PATCH] Updated FAQ (#608) * Updated AIV editor example video in FAQ * Converted faq to load q&a from json file for easy editing --- aic/detailed.html | 2 +- aic/field-values.html | 2 +- aic/overview.html | 2 +- aiv.html | 1 - assets/doc/faq.json | 38 +++++++++++++++++ assets/js/aic.js | 60 ++++++++++++++++++++++++++ assets/js/faq.js | 31 ++++++++++++++ assets/js/features.js | 32 ++++++++++++++ assets/js/index.js | 97 +------------------------------------------ contributing.html | 1 - faq.html | 94 ++++------------------------------------- features.html | 2 +- getting-started.html | 1 - index.html | 1 - 14 files changed, 174 insertions(+), 190 deletions(-) create mode 100644 assets/doc/faq.json create mode 100644 assets/js/aic.js create mode 100644 assets/js/faq.js create mode 100644 assets/js/features.js diff --git a/aic/detailed.html b/aic/detailed.html index 9cff4aa1..47e4791e 100644 --- a/aic/detailed.html +++ b/aic/detailed.html @@ -79,6 +79,6 @@

Description of AI Character Parameters

- + \ No newline at end of file diff --git a/aic/field-values.html b/aic/field-values.html index e6eb0ba2..0a920ed4 100644 --- a/aic/field-values.html +++ b/aic/field-values.html @@ -290,6 +290,6 @@
- + \ No newline at end of file diff --git a/aic/overview.html b/aic/overview.html index c8670d4b..b9f79cd6 100644 --- a/aic/overview.html +++ b/aic/overview.html @@ -159,6 +159,6 @@
Income
- + \ No newline at end of file diff --git a/aiv.html b/aiv.html index ff8aa94b..46d596e5 100644 --- a/aiv.html +++ b/aiv.html @@ -117,6 +117,5 @@
Customizing the AI's castles
- \ No newline at end of file diff --git a/assets/doc/faq.json b/assets/doc/faq.json new file mode 100644 index 00000000..dcc5e640 --- /dev/null +++ b/assets/doc/faq.json @@ -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.
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 <insert feature name> 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 link 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 AI Character Introduction for an overview on how to make your own AIs. For a video quickstart feel free to watch this tutorial made by Krarilotus

English:
SHC AI character design basics with UCP (ft wolfkiller rat)
" + }, + { + "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 AI Castle Introduction for a brief overview on how the game uses AI castles. For a video quickstart feel free to watch this tutorial made by Krarilotus.

English:
SHC AIV Editor setup, tips & tricks
" + } +] \ No newline at end of file diff --git a/assets/js/aic.js b/assets/js/aic.js new file mode 100644 index 00000000..001fdeea --- /dev/null +++ b/assets/js/aic.js @@ -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"); +}); \ No newline at end of file diff --git a/assets/js/faq.js b/assets/js/faq.js new file mode 100644 index 00000000..296be51d --- /dev/null +++ b/assets/js/faq.js @@ -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); + }) + }); +} \ No newline at end of file diff --git a/assets/js/features.js b/assets/js/features.js new file mode 100644 index 00000000..44ebc1cf --- /dev/null +++ b/assets/js/features.js @@ -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"); + } + }); \ No newline at end of file diff --git a/assets/js/index.js b/assets/js/index.js index e23f8cd1..21d126fe 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -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"); @@ -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"); -}); \ No newline at end of file +} \ No newline at end of file diff --git a/contributing.html b/contributing.html index 008b9e23..9039a3b3 100644 --- a/contributing.html +++ b/contributing.html @@ -241,6 +241,5 @@
Summary
- \ No newline at end of file diff --git a/faq.html b/faq.html index 05fe1757..3f97d98d 100644 --- a/faq.html +++ b/faq.html @@ -62,91 +62,13 @@

Unofficial Crusader Patch Latest Version: UCP 2.14

Frequently Asked Questions

-
-
Does this work in multiplayer?
-
-
- Yes, multiplayer works fine with the UCP installed as long as everyone playing has the same options selected.
- However, certain features such as changing Player 1's color or Activate Spectator Mode will cause crash or desync in multiplayer! -
-
- -
-
Can you change the map size?
-
-
- No we are not able to change it. Firefly isn`t able to change it either, without a big amount of work. -
-
- -
-
Can you include <insert feature name> feature?
-
-
- 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. -
-
- -
-
I'm a programmer how can I get involved?
-
-
- Look through the issues and find ideas you want to fix or implement. Follow this link to a getting started article for our codebase. -
-
- -
-
I'm not a programmer, is there any other way I can help?
-
-
- 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. -
-
- -
-
Am I allowed to modify this for personal use?
-
-
- Of course! -
-
- -
-
Where can I get community-developed AIs?
-
-
- There are a few bundled with the installer, or you can check out the content creation channel on our discord -
-
- -
-
Is there a tutorial on how to make my own AIs?
-
-
- There are a few, check out the AI Character Introduction for an overview on how to make your own AIs. - For a video quickstart feel free to watch this tutorial made by Krarilotus -

- English: -
- SHC AI character design basics with UCP (ft wolfkiller rat)
- -
-
- -
-
Is there a tutorial on how to make my own castles?
-
-
- There are many tutorials available on Youtube, and you can check out the AI Castle Introduction for a brief overview on how the game uses AI castles. - For a video quickstart feel free to watch this tutorial made by Krarilotus. -

- English: -
- SHC AIV Editor setup, tips & tricks
- +
+
+
Have any questions?
+
+
+ Visit the Unofficial Crusader Patch discord and ask away! +
@@ -159,6 +81,6 @@
Is there a tutorial on how to make my own castles?
- + \ No newline at end of file diff --git a/features.html b/features.html index 1065b181..f1ad0c95 100644 --- a/features.html +++ b/features.html @@ -610,6 +610,6 @@
Strongholdify
- + \ No newline at end of file diff --git a/getting-started.html b/getting-started.html index 96c2d85c..fc87f21c 100644 --- a/getting-started.html +++ b/getting-started.html @@ -434,7 +434,6 @@
Here you can select a starting resource configuration that will apply for - \ No newline at end of file diff --git a/index.html b/index.html index 26dd9424..ee0831cc 100644 --- a/index.html +++ b/index.html @@ -270,6 +270,5 @@

Suggestions and Contributing

- \ No newline at end of file