Is there a good way ECS for creating variants of a behaviour like in Java interfaces?

In Java, there are interfaces – I’m not clear on the details (I don’t use Java) but from what I’ve learned, they seem to be "classes for classes": a way to effectively make individual classes "instances" of one overarching class. For example, a "Cup" interface could be implemented by a "Mug" class, a "Glass" class, a "Goblet" class etc. As long as they have the same I/O methods such as fill(), empty() or drink(), they can be used interchangeably.

In languages with duck typing, interfaces are not needed – the language allows for classes to be used interchangeably as long as no invalid properties of methods are referenced. This is another valid was of going about things in OOP. This is how I usually go about things.

My question: how can I create varied behaviour in an ECS if components are data-only? I like to think in terms of first-class functions, but that seems to be taboo since components are not supposed to hold behaviour.

Option 1, have a massive switch or if/else chain in my System:

For example, if I have an AI component with several different behaviours, I could use an integer to define which type of AI to use for that particular entity. It seems a bit convoluted and inelegant.

Option 2, have a separate Component and matching System for each behaviour:

This would be neater in each individual System but as a whole, the program would be a mess. This wouldn’t work because of the large amounts of variation such as hundreds of different guns in a shooter game.

Option 3, use a flyweight-like data structure independent of the Component:

This would mean storing all of the different behaviours elsewhere, and storing a key that a System can use to access the behaviour. This is basically a fancy version of the switch option above, but it seems neater as there wouldn’t be a massive dump of code in the System.

Option 4, creating a complex way of encoding a description of the desired behaviour which the System can interpret:

This seems to be the most overkill of the lot. Unless I have to, or there are significant advantages, I’m trying to stay away from this.

If there’s no other way, I’ll just adopt the methodology of first-class functions as I usually do and just ignore any guidelines about ECS I’ve heard, just for this one case. The problem is, it probably won’t just be one case in the future.

Have I missed any other good options? Is there an industry standard or recommendation? If not, what considerations should I make about which option to choose?

Does the content on niche like festivals, wishes or quotes be considered as duplicate content?

Recently, I have started a Festival Wishes based blog as a starting step to drive traffic to something in future. I have some SEO experience (5 years back) but this niche is new for me.

It’s not easy to create unique content in this niche and overall the meaning will be similar. So what should be the right way to avoid duplicate content (not referring to plagiarism, it is avoided) and slowly set up the right SEO strategy for this niche. I am having hard time even to get the articles indexed in 48 hours, blog is 90 days old. I am using WordPress as CMS.

How do I give the right amount of treasure without going overboard, like my last DM did?

I am trying to find a good model for how much treasure and money to give my players in order not to make items too difficult to buy, or too cheap to buy.

In my last game, which ran for 6 months, our DM ended up so freely giving us gold that everything was trivial for us. Our characters at level 6 were so rich, we could afford any comfort and travel as kings. This was not because we found a treasure hoard, but because our DM had accidentally been giving us too much treasure for our encounters.

For example, every time we would fight something, they would reward us with 1-2 Platinum, sometimes more. They also used in-game currency for out of game creativity. If you made them laugh, you got another Platinum or like 100 Gold.

Nearing the end of the campaign, everything was so cheap that it wasn’t fun anymore to even buy anything or save up for fancy lodgings. We could afford hundreds of potions, countless trips to the local temple, resurrections…etc. There was no threat of dying, no challenge in earning, and the game lost steam fast.

I am not good with math. I am nowhere near an economist, but when I run my campaign I don’t want to end up with the same problem.

Are there any charts or rules of thumb for making a balanced, long-term economy in D&D 5th?

How do I assign treasure in a way that doesn’t inflate to worthlessness down the line?

I am looking for charts, guides or tables ideally. I would really appreciate the help.

could I use something like a magic amulet while it’s not on my neck? [duplicate]

What is defined as ‘worn’? Does an amulet or ring have to be on my neck or finger specifically or do I just have to be carrying it somewhere on my body or even in my backpack? For instance, if I had a Clockwork Amulet on my belt, does that constitute as me ‘wearing’ it so I could use it?

Is there a cross-platform way to compare data in one columnd on each sitde of replicated data, like a checksum or hash?

I have an Oracle 12 database with lots of tables, and I am replicating several of the tables (a subset of rows) into a SQL Server 2016 database. The subset of rows can be established with a WHERE clause on the Oracle side.

I have two web services that can expose anything I want to from that data, one on each side.

Do you have a suggestion for an approach of what I can expose, then compare to find out if the data between the systems matches?

I am currently exposing from one table, which has a few million rows the COUNT(*), which is a no-brainer since it is very efficient. So far, so good.

I’m also exposing the SUM of each of a few NUMBER(18,2) columns and comparing it to the corresponding SUM on the SQL Server side. However, this is problematic, as it has to scan the whole table in SQL Server; it is sometimes blocked, and sometimes might cause other processes to block. I imagine similar problems could occur on the Oracle side too.

Also, the SUM will not tell me if the rows match–it will only tell me that the totals match; if an amount was improperly added to one row and subtracted from another, I wouldn’t catch it.

I’ve pondered whether Oracle’s STANDARD_HASH might help me, but it seems cumbersome or error-prone to try to generate the exact same HASH on the SQL Server side, and also this doesn’t help with the inefficiency/blocking nature of the call.

So is there any way to have both databases keep track of a hash, checksum, CRC code, or other summary of a column’s data, that is efficient to retrieve, and that I can then use to compare to have some idea whether data is the same on both sides? It need not be a perfect solution–for example, comparing SUMs is close but perhaps not quite good enough.

As a first stab, I created an "summary" indexed view, with columns derived from SUMs, on the SQL Server side. This makes querying the view very fast, but incurs additional penalty on every write to the large table underneath. Still, I think it will work, but I’d like to improve on it. Other, better ideas?

Are there any undead that look like the living

Okay rules

  • No disguise skill
  • Shapeshifters are allowed as long as they fit the rest of the requirements.
  • Stuff they get from classes or other external sources doesn’t count it has to be an ability that every monster of that type has.
  • it’s okay if the appearance is only skin deep
  • anything that you can find on the srd, archives of nethys, or similar sites is okay including 3pp.
  • templates are cool too

So the question is are there any undead that appear to be alive even if it’s only visually.