dnd 5e – Does casting a spell from an item allow you to apply class abilities that are used when casting a spell?

As wax eagle’s answer states, it appears that since “you cast” the spell using the item, you can use any of your character’s abilities that can be used “when you cast a spell”.

DMG P. 141 lays out the rules for items that allow the user to cast spells from them:

Some magic items allow the user to cast a spell from the item. The spell is cast at the lowest possible spell level, doesn’t expend any of the user’s spell slots, and requires no components unless the item’s description says otherwise.

and a little further down:

A magic items, such as certain staffs, may require you to use your own spellcasting ability when you cast a spell from the item.

In both quotes it says that the user casts the spell — not that the use of the item triggers the casting of the spell or any other wording. Thus abilities that you can use “when you cast a spell” are usable — you are very clearly casting a spell. No ability I have found says “when you cast a spell from your daily spell slots” or “when you us the Cast a Spell action” or anything else that seem to explicitly restrict it from applying when you cast a spell from an item.

Mike Mearls posted a not very certain reply stating “believe it’s only when you cast from your slots”

Jeremy Crawford has tweeted that casting a spell from an item is neither a Use an Item action nor a Cast a Spell action. The DMG section (p.141) that was supposed to clarify this mentions only the Use an Item action, and remains silent on Cast a Spell.

Nonetheless, it is not clear that whether or not something is a Cast a Spell action is what determines whether or not you can apply class abilities to the casting. What type of action something is is used to determine under what circumstances you may take that action. None of the class abilities say anything about “When you use the Cast a Spell action…” — the abilities simply say “when you cast…” while being agnostic as to what kind of action (or item?) is used for the casting.

How we have been playing it is that if you are using an item that uses the user’s spellcasting ability (such as most staffs), it is just as if they are casting from slots, except that a slot (and components) are not required. In that case you can use any special spellcasting abilities, such as sculpting, metamagic, powering your Arcane Ward, etc. When you are using such an item, the use of your own spellcasting ability suggests that you are interacting more directly with the weave, and doing more to actually create/shape the spell. The item in this case “merely” allows you to do it without using spell slots and components (and helps cast it even if you wouldn’t otherwise know how), but doesn’t provide a fully-formed spell for you. You have to bring the spell into being with your own spellcasting ability.

On the other hand, if you are casting from an item that does not use the user’s spellcasting ability (such as most wands), we are treating it as if the spell is essentially stored in the item “pre-formed” (with a fixed DC, shape, etc.) and can’t be modified, and thus (contrary to what is written) the user isn’t really casting the spell for the purpose of using/triggering special spellcasting abilities (but rather it was the creator of the item who had cast the spell, and the user is just commanding it to go off at a selected time). Thus, the user’s special spellcasting abilities cannot be used.

group theory – A base for the space of class functions

Let $G$ be a group. A class function of $G$ is a function $f:GtoBbb{C}$ such that $f(ghg^{-1})=f(h)$ for every $g,hin G$. Let $H$ be the set of all class functions of $G$.

$a,bin G$ are said to be conjugated if $a = gbg^{-1}$ for some $gin G$. This is an equivalence relation on $G$ and the equivalence classes of this relation are called conjugation classes.

Let $Y$ be the set of all conjugation classes of $G$. I need to show that the family $B = (f_y)_{yin Y}$ given by

$f_y(g) = 1$ if $gin y$ and $f_y(g) = 0$ otherwise

is a base for $H$.

I already shown that they are l.i. To show that they generate $H$, I could only think that if $f:GtoBbb{C}$ is a class function then $f(g) = sum_{yin Y}f(g)f_y(g)$, but this doesn’t quite is a linear combination of the vectors of $B$. Can someone give an ideia on this? I have already studied some group representations and characters of representations, so you can use elementary results about this.

rendering – How can I make a custom mesh class in Unity?

I don’t recommend creating a new Mesh class for this.

Instead, send your additional 4D data to the GPU as texture coordinates. Don’t let the name fool you – these don’t need to have anything to do with textures, they’re just streams of arbitrary float data you can use however you want in the shaders.

This might look something like this:

void Add4DMeshData(Mesh source) {
    var vertices = mesh.vertices;
    var normals = mesh.normals;
    var positions = new Vector4(vertices.Length);
    var orientations = new Vector4(vertices.Length);

    for(int i = 0; i < vertices.Length; i++) {
        positions(i) = Get4DPosition(vertices(i));
        orientations(i) = Get4DOrientation(normals(i));
    }
 

    mesh.SetUVs(0, positions);
    mesh.SetUVs(1, orientations);
}

Your shader can then read these streams in its input struct…

struct vs_input {
    float4 position    : TEXCOORD0;
    float4 orientation : TEXCOORD1;
    // etc...
};

…and do whatever you need with them, no new Mesh class required.

Is there a way to add new div class via a theme’s Additional CSS interface?

I am trying to modify a woocommerce website and I have very little HTML/CSS training. Most of what I’ve learned has come from trial and error, some online tutorials, playing around with the developer console in Chrome, etc….

I’m trying to add an image border to the top of a page header right before an area called tg-container. I was able to put one below it, using an existing class, whose info I didn’t need to see. Can it be done with the Additional CSS interface built into the theme or do I have to go into the style.css and html to create the boarder? I know the benefit of the Additional CSS interface is having no need to edit the theme files directly whenever the theme is updated.

Bypass Page

Example Page with border – accessible only after bypass page is visited

IMAGE: Example page with Chrome Developer Console open and showing code for area

dnd 5e – Does holding class abilities require concentration?

The use of Path to the Grave uses the cleric’s Channel Divinity ability and they do not require concentration to use.

Taking a Ready action to use their Channel Divinity does not require concentration because it is not a spell and the channel divinity also doesn’t require concentration. This is simply an action that is awaiting a trigger. They haven’t actually ‘done’ it yet, they are waiting on a trigger to do it just like someone may be readying an attack. They can either get their trigger and use their action, or the trigger never comes, or they opt not to do it for some reason.

But there is no concentration involved, so moving forward I would recommend discussing what happened and what will happen in the future (no concentration checks).

The rules on Readying a spell are clear, but the rules on Readying something else that requires concentration are non-existent. It’ll be up to the table to determine if the Ready action for those is similar to spellcasting, and I think there’s a case for fun for either option.

The most likely option is that it doesn’t because it doesn’t say it needs concentration to hold, though.

spells – Do I need to have the “deity” class feature to cast Spiritual Weapon?

In Pathfinder 2, the spell Spiritual Weapon (https://2e.aonprd.com/Spells.aspx?ID=306) has, as a requirement, “you have a deity”.

What does it mean exactly?
My guesses (from the most to the least likely imho)

  • You need the “deity” class feature (that you get as a cleric)

  • You need to be a follower of a specific deity

  • You need to be the owner of a deity (ok, this one is so unlikely that I only put it here for the joke)

design patterns – Should base class include unused properties of sub class?

I was looking at the angular documentation and noticed this code:

export class QuestionBase<T> {
  value: T;
  key: string;
  label: string;
  required: boolean;
  order: number;
  controlType: string;
  type: string;
  options: {key: string, value: string}();

  constructor(options: {
      value?: T,
      key?: string,
      label?: string,
      required?: boolean,
      order?: number,
      controlType?: string,
      type?: string
    } = {}) {
    this.value = options.value;
    this.key = options.key || '';
    this.label = options.label || '';
    this.required = !!options.required;
    this.order = options.order === undefined ? 1 : options.order;
    this.controlType = options.controlType || '';
    this.type = options.type || '';
  }
}

They use this as the base class for different types of questions such as “DropdownQuestion”, “TextboxQuestion”, etc. I’ve copied the usage they included in the docs below:

export class DropdownQuestion extends QuestionBase<string> {
  controlType = 'dropdown';
  options: {key: string, value: string}() = ();

  constructor(options: {} = {}) {
    super(options);
    this.options = options('options') || ();
  }
}
 //in some other file...
  new DropdownQuestion({
    key: 'brave',
    label: 'Bravery Rating',
    options: (
      {key: 'solid',  value: 'Solid'},
      {key: 'great',  value: 'Great'},
      {key: 'good',   value: 'Good'},
      {key: 'unproven', value: 'Unproven'}
    ),
    order: 3
  }),

  new TextboxQuestion({
    key: 'firstName',
    label: 'First name',
    value: 'Bombasto',
    required: true,
    order: 1
  }),

  new TextboxQuestion({
    key: 'emailAddress',
    label: 'Email',
    type: 'email',
    order: 2
  })

As you can see, only the DropdownQuestion uses the “options” property, and has it’s own property for “options”, but they’ve included it in the base class. From what I can tell, it literally does nothing in the base class, because it’s not used in the constructor, and it will never reach the prototype. What is the point of doing that? Shouldn’t it just be included in the DropdownQuestion?

Slightly unrelated, but making the “key” and “label” properties optional when they seem to be required in all questions also seems like an odd thing to do.

Can anyone provide some clarification on what is ideal to do?

magento2.3 – Cannot override class RuleProductPricesPersistor in Magento 2

I’m trying to override following class

MagentoCatalogRuleModelIndexerRuleProductPricesPersistor

Using below code

<preference for="MagentoCatalogRuleModelIndexerRuleProductPricesPersistor"
                type="VendorModuleModelIndexerRuleProductPricesPersistor" />

But I’m getting following error

Type Error occurred when creating object:
MagentoCatalogRuleModelIndexerReindexRuleProductPrice, Argument 5
passed to
MagentoCatalogRuleModelIndexerReindexRuleProductPrice::__construct()
must be an instance of
MagentoCatalogRuleModelIndexerRuleProductPricesPersistor, instance
of VendorModuleModelIndexerRuleProductPricesPersistor given,
called in
/var/www/html/MagentoCE230/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 116 () ()

I tried to clear generation folder and also ran setup:di:compile command. But it didn’t work.

Como mapear correctamente una Query de un double en Firebase y Flutter – NoSuchMethodError: Class ‘double’ has no instance method ‘[]’

Tengo una base de datos como la siguiente…

> > loteActual:     
> >          pesoInicial: 100.0
> >          ultimoCrec: 350.0`

Quiero hacer una consulta simple del pesoInicial (tipo double) y llevo horas sin lograr hacerlo ya que siempre me encuentro con el siguiente error:

Exception has occurred. NoSuchMethodError (NoSuchMethodError: Class
‘double’ has no instance method ‘()’. Receiver: 350.0 Tried calling:
)

Como se observa, pareciera que está recibiendo bien el dato (350.0), pero tiene algún tipo de estructura que no me permite leerlo.

El código que tengo para la consulta es el siguiente:

Future<double> cargarPesoInicial( String idEmpresa, String idEstanque) async {

  double pesoInicial; 

  Query resp = db.child('PATH.../loteActual/pesoInicial');

  return resp.once().then((snapshot) {

      if (snapshot.value == null) return pesoInicial;
      if (snapshot.value('error') != null) return pesoInicial; 
      pesoInicial = snapshot.value;
      return pesoInicial;

      }
  );
} 

Y el error aparece cuando hago el llamado al método…

double _pesoInicial;
_pesoInicial      = await loteActualBloc.cargarPesoInicial(idEmpresa, idEstanque);

Unity – Change base class variable to a derived class in inspector dynamically

In an item system I’m trying to create I’m using prefabs to store an item’s default values, and then grab that item from the prefab to use in runtime. It works well, but I was wondering if there was a way to dynamically change a variable with a base type to a derived type, probably with a custom editor, so that I wouldn’t have to make separate classes for each derived type. This is the how I’m imagining it would be like:

public class ItemPrefab : Monobehaviour {
    public ItemTypes itemType;
    public Item item;
}

public enum ItemTypes {
    meleeWeapon,
    rangedWeapon
}

Item is an abstract base class, and MeleeWeapon and RangedWeapon are serializable derivatives. With that, I’m trying to do something to the effect of this:

switch (itemType) {
    case ItemTypes.meleeWeapon:
        item = item as MeleeWeapon;
        break;
    case ItemTypes.rangedWeapon:
        item = item as RangedWeapon;
        break;
}

I was wanting it to be the same as the below, just less scripts.

public class MeleeWeaponItemPrefab : Monobehaviour {
    public MeleeWeapon item;
}

public class RangedWeaponItemPrefab : Monobehaviour {
    public RangedWeapon item;
}