tes3cmd=./tes3cmd

$tes3cmd dump "Wares-base.esm" --raw-with-header "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_misc"

$tes3cmd modify "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_misc" \
  --run "\
  \$R->set({t=>'Name', f=>'ID'}, 'aa_avp_chalk_random'), \
  \$R->set({t=>'NNAM', f=>'Chance_None'}, '75'), \
  \$R->append(LEVI::INDX->new({'item_count', '5'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'MU_ChalkW'})), \
  \$R->append(LEVI::INTV->new({'level', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'MU_ChalkW'})), \
  \$R->append(LEVI::INTV->new({'level', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'MU_ChalkW'})), \
  \$R->append(LEVI::INTV->new({'level', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'MU_ChalkW'})), \
  \$R->append(LEVI::INTV->new({'level', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'MU_ChalkC'})), \
  \$R->append(LEVI::INTV->new({'level', '1'}))"

$tes3cmd dump "Wares-base.esm" --raw "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_misc"

$tes3cmd modify "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_misc" \
  --run "\
  \$R->append(LEVI::INDX->new({'item_count', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'aa_avp_chalk_random'})), \
  \$R->append(LEVI::INTV->new({'level', '1'}))"

$tes3cmd dump "Wares-base.esm" --raw "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_enchanted"

$tes3cmd modify "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_enchanted" \
  --run "\
  \$R->set({t=>'Name', f=>'ID'}, 'aa_avp_chalk_magical'), \
  \$R->set({t=>'NNAM', f=>'Chance_None'}, '99'), \
  \$R->append(LEVI::INDX->new({'item_count', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'MU_ChalkM'})), \
  \$R->append(LEVI::INTV->new({'level', '1'}))"

#   \$R->append(LEVI::INAM->new({'item_id', 'l_n_soul gem'})), \
#   \$R->append(LEVI::INTV->new({'level', '1'}))"

$tes3cmd dump "Wares-base.esm" --raw "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_enchanted"

$tes3cmd modify "Chalk - Wares.esp" \
  --type LEVI \
  --exact-id "aa_trader_enchanted" \
  --run "\
  \$R->append(LEVI::INDX->new({'item_count', '1'})), \
  \$R->append(LEVI::INAM->new({'item_id', 'aa_avp_chalk_magical'})), \
  \$R->append(LEVI::INTV->new({'level', '1'}))"
