[KDYv2] Development Blog Thread

By ThatRobHuman, in Star Wars: Armada

Newest hurdle: marking things as dirty for re-rendering.

Suppose for a moment that you have a keyword, say Rogue. You add that keyword to several squadrons. You then give Rogue a new icon. Now you've got to re-render all cards that have Rogue as a keyword. Ouch.

That's bad enough, but suppose that you've got a Genre and you set one of the custom colors for that genre, but it's only used in 1 renderer and 4 squadrons for that renderer. I've got to figure out how to make it only re-render those 4 squadrons without re-rendering every squadron that uses that genre.

This one may be painful.

Good luck and have strenght.

I've probably just written the most complex SQL query in my life so far.

Basically, when you edit a piece of content, it will go through and find ANY renderer nodes that uses the property that you just changed, cross reference that with a list of content that's related to that piece of content, and renders the intersection.

For example, suppose you change the primary color of a faction. It will check to see if any defined renderers use that color and then re-render any ships, squadron, stations, content-backs, that have that faction as an option AND whose renderer uses that color.

This way, it will not force a re-render for everyone if only one person uses "Faction.Color_Custom_8"

Edited by FoaS

I just added support for dynamic upgrade card back rendering. It automatically adjust for when an upgrade card has both one or two upgrade types.

Going to keep adding support for card backings and the types of things that come with it (objective types, damage card types, etc). After that, it'll be on to actual content types: Ships, Squadrons, Stations, etc.

Just finished support for Objective Types and renderers for the reverse-side of Objective cards.

Next up: slightly trickier stuff: Dice Types.

Is there anyway to login if you have forgotten your username?

Quite possibly. Could you PM me the email address you used?

PM sent

1 hour ago, Indy_com said:

PM sent

I found you - check your PMs.

I think I'm actually going to hold off on the Dice Types in favor of ironing out Defense Tokens. The problem I'm having is that there is an interrelationship between Defense Token defintions and Defense Token colors. Obviously in official Armada there are one color of defesene token: Green/Red, but I've recently started adding support for other colors: Blue/Yellow and Orange/Orange (each of which behave differently). Now, I want to be able to let people add their own defense-token color sets for their own homebrew rules (I imagine it will also get used as a stylistic choice, but that's really not what it is for).

Now, the problem is, I really don't want to have to force-render the intersection of Token Defintions vs Token Colors: for example, suppose I add Brace, Contain, and Scatter. That's 3 defense tokens. And someone adds two new sets of Defense colors (say Cyan/Purple and Blue/Yellow). I don't want to have to render 6 defense tokens ( 3 tokens x 2 colors ) each and every time someone adds a new token, or color definition.

I'm thinking instead that when a new token is created (like Scatter), the user can select what color set this particular token is - this means you will need to create multiple versions of "Scatter" if you want different colored rules to apply.

"But what about those stylistic differences you mentioned, Rob? Suppose I just want to color them differently on the card"

Most content types will have a set of custom colors (8 fields for each piece of content so far) that you can use in your renderer definitions. Suppose you make a ship, and that ship's faction is Klingon (because I'm a big ST geek). Well, chances are that this will belong to a new "Star Trek" genre in the system, plus I'll probably be using a custom renderer for this ship that I would design. When making this renderer, I will have access to 8 custom colors defined by the genre and 8 custom colors defined by the faction (which can change from faction to faction, genre to genre, depending on how I design things). PLUS anything that I can hard-code things in the renderer however I want.

ALSO good news: I've developed a way to add filters to renderers. Want your artwork to have a sepia filter at 75% density for that olde-timey-look? Done.

Edit: I just came up with yet another idea.

One thing that I've already added to renderer functionality is mathematical expressions. A perfect example of this is on the Squadron dial renderer: the hull point gauge. Well, to do this, you would add a certain type of renderer node called a NUMERIC_ITERATOR. It basically renders it's children nodes a number of times from a given value to another value while incremented by a third value - for those who are programmers, you'll know this as a For Loop.

So you can do things like this: Iterate from 1 to <SQUADRON.HULL>, while adding 1 in each step. Suppose your squadron has a hull value of 4. This will render the iterator's contents 4 times. In the contents you can then put <ITERATOR> in the body and it will render that number on each iteration. You can then place that <ITERATOR> value in an expression. In the case of the squadron dial renderers, you can set to rotation property of that node to say {<ITERATOR> * 30}. The first time, it'll set the rotation to 30, the second to 60, the third to 90 and the last to 120. That's how you'll get the hull numbers on the squadron dials.

Now here's the fun part: You'll be able to put functions in those expressions. For example {colorBlend(multiply,<FACTION.COLOR_ICONFORE_HI>,#808080)} and it will render a color that is 50% darker than the variable called "<FACTION.COLOR_ICONFORE_HI>". Color blending may be familiar to those who have used photoshop before, though I plan on supporting many more blending modes than photoshop does.

Edited by FoaS

On squadron cards the dice pool for anti-ship and anti-squadron are reversed when the card is rendered.

Nevermind, I'm an idiot.

Edited by Indy_com

Seems fine, but the fact that I put Anti-Ship first in the display view and Anti-Squadron first in the edit view probably isn't really that intuitive... I can fix that real quick, though.

image.png.dd98d7185c71859dead681674af42c3a.png

11 minutes ago, Indy_com said:

On squadron cards the dice pool for anti-ship and anti-squadron are reversed when the card is rendered.

Nevermind, I'm an idiot.

Happens to the best of us. Nonetheless, I've swapped it around in the detail view, because it makes more sense this way.

Sorry to bother, but I was denied access through the Contact Admin link.

I registered, using the same username as here, but I have not received a confirmation email. I figured I'd made a mistake of some sort, so I tried re-registering with the same password, and got an error message that a confirmation email had already been sent for that account.

Can you help me with this? Thanks!

On 2/23/2018 at 7:33 PM, elbmc1969 said:

Sorry to bother, but I was denied access through the Contact Admin link.

I registered, using the same username as here, but I have not received a confirmation email. I figured I'd made a mistake of some sort, so I tried re-registering with the same password, and got an error message that a confirmation email had already been sent for that account.

Can you help me with this? Thanks!

I've manually verified your account - you should be good to go.

Another update for v2:

I got defense token rendering working. To show you how this works, This is the renderer definition that I sent to the API

{
    "name": "Default",
    "description": "",
	"genre_id":"GLOBAL",
    "width": "1.0in",
    "height": "0.5in",
    "bleed": "0.125in",
    "content": {
    	"type":"CONTAINER",
        "properties": {
            "width": "100%",
            "height": "100%",
            "background_color": "<DEFTYPE.DEFMODE.COLOR_OBVERSE_BODY_HI>",
            "flow": "block",
            "align_x": "center",
            "align_y": "center",
            "visibility": "<ALWAYS>",
            "background_source": "ym18j8tj",
            "background_scale_mode": "contain"
        },
        "content": [
            {
                "type": "ICON",
                "properties": {
					"visibility": "<ALWAYS>",
                    "width": "0.5in",
                    "height": "0.5in",
                    "color": "<DEFTYPE.DEFMODE.COLOR_OBVERSE_ICON_HI>",
                    "asset": "<DEFTYPE.ICON>"
                }
            }
        ]
    }
}

And here's a result using the Brace defense type and the Green/Red defense mode.

1qk4QFfhIx17q1tj.jpg.e9fb951deff0962d6327ddf49d6ff1a5.jpg 5b14IxvaDWgol7iZ.jpg.9e2e2f9dcafe2b89b7f542a4b38beea8.jpg

So you know those icons that appear in text cards? the ones that represent dice-faces or command dials/tokens? How much customization do you want those to be on the genre level? for example, should command dial icons be absolutely universal, or should you have the option to have the icon be different between "Star Wars" and "Star Trek" genres?

Alternative: I could set up a new set of content types for DieFaces and Commands - giving people even more flexibility for their genres.

Edited by FoaS

Update: I can't believe I'm gonna do this...

Command Tokens/Dials and Die Icons will be customizable content. This also means that one can make their own renderer for textures for TTS, too. (augh! this is gonna be painful)

I know I'm going to regret this: How do we feel about supporting more than d8s for dice? if so, what should I use for an icon of the d10 that doesn't look like the d8?

Edited by FoaS

On second thought, I'm going to reduce the complexity just a bit. I won't be doing custom commands or custom die faces - too much work for too little benefit for now. If there is significant demand for such things I might be open to the idea, but in all reality, that's something that belongs in a whole new engine instead of SWA.

7 minutes ago, FoaS said:

On second thought, I'm going to reduce the complexity just a bit. I won't be doing custom commands or custom die faces - too much work for too little benefit for now. If there is significant demand for such things I might be open to the idea, but in all reality, that's something that belongs in a whole new engine instead of SWA.

Just to be clear, will custom dice using the standard D8, and standard 3 icons, in different configurations, still be possible?

At least 2 of the factions in version 1 rely on alternative dice types pretty heavily, I already made dice for them, and would be a little bit bummed out if they can't be transferred over.

That said, this is your baby, and I do understand if things must change for the system to run right. So please don't take me griping as I don't appreciate all you are doing.

Thanks for all your hard work on this!

6 hours ago, cynanbloodbane said:

Just to be clear, will custom dice using the standard D8, and standard 3 icons, in different configurations, still be possible?

At least 2 of the factions in version 1 rely on alternative dice types pretty heavily, I already made dice for them, and would be a little bit bummed out if they can't be transferred over.

That said, this is your baby, and I do understand if things must change for the system to run right. So please don't take me griping as I don't appreciate all you are doing.

Thanks for all your hard work on this!

You've nailed it. You'll still be able to create custom dice, they just have to be d8s with any of the 3 icons already in the game (hit, crit, accuracy) in any combination (up to three)

You know what? Screw it. I'm gonna add the custom dice shapes and faces.

29 minutes ago, FoaS said:

You know what? Screw it. I'm gonna add the custom dice shapes and faces.

Your “You know what? Screw It.” sounds a lot like my “ Let me drink 3 cans of Monster and get back to you....”. ???

Edited by Drasnighta
1 hour ago, Drasnighta said:

Your “You know what? Screw It.” sounds a lot like my “ Let me drink 3 cans of Monster and get back to you....”. ???

I mean, you're not wrong in the slightest. I am on my sixth cup of coffee for the day.

Just now, FoaS said:

I mean, you're not wrong in the slightest. I am on my sixth cup of coffee for the day.

#ProgrammerLife

7 minutes ago, Drasnighta said:

#ProgrammerLife

1) That can’t happen.

2) That doesn’t happen on my machine.

3) That shouldn’t happen.

4) Why does that happen?

5) Oh, I see.

6) How did that ever work?