Blog Post 4
Mantek Singh Bhatia
Self-Identity
Online Gaming
Avatars
Characterization
Author

Mantek Singh Bhatia

Published

October 25, 2022

Research Objective

My research objective for this project is to understand how people characterize their avatars in games.

Important

Here I use the term Research Objective because I do not have a specific Research Question in mind right now. This project is merely exploratory for me. It may develop closer to the end of the project.

Creating avatars in games gives people the freedom to be creative and cultivate an alternate identity. Now, this identity can be their “ideal self” or something that they just create for fun. To understand this process of creating identities I want to first examine the avatars people have already made. For this context I am thinking of scouring Reddit to find threads that talk about people describing the avatars/characters they have created while playing “Dungeons and Dragons”.

 
 
 

Data Collection

I was able to scrap data from multiple Reddit threads where users talk about their characters that they have created while playing a Dungeons and Dragons campaign.

 
 
 

 
 
 

Code
# install.packages("rvest")
# install.packages("RedditExtractoR")
# install.packages("textclean")
library(RedditExtractoR)
Warning: package 'RedditExtractoR' was built under R version 4.2.2
Code
library(rvest)
Warning: package 'rvest' was built under R version 4.2.2
Code
library(tidyverse)
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.3.6      ✔ purrr   0.3.5 
✔ tibble  3.1.8      ✔ dplyr   1.0.10
✔ tidyr   1.2.1      ✔ stringr 1.4.1 
✔ readr   2.1.3      ✔ forcats 0.5.2 
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter()         masks stats::filter()
✖ readr::guess_encoding() masks rvest::guess_encoding()
✖ dplyr::lag()            masks stats::lag()
Code
library(quanteda)
Package version: 3.2.3
Unicode version: 13.0
ICU version: 69.1
Parallel computing: 8 of 8 threads used.
See https://quanteda.io for tutorials and examples.
Code
library(quanteda.textplots)
library(textclean)
Warning: package 'textclean' was built under R version 4.2.2
Code
url <- c("https://www.reddit.com/r/DnD/comments/b1pk5c/tell_me_about_your_characters/", 
         "https://www.reddit.com/r/DnD/comments/33bv4f/best_dd_character_youve_made_or_seen/",
         "https://www.reddit.com/r/DnD/comments/37cx49/your_first_ever_dd_character/",
         "https://www.reddit.com/r/rpg/comments/2fk4op/best_dd_character_youve_ever_made/",
         "https://www.reddit.com/r/DnD/comments/cgdwgl/share_your_dnd_character/",
         "https://www.reddit.com/r/dndnext/comments/au8k0w/what_are_some_of_your_favourite_dd_character/")

#comments <- get_thread_content(url)
#save.image("mantek_blogpost4.RData")
load("mantek_blogpost4.RData")

#preprocessing
all_comments <- 
  comments$comments$comment %>% 
  str_replace_all("\n"," ")           #data cleaning

all_comments <- replace_contraction(all_comments)     #opened all contractions, like didn't to did not

tail(all_comments, n = 10)    #Some of the comments
 [1] "After watching a tierzoo video about companion races in nature, I want to play a Grung beastmaster. Their pet is a giant wolfspider, which the Grung rides.  It is a cute combination, but with Grung racials it can work surprisingly well.   The Grung has poison it can apply to weapons so would either go duelling shortswords or archery hand crossbow master. Adding 2d4 poison damage each hit is sure to add up - it\031s a \034free\035 Hunter\031s Mark!"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 [2] "Human champion fighter with spear mastery, soldier.  A 30 year old, ugly bald peasant who was forcably conscripted at a young age. He was forced to fight in a war where he suffered hardship, sickness which turned him into an angry bitter man. I like the simpilcity of it, I do not typically do for ther most heroic characters. "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
 [3] "I am having the most fun playing Mantaraya, a water genasi fighter with a passion for sewing. He once outswam a bull shark to save a friend and is therefore styled after a matador. He has horrible rolls in combat.   Other notable characters include:  Lim: a half elf evocation wizard from a well respected family of high elf divination wizards. Her elf mother cheated on her father and died in childbirth, and her father was too focused on his studies to notice or care. She has an heirloom set of her grandmother's bones that she can not actually use to divine anything. Nonetheless she pretends (I normally roll all of my dice and make generalizations from their total).   Riis: the \"human male farmer\" who is actually a half elf female rogue in disguise. She is a pathological liar and deeply committed this alter ego, even when the facts do not line up. I played her in a bronze age campaign, which happened to end with the assassination of their heir to the Persian Empire. Shortly after, Cyrus the Great ascended and Riis slipped out of spotlight. Coincidence?   Ksssht: my first ever character was an owlbear. Her cubs were taken and sold into slavery, so she came out of the forest to find them and left absolute destruction wherever she went. The party also included a deranged warlock, so the paladin spent a lot of time apologizing to/buying off local business owners .  "
 [4] "I\031ve got 1 more!  - Bronze Dragon, Red dragon sorc 14/Fiendlock 3/Champion 3, Haunted one \024 Bronze Dragonborn kicked out of clan after Tiamat makes him a warlock and draws out his red dragon blood. Take elemental adept and dragon fear feats if cha is maxed. Dex and con should be semi-decent. For added fun, take eldritch blast and agonising blast invocation. At max, this can do 4d10+20. Quicken spell another for another 1d10+5 and action surge. Assuming all hit, that\031s 10d10+50"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
 [5] "Human, beserker barbarian and vengence paladin.  An old man, about 45 years old. A psychopath whose blood lust knows no bound, yet has developed enough discipline and mental fortitude to resist it. A violent and wrathful man. He has spent years focusing and weaponising his rage and cruelty on those who deserve it. With friends and family he is the kindest and most loving man you will see. With his enemies, all they see is the monster that makes other monster run in terror.  Really want to play this guy, but he is wayy too destructive and cruel to unleash on any DM."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 [6] "Rogue trickster but reimagined as a 17 y.o. boy that is TRYING for maximum edge. Taking necromancy spells for flavor hes on a quest to prove to his mom and dad that \"it is not just a phase\""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
 [7] "My current favorite character concept just because I have gotten so much mileage out of it. Is an evil gnome wizard who uses a forgery kit to impersonate various government officials. Health and Safety inspector!, Weights and Measures departments, ect. ect. ect.  Or Oh by the way Duegar Leader this scroll I found, depicts you as the HEROINE OF LEGEND WHO SLAYS THE DRAGON...oh by the way there is also a handsome gnome wizard depicted as your advisor! wow!  Its nice to have a way to interact with NPC's without a high Cha score."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
 [8] "A druid black cat who is embarrassed by her human form. She has a tragic background.   She was originally from the coast tribe, and therefore knows misty step, water walking, and water breathing. But because she was extraordinarily pretty as a human, her tribe sold her into slavery when she was 8. She escaped, and now is a mercenary chaoitic neutral. She is incredibly independent, and does not trust anyone and is just trying to survive.   Because of her relationship with the coast tribe, she hates water and has taken an interest in fire spells. She hates being touched or pet, is extremely self-conscious about her human form, and goes to great lengths to make sure nobody sees her human form.  She is adept in defensive water and fire magic.   She is in desperate need of a bond, and if she finds one, it will be the most important thing in the world to her."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
 [9] "Here's one I thought was pretty funny. A dwarven fighter gunslinger whose main goal was to industrialize the crafting and manufacturing of firearms and then sell them to warring kingdoms in the hopes of become a war profiteer and further expanding his influence to more kingdoms."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
[10] "I have been waiting to do an artificer multiclassing into paladin. Dwarf as race. When an engineer graduated university, they take the Engineers Creed. If you are unaware of what that is, essentially they swear to serve the betterment of mankind with honesty, integrity, etc. I would build him as a support character making prosthetics, maybe armor, and other non combatative tools (maybe nonlethal weapons if I did any at all). Rp character more than anything"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Code
reddit_DnD_characters <- corpus(all_comments)
DnD_summary <- summary(reddit_DnD_characters, n = Inf)
DnD_summary             #SUmmary of the corpus
Corpus consisting of 375 documents, showing 375 documents:

    Text Types Tokens Sentences
   text1   207    379        15
   text2    17     18         2
   text3    53     66         2
   text4    48     58         3
   text5    15     18         2
   text6    39     42         4
   text7     1      1         1
   text8    69     93         1
   text9    45     52         3
  text10    74    112         5
  text11    96    134         6
  text12    10     11         2
  text13   176    313        15
  text14    67     90         5
  text15   199    366        18
  text16    24     29         3
  text17    68     86         6
  text18    60     84         4
  text19    81    106         8
  text20   128    217         7
  text21   559   1118        55
  text22   150    250        10
  text23   414    955        45
  text24    57     81         2
  text25   226    420        15
  text26   207    345        13
  text27   127    228         5
  text28   194    364        12
  text29   116    196         8
  text30    16     17         1
  text31    74    107         6
  text32   233    404        13
  text33    25     28         3
  text34   229    421        17
  text35    67     86         5
  text36   174    300        10
  text37   110    182        13
  text38   218    396        10
  text39    64     86         4
  text40    51     64         3
  text41   295    606        24
  text42   262    528        23
  text43    45     55         6
  text44   413    929        47
  text45   208    403        12
  text46     6      6         1
  text47    17     17         1
  text48   114    188         8
  text49    13     13         1
  text50    22     26         2
  text51    36     44         3
  text52    54     78         4
  text53    18     19         1
  text54   141    231        12
  text55    35     44         3
  text56    23     25         2
  text57    42     46         1
  text58    37     47         4
  text59   160    270         3
  text60   106    166         9
  text61   134    227        17
  text62    25     26         2
  text63    10     10         1
  text64   111    196         8
  text65    96    139         8
  text66   104    136         7
  text67   218    370        16
  text68    27     32         3
  text69    21     24         2
  text70    91    142         9
  text71    41     59         5
  text72     3      3         1
  text73    33     41         3
  text74    10     10         2
  text75   234    442        24
  text76    93    150         7
  text77   126    194         7
  text78    21     21         2
  text79     9      9         1
  text80    36     47         2
  text81    68     88         4
  text82    42     50         1
  text83    41     50         3
  text84     3      3         1
  text85    17     17         1
  text86    17     18         3
  text87     9      9         1
  text88    15     15         1
  text89   146    241        10
  text90    68     87         4
  text91   151    258         8
  text92   145    264        14
  text93    58     80         5
  text94    67     92         3
  text95   134    236        12
  text96    71     98         4
  text97    64     82         5
  text98   199    393        23
  text99   541   1299        46
 text100   189    309        11
 text101    64     83         5
 text102   188    366        12
 text103   241    442        16
 text104    50     62         4
 text105   295    623        32
 text106   212    369         1
 text107   166    281        16
 text108    81    115         2
 text109   134    226         1
 text110   189    349        14
 text111   317    683        39
 text112   128    210        10
 text113   169    311        21
 text114   174    289        13
 text115    85    141         7
 text116    10     10         1
 text117     8     10         2
 text118   114    171        11
 text119    22     26         3
 text120    19     22         2
 text121   121    196         8
 text122    94    139         5
 text123   103    164        13
 text124    49     71         4
 text125    52     63         3
 text126   140    243         8
 text127   158    275        17
 text128    34     46         4
 text129   104    175        13
 text130    20     22         3
 text131    44     60         5
 text132    51     64         2
 text133     9     10         2
 text134    23     28         4
 text135   142    224         9
 text136    89    138         5
 text137    59     94         6
 text138    24     24         1
 text139    39     51         4
 text140    12     13         1
 text141    15     15         1
 text142    61     74         4
 text143     7      7         1
 text144    77     98         4
 text145    80    114         4
 text146    27     31         2
 text147    47     59         3
 text148   129    192         6
 text149    66     91         6
 text150    44     50         3
 text151    55     91         5
 text152    27     34         4
 text153   102    160         7
 text154    33     36         2
 text155    96    140         5
 text156    31     34         3
 text157    67     79         3
 text158    59     79         3
 text159    70     99         5
 text160   147    250        11
 text161    40     61         4
 text162   113    188         7
 text163    14     17         2
 text164    34     39         2
 text165    34     44         3
 text166    83    115        10
 text167    94    140        12
 text168   114    163         6
 text169    28     36         3
 text170   199    359         9
 text171    44     56         3
 text172   160    238        13
 text173    91    136         5
 text174    75    112         6
 text175    32     40         4
 text176    57     72         4
 text177    69    103         6
 text178   157    291        17
 text179   152    287        16
 text180    97    136         4
 text181   352    803        38
 text182    99    145         7
 text183   101    169         9
 text184   143    227        10
 text185    80    130         3
 text186    68     84         4
 text187    43     57         5
 text188    84    115         2
 text189    61     78         5
 text190    24     26         3
 text191     7      7         1
 text192    81    118         6
 text193    26     32         3
 text194    58     72         4
 text195    93    132         6
 text196    47     65         4
 text197   101    155         9
 text198    46     61         6
 text199    85    132         6
 text200    10     10         1
 text201    77    127        10
 text202   368    858        46
 text203    21     24         2
 text204    54     71         5
 text205    79    105         5
 text206   187    357        20
 text207    16     18         3
 text208    10     15         2
 text209    36     50         2
 text210   145    247         9
 text211    89    120         6
 text212    20     20         1
 text213    48     71         5
 text214   102    156         9
 text215   197    370        19
 text216    10     12         1
 text217    56     75         4
 text218    74     99         7
 text219     2      2         1
 text220    19     20         2
 text221     1      1         2
 text222   146    230        17
 text223    10     10         1
 text224    19     23         2
 text225    21     22         2
 text226    22     25         1
 text227    19     24         3
 text228    64     83         5
 text229    39     47         2
 text230    12     12         2
 text231    13     14         1
 text232   208    387        20
 text233     9      9         1
 text234   264    518        20
 text235    63     75         3
 text236   230    461        22
 text237    18     20         1
 text238   118    184        15
 text239   124    211        13
 text240     6      6         1
 text241    23     25         5
 text242     6      6         2
 text243   177    308        15
 text244   106    174         7
 text245   189    350        18
 text246     3      3         1
 text247    13     13         1
 text248    34     46         2
 text249   133    224        13
 text250    74    108         5
 text251    22     22         2
 text252   156    289        12
 text253    73     92         4
 text254   312    687        72
 text255    82    108         4
 text256   135    207        13
 text257   151    259         9
 text258    89    118         9
 text259   135    225         5
 text260   107    166         6
 text261   136    241        10
 text262    36     43         4
 text263    19     24         2
 text264    43     53         5
 text265     8      8         1
 text266    96    145         8
 text267    77    111         6
 text268    58     73         7
 text269    53     68         5
 text270    15     17         1
 text271    43     56         3
 text272     3      3         1
 text273    49     71         4
 text274     0      0         0
 text275    51     66         5
 text276    22     25         2
 text277   425    941        39
 text278   192    320        12
 text279   117    201         9
 text280   490   1278        38
 text281   127    217        13
 text282   304    738        29
 text283   243    464        28
 text284    77    118         4
 text285    10     10         1
 text286    87    120         6
 text287    38     50         2
 text288    37     47         2
 text289    28     30         1
 text290     3      3         1
 text291    14     15         1
 text292   144    221         9
 text293    99    144         5
 text294    12     12         1
 text295    82    119         5
 text296    66     80         5
 text297    75     99         6
 text298    19     19         1
 text299   246    473        16
 text300   107    147         6
 text301   192    352        16
 text302   153    255        13
 text303   123    209         7
 text304    12     13         1
 text305    44     53         2
 text306   146    254        11
 text307   106    178         8
 text308    27     33         1
 text309   341    717         5
 text310    29     33         1
 text311   163    304        12
 text312     3      3         1
 text313    44    103         4
 text314   250    489        18
 text315   128    204         8
 text316    69     96         6
 text317   305    594        13
 text318   178    317        16
 text319   150    280        11
 text320     5      6         1
 text321   147    232         8
 text322    41     56         5
 text323    73    110         4
 text324    26     31         2
 text325    63     78         3
 text326   119    202         8
 text327    62     76         5
 text328    17     18         3
 text329    25     28         1
 text330     7      7         1
 text331   305    760        36
 text332    61     82         2
 text333     6      9         2
 text334   141    216        13
 text335    15     16         2
 text336     2      2         1
 text337    41     45         4
 text338    95    142         5
 text339    51     65         2
 text340    20     22         1
 text341   110    206         8
 text342    98    154         8
 text343    47     59         2
 text344   181    269        14
 text345   100    144         7
 text346    75    106         3
 text347    11     11         1
 text348    92    149         5
 text349    67     85         3
 text350    31     38         3
 text351    61     82         5
 text352   144    273        15
 text353   179    282        12
 text354    80    114         6
 text355    81    127         7
 text356     7      7         1
 text357     4      4         1
 text358   285    596        24
 text359    18     19         1
 text360    98    138         6
 text361   115    170         8
 text362   110    177         7
 text363    15     15         1
 text364    59     83         4
 text365   390    813        26
 text366    67     88         5
 text367    57     67         4
 text368   178    273        15
 text369    82    105         7
 text370    80    116         8
 text371    34     42         2
 text372    80    110         6
 text373    99    176        10
 text374    39     48         2
 text375    70     89         6
Code
DnD_tokens <- tokens(reddit_DnD_characters); DnD_tokens       #tokens before preprosessing
Tokens consisting of 375 documents.
text1 :
 [1] "I"       "will"    "give"    "my"      "top"     "three"   ":"      
 [8] "*"       "*"       "Moxt"    "Draaxis" "of"     
[ ... and 367 more ]

text2 :
 [1] "I"         "love"      "both"      "of"        "these"     "dragon"   
 [7] "builds"    "."         "My"        "newest"    "character" "is"       
[ ... and 6 more ]

text3 :
 [1] "Human"     "Ex-Monk"   "Rogue"     "."         "He"        "used"     
 [7] "to"        "live"      "in"        "a"         "monastery" "but"      
[ ... and 54 more ]

text4 :
 [1] "I"          "play"       "a"          "black"      "Dragonborn"
 [6] "Hexblade"   "Warlock"    "who"        "has"        "recently"  
[11] "come"       "into"      
[ ... and 46 more ]

text5 :
 [1] "Water"     "Genasi"    "Cleric"    "of"        "the"       "Moon"     
 [7] "Weaver"    "who"       "is"        "from"      "the"       "Elemental"
[ ... and 6 more ]

text6 :
 [1] "Brass"        "Dragonborn"   "Cleric"       "of"           "the"         
 [6] "Forge"        "."            "Performer"    ":"            "specifically"
[11] "sword"        "swallowing"  
[ ... and 30 more ]

[ reached max_ndoc ... 369 more documents ]
Code
#Removed Punctuation
#Removed symbols
#Removed Numbers
#Removed Stopwords

DnD_tokens <- tokens(reddit_DnD_characters, remove_punct=TRUE, remove_symbols = TRUE,
                     remove_numbers = TRUE) %>%
  tokens_select(pattern=stopwords("en"), selection="remove"); DnD_tokens
Tokens consisting of 375 documents.
text1 :
 [1] "give"       "top"        "three"      "Moxt"       "Draaxis"   
 [6] "Clan"       "Korinth"    "White"      "Dragonborn" "Barbarian" 
[11] "peircing"   "blue"      
[ ... and 166 more ]

text2 :
[1] "love"       "dragon"     "builds"     "newest"     "character" 
[6] "Dragonborn" "raised"     "halflings" 

text3 :
 [1] "Human"     "Ex-Monk"   "Rogue"     "used"      "live"      "monastery"
 [7] "abandoned" "chaotic"   "didn"      "t"         "abide"     "rules"    
[ ... and 22 more ]

text4 :
 [1] "play"       "black"      "Dragonborn" "Hexblade"   "Warlock"   
 [6] "recently"   "come"       "power"      "spirit"     "dead"      
[11] "silver"     "dragon"    
[ ... and 16 more ]

text5 :
[1] "Water"     "Genasi"    "Cleric"    "Moon"      "Weaver"    "Elemental"
[7] "Plane"     "Air"       "Yup"      

text6 :
 [1] "Brass"        "Dragonborn"   "Cleric"       "Forge"        "Performer"   
 [6] "specifically" "sword"        "swallowing"   "come"         "better"      
[11] "go"           "Later"       
[ ... and 7 more ]

[ reached max_ndoc ... 369 more documents ]
Code
DnD_dfm <- DnD_tokens %>% 
  dfm() %>%
  dfm_trim(min_termfreq = 20, verbose = FALSE)

DnD_dfm         #The DFM
Document-feature matrix of: 375 documents, 212 features (91.78% sparse) and 0 docvars.
       features
docs    give dragonborn barbarian love good fight well also go way
  text1    1          1         1    1    2     1    2    4  1   1
  text2    0          1         0    1    0     0    0    0  0   0
  text3    0          0         0    0    1     0    0    0  0   0
  text4    1          1         0    0    0     0    0    0  0   0
  text5    0          0         0    0    0     0    0    0  0   0
  text6    0          1         0    0    0     0    0    0  1   0
[ reached max_ndoc ... 369 more documents, reached max_nfeat ... 202 more features ]
Code
all_features <- featnames(DnD_dfm); all_features
  [1] "give"       "dragonborn" "barbarian"  "love"       "good"      
  [6] "fight"      "well"       "also"       "go"         "way"       
 [11] "help"       "others"     "people"     "world"      "home"      
 [16] "house"      "paladin"    "however"    "made"       "small"     
 [21] "back"       "dragon"     "sorcerer"   "spells"     "like"      
 [26] "fun"        "fire"       "always"     "character"  "human"     
 [31] "rogue"      "used"       "chaotic"    "basically"  "just"      
 [36] "make"       "magic"      "s"          "kind"       "even"      
 [41] "name"       "play"       "warlock"    "power"      "dead"      
 [46] "weapon"     "war"        "cleric"     "better"     "later"     
 [51] "little"     "called"     "two"        "time"       "soon"      
 [56] "going"      "ranger"     "sure"       "last"       "pretty"    
 [61] "party"      "big"        "campaign"   "d"          "amp"       
 [66] "think"      "best"       "life"       "many"       "left"      
 [71] "see"        "since"      "named"      "real"       "something" 
 [76] "new"        "part"       "family"     "killed"     "ever"      
 [81] "one"        "day"        "got"        "away"       "took"      
 [86] "came"       "found"      "decided"    "find"       "spell"     
 [91] "now"        "right"      "story"      "dwarf"      "druid"     
 [96] "death"      "old"        "friend"     "person"     "city"      
[101] "god"        "full"       "man"        "elf"        "first"     
[106] "knowledge"  "can"        "cast"       "wizard"     "group"     
[111] "gold"       "bard"       "times"      "trying"     "long"      
[116] "remember"   "place"      "went"       "lot"        "still"     
[121] "young"      "around"     "using"      "get"        "things"    
[126] "use"        "try"        "friends"    "much"       "game"      
[131] "played"     "level"      "fighter"    "high"       "neutral"   
[136] "hand"       "another"    "town"       "currently"  "order"     
[141] "class"      "never"      "really"     "often"      "magical"   
[146] "due"        "battle"     "hit"        "without"    "started"   
[151] "master"     "became"     "become"     "far"        "player"    
[156] "take"       "every"      "damage"     "characters" "halfling"  
[161] "lawful"     "want"       "let"        "know"       "idea"      
[166] "years"      "shield"     "ended"      "powerful"   "everyone"  
[171] "gave"       "though"     "evil"       "bad"        "strength"  
[176] "work"       "almost"     "said"       "kill"       "great"     
[181] "giant"      "guy"        "enough"     "wanted"     "mind"      
[186] "mage"       "father"     "village"    "actually"   "race"      
[191] "eventually" "set"        "next"       "half"       "orc"       
[196] "tried"      "save"       "end"        "managed"    "point"     
[201] "combat"     "dm"         "kept"       "brother"    "favorite"  
[206] "thought"    "playing"    "thing"      "died"       "rest"      
[211] "everything" "rurik"     

 
 
 

Note

Now we look at some of the common words in our document feature matrix and evaluate whether they are important in the context of characters created by the D&D players. If they are not, they will be removed from our Bag of Words.

 
 
 

Code
kwic_time <- kwic(reddit_DnD_characters, pattern = phrase("time")); head(kwic_time, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                           
    [text8, 60]         it.is friendly most of the | time |
  [text13, 119]          The portal closed just in | time |
  [text13, 171]             had not felt since her | time |
   [text18, 32]          beloved su-zee. He passes | time |
  [text21, 208]               , heal and spend his | time |
 [text21, 1033]                 a toga most of the | time |
  [text26, 307]             a flight of stairs any | time |
   [text29, 59]             village. He spent some | time |
   [text36, 50]               and do not waste his | time |
  [text41, 503] adopted dragonborn FenShawn and in | time |
                              
 but is fairly greedy and     
 for Phrixus to make it       
 as a mortal, and             
 by trying to make others     
 buffing party members. During
 and sat in a few             
 he tries to sneak.           
 in a monastery learning about
 with polite etiquette. He    
 Tru gained an affinity for   
Code
kwic_character <- kwic(reddit_DnD_characters, pattern = phrase("character")); head(kwic_character, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                               
   [text2, 11]           dragon builds. My newest | character |
   [text20, 6]      Fiasco Brimminghouse ( an old | character |
  [text23, 27]               one is a minmax joke | character |
   [text24, 7]        best friend has a recurring | character |
   [text41, 6]    Just finished backstory for new | character |
  [text44, 13]            have just been the same | character |
 [text44, 135] adventures because of this idiotic | character |
 [text44, 840]              a chance to play this | character |
 [text44, 919]           campaign and send me his | character |
  [text48, 19]              it years ago but that | character |
                                  
 is a Dragonborn raised by        
 of mine, long since              
 , but I love him                 
 , named Earl son of              
 . Adopted brothers ( dragonborn  
 across different universes in the
 . Oh, and he                     
 at some point, as                
 sheet so I can add               
 always stood out to me           
Code
kwic_party <- kwic(reddit_DnD_characters, pattern = phrase("party")); head(kwic_party, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                                 
  [text10, 74]                      and takes risks. My | party |
  [text10, 85]                      big blue mom of the | party |
  [text14, 54]                 . Likes to accompany the | party |
 [text21, 210]               and spend his time buffing | party |
 [text21, 538]          harrowing aftermath caused by a | party |
 [text31, 105]             already converted one of our | party |
 [text32, 218]                  , keepsakes from an old | party |
 [text34, 124] Gruumsh using an unfortunate adventuring | party |
 [text44, 251]                    and hang out near the | party |
 [text44, 861]                   spell the first time a | party |
                                 
 referred to her as the          
 . Edit: Her name                
 rouge on assassinations by being
 members. During downtime in     
 of adventurers killing the main 
 members.                        
 of clerics and paladins she     
 . Drox...                       
 s tank. He also                 
 is about to get steamrolled     
Code
kwic_love <- kwic(reddit_DnD_characters, pattern = phrase("love")); head(kwic_love, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                     
   [text1, 52]          cocky, arrogant, and | love |
    [text2, 2]                             I | love |
 [text13, 289]            last note, I would | love |
 [text15, 260] eladrin with wanderlust and a | love |
  [text22, 26]            all means, I would | love |
  [text23, 31]         joke character, but I | love |
 [text42, 288]       is a necromancer with a | love |
 [text42, 479]        in time magic and will | love |
 [text44, 454]     like playing druids and I | love |
   [text55, 2]                             I | love |
                                    
 a good fight as well               
 both of these dragon builds        
 to have him be an                  
 for beauty and new experiences     
 to see Quinnlan Strongspirit arrive
 him.** Edmund                      
 and appreciation of music,         
 to learn more about it             
 the CN alignment?.                 
 it. I havent had                   
Code
kwic_kind <- kwic(reddit_DnD_characters, pattern = phrase("kind")); head(kwic_kind, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                       
    [text3, 45]             He s Chaotic Good, | kind |
  [text23, 499]         appearance, he is very | kind |
  [text23, 554]              battle. He is the | kind |
  [text29, 148]         and pointy ears of his | kind |
  [text38, 349] perhaps more Richard Grayson ( | kind |
  [text44, 302]    let you piece together what | kind |
   [text97, 52]                 roll. He was a | kind |
 [text106, 272]        wife was priceless, its | kind |
 [text107, 210]               Now he is a more | kind |
 [text113, 218]        , recognizing it as the | kind |
                                     
 but misguided, and has              
 , and is the first                  
 of person that if he                
 . He wears three iron               
 , compassionate, friendly,          
 of mischief came about with         
 soul, a genuinly good               
 of hard to relive the               
 man, but if anyone                  
 of ill-informed prejudice she sought
Code
kwic_man <- kwic(reddit_DnD_characters, pattern = phrase("man")); head(kwic_man, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                          
 [text15, 162]            but a good and honorable | man |
 [text42, 313]                home. A very curious | man |
 [text42, 379]          Present Corus is a scarred | man |
 [text65, 134]                round if she hadn't. | Man |
   [text66, 1]                                     | Man |
 [text75, 221]               she shouts at the old | man |
 [text75, 292]              . You approach the old | man |
 [text89, 187]         the Renegade Mastermaker, a | man |
  [text91, 87]        Eladrin Hexblade ), Thinking | Man |
  [text97, 19] a totally average milquetoast young | man |
                              
 . A wood elf rogue           
 who has a nasty habit        
 , having lost his left       
 that was fun ^ ^             
 idk; most of me              
 . He still has his           
 placing your hand on his     
 who seeks to be a            
 ( Elan Eladrin Psion )       
 who got caught up adventuting
Code
kwic_full <- kwic(reddit_DnD_characters, pattern = phrase("full")); head(kwic_full, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                       
 [text15, 154]             . He is pompous and | full |
  [text20, 22]          a young tiefling bard, | full |
 [text23, 922]             this. Nothing else. | Full |
  [text25, 47]                 giants. he is a | full |
 [text26, 157]          and Sentinel. He wears | Full |
 [text26, 168]            made to be worn over | Full |
 [text26, 298] like someone dropped a cupboard | full |
 [text26, 339]    anyone, even someone wearing | full |
 [text34, 418]        of people who are always | full |
 [text67, 334]              not get to see the | full |
                              
 of himself but a good        
 of life and loving it        
 plate armor, spiked shields  
 ranger, favoured enemy Giants
 Plate with a special robe    
 Plate. It looks like         
 of pans down a flight        
 plate, would normally make   
 of hate.                     
 potential of the little guy  
Code
kwic_group <- kwic(reddit_DnD_characters, pattern = phrase("group")); head(kwic_group, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                      
 [text15, 295]  finds a traveling caravan or | group |
  [text31, 49]        Hes lawful evil but my | group |
  [text31, 86]          made them purple. My | group |
 [text45, 143]          choice but to join a | group |
 [text45, 184]   were incredibly useful to a | group |
 [text45, 253]     Initially the rest of the | group |
 [text45, 304] from rushing headlong after a | group |
 [text45, 322]     ( that Thexbas warned the | group |
 [text45, 349]         the new leader of the | group |
 [text45, 371]         a bard who joined the | group |
                                       
 and tags along. She                   
 thinks he is lawful good              
 thinks im our moral compass           
 of adventurers traveling cross country
 of adventurers, what with             
 was annoyed by him,                   
 of orcs and falling into              
 to let go as it                       
 , much to his (                       
 shortly after and the rest            
Code
kwic_barbarian <- kwic(reddit_DnD_characters, pattern = phrase("barbarian")); head(kwic_barbarian, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                                
   [text1, 20]          Korinth** White Dragonborn | Barbarian |
   [text19, 6] Alferd One-Tooth Elverson. Half-orc | Barbarian |
 [text21, 945]         one shot lvl 3 Invulnerable | Barbarian |
  [text36, 15]            Yarit** Green Dragonborn | Barbarian |
  [text41, 25] together FenShawn: Green Dragonborn | Barbarian |
   [text61, 6]    Dyrgon Shatterbeard. The dwarven | barbarian |
 [text77, 164]             , even past the Vampire | Barbarian |
  [text90, 13]         dancing the Hakka. Half-orc | barbarian |
   [text92, 4]                  Urzva the Half-Orc | Barbarian |
  [text92, 11]            She was mostly a typical | Barbarian |
                             
 with peircing blue eyes,    
 . One tusk broken off       
 with a twist, all           
 / Nature Cleric with soft   
 , stealth bias Abandoned as 
 that one shotted a bone     
 Aristocrat who fell in puppy
 whose weapon and also method
 . She was mostly a          
 , but she was fucking       
Code
kwic_dragonborn <- kwic(reddit_DnD_characters, pattern = phrase("dragonborn")); head(kwic_dragonborn, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                             
   [text1, 19]            Clan Korinth** White | Dragonborn |
   [text2, 14]        My newest character is a | Dragonborn |
    [text4, 5]                  I play a black | Dragonborn |
    [text6, 2]                           Brass | Dragonborn |
  [text15, 23]           his parents friend, a | dragonborn |
 [text21, 592]             life. Asurath: Blue | Dragonborn |
 [text21, 881]      another player made a Gold | Dragonborn |
  [text36, 14]               Aqi Yarit** Green | Dragonborn |
  [text41, 11]   character. Adopted brothers ( | dragonborn |
  [text41, 24] banded together FenShawn: Green | Dragonborn |
                                  
 Barbarian with peircing blue eyes
 raised by halflings.             
 Hexblade Warlock who has recently
 Cleric of the Forge.             
 cleric of Bahamut. He            
 , he used to be                  
 fighter, and we were             
 Barbarian/ Nature Cleric with    
 and halfling ) that reconnected  
 Barbarian, stealth bias Abandoned

 
 
 

Note

You can see from the contextual analysis words like time, character, love, etc., are used in the colloquial sense and does not add any meaning to our analysis of the characters, however, words like bargarian, dragonborn are directly related to the characters defined by the D&D players. Hence, we remove many common words from our DFM.

 
 
 

Code
DnD_dfm1 <- dfm_remove(DnD_dfm, c("give", "love", "well", "also", "go", "way", "help", "like", "fun", "fire", "always", "character",
                                  "used", "basically", "just", "make", "s", "even", "name","play", "dead", "weapon", "better", "later", 
                                  "little", "others", "people", "world", "home", "house","however", "made", "small", "back",
                                  "called", "two", "time", "soon",  "going", "sure", "last", "pretty", "party", "big", "d", "amp",
                                  "think", "best", "life", "many", "left", "see", "since", "named", "real", "something", "new","part",
                                  "ever", "one", "day", "got", "away", "took", "came", "found", "decided", "find", "now", "right",
                                  "person", "first", "can", "group", "times", "trying", "long", "remember", "place", "went", "lot",                                          "still","around", "using", "get", "things", "use", "try", "much", "another", "currently", "never", 
                                  "really","due", "without", "started", "became", "become", "far", "take", "every", "characters", "want",                                    "let", "know", "ended", "everyone", "gave", "though", "almost", "said", "great", "guy", "enough",
                                  "actually", "eventually", "set", "next", "tried", "managed", "kept", "thought", "playing", "thing",                                        "rest", "everything"))

featnames(DnD_dfm1)
 [1] "dragonborn" "barbarian"  "good"       "fight"      "paladin"   
 [6] "dragon"     "sorcerer"   "spells"     "human"      "rogue"     
[11] "chaotic"    "magic"      "kind"       "warlock"    "power"     
[16] "war"        "cleric"     "ranger"     "campaign"   "family"    
[21] "killed"     "spell"      "story"      "dwarf"      "druid"     
[26] "death"      "old"        "friend"     "city"       "god"       
[31] "full"       "man"        "elf"        "knowledge"  "cast"      
[36] "wizard"     "gold"       "bard"       "young"      "friends"   
[41] "game"       "played"     "level"      "fighter"    "high"      
[46] "neutral"    "hand"       "town"       "order"      "class"     
[51] "often"      "magical"    "battle"     "hit"        "master"    
[56] "player"     "damage"     "halfling"   "lawful"     "idea"      
[61] "years"      "shield"     "powerful"   "evil"       "bad"       
[66] "strength"   "work"       "kill"       "giant"      "wanted"    
[71] "mind"       "mage"       "father"     "village"    "race"      
[76] "half"       "orc"        "save"       "end"        "point"     
[81] "combat"     "dm"         "brother"    "favorite"   "died"      
[86] "rurik"     
Code
topfeatures(DnD_dfm1, 100)
      good   campaign      magic         dm      human    fighter      rogue 
        98         82         77         71         70         67         64 
    wizard      years       evil        elf       bard     ranger    paladin 
        64         64         61         58         57         56         54 
    played        old     dragon       game     spells     cleric        man 
        53         52         50         50         48         48         46 
      cast      level        god       town     family    warlock      power 
        46         44         43         43         40         38         38 
    killed      dwarf   halfling       died     father      fight       half 
        38         37         37         35         34         33         32 
    battle     friend        end  barbarian   sorcerer      giant     wanted 
        31         30         30         29         29         29         29 
     point       city    friends      druid      spell      class     master 
        29         28         28         27         26         26         26 
      idea   favorite dragonborn       full        war      story        hit 
        26         26         25         25         24         24         24 
  powerful       mind       save      rurik      death       gold       high 
        24         24         24         24         23         23         23 
       bad       kind  knowledge      order      often     damage       work 
        23         22         22         22         22         22         22 
   village        orc     combat    chaotic       hand    magical     player 
        22         22         22         21         21         21         21 
    lawful   strength       kill       mage       race    brother      young 
        21         21         21         21         21         21         20 
   neutral     shield 
        20         20 
Code
textplot_wordcloud(DnD_dfm1)      #Word Cloud of the existing tokens

Code
kwic_chaotic_good <- kwic(reddit_DnD_characters, pattern = phrase("chaotic good")); head(kwic_chaotic_good, n=100)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 8 matches.                                                                   
    [text3, 42:43]               with magic ) He s | Chaotic Good |
 [text23, 286:287]       collect. His alignment is | Chaotic Good |
 [text23, 647:648]      . He was somewhere between | Chaotic good |
     [text27, 4:5]                    Moonpaw, the | Chaotic Good |
     [text30, 4:5]                       Mine is a | Chaotic good |
   [text33, 16:17] maintain the elemental balance. | Chaotic Good |
  [text114, 48:49]                   of: Korun, my | chaotic good |
  [text179, 42:43]               folk hero. She is | chaotic good |
                                
 , kind but misguided,          
 , though if you asked          
 and True Neutral ( I           
 Boy. he is a                   
 , Dwarven cerebremancer who has
 sorcerer/ warlock. His         
 fighter/ rogue who somehow     
 . She is easily trusting       
Code
kwic_lawful_good <- kwic(reddit_DnD_characters, pattern = phrase("lawful good")); head(kwic_lawful_good, n=100)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 7 matches.                                                               
    [text22, 46:47]       Halfling Lore Bard 8. | Lawful Good |
    [text31, 53:54]       my group thinks he is | lawful good |
    [text38, 98:99]          made a pact with a | lawful good |
 [text109, 133:134]             ( a cult of the | lawful good |
 [text244, 131:132]     his doctrine legal, the | lawful good |
 [text245, 287:288] and shifted my alignment to | Lawful Good |
 [text326, 133:134]     a super kind character, | lawful good |
                               
 , but is not afraid           
 . He has purple eyes          
 celestial being to empower his
 wind archon Chan ) was        
 dwarf had to adhere to        
 , which broke most of         
 , just trying to live         
Code
kwic_neutral_good <- kwic(reddit_DnD_characters, pattern = phrase("neutral good")); head(kwic_neutral_good, n=100)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 2 matches.                                                    
     [text207, 2:3]               A | Neutral Good |
 [text334, 119:120] this one, but a | neutral good |
                                     
 Summoner in Pathfinder. That        
 warforged fighter/ Celestial warlock
Code
kwic_family <- kwic(reddit_DnD_characters, pattern = phrase("family")); head(kwic_family, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                     
  [text13, 42]   part of a prominent noble | family |
  [text13, 48]       in the Underdark. His | family |
 [text13, 211]  the faction who killed his | family |
  [text14, 44]    death of his adoptive be | family |
 [text25, 147]        out to find his real | family |
  [text37, 26]      things went south. The | family |
  [text37, 43]  for the destruction of his | family |
  [text38, 13] Born of peasantry, Dalton's | family |
  [text38, 76]   the noble that ruined his | family |
 [text38, 186]     the ones who helped his | family |
                             
 in the Underdark. His       
 was killed/ captured by     
 , and has wandered the      
 ( old age ).                
 . -** PC                    
 hid in shame for generations
 name. In his quest          
 was torn apart by a         
 from power. Mechanically,   
 most. Dalton will lie       
Code
kwic_father <- kwic(reddit_DnD_characters, pattern = phrase("father")); head(kwic_father, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                          
 [text25, 339]              was born with ( her | father |
  [text28, 74]       who loved working with his | father |
 [text28, 228]               at the tavern. His | father |
 [text28, 260]         changing it himself. His | father |
  [text38, 34]      the woman to leave Dalton's | father |
 [text41, 387]              too ) many heirs to | father |
 [text45, 109]             could find. When his | father |
 [text54, 158] bookish kid who disappointed his | father |
 [text61, 199]               potion. Dyrgon ´ s | father |
 [text102, 27]            is not clear what his | father |
                            
 is a bit of a              
 at the builder's guild.    
 became guild master and saw
 gently kicked him from the 
 . Dalton has now made      
 s Inn, took up             
 died all his lands went    
 as a child because he      
 was a hammer, Dyrgon       
 was. The half dragon       
Code
kwic_brother <- kwic(reddit_DnD_characters, pattern = phrase("brother")); head(kwic_brother, n=10)
Warning: 'kwic.corpus()' is deprecated. Use 'tokens()' first.
Keyword-in-context with 10 matches.                                                         
 [text41, 495]              . He was an older | brother |
 [text41, 515]         poison arts due to his | brother |
 [text41, 582] Having a larger though younger | brother |
 [text45, 118]       lands went to the eldest | brother |
 [text45, 152]     cross country, because his | brother |
  [text91, 73]      to protect his Little Big | Brother |
 [text122, 36]      hanging out with my older | brother |
 [text151, 59]               was a wizard, my | brother |
 [text187, 27]   best friend made my half-elf | brother |
 [text195, 47]           for me and my little | brother |
                                   
 to the adopted dragonborn FenShawn
 s youthful production of toxins   
 , Tru to quickly developed        
 , who hated Thexbas,              
 had used his influence to         
 ( halfling bard ),                
 who was the DM playing            
 was a fighter, and                
 , Thorn. Together we              
 because I bugged him to           

 
 
 

Note

Here we can see the words like father, brother, and family are used in the context of creating a back story for the character created by the player, however, they just provide metadata about the character, therefore, even though it is important in terms of the character building, they are not directly related to the features of the character itself.

Bi-grams like chaotic good, lawful good, and neutral good are used to describe the personality of the characters.

Chaotic good is the philosophy that goodness is best achieved through the freedom of individuals to act independently. It is a philosophy of altruistic individualism. This philosophy holds that people should behave altruistically and that society exists for the sake of its individual members.

Lawful good is the philosophy that goodness is best achieved through law and order. It is a philosophy of altruistic collectivism. This philosophy holds that people should behave altruistically and put the needs of the group ahead of individual desires.

Neutral good is the philosophy that goodness should be advanced by using whatever means provide the most benefit. It is a philosophy of altruistic consequentialism. This philosophy holds that people should behave altruistically and balance the needs of the collective as a whole and the needs of the individuals making up the collective.

 
 
 

Code
DnD_dfm_char <- dfm_remove(DnD_dfm1, c("good", "fight", "chaotic", "kind", "campaign", "war", "killed", "story", "death", "old", "friend", 
                                       "city","full", "man", "knowledge", "gold", "game", "played", "level", "high", "neutral", "hand", 
                                       "town", "order", "often", "player", "hit",  "battle", "player", "damage", "lawful", "idea", "years",
                                       "shield", "powerful", "evil", "bad", "strength", "work", "kill", "giant", "wanted", "mind",                                                "village","save", "end", "point", "combat", "dm", "favorite", "died", "magical", "class", "orc", 
                                       "cast", "half", "spell", "family", "brother", "father", "race", "young", "halfling"))

DnD_dfm_char
Document-feature matrix of: 375 documents, 24 features (91.84% sparse) and 0 docvars.
       features
docs    dragonborn barbarian paladin dragon sorcerer spells human rogue magic
  text1          1         1       1      1        1      1     0     0     0
  text2          1         0       0      1        0      0     0     0     0
  text3          0         0       0      0        0      0     1     2     1
  text4          1         0       0      1        0      0     0     0     0
  text5          0         0       0      0        0      0     0     0     0
  text6          1         0       0      0        0      0     0     0     0
       features
docs    warlock
  text1       0
  text2       0
  text3       0
  text4       1
  text5       0
  text6       0
[ reached max_ndoc ... 369 more documents, reached max_nfeat ... 14 more features ]
Code
topfeatures(DnD_dfm_char, 100)
     magic      human    fighter      rogue     wizard        elf       bard 
        77         70         67         64         64         58         57 
    ranger    paladin     dragon     spells     cleric        god    warlock 
        56         54         50         48         48         43         38 
     power      dwarf  barbarian   sorcerer    friends      druid     master 
        38         37         29         29         28         27         26 
dragonborn      rurik       mage 
        25         24         21 
Code
textplot_wordcloud(DnD_dfm_char)

Code
#creating a Network plot
DnD_fcm = fcm(DnD_dfm_char)

# pull the top features
myFeatures = names(topfeatures(DnD_fcm, 20))

# retain only those top features as part of our matrix
Smaller_fsm = fcm_select(DnD_fcm, pattern = myFeatures, selection = "keep")

# compute size weight for vertices in network
size = log(colSums(Smaller_fsm))

# create plot
textplot_network(Smaller_fsm, vertex_size = size / max(size) * 3)

 
 
 

Note

Here, you can read more about the different classes of characters you see in the word cloud and network plot.

Different Character Classes of D&D characters