配置文件规则

服务端常用数据样式描述

1: 取工作区的第一列作为内容输出
list
{list, Sheets}
例如:
fun: {list, cb_fun, handle, {list, [“主线任务”, “支线任务”]}}
data: list() -> [10000, 10001].

2: 取工作区的所有行指定列作为内容输出
{tuple_list, ValFields}
{tuple_list, Sheets, ValFields}
{tuple_list, Sheets, ValFields, Opts}
Opts: unique (去除重复的值) | sort (排序)
例如:
fun: {get_enemy, cb_fun, handle, {tuple_list, [“对手条件”], [cup1, cup2, fc1, fc2, lev1, lev2]}}
data: get_enemy()-> [{-100, -50, -1000, 1000, -2, 1}, {-50, 0, -1000, 1000, -2, 1}].

3: 取工作区所有行指定列作为record输出
{record_list, RecFields}
{record_list, RecName, RecFields}
{record_list, Sheets, RecName, RecFields}
例如:
fun: {list, cb_fun, handle, {record_list, [“道具配置”], treasure_item_data, all}}
data: list() -> [#treasure_item_data{}].

4: 取工作区所有行指定列作为map输出
{map_list, ValFields}
{map_list, Sheets, ValFields}
例如:
fun: {list_sub, cb_fun, handle, {map_list, [“人物评分”], [item_id, min_lev]}}
data: list_sub()-> [#{item_id => 11, min_lev => 1}].

5: 根据KeyFields字段分类形成ValFields列表
{tuple_type, KeyFields, ValFields}
{tuple_type, Sheets, KeyFields, ValFields}
{tuple_type, Sheets, KeyFields, NormalFields, ValFields}
例如:
fun: {init_skill, cb_fun, handle, {tuple_type, [“战斗初始技能”], base_id, [classes, skills]}}
data: init_skill(21055) -> [{1, [10050]}, {2, [20020]}, {3, [30010]}, {4, [40020]}, {5, [50040]}, {6, [60010]}];

6: 根据KeyFields字段分类形成RecFields列表
{record_type, KeyFields, RecFields}
{record_type, KeyFields, RecName, RecFields}
{record_type, Sheets, KeyFields, RecName, ValFields}
例如:
fun: {type_list, cb_fun, handle, {record_type, [“道具配置”], item_grade, treasure_item_data, all}}
data: type_list(1) -> [#treasure_item_data{}].

7: 根据KeyFields字段分类形成MapFields列表
{map_type, Sheets, KeyFields, MapFields}
{map_type, Sheets, KeyFields, NormalFields, MapFields}
例如:
fun: {{get_trans_pos, “[]”}, cb_fun, handle, {map_type, [“地图可传送点”], [map_id, pos_x, pos_y], [amend_x, amend_y]}}
data: get_trans_pos({10001, 5505, 2109}) -> [#{amend_x => 10, amend_y => 10}].

fun: {get_rank_item_reward, cb_fun, handle, {map_type, [“排行榜道具奖励”], [rank_type, reward_type], [days], [s_idx, e_idx, mail_id, items]}}
data: get_rank_item_reward({14, 2}) -> {{[1]}, [#{s_idx => 1,e_idx => 3,mail_id => 129000,items => [{90000,100},{90000,100}]}]}.

8: 根据KeyFields字段分类形成MapFields列表
{map_map, Sheets, KeyFields, NormalFields, MapFields}
例如:
fun: {get_item_drop_id, [{nonull, [item_drop_id]}], cb_fun, handle, {map_map, [“道具掉落”], item_drop_id, [all_num], all}}
data: get_item_drop_id(101) -> {#{all_num => 0}, [#{all_num => 0,bind => 1,notice => 0}]}.

9: 根据工作区指定主键返回指定字段#record{}
{get_record, KeyFields, RecFields}
{get_record, Sheets, KeyFields, RecFields}
{get_record, Sheets, KeyFields, RecName, RecFields}
例如:
fun: {get_quest, cb_fun, handle, {get_record, [“任务数据”], id, quest_data, all}}
data: get_quest(10000) -> #quest_data{id = 10000, lev = 23, classes = 0, rewards_commit = [{90000,1,20000}]};

10 : 根据工作区指定主键返回指定字段#{}
{get_map, Sheets, KeyFields, MapFields}
例如:
fun: {get_title, cb_fun, handle, {get_map, [“头衔数据”], [id, classes], all}}
data: get_title({1940, 0}) -> #{id => 1940, classes => 0, quest_list => [10022,10023,10024,10068], final_flag => 1, honor_id => 1550};

11 : 根据工作区指定主键返回指定字段{}
{get_tuple, Sheets, KeyFields, ValFields}
例如:
fun: {{get_cfg, “false”}, cb_fun, handle, {get_tuple, [“杂项配置”], key, value}}
data: get_cfg(1) -> 2008;

12 : 根据工作区指定主键返回指定字段{}
{get_tuple_single, Sheets, KeyFields, ValFields}
例如:
fun: {limit_type, cb_fun, handle, {get_tuple_single, [“道具使用限制”], base_id, limit_type}}
data: limit_type(30002) -> 2;

13 : 根据工作区指定主键返回指定字段[]
{get_list, Sheets, KeyFields, ValFields}
例如:
fun: {{get_pet_slave, “[]”}, cb_fun, handle, {get_list, [“宠物数据”], unit_lev, pets}}
data: get_pet_slave(1) -> [60501, 60502, 60503];

14 : 用指定字段值潜换方法内容 所有行独立
{get_fun, Sheets, FunStr, ArgsFields}
例如:
fun: {{get_form_lev, “1”}, cb_fun, handle, {get_fun, [“阵法”], “get_form_lev(UnitLev) when UnitLev >= ~ts andalso UnitLev =< ~ts -> ~ts;”, [min_lev, max_lev, form_lev]}}
data: get_form_lev(UnitLev) when UnitLev >= 1 andalso UnitLev =< 2 -> 1;

15: 用指定字段值潜换方法内容 所有行独立
{get_fun_type, Sheets, FunStr, ArgsFields}
例如:
fun: {{get_base_ratio, “[]”}, cb_fun, handle, {get_fun_type, [“基础属性档次”], "get_base_ratio({~ts, Lev}) when Lev >= ~ts andalso Lev =< ~ts -> ", [attr_name, min_lev, max_lev], [step, ratio, odds, well_odds]}}
data: get_base_ratio({28, Lev}) when Lev >= 50 andalso Lev =< 200 -> [#{step => 15, ratio => 1000, odds => 20, well_odds => 20}].

16: 用指定字段值潜换方法内容 所有行独立
{get_fun_map, Sheets, FunStr, ArgsFields}
例如:
fun: {get_summon, cb_fun, handle, {get_fun_map, [“召唤”], “get_summon(Times) when Times >= ~s ->”, [times], all}}
data: get_summon(Times) when Times >= 1 -> #{times => 1,cost => [{90002, 80}]};

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值