KFNEXUS / KFNEXUS.github.io

GNU Lesser General Public License v3.0
3 stars 6 forks source link

Mission Database #26

Open CrazyVulcan opened 7 years ago

CrazyVulcan commented 7 years ago

When I play Attack Wing I mostly like using the custom missions that come with each ship or most of the time the OP events that are provided by Wizkids. As it is if I want to build a fleet for one I need the mission cards to look at or go online to Wizkids and look up the pdf of that op. And I can only plan for missions that I have the ships to as finding them online is difficult and time-consuming. I have been thinking of adding a 3rd app for Utopia where all the available missions are listed and are easy to access.

It will take me some time but I already have my plan on how to execute it. Just like the builder and set viewer there will be the Utopia logo and links to the set viewer and builder. Then just like the set viewer there will list all of the missions starting with the OP events and then each mission title sorted by faction. This will require me to write a new JSON file as I don't want to bog down the current data.JSON with all the extra text. On the right side in top center will be the setup deployment map that I would like to be handled by CSS but given how many different setups there are I may just have to store all the images in a folder. Then I will include text in the JSON that will list out all the paragraphs that go along with it.

But I am completely open to improvement suggestions. Right now I am worried about it being a lot of text without much eye candy. I am rather good at typesetting but it could use some pizzazz.

jsterner73 commented 7 years ago

Sounds great, having the text is a big step and we can deicde on how to present it later as well.

Thanks for the suggestion!

CrazyVulcan commented 7 years ago

Quick question, does anyone have an automated way to changing "staw-utopia/js/utopia.min" into something easier to read. Right now it is collapsed into a single line of code and that makes editing it very difficult. Especially for myself who does not know exactly what I am looking for. I am using Notepad++ and can not find an option opposit to "remove whitespace".

jsterner73 commented 7 years ago

The thing is, why would you like to read this file?

As I mentioned on the wiki page you should only edit the src folder files and use the tool grunt to compile the other files that are being loaded on the webpage.

CrazyVulcan commented 6 years ago

@FND I don't know if you would be willing to help me with this but I am trying to set up a template, CSS, and data file to hold all the text. I can handle Data entry but I could use some help setting things up.

The page will work like the mission database but there will be no cards. Just text and some CSS for now. I also need to make something along the line of 'sets' but just for missions.

I have this much done so far http://kfnexus.github.io/staw-utopia/mission-database.html

FND commented 6 years ago

Hey @CrazyVulcan, I'm stretched a little thin these days, but can try to assist with some basics.

Your idea seems like a valuable addition, but I'm not sure I fully understand what you have in mind at this point. I very much agree with @jsterner73 that before we worry about what the app should look like, we should try to establish a common understanding about the basic goals: As I understand it, you essentially want to browse missions by factions and/or ships involved?

So you'd start out with a list like this:

Then you might filter that list by factions/ships and select a mission to see the respective instruction sheet (text with images). Does that sufficiently describe the basics or did I overlook anything important?

It seems to me that Markdown (as used right here on GitHub) would be suitable for describing individual missions - however, for an initial MVP it should be sufficient to just link to the original Wizkids PDFs instead? That leaves the metadata required for the list above:

{
    title: "Yesterday's Enterprise",
    factions: ["federation"],
    ships: ["enterprise_d_2017core"],
    instructions: "https://wizkids.com/attackwing/wp-content/uploads/sites/4/2016/12/72326-Instruction-Sheet.pdf"
}

As stated elsewhere, I'm not very familiar with Angular (the framework used by the other Utopia apps). However, for something simple like this (assuming my summary above is more or less accurate), I could fairly quickly set up a plain JavaScript application that doesn't require Angular at all. Of course that would mean things work a little different than you're used to, but arguably it'd actually be simpler and easier to understand.

CrazyVulcan commented 6 years ago

@FND As I am an artist more then a coder I made this. All I need help with is getting it started. I mod more than anything so once I have something to work with I am good from there. Just need to get the page working first.

https://i.imgur.com/CYAnpyi.png

CrazyVulcan commented 6 years ago

I am getting closer!!! can someone look at line 31 in src/mission-database.html for me and see what I am missing?

@KFNEXUS @jsterner73 your input would be welcomed.

CrazyVulcan commented 6 years ago

@FND @KFNEXUS @jsterner73 @wiegeabo

I feel so close, I have all the needed files made now I just need to link all the information correctly. Please if you can find an hour look at the files. mission-database.html, utopia-missions.js, missionSets.js, utopia-missions.css

We can make this happen! Also any tips for troubleshooting the site. every error comes up as an angilar.js or in the utopia.min file and I can't find what is wrong.

http://kfnexus.github.io/staw-utopia/mission-database.html

CrazyVulcan commented 6 years ago

Here is all the relevant code. What am I missing?

module.exports = [{
    type: "missionSet",
    sourceID: "001",
    name: "A New Source Of Dilithium",
    orderDate: "2000-01-01"
}];
module.exports = [{
    type:"mission",
    name:"A NEW SOURCE OF DILITHIUM",
    missionSet:["001"],
    Componets: "...",
    description: "....",
    setUp: "....",
    specialRules: "....",
    objectives: "...."
}];

var module = angular.module("utopia-missions", ["utopia"]);

module.controller( "UtopiaSetCtrl", [ "$scope", "cardLoader",  function($scope, cardLoader) {

    $scope.missionSets = {};
    $scope.missionList = [];

    $scope.viewer = {};
    $scope.activeSet = false;
    $scope.setCards = [];

    cardLoader( $scope.missionSets, function() {

        var sourceID = location.hash ? location.hash.substring(1) : false;

        $.each( Object.keys( $scope.missionSets ), function(i, sourceID) {
            var missionSet = $scope.missionSets[sourceID];
            if( missionSet.sourceID == sourceID || missionSet.name == sourceID )
                $scope.viewer.missionSet = missionSet;
            $scope.missionList.push(missionSet);
        });

    });

    $scope.$watch( "viewer.missionSet", function(missionSet) {

        $scope.missionSetCards = [];
        if( missionSet ) {
            location.hash = missionSet.sourceID;
            $.each( $scope.cards, function(i, card) {
                if( $.inArray( missionSet.sourceID, card.missionSet ) >= 0 )
                    $scope.setCards.push( card );
            });
            $scope.setCards.sort(displaySort);}
} );   }] );
<div class="u-container">
<ul class="mission-list">
<li ng-repeat="missionSet in missionList | orderBy:'-orderDate'" ng-click="viewer.missionSet = missionSet" ng-class="{'missionSet-selected': viewer.missionSet == missionSet}">-{{missionSet.name}}</li></ul></div>

<div class="u-fleet missionSet-cards">
<div class="missions-header" ng-show="missions.name">{{viewer.missions.name}}</div>
<div class="missions-header" ng-show="missions.description">{{viewer.missions.description}}</div>
</div>
CrazyVulcan commented 6 years ago

Guys I have had an insight! the new CSS file is not being added to utopia.min.css! Working on that now and hopefully, that will work. Or at least get us on the right track.