Files
fc/server/tools/gen_data/cfg/daily_tres_data.erl
T
2026-05-23 22:10:14 +08:00

158 lines
9.5 KiB
Erlang

%%%-------------------------------------------------------------------
%%% @author Administrator
%%% @copyright (C) 2023, <COMPANY>
%%% @doc
%%%
%%% @end
%%% Created : 27. 12月 2023 15:25
%%%-------------------------------------------------------------------
-module(daily_tres_data).
-author("Administrator").
-include("common.hrl").
-include("data_config.hrl").
%% API
-export([cfg/0]).
cfg() ->
#data_cfg{
name = daily_tres_data
,lua_name = daily_tres_data
,desc = "新星空许愿配置数据"
,source = "daily_tres_data.xml"
,target = "daily_tres_data.erl"
,inc = ["common.hrl", "attr.hrl", "day_goals.hrl", "gain.hrl", "quest.hrl"]
,callback = [
{{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [code, val, desc]}}
,{get_group, cb_fun, handle, {get_record, ["夺宝配置"], group, new_map, all}}
%% ,{get_gift, cb_fun, handle, {get_tuple, ["直购商城"], charge_id, all}}
%% ,{get_num, cb_fun, handle, {get_tuple, ["直购商城"], id, buy_num}}
%% ,{get_gift_list, cb_fun, handle, {list, ["直购商城"]}}
,{group_items, cb_fun, handle, {tuple_type, ["奖励配置"], group, [id, probability]}}
,{get_items, cb_fun, handle, {get_tuple, ["奖励配置"], [group, id], [item_id, num, is_luck, is_notice]}}
,{get_level, cb_fun, handle, {get_tuple, ["奖励配置"], [group, id], level}}
,{get_period, cb_fun, handle, {get_tuple, ["周期配置"], id, period_id}}
%% ,{get_lucky, cb_fun, handle, {tuple_list, ["幸运值概率"], all}}
%% ,{get_baodi, cb_fun, handle, {get_tuple, ["保底奖励"], id, reward}}
,{get_ext_reward, cb_fun, handle, {get_tuple, ["进度奖励"], [period, id], all}}
,{get_ext_reward_list, cb_fun, handle, {list, ["进度奖励"]}}
,{{get_reward, "[]"}, cb_fun, handle, {get_tuple, ["夺宝日签"], goal_id, award}}
,{get_day, cb_fun, handle, {get_tuple, ["夺宝日签"], goal_id, day}}
,{{get_quest, undefined}, cb_fun, handle, {get_record, ["夺宝日签"], goal_id, grow_data, [goal_id, day, progress]}}
,{quest_list, cb_fun, handle, {record_type, ["夺宝日签"], [period, day], grow_data, [goal_id, day, progress]}}
]
,callback_cli = [
]
,callback_json = [
{const, cb_fun_json, handle, {key_val, [ "常量配置"], [code], all}}
, {base_info, cb_fun_json, handle, {key_val, [ "夺宝配置"], [group], all}}
, {reward_info, cb_fun_json, handle, {type_get_val, [ "奖励配置"], [group, id], all}}
, {reach_reward, cb_fun_json, handle, {type_get_val, [ "进度奖励"], [period, id], all}}
%% , {shop_info, cb_fun_json, handle, {key_val, [ "直购商城"], [id], all}}
,{prob_info, cb_fun_json, handle, {key_val, ["概率展示"], [index], all}}
,{explain, cb_fun_json, handle, {key_val, ["活动说明"], [id], all}}
,{day_task_list, cb_fun_json, handle, {type_get_val, ["夺宝日签"], [period,goal_id], all}}
]
,sheet = [
{["常量配置"], [
#f_column{type = atom, name = code, desc = "", mod = all}
,#f_column{type = term, name = val, desc = "", mod = all, add_list_sign = false}
,#f_column{type = str, name = desc, desc = "描述", mod = all}
]}
, {["夺宝配置"],
[ #f_column{desc = "组别", type = int, name = group, mod = all}
,#f_column{desc = "召唤名称", type = bstr, name = name, mod = all}
, #f_column{desc = "开启限制", type = term, name = limit_id, mod = all}
, #f_column{desc = "单抽钻石消耗", type = term, name = loss_goal_once, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "10抽钻石消耗", type = term, name = loss_goal_ten, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "单抽消耗道具", type = term, name = loss_item_once, width = 200, comment = "{道具id, 数量}",mod = all}
, #f_column{desc = "10抽消耗道具", type = term, name = loss_item_ten, width = 200, comment = "{道具id, 数量}",mod = all}
]}
,{["奖励配置"], [
#f_column{type = int, name = id, desc = "序号", mod = all}
,#f_column{type = int, name = group, desc = "组别", mod = all}
,#f_column{desc = "名称", type = bstr, name = name, mod = all}
,#f_column{type = int, name = item_id, desc = "奖励id", mod = all}
,#f_column{type = int, name = num, desc = "数量", mod = all}
,#f_column{type = int, name = level, desc = "奖励级别", mod = server}
,#f_column{type = bstr, name = level_name, desc = "奖励级别名称", mod = client}
,#f_column{type = int, name = probability, desc = "权重", mod = server}
,#f_column{type = kv, name = is_luck, desc = "是否获得幸运值", kv_type = [{"", 1}, {"", 0}], mod = all}
,#f_column{desc = "是否传闻", type = int, name = is_notice}
,#f_column{type = int, name = point, desc = "位置", mod = client}
]}
%% ,{["幸运值概率"], [
%% #f_column{type = int, name = id, desc = "幸运值", mod = all}
%% ,#f_column{type = int, name = probability, desc = "权重", mod = server}
%% ]}
%% ,{["保底奖励"], [
%% #f_column{type = int, name = id, desc = "幸运值", mod = all}
%% ,#f_column{type = term, name = reward, desc = "奖励", mod = server}
%% ]}
,{["进度奖励"], [
#f_column{type = int, name = period, desc = "周期", mod = all}
,#f_column{type = int, name = id, desc = "祈愿次数", mod = all}
,#f_column{type = int, name = num, desc = "祈愿次数", mod = all}
,#f_column{type = term, name = reward, desc = "奖励", mod = all}
]}
%% ,{["直购商城"], [
%% #f_column{type = int, name = id, desc = "ID", mod = all}
%% ,#f_column{type = kv, name = pay_type, desc = "支付方式", kv_type = [{"人民币", 1}, {"钻石", 2}], mod = all}
%% ,#f_column{type = int, name = charge_id, desc = "充值ID", mod = all, val = 0}
%% ,#f_column{type = term, name = reward, desc = "奖励", mod = all}
%% ,#f_column{type = int, name = price, desc = "价格", mod = all}
%% ,#f_column{type = int, name = buy_num, desc = "活动期间购买次数", mod = all}
%% ]}
,{["活动说明"], [
#f_column{type = int, name = id, desc = "标签", primary = true, mod = client}
,#f_column{type = str, name = title, desc = "标签名", mod = client}
,#f_column{type = str, name = desc, desc = "内容", mod = client}
]}
,{["周期配置"], [
#f_column{type = int, name = id, desc = "活动id", mod = all}
,#f_column{type = int, name = period_id, desc = "周期id", mod = all}
]}
,{["概率展示"], [
#f_column{type = int, name = index, desc = "id", mod = client}
,#f_column{type = bstr, name = name, desc = "名称", mod = client}
,#f_column{type = bstr, name = probability, desc = "概率", mod = client}
]},{["夺宝日签"], [
#f_column{type = int, name = period, desc = "周期", mod = all}
,#f_column{type = int, name = goal_id, desc = "目标ID", mod = all}
,#f_column{type = kv, kv_type = quest_type, name = quest_type, desc = "任务类型", val = "12", mod = all}
,#f_column{type = int, name = day, desc = "开启天数", mod = all}
,#f_column{type = int, name = min_lev, desc = "开启等级下限", mod = all}
,#f_column{type = int, name = max_lev, desc = "开启等级上限", mod = all}
,#f_column{type = bstr, name = title, desc = "任务标题", mod = client}
,#f_column{type = bstr, name = desc, desc = "任务描述", mod = client}
, #f_column{desc = "达成条件", type = func, name = progress, width = 360, spilt_str = ";", type_func = {quest_data, progress},
fields = [
#f_column{desc = "服务端事件", type = term, name = label, add_list_sign = false}
, #f_column{desc = "客户端标签", type = str, name = cli_label, mod = client}
, #f_column{desc = "目标值", type = int, name = target, mod = all}
, #f_column{desc = "目标需求值", type = int, name = target_val, mod = all}
, #f_column{desc = "服务端附加参数", type = term, name = param, add_list_sign = false}
, #f_column{desc = "客户端附加参数", type = term, name = param, add_list_sign = false, mod = client}
],
valid_list = [
{atom, integer, integer},
{atom, integer, integer, term},
{atom, atom, integer, integer, term}
],
comment = "{事件标签, 目标值, 目标需求值, 附加参数} 或 {服务端事件标签, 服务端事件标签, 目标值, 目标需求值, 附加参数}\n"
"事件标签/服务端事件标签/客户端事件标签:英文字符串;\n"
"目标值:整数\n"
"目标需求值:整数\n"
"附加参数需要用“[]”包括,其中每一项需要用“{}”包括:[{monitor}, {type, 1}]\n"
"多个任务目标用“;”(分号)分隔,例如: {evt_get_item, 10001, 1, [{monitor}]};{evt_use_item, 10001, 1, [{type, 1}]}",
mod = all
}
,#f_column{type = int, name = show_icon, desc = "客户端使用效果", mod = client}
,#f_column{type = term, name = award, desc = "奖励内容", mod = all}
,#f_column{type = int, name = id, desc = "标志位", mod = client}
,#f_column{type = int, name = jump_id, desc = "前往跳转", mod = client}
]}
]
}.