dnd 5e – How exactly do the rules on changing your subclass from “Tasha’s Cauldron of Everything” work?

“The DM might…”

These are not rules in the traditional sense. These are suggestions a DM might use to facilitate a subclass change in their game. Under “Training Time”, we see (emphasis mine):

To change your subclass, your DM might require you to spend time devoted to the transition, (…)

The DM might also require an expenditure of money to pay for training, (…) This cost might be accompanied by a quest of some sort.

And under “Sudden Change”, we see (emphasis mine):

Sometimes a character undergoes a dramatic transformation in their beliefs and abilities. When a character experiences a profound self-realization or faces an entity or a place of overwhelming power, beauty, or terror, the DM might allow an immediate subclass change.

These are not rules. These are suggestions to help a DM facilitate a subclass change, which is a pretty significant change. The idea here is to make the transition just as meaningful as where you came from and where you’re going.

How would I personally work a subclass change?

I would ditch the limitation of “you can change your subclass when you would normally gain a new subclass feature.

The two methods offered give us distinct approaches for handling two different situations:

  • A character says they want to switch subclasses some time in the future.
  • A character says they want to switch subclasses very soon.

In either situation, I would work the subclass change at their next level up. In the first scenario, if they give me time to work in some plot, there is going to be some significant plot leading up to their next level up that will culminate in a change of subclass when they finally level up.

The second scenario is when I would use the “Sudden Change” guidance. If we are nearing a level up, and my player says “I want to change subclasses”, I don’t have time to work in significant plot build-up to the change, so I will opt for something like is suggested in this section at the next level up.

In either case, I am looking forward to the next level up, not the next subclass feature.

Waiting for a level up is how I would first express this to the player. If they felt that was too long to wait, I would of course see how we could work a transition even sooner.

What about rogues?

I present rogues as a use case for why I would break from the guidance given in the book. Rogue subclasses have a huge gap in features. Once a rogue gets their first subclass features at 3rd level, they don’t get another until 9th level.

Say one of my players is a 5th level rogue and wants to change subclasses. I’m not waiting till 9th level to allow this. In this case, I would ignore the suggestion given in Tasha’s Cauldron of Everything and still work the subclass change for their next level up.

networking – Transfer a changing file over unreliable network

Summary:
I want to transfer a file which changes over time, probably faster than the available connection allows a successful transfer.

Setup:

  • A remote device with bad network reliability and speed most of the time, but with “windows” of decent connection (able to scp ~>100 mb overnight).
  • The device could spend anywhere from minutes to days (but usually not weeks) without reception.
  • The device logs to a sqlite database with current date-time, several times a day.
  • The db is around 5-10 mb, and I’ve found it can be compressed to about 10% of its original size experimentally.
  • Database could be reset/deleted (low frequency, but happens, eg once per month or less) by a third party.
  • I need to have a local copy of the database locally.

Current solution:

I have a script which does the following:

  1. Connect via ssh to the device.
  2. “snapshot” the db to a compressed file, unless a snapshot already exists.
  3. rsync -ruvhP the snapshot to a local drive (this starts a new transfer, or continues an interrupted one)
  4. untar transferred file to a sqlite file.
  5. Read first date-time entry of db. Use it as a unique name to rename the local database.
  6. Delete remote snapshot (but not the local one). This allows to transfer new rows from the db (or the whole db if it was reset), but waste bandwidth “re-downloading” data we already have (the old rows if it wasn’t reset). If the newly created snapshot is exactly like the old one, rsync does not waste bandwith. The script did create+destroy “uselessly” the snapshot though…

Problem:
Depending on the number in the implementation above where the connection fails, there are lots of edge cases, producing unusable corrupted/incomplete db, etc. This is starting to look a lot like reinventing the wheel…

Questions:

  1. Are there libraries/solutions to this problem? I imagine services like dropbox and similar have situations like these solved, except for:
  • Ideally, I would like to avoid installing services on the remote device.
  • In the case the remote device “resets” the db, the new remote version would overwrite the local, without keeping the local(s) – At least in the dropbox case.
  1. Any alternatives patterns/better implementations to deal with edge cases?
  2. What about simpler storage alternatives, like CSV (to allow incremental transfers), or rsync –compressed?

dnd 5e – How Exactly Do Tasha’s Subclass Changing Rules Work?

The DM might

These are not rules in the traditional sense. These are suggestions a DM might use to facilitate a subclass change in their game. Under Training Time we see:

To change your subclass, your DM might require you to spend time devoted to the transition
[…]
The DM might also require an expenditure of money to pay for training […] This cost might be accompanied by a quest of some sort.

And under Sudden Change, we see:

Sometimes a character undergoes a dramatic transformation in their beliefs and abilities. When a character experiences a profound self-realization or faces an entity or a place of overwhelming power, beauty, or terror, the DM might allow an immediate subclass change.

These are not rules. These are suggestions to help a DM facilitate a subclass change, which is a pretty significant change. The idea here is to make the transition just as meaningful as where you came from and where you’re going.

How would I work a subclass change?

I would ditch the “you can change your subclass when you would normally gain a new subclass feature.

The two methods offered give us distinct approaches for handling two different situations:

  • A character says they want to switch subclasses some time in the future.
  • A character says they want to switch subclasses very soon.

In either situation, I would work the subclass change at their next level up. In the first scenario, if they give me time to work in some plot, there is going to be some significant plot leading up to their next level up that will culminate in a change of subclass when they finally level up.

The second scenario is when I would use the “Sudden Change” guidance. If we are nearing a level up, and my player says “I want to change subclasses”, I don’t have time to work in significant plot build-up to the change, so I will opt for something like is suggested in this section at the next level up.

In either case, I am looking forward to the next level up.

What about rogues?

I present rogues as a use case where I would break from the guidance given in the book. Rogue subclasses have a huge gap in features. Once a rogue gets their first subclass features at 3rd level, they don’t get another until 9th level.

Say one of my players is a 5th levle rogue and wants to change subclasses. I’m not waiting till 9th level to allow this. In this case, I would ignore Tasha’s suggestion and still work the subclass change for their next level up.

plotting – Figures as a one column panel with same x axis but changing y axis

If I’ve understood, it seems like you just want a variation of the answer you received in Plot Figures in two columns.

ResourceFunction["PlotGrid"][
 {
  {Plot[x, {x, 0, 1}, Frame -> True, 
    PlotLabel -> "Some Label"]}, {Plot[x, {x, 0, 1}, Frame -> True, 
    PlotLabel -> "Some Label"]}, {Plot[x^2, {x, 0, 1}, Frame -> True, 
    PlotLabel -> "Some Label"]}, {Plot[x^2, {x, 0, 1}, Frame -> True, 
    PlotLabel -> "Some Label"]}
  }, Spacings -> {0, 30}]

enter image description here

Essentially each grid row has a single element.

You can adjust Spacings to overlap Axes labels and show a single Axis on the bottom graph.

database – How to update Drupal custom module after changing .install file

I am working on a pre-created Drupal 8 project that has a custom module called CCA(named out of project title). I have done the below update in the .install file to add a new column to the backend via Drupal.

function cca_update_8902 (&$sandbox) {
  db_add_field('cca_findings', 'cca_topic_id', array(
    'type' => 'float',
    'not null' => FALSE,
    'description' => 'interim fields addition',
  ));

How do I update the module in Drupal after this change has been made? Can someone guide on next steps to update my custom module in Drupal so that this change will be implemented? Thanks!

.htaccess – Adding, removing, and changing user names and passwords in .htpasswd with PHP

Some code I wrote to add, remove, and change user names and passwords in .htpasswd with PHP:

function adduser($user, $pass) {

    try {

        $htpasswd = '.htpasswd';

        //$hash = '{SHA}'.crypt($pass, base64_encode($pass));

        $hash = crypt_apr1_md5($pass); //APR1-MD5

        $contents = $user . ':' . $hash;

        $lines = explode(PHP_EOL, file_get_contents($htpasswd)); // get .htpasswd

        print('<h4>input:</h4><pre>'.print_r(implode(PHP_EOL, $lines),true).'</pre>');

        $exists = false;

        foreach($lines as $line){

            $existing_user = explode( ':', $line );

            if ($existing_user(0) == $user) { //checks if user exists

                $contents = str_replace($line, $contents, $lines); //changes password for user

                $contents = implode(PHP_EOL, $contents);

                $exists = true;

                if ($pass == '') { // removes user if password is empty

                    $contents = str_replace($line, '', $lines); //removes user

                    $contents = array_filter($contents); // cleans empty space in array

                    $contents = implode(PHP_EOL, $contents);

                    $exists = true;

                }

            }

        }


        if ($exists == false) {

            $contents = implode(PHP_EOL, $lines) . PHP_EOL . $contents;
        }

        file_put_contents($htpasswd, $contents);

        print('<h4>output:</h4><pre>'.print_r($contents,true).'</pre>');

    }catch(Exception $e) {

        echo '<h3>fail: </h3>' . $e->getMessage();
    
    }

}

if(isset($_GET('user'))){

    adduser($_GET('user'), $_GET('pass'));

    echo '<h3>success</h3>';

}else{

    $htpasswd = '.htpasswd';

    $lines = explode(PHP_EOL, file_get_contents($htpasswd)); // get .htpasswd

    print('<h4>.htpasswd:</h4><pre>'.print_r(implode(PHP_EOL, $lines),true).'</pre>');

    echo '<h3>no user set</h3>';
}

Would love to streamline it and clean it up.

linux – Dynamically changing cursor color rxvt/urxvt based on vim syntax

I try to switch my terminal emulator from terminator to urxvt. However, I cannot change the cursor background color dynamically depending on the underlying color of the syntax in vim in urxvt, which however works in terminator. This question is not about changing the cursor color depending on insert/normal mode, but changing the cursor color depending on the color of the syntax that the cursor is on. I use Arch Linux, i3wm, and the current rxvt-unicode package 9.22-10 and vim 8.2.1989.

terminator (green cursor background)

urxvt (white cursor background, want green)

.Xdefaults

!!! Config for urxvt terminal 
!INFO Own stuff
!URxvt.underlineURLs: true
URxvt*letterSpace: -2
!Using Xft.antialias changes the antialias option of !every! graphical program (firefox, ...)
URxvt.antialias:              true
URxvt.allow_bold:           true
!INFO It looks weird inside vim if I use pixelsize 23 or 25
URxvt*font:xft:Meslo LG S DZ for Powerline:pixelsize=24
URxvt*boldFont:xft:Meslo LG S DZ for Powerline:pixelsize=24:style=bold
! Fix bold colors
URxvt.intensityStyles: false 
!Use foreground color (text color) from terminator
*foreground: #839496

xterm*dynamicColors: true
urxvt*dynamicColors: on
!URxvt*cursorColor:  #D6C0FB
!URxvt*cursorBlink:  on

!Rest from  https://gist.github.com/yevgenko/1167205

!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------

Xft.dpi:                    96
!Xft.antialias:              false INFO Set this to true above, but only for URxvt 
Xft.rgba:                   rgb
Xft.hinting:                true
Xft.hintstyle:              hintslight

!-------------------------------------------------------------------------------
! URxvt settings
! Colours lifted from Solarized (http://ethanschoonover.com/solarized)
! More info at:
! http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod
!-------------------------------------------------------------------------------

URxvt.depth:                32
URxvt.geometry:             90x30
URxvt.transparent:          false
URxvt.fading:               0
! URxvt.urgentOnBell:         true
! URxvt.visualBell:           true
URxvt.loginShell:           true
URxvt.saveLines:            50
URxvt.internalBorder:       3
URxvt.lineSpace:            0

! Fonts
!URxvt.allow_bold:           false INFO Set to true above
/* URxvt.font:                 -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */
!URxvt*font: xft:Monospace:pixelsize=14 INFO Other font above
!URxvt*boldFont: xft:Monospace:pixelsize=14 INFO Other font above

! Fix font space 
!URxvt*letterSpace: -1 INFO I set it to -2 above

! Scrollbar
URxvt.scrollStyle:          rxvt
URxvt.scrollBar:            false

! Perl extensions
URxvt.perl-ext-common:      default,matcher
URxvt.matcher.button:       1
URxvt.urlLauncher:          firefox
URxvt.matcher.pattern.1: \bwww\.(\w-)\.(\w./?&@#-)*(\w/-)!Disabeling 
!INFO Mine URxvt.urlButton: 1

! Cursor
URxvt.cursorBlink:          true
!URxvt.cursorColor:          #657b83
URxvt.cursorUnderline:      false
!*cursorColor:      *XtDefaultForeground

! Pointer
URxvt.pointerBlank:         true

!!Source http://github.com/altercation/solarized

*background: #002b36
!*foreground: #657b83 INFO Custom foreground above
!!*fading: 40
*fadeColor: #002b36
*cursorColor: #93a1a1
*pointerColorBackground: #586e75
*pointerColorForeground: #93a1a1

!! black dark/light
*color0: #073642
*color8: #002b36

!! red dark/light
*color1: #dc322f
*color9: #cb4b16

!! green dark/light
*color2: #859900
*color10: #586e75

!! yellow dark/light
*color3: #b58900
*color11: #657b83

!! blue dark/light
*color4: #268bd2
*color12: #839496

!! magenta dark/light
*color5: #d33682
*color13: #6c71c4

!! cyan dark/light
*color6: #2aa198
*color14: #93a1a1

!! white dark/light
*color7: #eee8d5
*color15: #fdf6e3

unity – Script not working (Function not changing value)

I have this script that I made for an FPS character.

public class Player_Movement : MonoBehaviour

{
public CharacterController controller;
public Transform camera;

public float gravity = -9.81f;

public Transform groundCheck;
public float groundDistance = 0.4f;
public LayerMask groundMask;
bool grounded;

public GameObject joystick;
public bool isMoving;
public float speed = 12f;
public float turnSmoothTime = 0.1f;
float turnSmoothVelocity;

public float jumpHeight;
public Vector3 yPosition;
public bool jumpAble = true;

// Update is called once per frame
void FixedUpdate()
{
    grounded = Physics.CheckSphere(groundCheck.position, groundDistance, groundMask);

    if (grounded)
    {
        yPosition.y = -2f;
        jumpAble = true;
    }

    Vector3 direction = new Vector3(joystick.GetComponent<Joystick>().inputDirection.x, 0f, joystick.GetComponent<Joystick>().inputDirection.y);
    isMoving = direction.magnitude != 0 ? true : false;
    
    if (isMoving)
    {
        controller.Move(direction * speed * Time.deltaTime);
    }

    yPosition.y += gravity * Time.deltaTime;
    UnityEngine.Debug.Log(yPosition);
    controller.Move(yPosition * Time.deltaTime);
}

public Vector3 Jump()
 {
     UnityEngine.Debug.Log(jumpAble);
     UnityEngine.Debug.Log(grounded);
     if (jumpAble && grounded)
     {
         jumpAble = false;
         yPosition.y = Mathf.Sqrt(jumpHeight * -2 * gravity);
         UnityEngine.Debug.Log(yPosition.y);
         UnityEngine.Debug.Log(yPosition);
         return yPosition;
     }

     return yPosition;
 }

}

The game operates on mobile touch controls, and the Jump() is called when the jump button is pressed. However, the character does not jump when I press the button, even though the function is being called, and the yPoisition is being changed in the function. I know that changing the yPosition should make the player jump, as when I add this code to the Update:

if (Input.GetKey(KeyCode.Space) && jumpAble)
         {
             fallDown.y = Mathf.Sqrt(jumpHeight * -2 * gravity);
         }

Everything works fine.
Why is the new yPoisition value not being passed to Update, and why is this happening?

theming – Changing the layout of a Taxonomy Term Page

By default my taxonomy term page lists all articles using this term in 2-columns. I would like to change it to a 1-column layout.

(1) I have created a custom display layout for the taxonomy group:

enter image description here

(2) And selected the one column layout:

enter image description here

Still it doesn’t work. Any other changes, like adding a field, do work though. What am I missing?

google sheets – Changing the fontColor of cells when editing

I’m trying to write an Apps Script that change the font color of a cell when it value changes.

I found a way to to change de fontColor of a range, and add to trigger ‘onEdit’, but the all range is changing and not the single cells that I’ve been modify.

Here is my Script :

function changeFontColor() {

var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheetA1 = ss.getSheetByName(‘Voltaire’);
var lastRow = sheetA1.getLastRow();
var lastColumn = sheetA1.getLastColumn();
var dataRange = sheetA1.getRange(3, 3, lastRow -6, lastColumn);

dataRange.setFontColor(‘Red’);

}

Thank you !