capelastegui / sfrpg

Sources for book: Square Fireballs, the Role Playing Game
Other
0 stars 0 forks source link

Shiny App: Character Sheet creator #231

Open capelastegui opened 2 years ago

capelastegui commented 2 years ago

Advanced version of existing notebook, create_sheets.Rmd

library(sfrpg)
library(magrittr)

devtools::load_all()

dir_output = here::here('notebooks','output')

df_power_raw = read_df_power()

df_class = get_df_class()

htm_file_tmp = get_class_build(
df_class, 'Fighter', 'Guardian')$htm_class_section

htm_file = htm_file_tmp %>% get_htm_file()

l_feature_id = c(
  'ori_human_act',
  'ori_human_rec',
  'ori_human_skl',
  'ftr_shiel_mas',
  'ftr_guard_aur',
  'ftr_guard_shi',
  'ftr_armor_spc',
  'ftr_train'
)

l_power_id = c(
  'ftr_fe_defaur',
  'ftr_aw_shlbsh',
  'ftr_aw_cleave',
  'ftr_en_stmbla',
  'ftr_en_halt',
  'ftr_da_dchase',
  'ftr_da_comget',
  'ftr_ut_shiwll'
)

l_items = c()
l_feats = c('Mighty Blow','Blast Shield')

htm_sheet = write_html_sheet(l_feature_id, l_power_id, l_items, l_feats, dir_output, 'Kangor')
htm_sheet %>% cat()

Input data: .csv file with columns option_type, option_id

function: csv_to_html_pc() - takes input csv in format above, generates html.

Shiny app: form to generate csv, for use in csv_to_html_pc()

Future option: button: load Future feature: option to remove elements