Compare commits

...

566 Commits
v1.0 ... main

Author SHA1 Message Date
Carson - 宝鱼 720e2eaf49
[fix] 解决7c0579b4bbd7d2c746a8a264d54557ec1e209fd4提交造成的编译错误 (#55)
Co-authored-by: 宝鱼 <kteong1012@outlook.com>
2023-07-06 08:28:08 +08:00
SaNeOr 7c0579b4bb
[fix] 修复 导出python数据, DBool类型 格式问题 (#53) 2023-06-25 18:02:55 +08:00
宝鱼 b791b4276d [new] 新增正则校验器 2023-06-23 12:28:47 +08:00
walon de075ca7d9 [change] DataUtil由GBK编码改为UTF8 2023-06-23 12:21:24 +08:00
SaNeOr 803145e267
[fix] 修复 导出python数据, DMap类型 key的格式问题 (#49)
python的dict类型key不像json只能为string,还可能为其他类型。
2023-06-15 16:46:27 +08:00
walon ea1dc4a462 [fix] 修复data_json_monolithic生成失败的问题 2023-05-12 12:56:33 +08:00
walon 62b60ac581 更新README中文档链接到luban-doc 2023-05-11 17:34:51 +08:00
walon 9bc74b3c73 [fix] 修复ref指向singleton表时,校验错误地使用了ref定义所在的字段而不是ref指向的表的字段的bug 2023-05-06 13:04:44 +08:00
walon 4ef2d70398 [fix] 修复config cpp对多联合索引生成的代码的编译错误 2023-04-12 00:36:41 +08:00
walon 8e68ab0fcd [fix] 修复cfg ts加载bin格式datetime类型时返回bigint的bug 2023-04-03 19:19:42 +08:00
walon bcf81ffe26 [fix] 修复 Proto及DB生成时,对于多级继承在某些遍历顺序下 CollectHierarchyFields 的bug 2023-02-28 21:31:16 +08:00
walon c14437aa59 [fix] 修复Cfg DefBean.PreCompile中CollectHierarchyFields时由于顺序原因有可能发生祖父及更高层级的类的ParentDefType字段未设置导致的未能收集到所有字段的恶劣bug 2023-02-28 20:36:43 +08:00
walon 16e4fe2452 [fix] 修复使用Scriban导出大型文本型数据时发生超出最大迭代次数的问题 2023-02-10 14:37:07 +08:00
walon 7ad942b7cd [fix] 修复生成 java array类型代码的编译bug 2023-02-06 21:33:46 +08:00
walon e8ac256e92 [fix] 修复生成map类型的java resolve代码的有编译错误的问题 2023-02-06 21:12:24 +08:00
walon 46cc7cd26f [change] 删除 ParseExcelBool中对 '是'和'否'的支持 2023-02-03 22:47:45 +08:00
walon e67082a098 [fix] 修复生成db cs代码的编译错误
[change] 生成db cs代码由异步模式换成同步模式
2023-02-03 22:47:45 +08:00
wmltogether ae87bf3f52
[change] 使用int64存储datetime类型,避免读取日期超过2038年出现问题 (#38) 2023-01-29 13:42:46 +08:00
walon ea30f8c202 [fix] 修复db生成代码的bug 2023-01-06 21:49:38 +08:00
Skyhand 874f966a40
[opt] verify param template_search_path (#37) 2022-12-30 18:12:48 +08:00
Carson - 宝鱼 b37f2692e3
[fix] 修复生成java嵌套容器代码有编译错误的bug 2022-12-28 09:50:00 +08:00
Carson - 宝鱼 ba2c5c56e7
[new] 增加java对容器ref的支持 (#34)
[new] 增加java对容器ref的支持
2022-12-14 09:56:04 +08:00
walon d0587324f5 [opt] 优化excel中填写bool类型数据,可以用 true|yes|y|1表示true,用 false|no|n|0表示false 2022-12-07 19:28:46 +08:00
walon 2962b6a1bf
Merge pull request #32 from fgc0109/fix_publish
fix publish single file
2022-12-07 10:58:56 +08:00
Chasel 44b0fc9b36 fix System.Reflection.Assembly.GetCallingAssembly().Location return empty string when publish single file 2022-12-06 17:35:31 +08:00
walon 33b7f25fd4 [fix] 修复excel格式中仅非有效字段列非空的行被判定为非空行,导致解析数据失败的bug 2022-12-05 18:04:24 +08:00
walon 9b97f5d0bd [new] 支持proto java代码生成 2022-11-28 20:17:12 +08:00
宝鱼 88ab94e836 fix: 修复上个commit引发的空引用报错 2022-11-22 18:19:13 +08:00
Carson - 宝鱼 410fdd3618
[fix] 修复了$type-$value的形式没有读取bean在表格添加的sep符号的bug。 (#30)
Co-authored-by: 宝鱼 <kteong1012@outlook.com>
2022-11-18 12:26:13 +08:00
Carson - 宝鱼 bcc7bc8b37
[new]支持$type + 流式$value的填写方式 (#29)
[new]支持$type + 流式$value的填写方式

Co-authored-by: Tianbao Lin <kteong1012@outlook.com>
2022-10-20 09:04:42 +08:00
walon 165ad69a5d
Merge pull request #27 from kteong1012/pr221019
[fix] 修复了beans定义表不能指定单独sheet的bug
2022-10-19 10:39:51 +08:00
Tianbao Lin b1c2507d99 [fix] 修复了beans定义表不能指定单独sheet的bug 2022-10-19 10:33:02 +08:00
walon af492cea8d [fix] 修复 cs_unity_editor_json/bean.tpl 多了一个括号的bug 2022-10-18 22:39:25 +08:00
Carson - 宝鱼 30a4ce12db
[new] 新增表格对##group的支持
[new] 新增表格对##group的支持


Co-authored-by: Tianbao Lin <kteong1012@outlook.com>
2022-10-13 17:48:42 +08:00
walon 14faa26565
Merge pull request #23 from kteong1012/main
[fix] 修复了导出多维数组失败的bug
[fix] 修复CS模板处理嵌套命名空间的bug
2022-09-23 10:05:32 +08:00
Carson Lin 472c912f0f fix: 修复了导出多维数组失败的问题。 2022-09-22 15:22:38 +08:00
Carson Lin e897d6b5c0 fix: 修改CS模板,修复严重bug 2022-09-22 15:18:23 +08:00
walon 70b5a9b061
Merge pull request #21 from kteong1012/pr220910
[new] config c#代码生成支持无命名空间
2022-09-19 17:01:32 +08:00
Carson Lin 15a5a627d5 opt:修改一些细节 2022-09-16 10:55:56 +08:00
walon c707935008 [feature] flags类型的enum支持以枚举项为子列的配置方式 2022-09-14 12:48:20 +08:00
walon 81295cbfe1 [fix] 修复对容器类型的element type为external type时,生成的cs代码错误对external type调用?.Resove的bug 2022-09-14 12:20:20 +08:00
Carson Lin d9013167b8 feat : 支持无命名空间 2022-09-10 11:16:00 +08:00
walon ad4acf337f [opt] 优化生成的emmylua注解中的类型信息 2022-09-07 17:53:54 +08:00
walon f25f91b94d [fix] 修复code_cs_dotnet_json生成的external type代码有编译错误的bug 2022-08-23 10:11:25 +08:00
walon 741d820587
Merge pull request #19 from kteong1012/pr220816
feat:支持tables.xlsx中value_type定义parent,定义格式为TypeChild#parent=TypeParent
2022-08-22 08:42:24 +08:00
Carson Lin c1b4070520 fix:添加一个判空 2022-08-16 19:32:11 +08:00
Carson Lin 4e2891e07b feat:支持tables.xlsx中value_type定义parent,定义格式为TypeChild#parent=TypeParent 2022-08-16 19:01:30 +08:00
walon b1f9105773 [new] excel __beans__.xlsx 支持 alias字段 2022-08-14 16:38:20 +08:00
walon 69a0acf63e [fix] 修复为cs_unity_json生成 反序列化external bean类型的编译错误bug 2022-08-10 20:22:04 +08:00
walon ff6e09ec9d [fix] 修复xml定义table时失误将options属性写成parser_mode的bug 2022-08-10 18:03:10 +08:00
walon c60f91fdd4 [new] 支持纯流式模式的excel解析方式 2022-08-10 15:22:51 +08:00
walon 154d55f372 [fix] 修复为了支持嵌套容器导致未检查容器元素类型不能为可空的bug 2022-08-09 11:51:21 +08:00
walon 2dd826bafb [change] 修复一些 README.md 错误 2022-08-05 00:44:13 +08:00
walon 412a400471 [fix] 修复ref引用了被过滤的记录却未报告引用错误的bug 2022-07-28 17:02:44 +08:00
walon c738b4dcad
Merge pull request #18 from kteong1012/main
[new] 添加cpp的联合多主键解析
2022-07-26 22:44:10 +08:00
Carson Lin a39339bd51 feat:添加cpp的联合多主键解析
Signed-off-by: Carson Lin <396098651@qq.com>
2022-07-26 21:02:26 +08:00
walon 699b5a167a [new] range和size都支持固定大小或者区间段 xxx=value 或 xxx=[a,b] 的写法 2022-07-19 12:58:02 +08:00
walon 665b9a4cea [new] 新增bidx,即binary格式的索引文件输出。方便优化按需加载 2022-07-19 11:42:49 +08:00
walon abcacebcaa
Merge pull request #14 from kteong1012/main
[new] 支持嵌套容器,支持多维数组和list,array,map的相互嵌套
2022-07-18 19:16:58 +08:00
walon c0706a84f1 [new] 新增Bson导出格式支持 2022-07-18 18:03:53 +08:00
Carson Lin bfc13bc35f fix: 修复TrimBracePairs方法可能会出现的问题 2022-07-13 12:50:13 +08:00
Carson Lin 02f3ebd979 feat: 弃用Type的CollectionLevel,改为在visitor添加depth参数以实现嵌套容器的解析 2022-07-13 11:41:32 +08:00
Carson Lin 79940dcf09 feat: 在TType添加CollectionLevel,用于连续嵌套容器时生成解析代码 2022-07-13 10:28:09 +08:00
carson 6620cca6e1 feat:支持多维数组嵌套 2022-07-13 03:47:23 +08:00
Carson Lin d6ad1e64c4 fea:支持嵌套容器,暂时只支持list 2022-07-12 22:30:14 +08:00
walon c0ddce497c [fix] config enum的java代码生成普通的int,而不是java枚举类。修复flags=1的枚举项反序列化的异常。 2022-06-25 18:29:59 +08:00
walon 4255ae25bf [update] 更新文档,补充godot相关支持的描述,补充c++语言使用示例 2022-06-15 21:01:53 +08:00
Dongua ba1a552d3e [change]gdscript 支持多独立主键 2022-06-11 16:40:15 +08:00
Dongua 60faab741e 【特性】支持gdscript语言 2022-06-09 12:37:45 +08:00
walon f756ab2aa2 [fix] 修复当有两个input文件内容完全相同的情况下,TableDataInfo::BuildIndexs 抛出key重复异常的bug 2022-06-01 17:02:29 +08:00
Dongua 9b086767a1 [change]修改reademe 格式问题,修改链接指向新地址 2022-05-31 15:25:14 +08:00
walon c39b6a623d [new] 添加友情链接 2022-05-29 19:18:39 +08:00
walon 827eca027c [change] 将GenClient与GenServer的最大协议大小由20M改为100M,解决单个表数据文件过大时,无法传输文件的问题 2022-05-07 18:34:01 +08:00
walon e3dc909514 [fix] 修复无法读取纵表多级标题头的bug 2022-05-05 10:44:10 +08:00
walon 6d991ef000 [fix] 修复table设置了mode=map,但index为空时,抛出key不能为多个错误的bug 2022-04-16 15:52:28 +08:00
walon 3f2b2c71eb [new] 新增xml导出数据格式 2022-04-15 17:30:10 +08:00
walon 861f40c29b [new] 支持启用宏的excel格式,即xlsm格式。 2022-04-11 16:11:31 +08:00
walon d9a2e0f83b [opt] 优化错误为int之类的字段使用子列名时的报错信息 2022-04-10 13:33:06 +08:00
walon f7814a0612 [opt] 优化配置中错误创建了抽象类型时的错误提示 2022-04-06 17:14:15 +08:00
walon 142e3ddf93 【修复】修复当存在namespace大小写不同的类时,会出现反复新增并且删除生成的代码文件的问题 2022-03-30 17:46:26 +08:00
walon 7b7ab7b8ba 【优化】检查table.name和value_type,不允许为空白字符串 2022-03-29 00:44:06 +08:00
walon df932046e4 【优化】导出的json格式对于 '\','<' 之类的字段不escape 2022-03-28 18:54:37 +08:00
walon 7bc489e15e 【优化】path检查时严格检查文件大小写 2022-03-27 16:44:06 +08:00
walon 82fbdb513f 【优化】 对于group属性失误用于type添加错误提示
【优化】对于sep失误写成seq添加错误提示
2022-03-27 15:20:20 +08:00
walon c146cf6031
Merge pull request #10 from kteong1012/main
pull request
2022-03-26 17:15:24 +08:00
Carson ee6bba3414 【修复】修复了table和enum的excel表在子sheet的时候通过@定位会报错的问题。 2022-03-26 15:36:37 +08:00
Carson 9886bd1222 【新增】让Map类型支持纵向填充。 2022-03-26 03:37:48 +08:00
walon 71185c4f3d 【修复】修复多态bean定义时子bean在var之后的错误提示 2022-03-15 12:34:07 +08:00
walon ced29f9fca 【修复】修复生成的go代码读取可空变量的bug 2022-03-14 11:10:48 +08:00
walon dee9bcdfe0 【修复】修复output_data_dir目录名末尾包含'/'或'\'时,FileCleaner判定文件存在出错,导致反复add和remove的bug 2022-03-13 11:06:41 +08:00
walon 4cc52c25a3 【修复】修复bool格式的导出错误 2022-03-12 18:09:02 +08:00
walon 69b54fcd91 【特性】新增 data_yaml 导出格式支持 2022-03-12 17:00:54 +08:00
walon fc0772d6f6 【修复】修复从数据excel表头读取多态表结构定义时,误将$type当作普通字段的bug 2022-03-03 14:01:08 +08:00
walon 68c48d0c02 【修复】修复 code_cs_unity_editor_json 解析多态数据代码,如果namespace为空,生成重复case 项的bug 2022-03-02 18:03:37 +08:00
walon 856f30df5b 【修复】修复code_cs_unity_editor_json无法加载多态数据的问题 2022-03-02 16:51:07 +08:00
walon 0e3782dd48 【调整】config gen_gype 'code_cs_json' 改名为 'code_cs_dotnet_json',与'code_cs_unity_json' 区分,避免误用 2022-02-26 11:04:16 +08:00
walon aab29ed828 【修复】修改导出lua数据未正确处理换行符之类的escape的bug 2022-02-24 19:08:35 +08:00
walon c0d91dfa81 【调整】config code_cs_unity_editor_json生成的enum类改成普通枚举类。额外生成一个枚举元数据类。 2022-02-24 11:10:10 +08:00
walon e977a363ef 【调整】json、xml、lua、yaml等数据源支持int类型的enum数据 2022-02-24 10:33:09 +08:00
walon 480b839d31 【文档】补充一个复杂的多级多行表的例子 2022-02-23 15:11:25 +08:00
walon 2335a82c11 【优化】不允许两个自定义类型忽略大小写后同名,避免生成代码文件的平台兼容性问题(例如win下文件名大小写不敏感,如果允许,则会生成到同一个文件名,引起编译问题)
【优化】关闭Luban.Client生成结束后打印的Socket错误日志。
2022-02-23 13:03:58 +08:00
walon 7901b7012b 【优化】Luban.Client写入生成的文件时使用自定义的WriteFileAllBytes,即使文件被占用情况下也能写入。 2022-02-23 12:37:00 +08:00
walon c79e6169a6 【修复】修复path校验子资源路径匹配判定的问题 2022-02-19 19:29:50 +08:00
walon 13ee28835a 【修复】修复读取vector2,3,4类型数据时,未检查数据过多的问题,例如 vector2类型填了'1,2,4' 2022-02-16 20:43:19 +08:00
walon b2014ab7bb 【新增】vector{2,3,4}和datetime类型也支持 externaltype 映射 2022-02-16 18:03:57 +08:00
walon d5184e136e 【新增】config新增gen_type类型 code_cs_unity_bin,生成代码与code_cs_bin基本相同,除了使用 UnityEngine.Vector外 2022-02-16 17:24:26 +08:00
walon 3631f131ad 【优化】对于flags类型enum,填整数值时不再要求是枚举值中某一个 2022-02-16 09:58:52 +08:00
walon 034f0dd21b 【修复】修复proto c#对可空变量序列化的bug 2022-02-13 11:57:55 +08:00
walon c52407bdee 【调整】excel之类的格式读取多态类型时,优先查找$type之类字段,再查找默认__type__字段
【修复】修复生成protocol序列化可空类型的代码的编译错误
2022-02-12 21:46:09 +08:00
walon ba269df862 【修复】修复lua_bin生成的代码使用_name作为多态key的bug。应该_type_。 2022-02-12 13:42:12 +08:00
walon 657bd19c77 【调整】【重大】将配置中的多态类型字段由统一的__type__改成 excel优先$type,json优先$type,xml优先type,lua优先_type_,如果找不到再找默认__type__。 2022-02-12 13:23:26 +08:00
walon e76b20b24f 【重构】重构 cpp_bin 生成,全部可以在模板中定制
【重构】重构 cpp_ue_editor_json、cpp_ue_bp、cs_unity_editor_json 生成
2022-02-12 12:33:08 +08:00
walon caa476272b 【更新】根据最新README.md更新了README.en-us.md 2022-02-12 10:44:18 +08:00
walon 953469475c 【修复】修复无法识别纵表标签 ##column#var 的bug 2022-02-11 18:09:24 +08:00
walon e8805873ea 【新增】config 容器元素为ref时,也为生成相应的ref变量并且resolve。 目前只支持c# 2022-02-11 11:48:23 +08:00
walon e6203df5b3 【优化】将tpl文件中__type__改为 {{x.json_type_name_key}},方便统一调整。 2022-02-10 18:06:29 +08:00
walon 6b1669e050 【调整】调整externaltype实现 2022-02-10 15:07:09 +08:00
walon 45f4a13dd2 【修复】修复当意外使用bean或容器等不能作为index类型的字段为table的index时,打印的错误日志没有报告正确的错误的信息的问题。在DefTable Compile时检查并且给出清晰的错误信息。 2022-02-10 12:47:15 +08:00
walon 0b63b1fcb3 【优化】调整&与#的分割语法。除了定义字段的非type以外的属性用&,其他地方都用#。 2022-02-10 12:00:42 +08:00
walon 66e07830d0 【调整】移除对简单容器类型如"list,int"之类自动sep的支持,简化规则 2022-02-10 11:26:45 +08:00
walon 0122d97071
Merge pull request #7 from youngself/develop
【新增】生成EmmeLua文档类型接口
2022-02-03 22:28:22 +08:00
yxy 7d05f1fd4d 【优化】EmmyLuaType的TBytes 2022-02-03 22:18:48 +08:00
yxy a4df2de837 【修复】EmmeLua改为EmmyLua 2022-02-03 22:15:15 +08:00
yxy f3949f9c72 【新增】EmmeLua文档注解接口 2022-02-03 13:43:40 +08:00
walon 1a1fc3ca2f 【调整】删去excel中定义多态结构时,要求parent必须相同命名空间的限制 2022-01-29 15:02:00 +08:00
walon 54e1955112 【修复】修复上次调整sep机制引起的读取简单数据列表只读到第一个字段的问题 2022-01-29 14:54:15 +08:00
walon b3457da8d2 【特性】支持子bean在其他地方,包括其他模块从父类继承 2022-01-29 14:28:03 +08:00
walon 9f687adcf1 【修复】新增code_cs_unity_editor_json时失误改了cs_json的模板。回滚 2022-01-29 11:05:49 +08:00
walon 7f9c4e93d6 【新增】excel格式支持定义多态类型 2022-01-28 17:58:52 +08:00
walon 29cf3b56f6 【修复】修复code_cs_unity_editor_json保存map类型数据的bug 2022-01-26 22:48:17 +08:00
walon f617d5f10f 【特性】 cfg root.xml 新增配置项 option
【特性】新增 code_cs_unity_editor_json 支持
2022-01-26 22:19:40 +08:00
walon 1acaac5b87 【优化】如果枚举类包含value为0的枚举项,允许excel中列限定模式下为空取默认值 2022-01-26 11:25:46 +08:00
walon c20505aea3 【更新】调整 README.md 中的示例 2022-01-25 16:02:22 +08:00
walon f9abe09a8d 【优化】生成的cfg c#代码都为partial类。并且新增PostInit和PostResolve两个partital函数 2022-01-25 15:02:18 +08:00
walon 582edb6cc6 【特性】对c#语言,为联合索引和多重索引的table生成索引代码 2022-01-25 13:23:21 +08:00
walon a41fd92b43 【修复】修复code_cs_bin在table.mode='list'时,加载数据列表为空的bug 2022-01-24 22:24:50 +08:00
walon 1e06690def 【修复】修复table.mode为空时,由于只使用","去拆分index,导致误将key1+key2+key3当作一个key,而猜测mode="map"导致无法找到key的bug 2022-01-23 21:34:31 +08:00
walon c612423590 【更新】更新文档 2022-01-21 12:01:56 +08:00
walon d40c016afa 【修复】修复读取深层次容器未使用sep的bug 2022-01-19 21:16:49 +08:00
walon 36df70bffb 【优化】当excel字段行包含非法tag如group时,打印错误 2022-01-19 18:12:12 +08:00
walon 8cd9e5f247 【修复】修复refgroup可默认性的计算bug 2022-01-06 16:32:35 +08:00
walon a560c23c67 【优化】path检查支持 Assets/xxxx/yyyy[abc] 这样的子资源文件 2022-01-06 10:49:52 +08:00
walon c009d54d26 【修复】修复ref只包含一个refgroup,同时refgroup只包含一个表时,错误判定为需要genRef,导致生成代码出错的bug 2022-01-03 12:51:46 +08:00
walon fc1cb23974 【更新】更新文档 2022-01-01 23:49:05 +08:00
walon 4bd826a360 【调整】调整data_resources输出中tag和资源值的顺序,tag在前,资源值在后 2021-12-27 10:10:46 +08:00
walon 00a56c0a37 【修复】修复data_resources导出 2021-12-24 13:57:31 +08:00
walon 8164d641e4 【调整】生成单个代码文件时,相对目录为output_code_dir而不是当前目录 2021-12-23 17:19:52 +08:00
walon 51dbe96917 【特性】新增cfg python27 json支持 2021-12-22 18:10:35 +08:00
walon 8e4ef0952d 【修复】修复excel中未定义多态或可空类型的__type__列时抛出无法准确定位错误信息的异常的问题 2021-12-22 15:04:28 +08:00
walon b27366932d 更新 README.md 2021-12-22 13:37:44 +08:00
walon 73da39e7cd 【更新】更新文档,替换wiki链接地址为lubandoc。更新英文文档。 2021-12-22 10:06:50 +08:00
walon 7a80812c17 【优化】调整了excel格式,允许使用##var来标识顶层字段,并且允许自由调整顶层字段行的位置 2021-12-20 18:15:14 +08:00
walon 2021e38485 【特性】新增convert_template支持 2021-12-18 20:11:59 +08:00
walon c2fc86215c 【特性】新增 --output:tables, --output:include_tables, --output:exclude_tables 用于指定包含或者排除某些表 2021-12-18 18:50:03 +08:00
walon 6bc3552a1f 【特性】新增unity ScriptableObject asset数据源支持
【优化】允许为目录数据源指定参数,这些参数会作用到所有目录下的子文件上
2021-12-18 13:36:21 +08:00
walon 9e6463f18d 【优化】新增 --go:bright_module_name 参数,优化go的生成代码,使用比较地道的module机制 2021-12-17 10:24:58 +08:00
walon 4f8fd20780 【优化】读取excel标题头列时,如果遇到不认识的标签,打印警告。将示例中的##+全部统一成##var。 2021-12-12 13:12:01 +08:00
walon 8cd9ffee3c 【修复】修复文档错误 2021-12-11 15:39:17 +08:00
walon fb000e400c 【特性】支持 [xxx, xxx] 这种格式来标识一个占据多列的字段,方便csv这种不支持多列合并的格式表达多列字段 2021-12-10 16:32:57 +08:00
walon e650ff6fe6 【特性】新增code_protobuf3及data_protobuf3_json支持
【修复】修复FlatBuffers json导出格式中map数据的格式错误。本应该是{"K":v}却序列化成[[k1,v1]]
2021-12-08 20:39:58 +08:00
walon aa0d0a9a36 【修复】修复LubanAssistant的编译错误。这是LubanAssistant最后一个版本。后面转为Office Add-In开发。 2021-12-07 17:33:56 +08:00
walon c1ffaa2d98 【特性】新增flatbuffers支持,可以生成schema定义,但目前只支持json导出格式(有个问题:不支持union与容器的组合),因为binary格式过于复杂了。 2021-12-06 18:07:18 +08:00
walon 5861001683 【特性】新增msgpack导出支持 2021-12-06 10:36:38 +08:00
walon a78c9abd1a 【特性】新增refgroup,方便很多字段都引用到同一组引用表的情况。 2021-12-05 20:49:00 +08:00
walon 1377eb828d 【修复】修复ref了不属于当前导出分组的table时,生成报错的bug。
【修复】修复未进行完整生成,只生成导出分组表,导致一些ref检查出错的bug。
2021-12-05 17:52:42 +08:00
walon 19656437cb 【优化】灵活并且统一了sep的用法 2021-12-05 16:57:55 +08:00
walon 83f81ed463 【调整】名称调整,统一 pb => protobuf
【特性】新增 gen_types 类型 code_template,可以自定义新的模板目录了,新增配合的命令行选项 --template:code:dir
【调整】模板参数名调整。 data_template_name => template:data:file, output_compact_json => output:data:compact_json
【修复】修复protobuf生成错误设置 language为lua的bug
2021-12-04 14:47:47 +08:00
walon 93595c7748 【优化】如果模板代码生成的内容为空,则不生成此文件 2021-12-04 13:13:53 +08:00
walon 79d52c8820 【修复】从service.manager中获得Tables管理类的类名,而不是写死为Tables。 2021-12-03 18:10:09 +08:00
walon a6a1d58159 【更新】修复文档错误 2021-12-03 17:40:12 +08:00
walon f740685830 【更新】更新文档 2021-12-03 15:30:54 +08:00
walon 8b0f607f4a 【修复】修复一些将field拼成filed的错误
【优化】当table从xlsx中读取定义时,如果value不包含命名空间,则使用table所在的命名空间;如果包含,则使用它的命名空间
【修复】修复从xlsx读取的table定义,未检查table名唯一的bug。
2021-12-02 18:37:26 +08:00
walon 6bcc8e74ce 【修复】修复unity项目中彻底移除某个模块后,重新生成代码过程中会尝试删除该模块目录,由于保留了meta文件导致目录删除失败的bug 2021-12-02 18:11:39 +08:00
walon 91bb1b317f 【修复】修复excel中多层标题头读取可空bean时抛异常的bug 2021-12-02 17:11:49 +08:00
walon edc09b6742 【特性】新增对外部class类的支持。 可以在定义中引用现成的外部类,如UnityEngine.Color 2021-12-02 14:59:25 +08:00
walon 7fc75871d4 【特性】支持 enum 的external type映射。可以将定义中的某个枚举类映射到现成的另一个枚举类。暂时只支持cs语言。 2021-12-02 13:43:33 +08:00
walon ff93a074c4 【调整】调整xlsx中定义enum的格式。完整对应xml定义。 2021-12-02 10:52:06 +08:00
walon 85937685b6 【特性】新增cfg 所有语言对table mode=list的代码生成 2021-12-01 14:12:11 +08:00
walon ba4bb014a9 【特性】新增list表,支持多key联合索引与多key独立索引 2021-12-01 12:33:31 +08:00
walon 967c45dda1 【调整】调整 naming_convetion 相关的一些命令行选项名 2021-11-30 20:44:46 +08:00
walon 46ccf6868b 【修复】修复在某些机器上无法找到"Asia/Shanghai",导致启动失败的问题。新增失败后尝试"China Standard Time"
【修复】修复Luban.ClientServer未初始化DefaultTimeZone,导致默认时区为Utc的bug,严重!
2021-11-30 20:14:57 +08:00
walon 7df2f6ea86 【特性】cfg excel格式支持列表水平展时的多级标题头,可以为每个元素指定列。 2021-11-30 18:50:08 +08:00
walon 57867bc14b 【修复】修复LubanAssistant的编译错误 2021-11-30 18:07:16 +08:00
walon ca8e5035ba 【重构】模块相关函数由StringTemplateUtil移到StringTemplateManager
【特性】Luban.Server支持禁用生成缓存(但仍保留源文件缓存)。
【修复】修复 start_up.md 文档中的链接错误
2021-11-30 16:32:31 +08:00
walon d686f82ba8 【更新】更新文档 2021-11-30 15:08:15 +08:00
walon d571638970 【优化】cfg cs代码的datetime类型额外生成 xxx_Millis字段,返回毫秒值。
【更新】更新文档,补充protobuf,msgpack,flatbuffers相关描述
2021-11-30 12:16:38 +08:00
walon 56c222976e 【修复】修复cfg data_protobuf导出多态结构数据的问题。已经通过所有测试。完美! 2021-11-30 10:32:47 +08:00
walon 6e83d8c1eb 【更新】更新protobuf相关说明 2021-11-30 02:10:14 +08:00
walon 66ba09e8a0 【特性】支持生成 proto定义文件和proto二进制数据 2021-11-30 01:52:47 +08:00
walon b8e794d528 【完善】proto go补充了rpc和stub的实现 2021-11-29 17:57:32 +08:00
walon 813e129352 【调整】调整 proto go和 cfg go的生成 2021-11-29 16:24:02 +08:00
walon a9de6b924b 【特性】新增 proto go支持 2021-11-29 14:31:13 +08:00
walon 1de0299b17 【调整】调整本土化相关选项名,统一为 --{l10n}:{option} 2021-11-29 10:17:48 +08:00
walon e9244a30da 【调整】调整一些语言相关的生成选项名,标准化为 --{language}:{option} 2021-11-29 09:57:12 +08:00
walon bb534ef12e 【重构】重构cfg code生成,消除大量重复代码 2021-11-27 15:23:42 +08:00
walon 28626d0cfd 【特性】新增 proto go实现,有待完善。 2021-11-27 13:45:04 +08:00
walon b0d64bb967 【优化】优化 cfg go的生成代码 2021-11-27 13:36:38 +08:00
walon 7ff3467d35 【修复】修复 proto typescript对 TFlong及Tlong bigint情况下的代码及 array类型的代码的编译问题 2021-11-27 13:27:33 +08:00
walon edd82f249c 【重构】重构proto Render代码,减少不必要的代码复制
【调整】解决proto代码有一些Unity下编译器不支持的语法特性
2021-11-27 12:02:14 +08:00
walon 9083915b62 【重构】重构proto JobController代码,添加新的代码生成不再需要修改JobController代码。 2021-11-26 19:03:03 +08:00
walon 675f9954cf 【调整】cfg生成的go代码的包名由固定cfg改为由DefAssembly.TopModule 2021-11-26 18:13:54 +08:00
walon fa971c0e06 【优化】优化type的属性解析,可以正确去掉多余括号 2021-11-25 09:52:26 +08:00
walon 41fd0a908b 【优化】优化Dockerfile,选用cache加速生成 2021-11-25 09:52:26 +08:00
walon 3a021f74a8 Set theme jekyll-theme-slate 2021-11-24 15:32:46 +08:00
walon 8cd45782f4 【优化】优化type的attr解析,允许用()来界定属性的定义范围,如int#(set=1,2,3)
【优化】模块中可以通过assembly属性获得DefAssembly变量
2021-11-22 16:39:32 +08:00
walon 5e56d35e4a 【特性】新增validator set, 要求值必须在某一集合内
【重构】重构validator,基于注解获得所有Validator类
2021-11-22 15:50:05 +08:00
walon f024ec6974 【调整】移除特殊tag: no,不再用于表示不导出记录 2021-11-20 15:55:08 +08:00
walon 35082d96d5 【新增】新增特殊tag: unchecked。 校验器不检查带此tag的记录。 2021-11-20 15:31:51 +08:00
walon fcc12ab0d2 【更新】补充json和lua数据源文档中关于text类型的说明 2021-11-19 09:58:02 +08:00
walon 9eacac3171 【特性】新增 SizeValidator 2021-11-18 17:06:31 +08:00
walon 4f0addec89 【更新】完善json,lua 数据源文档 2021-11-18 13:23:14 +08:00
walon 21a745a4f7 【重构】 config/rust_json/mod_header.tpl 改名为 include.tpl 2021-11-17 10:19:15 +08:00
walon 8c02821fd8 【重构】将python_json生成代码中import和vector定义部分移到 include.tpl,方便定制 2021-11-17 10:15:31 +08:00
walon e9f608a238 【优化】convert_xlsx格式,对于复合字段,如果未指定sep,则默认使用| 2021-11-16 19:13:21 +08:00
walon 8e8fe68fd0 【更新】更新json、lua、yaml数据源文档 2021-11-16 16:12:14 +08:00
walon d9e7bc3914 【优化】考虑到##field容易写错,新增##+和##var作为子字段行的标识名 2021-11-16 12:30:12 +08:00
walon 9fd76d5334 【特性】lua,yaml格式也支持从子字段读取记录
【修复】修复json格式中读取字段列表时未判定忽略的null数据的bug
2021-11-16 09:41:50 +08:00
walon 2034e8050f 【调整】将多态类型id字段ID改名为__ID__,避免与常见的字段名ID冲突而产生编译错误 2021-11-15 23:47:50 +08:00
walon f6b8b32123 【修复】修复.net 6的TimeZone相关调整导致datetime计算错误的问题
【调整】新增datetime的等价类型名time
【调整】Luban.Server的Dockerfile不再拷备localtime文件
2021-11-15 23:26:17 +08:00
walon 9cc489ecfd 【特性】json数据源支持从json子字段读入bean或者list,bean,支持用*@xxx.json形式将json当作一个记录列表读入list,bean形式的数据 2021-11-15 22:27:49 +08:00
walon 390a72747d 【修复】修复解析excel数据出错时,打印行号有误的bug 2021-11-13 14:53:34 +08:00
walon a11380d142 【调整】Luban.ClientServer忽略-h参数,避免意外添加-h变成云生成,给新手造成很多困惑。 2021-11-10 22:25:04 +08:00
walon fd0817d630 【优化】缓存在excel中的定义的表ValueType结构,加速生成 2021-11-10 16:06:55 +08:00
walon 5a21c9b1b4 【调整】 cfg --output_data_dir 改为可选参数。只生成代码时可以不指定此参数
【更新】更新文档
2021-11-10 09:44:11 +08:00
walon afbfaa1c55 【调整】调整java_bin和java_json的生成代码,移除var关键字,兼容java 1.8的语法。 2021-11-09 18:40:58 +08:00
walon 28c6ee75a0 【升级】升级.trivis脚本中.net 5到.net 6 2021-11-09 11:05:55 +08:00
walon 66db58d3fb 【升级】升级到.net6 2021-11-09 10:08:49 +08:00
walon 3612d4e2d8 【优化】convert_xlsx输出记录按key排序 2021-11-05 17:10:43 +08:00
walon 575d0b2533 【更新】更新 README.md 2021-11-05 14:07:46 +08:00
walon 7df7c5d866 【修复】修复 convert_xlsx生成的数据的一些格式错误 2021-11-05 13:22:02 +08:00
walon d292f12070 【特性】新增 --input_convert_data_dir 参数,用于覆盖table的input值,从convert目录读取每个表的源数据 2021-11-05 12:10:55 +08:00
walon 21676657a5 【调整】由于 spreedsheet在mac下无法正常工作,换成ClosedXml库。
【修复】修复 LubanAssistant 的编译bug
2021-11-05 11:36:39 +08:00
walon bf03d47784 【调整】跟随brightdb调整,生成与最新版本相匹配的代码 2021-11-04 16:22:28 +08:00
walon 8a41b5bc83 【新增】Luban.Client新增 --generateonly 选项。只生成,不下载生成结果,可用于单纯地执行生成过程,检查数据合法性。 2021-11-02 17:24:43 +08:00
walon 2e047ce56e 【修复】修复db生成的bug 2021-11-02 15:13:19 +08:00
walon b2e33fc74c 【更新】更新 README.md,为一些示例补充在xlsx中定义bean的写法 2021-11-01 21:33:38 +08:00
walon da94480110 更新 README.md 2021-11-01 09:22:32 +08:00
walon ae5f92721b 【优化】放松对enum填法的要求,允许填合法的整数枚举值了
【调整】默认强迫枚举值唯一,减少意外错误
2021-10-29 15:44:28 +08:00
walon 6e994e7729 【优化】优化excel中多级标题头时#desc的解析处理 2021-10-29 14:24:27 +08:00
walon d1d28a0692 【优化】去掉生成的c#类中的partial,用不上。 2021-10-29 12:28:02 +08:00
walon 4cff35fb84 【优化】优化从table中读取field的desc值的方式,先找##desc行,再找##comment行,最后找##行
【修复】修复 comment 未对换行或者 '<' 等字符escape,产生非法注释进而导致编译错误的bug
2021-10-29 12:15:52 +08:00
walon 5d8c3d454e 【更新】修正一些过时的excel格式的文档 2021-10-28 21:23:21 +08:00
walon eb34a4cb7f 【修复】修复没有检查容器中bean类型数据的子数据的bug 2021-10-28 17:00:27 +08:00
walon 38b410f0a5 【修复】修复enum与bean没有正确处理tags导致枚举类型字段无法正确生成ref的bug 2021-10-28 16:20:34 +08:00
walon e54870fb02 【调整】将Excel2TextDiff拆成独立项目 2021-10-28 11:25:06 +08:00
walon c8cd68af61 【优化】LubanAssistant 支持自由组织##field的位置 2021-10-28 10:48:30 +08:00
walon e7c03419a5 【优化】允许自由组织##field行的位置,不必强制从第2行开始。 2021-10-28 10:48:30 +08:00
walon 8082c8f87f
Update FUNDING.yml 2021-10-28 09:18:25 +08:00
walon 5181b1f305 【修复】修复读取多行记录的bug 2021-10-27 19:50:11 +08:00
walon 258f657ce8 【修复】修复当A1单元格为null时,判定StartWith("##")抛异常的bug 2021-10-27 17:38:28 +08:00
walon 4cc90d459a 【更新】根据excel重构格式,重新调整了README.md中的文档 2021-10-27 15:36:56 +08:00
walon 72cf2884d9 【重构】重构excel格式后相应调整了convert_xlsx的生成 2021-10-27 15:09:24 +08:00
walon cd227c3f4c 【重构】调整excel格式后相应调整了LubanAssistant对sheet的解析 2021-10-27 14:44:33 +08:00
walon 13309b5da8 【重构】重构excel格式,更加优雅清晰 2021-10-27 14:15:37 +08:00
walon 881bd3aecc 【特性】新增 xlsx 格式导出
【修复】修复 lua 导出格式中未对"转义的bug
2021-10-26 17:48:02 +08:00
walon 050fbc347e 【优化】优化容器类型的tag解析,终于可以正确区分容器自身及元素类型的tag定义 2021-10-26 09:41:18 +08:00
walon 18678059f4 【修复】修复Luban重构导致LubanAssistant编译失败的问题 2021-10-25 22:03:55 +08:00
walon dd25873b58 【重构】重构 validator 2021-10-25 21:45:10 +08:00
walon 60bbcbbbf8 【重构】validator重构 2021-10-25 20:41:41 +08:00
walon 79d684dca4 【修复】修复识别非顶层多行记录的bug 2021-10-25 17:30:03 +08:00
walon dd582a37ee 【优化】对于有标题头限定的可空bean,如果所有单元格为空,则取null(之前强制要求填null) 2021-10-25 16:44:23 +08:00
walon 1494bb9cf8 【优化】优化读取excel数据的错误信息,给出准确的错误位置 2021-10-25 16:36:39 +08:00
walon 8f872289b8 【特性】新增 --naming_convention_xxx 相关选项,允许指定生成代码的命名风格 2021-10-25 16:16:57 +08:00
walon dff8ac0cdd
Create FUNDING.yml
新增微信与支付宝的捐赠按键
2021-10-25 11:09:35 +08:00
walon 47e950be6f 【特性】新增 sort_data_list 模板函数,对记录排序 2021-10-25 10:47:18 +08:00
walon 48f7ffe0b9 【更新】更新本地化相关文档 2021-10-25 09:38:10 +08:00
walon 029ac6ebd8 【特性】excel title新增属性 non_empty,表示字段单元格值不能为空。 <name>&non_empty=1等效于 !<name>
【优化】excel中第一个字段默认为non_empty,避免了绝大多数情况下失误未填key时将空单元格当作key=默认值的问题
2021-10-24 20:56:03 +08:00
walon 06467344a5 【特性】支持为容器类型自身及key,value类型单独指定属性(例如 map,(int&ref=test),(int&path=unity)&tag_of_map=xxx) 2021-10-24 20:07:32 +08:00
walon 08720156e8 【调整】cfg bean的field字段的index属性移到type中,xml及__bean__.xlsx中不再接受单独的index定义 2021-10-24 11:37:54 +08:00
walon 81909562a0 【修复】修复上回重构引发的excel中定义的ref未正确处理的bug 2021-10-24 11:15:52 +08:00
walon 4ff1a54eed 【优化】优化多行字段未设置multi_rows属性时的报错信息 2021-10-24 11:06:13 +08:00
walon 96ce3443d5 【特性】新增转换到json和lua的源数据格式(注意,转换格式不同于导出格式) 2021-10-22 18:46:10 +08:00
walon 8ad27e8275 【特性】新增 --output_compact_json 选项,生成紧凑的json格式 2021-10-22 16:59:29 +08:00
walon 5665e76299 【优化】优化LubanAssistant保存,只保存改变的记录。优化记录显示顺序,如果key为int和long类型,按从小到大排序,而不是按字符串顺序排序。 2021-10-22 14:33:12 +08:00
walon fb55a7a4c6 【优化】大幅优化了 LubanAssistant加载和保存的速度(慢如牛到闪电) 2021-10-22 10:44:33 +08:00
walon 7d4b9e049d 【修复】修复 bean设置属性sep后,被excel中字段sep分割后,再次被bean属性sep分割,导致解析失败的问题
【修复】修复 在excel中定义的table,__tag__被当作普通字段,但又缺失type列,代码中没仔细处理导致产生空指针异常的bug
2021-10-21 16:32:00 +08:00
walon 6c50e66915 【特性】LubanAssistant支持多行列表。以及修复对list,int之类简单原生数据未加sep=,的问题 2021-10-20 19:34:28 +08:00
walon ac01206f78 【更新】更新 README.md 2021-10-20 16:48:06 +08:00
walon 1e56baaf8c 【更新】更新 README.md 2021-10-20 14:02:27 +08:00
walon 4559649f44 【更新】更新 README.md 2021-10-20 11:51:28 +08:00
walon eeba3fd99c 【特性】cfg table新增output属性,用于指定输出文件名字
【特性】cfg 新增 --output_code_monolithic_file 参数,用于指定typescript之类生成的全量代码文件名
【修复】修复 topmodule不能为空的bug
2021-10-18 17:05:14 +08:00
walon ec3635cc70 【修复】修复新增 LubanTool.sln后 src目录包含多个sln导致 travis脚本无法工作的bug 2021-10-18 10:52:53 +08:00
walon 524113a738 【修复】修复LubanAssistant由于版本太低导致缺失函数的编译bug 2021-10-18 09:29:53 +08:00
walon 59276dd503 【特性】支持多行bean
【特性】支持多行字段的简化语法 *<字段名> 等价于 <字段名>&multi_rows=1
2021-10-16 16:03:49 +08:00
walon 3b17094618 【重构】重构LubanAssistant代码,复用Luban的解析方式 2021-10-16 12:55:06 +08:00
walon 953c4db678 【重构】修复path检查 2021-10-15 18:32:58 +08:00
walon 2b03140c68 【重构】完成ref检查重构 2021-10-15 18:22:50 +08:00
walon c530331f95 【重构】修复 ref 相关生成 2021-10-15 18:14:49 +08:00
walon a7dcb7f64d 【重构】完成数据生成重构 2021-10-15 17:18:01 +08:00
walon 1c22887e69 【完善】完善TitleRow解析
【完善】添加RawSheetTableDefInfo 解析
2021-10-15 11:39:13 +08:00
walon 4613169811 【重构】重构excel解析代码及将field上的属性移到type 2021-10-14 19:52:30 +08:00
walon 4308db1a83 【修复】修复string和enum类型default值处理的bug
【修复】修复失误删除csv编码检测相关代码,导致加载非本地ansi编码的csv出错的bug
2021-10-14 11:00:43 +08:00
walon 042c525f2e 【重构】将 Excel2TextDiff和LubanAssistant分拆到单独的 LubanTools工程 2021-10-13 16:56:53 +08:00
walon 5f25168074 【更新】补充LubanAssistant相关的文档 2021-10-13 16:35:53 +08:00
walon 89177f6580 【修复】修复 LubanAssistant Release生成出错的问题 2021-10-13 16:01:25 +08:00
walon f720c24693 【完善】LubanAssistant实现了数据保存到json文件 2021-10-13 15:53:01 +08:00
walon f22dc45273 【完善】LubanAssistant 能够正确从json或者其他配置文件中加载配置,并且填充到excel中 2021-10-13 11:47:40 +08:00
walon 4e7c993d53 重构 2021-10-12 16:05:10 +08:00
walon 48c2ce74b7 完善 2021-10-12 14:08:18 +08:00
walon 1dc7e0b84f 完善实现 2021-10-12 11:31:32 +08:00
walon 1e7fb10db2 LubanAssistant添加配置定义加载相关代码 2021-10-11 23:06:41 +08:00
walon 8288591827 【重构】为与LubanAssistant共享代码而略微调整了一些.net5与.net 4.7 之间不兼容的代码 2021-10-11 23:05:16 +08:00
walon 2f9c970730 【新增】 新建LubanAssistant项目 2021-10-11 17:18:07 +08:00
walon 68676cf8ab 【删除】移除 cfg --export_test_data 选项,如果想不导出测试数据,使用 --export_exclude_tags test
【特性】新增 cfg --export_exclude_tags选项,支持过滤指定tags列表的数据
2021-10-11 15:43:51 +08:00
walon dd5bae123f 【重构】重构cfg记录tags处理 2021-10-11 14:28:05 +08:00
walon 4876baabf7 【更新】优化文档 2021-10-08 11:16:22 +08:00
walon a51d816246 【修复】修复 data_lua.md 文件中包含{{导致生成github page失败的问题 2021-10-08 10:12:30 +08:00
walon 25610a8b86 更新 README.md,补充 Excel2TextDiff及Excel插件 Luban Assitant的相关说明 2021-09-30 10:07:15 +08:00
walon 0a5d7b6ab4 【调整】移除cfg,proto,db对const定义的支持 2021-09-27 16:27:13 +08:00
walon f90fa41d57 【优化】调整及补充文档 2021-09-27 14:45:51 +08:00
walon e69cf2a764 【修复】修复cfg rust json生成代码,正确处理多态类型 2021-09-27 13:53:14 +08:00
walon c29c00bbe3 【特性】新增生成类型 cfg code_rust_json(多态支持有一些问题) 2021-09-27 12:52:09 +08:00
walon dad7fa0ea8 【更新】 更新 README.md 2021-09-26 16:31:23 +08:00
walon d9a303eda8 【更新】更新 README.md 2021-09-26 14:44:01 +08:00
walon dc279d2def 【更新】优化README.md 2021-09-26 14:17:20 +08:00
walon c72bf53579 【调整】proto的gen_types ts改为 typescript,与db和cfg统一
【调整】删除 cfg的gen_types data_erlang,不再支持erlang导出数据类型,但仍然提供对 erlang data template相关的支持
2021-09-23 14:59:47 +08:00
walon e75289d82f 【重构】cfg 从excel中读取table的value type定义的代码的一些微小重构 2021-09-09 11:19:07 +08:00
walon 614ebb6442 【调整】cfg生成中branch相关名称改为patch 2021-09-07 16:34:58 +08:00
walon 62511c10f2 【删除】删除 cfg code_editor_typescript 2021-09-06 15:49:41 +08:00
walon 70db1dca9e 【优化】优化cfg生成的typescript代码中可空变量的定义代码在eslint下警告的问题
【完善】优化install.md文档,简化流程,更加清晰易理解。
2021-09-06 10:32:43 +08:00
walon 533ab56f86 【优化】优化typescript 可空变量的定义,由 xxx?:yyy 改成 xxx:yyy|undefined
【新增】新增 code_typescript_editor_json 一个用于web的临时性生成方案
【优化】优化 typescript Vector{2,3,4}加载json的代码。 json['x']改成json.x
【优化】优化 typescript 格式及解决一些编译警告
2021-09-03 12:52:51 +08:00
walon 412173f1c0 【更新】更新 README.md 2021-09-02 10:52:19 +08:00
walon f8cb21c57f 【修复】修复无法在excel的标题行中定义orientation属性的问题 2021-09-01 14:59:39 +08:00
walon e0dda1c83c 【重构】使用vs内置工具进行代码清理 2021-09-01 11:30:56 +08:00
walon 75e73206f4 【修复】修复加载定义出错时,打印错误日志无法定位错误的bug 2021-09-01 11:28:28 +08:00
walon f0f39381c3 【特性】cfg新增 --data_file_extension选项,用于指定生成的数据文件的扩展名 2021-09-01 09:34:54 +08:00
walon ec84a0be64 【优化】支持excel定义字段时支持tags属性
【优化】解析excel字段属性时,只拆解第一个'='
2021-08-31 17:33:40 +08:00
walon f82df5d68d 【特性】cfg excel格式支持以map的key作标题头,但必须配合orientation=c使用 2021-08-30 16:14:43 +08:00
walon ae63bd883b 【特性】cfg var 新增orientation属性。主要用来以纵向形式读入map(虽然也可以用来读入list,array,set) 2021-08-30 14:37:04 +08:00
walon 8069c6d7fe 【修复】修复上次调整DataExport引发的新的导出数据的bug
【调整】调整输出数据文件名为 <full_name>.replace('.','_').lower()
2021-08-30 10:43:55 +08:00
walon 732297411c 【新增】支持erlang导出格式
【优化】完善了数据导出模板相关机制,补充一些辅助函数,方便定制生成。
2021-08-28 15:33:19 +08:00
walon 125504e5a7 【重构】重构json和lua转化为literal的代码 2021-08-28 10:07:41 +08:00
walon 47ced0fbbb 【删除】删除废弃的config测试配置目录 2021-08-27 19:35:35 +08:00
walon 434d52ed8d 【特性】新增gen_types类型 data_template 以及新增配套参数--template_name,用于模板生成自定义格式的配置数据 2021-08-27 19:23:28 +08:00
walon 2fde2a481e 【特性】提供自定义lua和json数据生成所必要的序列化支持 2021-08-27 18:45:55 +08:00
walon 7ea907cc5b 【特性】支持数据模板。允许自定义生成数据(自定义生成的数据不能被标准的生成代码识别,因此只能用于自定义加载) 2021-08-27 16:35:22 +08:00
walon 45279810ec 【特性】新增cfg bean的var属性default,用于指定excel默认值
【调整】调整excel格式中bean的field定义, 字段名reference调整为ref,与xml一致
2021-08-27 15:39:36 +08:00
walon efd079939f 【重构】重构cfg JobController处理。通过注解方式,新增代码或者数据生成,不再需要修改JobController代码 2021-08-27 15:00:14 +08:00
walon f31172c850 【重构】重构计算gen_type对应ELangua的方式,重构计算生成数据文件后缀的方式
【修复】修复类型名为 xx_zz_ 包含独立的_时,UpperCaseFirstChar空白名字导致的异常
2021-08-27 12:00:14 +08:00
walon f6e4f6377a 【优化】优化Luban.ClientServer性能,GenServer使用LocalAgent直接读取本地文件,而不是通过网络从GenClient获得。 2021-08-27 10:54:38 +08:00
walon 2685a4d5d4 【重构】重构创建TType对象的方式。只允许通过工厂模式创建。 2021-08-27 10:15:34 +08:00
walon 6eb1a0d4f5 【调整】自定义attrs改名为tags,相应测试函数也改为has_tag、get_tag 2021-08-27 09:33:04 +08:00
walon 2955cbac52 【特性】为enum,enum.item,bean,bean.field,bean.field.type,table 等大多数定义的对象加上attrs属性。同时添加 has_attr和get_attr模板函数,通过对对象标签识别做一些标准以外的自定义生成。 2021-08-26 19:58:16 +08:00
walon 04b51fccc4 【调整】Luban.Server的 命令行参数-t 语义调整为额外的模板搜索路径。如果指定,优先搜索此路径,再搜索默认的Templates路径。 2021-08-26 17:27:31 +08:00
walon 77fe01dea6 【修复】解决不在Luban.Server或者Luban.ClientServer目录运行Luban.Server或者Luban.ClientServer时,生成代码发生无法找到Templates目录的问题。如果未指定-t参数,自动使用程序所在目录的Templates目录。 2021-08-26 16:56:29 +08:00
walon 003f4cadb6 【调整】cfg选项 output_l10n_not_converted_text_file改为output_l10n_not_translated_text_file 2021-08-26 13:43:52 +08:00
walon 67fce760c4 【特性】新增java,Python,Typescript,Lua的动态本地化支持 2021-08-26 13:34:28 +08:00
walon 93214633b8 【特性】新增 cfg go_json动态本地化支持 2021-08-26 12:22:20 +08:00
walon f5e9eef725 【特性】cfg cs_unity_json支持动态本地化 2021-08-26 11:44:10 +08:00
walon c5bd179a82 【特性】cfg cs_json支持动态本地化 2021-08-26 11:31:31 +08:00
walon 12be29afd5 【特性】 cfg cs_bin支持动态本地化 2021-08-26 11:19:09 +08:00
walon 12b3c9d5df 【特性】cfg 导出数据中text类型包含key数据。 2021-08-26 10:35:21 +08:00
walon 35fd2b38cb 【修复】修复Luban.ClientServer未指定-h参数运行抛异常的bug 2021-08-25 15:38:22 +08:00
walon 598b14305f 【新增】Luban.ClientServer支持-h 选项,不指定该选项时使用内嵌生成,使用该选项时,远程生成。 2021-08-25 15:28:38 +08:00
walon c015c0e8b2 【新增】新增Luban.ClientServer项目,Client与Server一体,不需要部属Luban.Server也能直接生成配置 2021-08-25 14:58:31 +08:00
walon 36be33dea8 【优化】cfg 从excel中读取可空变量值时,如果单元格为空,则取null,而不是false,0之类。
【优化】cfg excel格式支持空单元格表示vector{2,3,4}类型的默认值
2021-08-25 13:43:58 +08:00
walon 216bdee29d 【特性】新增 cfg java_json 支持
【重构】Render不再从ThreadStatic里获得Template,改从CocurrentDictionary中获取
【优化】优化 cfg java_bin 代码,不再从AbstraceBean继承,并且美化代码。
2021-08-25 11:52:08 +08:00
walon d296c57f93 【修复】修复Luban.Server的Dockerfile未拷贝Templates目录的bug 2021-08-24 20:37:46 +08:00
walon 6309108da0 【重构】将scriban模板字符串从代码中移到Templates目录 2021-08-24 20:17:25 +08:00
walon ea9830b1c4
Update sync_gitee.yml 2021-08-23 12:05:41 +08:00
walon 967f446991
Update sync_gitee.yml 2021-08-23 11:56:18 +08:00
walon cf922c76aa
Update sync_gitee.yml 2021-08-23 11:52:00 +08:00
walon 14370fb913
Update sync_gitee.yml 2021-08-23 11:42:41 +08:00
walon 3396277a17
Update sync_gitee.yml 2021-08-23 11:40:20 +08:00
walon 2525b76b45
Update sync_gitee.yml 2021-08-23 11:28:37 +08:00
walon a90cac7923
Create sync_gitee.yml
sync repo to gitee mirror
2021-08-23 11:26:09 +08:00
walon 8530840ddf 【优化】GetImportFileOrDirectory 新增文件后缀过滤,只获取支持的文件
【优化】CommonDefLoader import目录时,只获取.xml后缀文件
2021-08-23 10:48:08 +08:00
walon af4038e810 【修复】补充遗漏的未回滚的代码 2021-08-20 18:51:01 +08:00
walon 02481f03e1 【回滚】考虑到 cfg table的DataList必须按照配置定义的顺序。如果改成data_json2格式,顺序就无法确定了。回滚上个版本的修改。 2021-08-20 18:43:33 +08:00
walon 15d1e0b07e 【调整】合并data_json2和data_json格式,统一为data_json但使用data_json2的格式
【修复】修复 生成的data_json_monolithic json文件中,表名错误地使用了bool值的bug
2021-08-20 17:56:49 +08:00
walon bea3edf0ca 【调整】cfg data_json2输出的json顶层结构由array调整为object 2021-08-20 16:59:52 +08:00
walon 92493005a7 【调整】调整 db cs生成。 Table只支持key为string和long类型 2021-08-19 16:12:32 +08:00
walon 5482b0a5de 【调整】调整excel多行记录的判定方式。只有对顶级多行才支持与该记录第一行非多行字段相应单元格值完全相同时,判定该行属于当前记录 2021-08-17 13:35:10 +08:00
walon 0ae7744f6e 【修复】修复 db typescript 生成代码有编译错误的bug 2021-08-16 15:42:08 +08:00
walon e278566289 【修复】修复cfg typescript优化序列化代码最后的分号";"引发的proto与db的生成代码编译错误问题 2021-08-16 11:53:18 +08:00
walon 1a79272af3 【更新】更新文档 2021-08-14 18:34:51 +08:00
walon 5a3cf18b45 【更新】README.md中补充 benchmark 相关文档 2021-08-14 16:27:11 +08:00
walon ef10cf0a84 【修复】修复 cfg java bin 代码生成的bug(上次修复cpp生成时失误改错了)
【优化】优化 cfg typescript bin代码,删除多余的分号';'
2021-08-14 14:24:26 +08:00
walon 31df88bf48 【废弃】废弃对python27的支持 2021-08-14 13:02:26 +08:00
walon 3e8bfb1d77 【修复】修复 cfg python3 生成的代码无法加载可空数据的bug
【修复】修复 cfg python3 生成的enum类 未继承enum.Enum导致无法正确构造的bug
2021-08-14 12:53:20 +08:00
walon ef6524626e 【优化】cfg 导出json格式数据时,object类型不再导出值为null的属性 2021-08-14 12:51:15 +08:00
walon 6003ec95f0 【修复】修复在excel定义了重复table时,产生难以理解的错误日志的问题 2021-08-13 16:58:45 +08:00
walon 3bb7d9a873 【调整】 cfg 生成类型 data_json_monolithic使用data_json2的map格式。 2021-08-13 16:01:15 +08:00
walon ec3dfe53ae 【优化】调整excel多行记录的判定方式。对于除了多行字段以外的字段,新行全空或者与第一行相应单元格值完全相同,则判定该行属于当前记录 2021-08-13 15:35:45 +08:00
walon de250768bc 【修复】修复cfg c++代码没有填充Index索引Map的问题 2021-08-13 12:53:55 +08:00
walon 0e48dc1bd1 【特性】cfg 支持从excel里读取bean.var的index属性 2021-08-13 11:41:03 +08:00
walon d47094a130 【特性】cfg新增data_json2格式。 与data_json区别在于 data_json的map导出成[[k1,v1], ...] 而data_json2的map导出格式为 { k1:v1, ... } 2021-08-13 09:33:45 +08:00
walon b3eaee60ca 【优化】修复cpp代码文档注释*号未对齐的问题 2021-08-13 09:09:42 +08:00
walon 9b7e5848e4 【优化】不对没有注释的类或者字段生成注释代码 2021-08-12 19:03:14 +08:00
walon 6bd3b14596 更新 README.md,补充yaml相关文档,另外少量优化了文档 2021-08-12 17:22:13 +08:00
walon eb8279844d 【优化】如果 enum的item comment为空,但有alias,则comment取alias值 2021-08-12 16:34:07 +08:00
walon d673320f2c 【特性】新增 yaml 数据源支持 2021-08-12 16:28:34 +08:00
walon 4e5dc02c9f 【优化】生成c++代码使用utf-bom格式,以避免vs编译时产生"Warnning C4819" 2021-08-12 14:25:14 +08:00
walon f68f82da4c 【调整】调整cfg c++生成,将使用到的std::类型替换成CommonMacros.h中的::bright::类型 2021-08-12 12:05:12 +08:00
walon 114ebb2573 【调整】解决生成的cfg c++代码中依然有一部分直接使用了std::shared_ptr的问题 2021-08-12 10:52:50 +08:00
walon 901441e9c2 【调整】调整cfg c++的生成代码,允许在CommonMacros.h里重新定义所有内置类型 2021-08-12 10:38:06 +08:00
walon 73e98662ab 【修复】修复lambda函数中捕捉了foreach循环变量的问题(其实好像也没啥问题,只要不修改它?)
【优化】新增cfg data 文件的cache.只要文件记录相同,则直接返回生成好的内容(之前虽然缓存了加载记录,但仍然要Export一遍)
2021-08-11 19:34:22 +08:00
walon 9673664147 【优化】对于 DBool,DInt,DLong,DString,DFloat 使用对象池。略微优化了下性能。 2021-08-11 17:26:36 +08:00
walon 1579d9bf3c 【优化】 对于cfg excel数据源,如果字段为简单原生类型,并且有标题头对应,允许留空表示默认值。 2021-08-11 17:10:16 +08:00
walon 3825de6b07 【调整】cfg c++ 对于可空类型使用 shared_ptr 2021-08-11 16:10:55 +08:00
walon 9edb704199 【修复】为ue4生成cfg c++代码并且使用FString作为string类型时,由于FString无法作为unordered_map的key,产生编译错误,索性放弃对FString支持, 统一为std::string 2021-08-11 15:09:22 +08:00
walon 2854ba4a9f 【完善】补充cfg c++对可空变量的支持,补充对ref字段resolve的支持 2021-08-11 14:36:16 +08:00
walon 323ffd9b74 【调整】bright事务改为异步模式
【修复】修复生成的bright事务异步模式的代码的编译错误
2021-08-10 18:29:25 +08:00
walon 5e0c35c2fc 【优化】修复proto和cfg生成的typescript代码在eslint下有警告的问题 2021-08-09 20:23:25 +08:00
walon 42d297ac29 【优化】在win下自动禁用console的快速编辑模式 2021-08-09 12:18:38 +08:00
walon e7066c579b 【特性】支持不限层次的嵌套 multi_rows,即multi_rows的list,每行元素本身又可以包含multi_rows的字段 2021-08-06 19:06:25 +08:00
walon 5c35c140b3 【升级】升级 NeoLua 版本
【修复】修复 table input属性包含多余逗号,导致empty字符串''也被识别为目录,错误将整个input_data_dir目录当作数据源的bug
【优化】引用UDE库,智能识别csv文件编码,非utf8格式csv也能被正常识别
2021-08-06 13:44:23 +08:00
walon 861015e802 【优化】优化出错时的日志打印
【修复】修复解析table的字段定义,错误将属性multi_rows写成multi_lines的bug
2021-08-05 16:44:19 +08:00
walon a19b17d7ed 【调整】为了避免使人疑惑,强迫excel定义enum类型时,必须填写value值(而xml中可不填,默认使用c语言的值递增规则)。 2021-08-05 10:42:16 +08:00
walon 714f731f99 【调整】调整cfg excel meta属性title_rows的语义,原来title_rows将多级标题头当作一行,现在简单统一为除了meta行和数据以外的标题行的行数 2021-08-05 10:24:48 +08:00
walon e9279364b1 【修复】修复从excel中读取bean定义时未正确处理空group,导致数据没有导出的bug 2021-08-04 18:08:18 +08:00
walon 8ba2278de5 【修复】修复从excel读取table和bean定义的bug 2021-08-04 17:19:53 +08:00
walon 8d95e8539a 【特性】cfg datetime的在excel格式下支持excel内置的时间格式 2021-08-04 16:50:59 +08:00
walon fb733f751a 【特性】支持在excel中定义bean
【调整】将table和enum的excel格式中 module字段与name字段合并为full_name字段
2021-08-04 15:34:13 +08:00
walon 7f3138c66e 【完善】更新 README.md中关于excel中定义enum的文档 2021-08-04 12:03:32 +08:00
walon a165be4b30 【特性】支持在excel定义enum类型 2021-08-04 11:49:01 +08:00
walon 46bc612f57 【优化】优化cfg日志,不再打印吓人的堆栈信息 2021-08-04 10:05:14 +08:00
walon 6854daec32 【优化】 从excel里读取定义时,会自动清理空白字符,避免意外写错
【优化】日志打印字符串时,添加'边界符,方便发现一些多余的空白字符的错误。
2021-08-03 18:48:24 +08:00
walon 05f98f3ae1 【特性】为 proto,cfg 新增 --use_unity_vector命令行参数,允许使用 UnityEngine.Vector{2,3,4} 而不是 System.Numerics.Vector{2,3,4} 2021-08-03 16:05:43 +08:00
walon e6e88e5104 【完善】补充 luban.client -w 选项的使用示例 2021-08-03 14:44:25 +08:00
walon 966261c829 【完善】完善README.md,同步更新了 README.en-us.md。 补充 luban_install_manual.md
【调整】取消 excel meta属性orientation中 landscape|l|portrait|p 这4个值。只保留 row|r|column|c
2021-08-03 11:05:29 +08:00
walon 1632ff117f 添加开发微信群相关链接 2021-08-02 18:08:48 +08:00
walon cd6f0f1282 【修复】解决不同平台下生成json和lua数据文件(换行符)不同的问题 2021-08-02 13:46:59 +08:00
walon 39d976436c 【更新】README.md中补充从excel读取table列表的说明 2021-08-02 12:55:35 +08:00
walon 0628dd1e6f 【特性】支持从excel中读入Table列表定义。这样大多数情况下,只通过修改excel文件就能完成添加新表。 2021-08-02 12:46:11 +08:00
walon 0e872b5610 【新增】cfg 新增 cs_code_unity_json 类型生成支持。 使用 SimpleJSON 。
【调整】略微调整了 code_code_json生成(主要是将_buf改名为_json)
2021-07-31 18:25:36 +08:00
walon cf651b6686 【优化】优化从excel读取定义的性能,不再读取整个sheet,只读取前面几行包含标题头的行 2021-07-31 10:55:50 +08:00
walon 12e9693459 【完善】README中补充定义与数据混合的传统兼容excel表定义的说明和示例 2021-07-31 09:58:34 +08:00
walon a8a341a80f 【调整】cfg excel meta属性row改名为orientation,同时取值范围由true|false改为landscape|l|row|r|portrait|p|column|c 2021-07-31 09:30:52 +08:00
walon 2ca0cebe99 【特性】支持从excel文件的标题头里直接读取定义,定义和数据一体了。简化写记录定义的麻烦 2021-07-30 18:22:08 +08:00
walon 94197d9968 【新增】proto,db,cfg新增 --typescript_bright_package_name 必然,支持在typescript语言的情况下以package形式引入bright包,相比于require path的形式,以package方式引用ByteBuf之类的类时不包含路径名。 2021-07-30 13:58:13 +08:00
walon 06e2adf2aa 【调整】调整配置解析错误的格式
【调整】为 README.md 补充gitee相关链接和说明
2021-07-30 12:54:14 +08:00
walon 27e9bd2d1f 【修复】读取excel数据出错时,打印出正确的出错位置(之前有可能往后偏移一位,给出错误的位置信息) 2021-07-29 18:35:56 +08:00
walon df722abb4a 【优化】更加优雅地打印配置加载错误。默认不再显示大段的堆栈信息 2021-07-29 18:14:15 +08:00
walon 54685289af 【新增】Luban.Client和Luban.Server 新增 -l (--loglevel) 参数,允许按理日志级别。另外,对于 <= DEBUG的日志级别,打印日志代码位置
【优化】特殊优化 Luban.Client 由于未设置 LUBAN_SERVER_IP 环境变量导致-h 参数为空而运行失败的问题,此时默认取 127.0.0.1 并打印警告日志。
2021-07-29 15:48:15 +08:00
walon 75cc8e969f 【修复】解决Luban.Server和Luban.Client在非大陆地区运行错误日志乱码的问题 2021-07-29 15:03:53 +08:00
walon e63220be9f 【特性】支持comment属性,生成代码时包含类和字段注释 2021-07-27 16:43:49 +08:00
walon 050310c15c 【完善】完善db typescript 生成。补充table key,value序列化函数实现。
【修复】修复Luban.Client连接服务器失败后不退出的问题
2021-07-23 12:04:41 +08:00
walon d776373ee8 【调整】调整db cs关于容器与日志方面的生成代码。 2021-07-23 11:21:14 +08:00
walon de56fa9560 【优化】放松对datetime类型数据格式中月份和天数格式的要求, 1999-01-01和1999-01-1和1999-1-01和1999-1-1 都能被识别 2021-07-22 11:19:55 +08:00
walon 252ed19b61 【修复】修复proto typescript代码,当namespace为空时生成的代码编译错误 2021-07-20 15:41:27 +08:00
walon 6e091c7640 【完善】完善db typescript 生成,至少保证暴露接口的正确性 2021-07-19 18:08:33 +08:00
walon f164dc82fb 【重构】重构 cfg JobController代码,减少重复代码
【调整】原来data_lua中类型部分代码被移到 code_lua_lua目标中
【修复】修复go_bin的生成代码有编译错误的问题
2021-07-15 16:14:34 +08:00
walon d7dbdf4b94 【重构】略微重构GenArgs类,提出公共基类及公共检查函数 2021-07-15 09:33:42 +08:00
walon 12e6df6090 【新增】db typescript 支持(只实现了使用接口,内部有待完善) 2021-07-13 19:09:08 +08:00
walon 00de219e16 【调整】调整cfg typescript有多种输出类型,解决每种类型引入 ByteBuf类及Bright类的方式不一样的问题。 2021-07-13 15:15:55 +08:00
walon 6a43f7af6f 【调整】调整 proto typescript生成,更灵活处理bright类型来自模块或者内嵌或者puerts注入的情形 2021-07-13 12:59:28 +08:00
walon 3549603dcc 【修复】修复proto 生成typescript反序列化多态bean代码的编译bug 2021-07-12 16:12:13 +08:00
walon c2b770a33b 【特性】proto和cfg 新增参数 --typescript_bytebuf_require_path, 用于指定 ByteBuf类的路径 2021-07-09 19:25:04 +08:00
walon 9949d2ddce 【特性】新增go语言json数据加载支持(code_go_json) 2021-07-08 16:03:31 +08:00
walon 1aeeca2e08 【修复】修复 go对可空变量的支持 2021-07-08 14:01:21 +08:00
walon 36645bd6f8 【更新】完善 README.md 文档 2021-07-07 10:04:45 +08:00
walon 2f14949c6e 【更新】补充 cfg 常量替换相关文档 2021-07-06 16:38:12 +08:00
walon 28f5428472 【修复】修复 读取excel纵表转置时一个越界bug 2021-07-06 15:20:20 +08:00
walon 1a8f2a5231 【优化】略微优化了Excel2TextDiff读取excel的性能,同时删除无用代码 2021-07-06 11:52:58 +08:00
walon 6576005c34
Update README.md 2021-07-06 11:38:21 +08:00
walon a54858a9ad 【更新】 完善文档 2021-07-06 11:34:06 +08:00
walon fe62154451 【更新】根据中文版本完善 README.en-us.md 2021-07-05 20:26:00 +08:00
walon fb3416441e 【更新】完善 README.md中关于group的例子 2021-07-05 18:23:57 +08:00
walon cba05fb037 【更新】更新 README.md, 优化文档 2021-07-05 16:14:23 +08:00
walon 61703adc25 【更新】更新 README.md 关于 luban.server 与 luban.client 部属及使用的说明 2021-07-05 11:05:53 +08:00
walon 681260e06a 【新增】新增 build Luban.Client docker映像的脚本 2021-07-05 10:49:04 +08:00
walon 346febc8cb 【修复】修复json,xml,lua数据源未正确处理可空字段的bug 2021-07-01 14:58:56 +08:00
walon 1a9547769d 【更新】 更新readme 更新关于可空数据的介绍
【调整】 增加类型名作为可空非多态bean的非空标识(与多态一致)
2021-07-01 10:16:54 +08:00
walon bf3cae5d1a 【特性】proto 生成的typescript代码包含constructor函数,默认构造了初始值 2021-06-30 12:01:07 +08:00
walon 5c038ca449 【修复】修复Luban.Server在linux平台(\n)和win平台(\r\n)生成的文本换行符不一样的问题(导致不同平台生成结果不一样)。统一为 \n 2021-06-30 10:19:15 +08:00
walon 02a7973f42 【调整】可空bean的标识串由{null}改成null 2021-06-30 09:33:31 +08:00
walon 059d3ffb09 【重构】 TType -> TData Creator类从TypeVisitors目录移到DataCreators目录 2021-06-29 20:14:54 +08:00
walon ccea1359d3 【特性】cfg typescript,lua,python,go均新增对可空bean支持 2021-06-29 20:10:34 +08:00
walon dcaee15c0e 【优化】整理所有没有正确使用 {{~ ~}} 格式化行的地方
【特性】cfg java生成代码支持可空bean
2021-06-29 19:41:53 +08:00
walon 0bf3824ebb 【特性】为了支持可空bean,调整生成的typescript json代码 2021-06-29 19:11:22 +08:00
walon a471f13488 【特性】非多态bean类型也支持可空。bean的bin输出模式下的格式与其他原生类型一致(强迫先bool表示是否为,再读取类型字段),也调整excel识别非多态bean类型的办法。 2021-06-29 19:02:46 +08:00
walon 9e32c2f4fd 【重构】提取 cfg code_python_27和 code_python_3 关于vector定义的公共字符串。不再重复出现。
【重构】删除 proto typescript 生成代码中行末的';'
2021-06-29 17:59:07 +08:00
walon 260a1a84a3 【优化】优化生成的typescript代码,去掉行末不必要的';'号 2021-06-29 17:23:06 +08:00
walon ff1dd168dd 【优化】优化Excel2TextWriter的导出格式,忽略空白行(用于diff,显示空白行无意义) 2021-06-29 09:44:32 +08:00
walon 0aef438e0c 【删除】删除对配置双键表的支持 2021-06-21 22:53:47 +08:00
walon 75c92d4685 【重构】 Excel2TextWriter 细微代码重构 2021-06-21 20:59:10 +08:00
walon 77949bdfff 【新增】 Excel2TextDiff 新增 -f 参数,用于指定调用第三方diff程序时的参数格式 2021-06-19 17:39:55 +08:00
walon 10c2768f1a 【新增】新增Excel2TextDiff工具项目,用于将excel转换为text或者直接将两个excel文件转换为text后再diff 2021-06-19 16:22:10 +08:00
walon 1d6698fac7 【特性】excel、lua、xml、json 支持标签过滤
【调整】datetime 类型数据不再在创建时确定utc时间,改为导出时根据时区再确定(跟text的方式保持一致,即所有原始数据加载时保持不变,只有导出时才做转换)
2021-06-19 11:51:52 +08:00
walon 75691d1f7f 【改动】cfg --input_l10n_text_files 的参数由原来相对于 --input_data_dir目录,改为相对当前目录。与--branch_input_data_dir 一致。 2021-06-18 17:49:49 +08:00
walon 80074057f8 【优化】 包含~和$字符的文件变化不会触发MultiFileWatcher的事件。避免excel关闭时触发生成。 2021-06-18 16:41:25 +08:00
walon dd4368faf9 【优化】解决Luban.Client在watch模式下,数据目录变化后,触发两次生成(第二次多余)的问题 2021-06-18 13:03:03 +08:00
walon 8977b5c4c3 【优化】美化生成的c#和typescript 配置加载代码。对齐,去掉不必要的';'号和空格 2021-06-18 11:19:31 +08:00
walon 19dce48383 【本地化】支持指定本地化值的text字段名,可以处理在同个文件中配置多个语言的本地化值字段的情形 2021-06-18 09:40:31 +08:00
walon 16c320ff49 修复 README.md 的错误 2021-06-17 17:31:31 +08:00
walon 9e4ba72950 - 支持 主版本+分支版本的 多分支数据合并,用于发布多地区版本极其有用 2021-06-17 17:20:19 +08:00
walon e9166ac462 更新README中关于静态本地化的描述 2021-06-17 14:59:00 +08:00
walon d873aa3a6c 【特性】 cfg 实现静态本地化 2021-06-17 14:57:39 +08:00
walon 97c2342cfc 【text】根据本地化 TextTable 对Text作转换 2021-06-17 12:51:35 +08:00
walon 35bafee063 【新增】 能够从excel,json,xml,lua等类型文件中加载 text 类型数据 2021-06-17 09:11:34 +08:00
walon 2b28e4de74 【新增】 新增 typescript和go的示例代码,调整lua语言示例代码 2021-06-11 21:16:23 +08:00
walon b1638198db 【新增】 完善ReadMe,补充 分组导出,数据标签,path引用,range检查 相关文档,同时优化一些图片。 2021-06-11 20:30:07 +08:00
walon ee217e1a32 【cfg】 解决FileRecordCacheManager不清除缓存,导致内存占用缓慢无限增大的bug 2021-06-09 19:29:26 +08:00
walon e36468dcc8 【Luban.Client】修复watch参数为空时抛出空指针异常的bug 2021-06-08 21:06:58 +08:00
walon bdeff0ad81 【Luban.Client】支持watch多个目录 2021-06-08 16:55:51 +08:00
walon d67e232cdc 【cfg】 支持bean类型数据的multi_rows模式,使用流式格式从多行区间读取数据 2021-06-07 17:44:06 +08:00
walon 7e03fe7192 - 优化cs ToString函数实现,正确打印窗口类型数据 2021-06-05 10:32:26 +08:00
walon 2f46d40ca3 【cfg】ref 检查支持int、fint、enum类型之间等值判定 2021-06-04 12:10:45 +08:00
walon a36b118a98 【cfg】 ref 支持多个表
【cfg】 修复Validator未加载完所有数据便进行校验,导致出现大量ref检查错误的bug
2021-06-02 15:39:53 +08:00
walon b123a61081 【cfg】修复cfg 检查ref的key类型为ENum类型,不正确使用别名进行比较,产生错误警告ref不存在的bug 2021-05-24 20:18:13 +08:00
walon 17f7fc5b1b 【db】修复 db生成的多态代码有编译错误的bug 2021-05-20 20:34:21 +08:00
walon 5f07daa657 【cfg】 新增path模式: unity 2021-05-17 13:24:44 +08:00
walon 35f0af394a 【特性】Luban.Client支持watch机制,监测相关定义或数据改变后自动重新生成。节省迭代时间。 2021-05-08 15:08:27 +08:00
walon 1129b5f458 【修复】修复生成typescript const类未包含命名空间的bug 2021-05-03 22:01:48 +08:00
walon ca8104aa33 【重构】【cfg】 略微重构 typescript语言生成代码,多态类的构造函数名由 deserialize改为 constructorFrom,语义更清楚
【修复】【cfg】 修复  typescript 生成代码能编译但未能正确导出定义类的bug
【特性】【proto】 对于使用puerts框架的unity项目,支持生成 typescript的消息代码。测试通过。
2021-05-01 22:36:59 +08:00
walon 5868f9bd0a 【修复】【cfg】修复 生成Typescript读取json格式数据的代码的bug 2021-05-01 15:04:36 +08:00
walon 428652b433 【特性】【cfg】 新增puerts + unity框架下加载bin格式数据的Typescript 代码生成 2021-05-01 14:49:22 +08:00
walon c538f2045d 【修复】修复FileUtil.GetParent当参数不包含目录时,错误地返回文件名自身的bug(正确应该是当前目录 ".") 2021-04-19 22:16:03 +08:00
walon 1c59a3d0d0 【特性】【db】新增IReadOnlyXXX 类型bean接口,同时生成的table.Select及SelectAsync返回只读接口类型 2021-04-14 13:51:27 +08:00
walon 2b6a1b04c2 [change]Bright调整了TxnBeanBase实现,相应调整生成代码 2021-04-14 13:08:26 +08:00
walon 83a6e4fd12 - 优化导出的json数据文件。unicode字符以原字符方式导出而不是\uxxxx这种格式。 2021-04-12 11:40:15 +08:00
walon 0cbf47e23c - 支持零散文件形式的输出文件
- gen_types中  output_data_json_monolithic_file 和 output_data_resource_list_file 改成零散文件的输出形式,不必再指定输出目录。
2021-04-08 11:50:54 +08:00
walon ad965cf8e4 job cfg 新增gen_type类型 data_json_monolithic:将所有json文件生成到一个文件 2021-04-08 10:56:58 +08:00
walon ff467b8fa7 更新 README.md,添加pipeline流程图 2021-04-06 12:34:39 +08:00
walon 5720895b43 更新 README.md 2021-04-06 11:40:11 +08:00
walon 88f7ccb96f - 新增 build_docker.sh, tag_and_push.sh脚本
- 配置的NamedMode ExcelStream下,支持用空白、""、null来表达空白
2021-03-28 11:18:49 +08:00
walon 87877f4671 【调整】db 回滚为同步事务模式
【修复】修复 db同步模式一些生成代码的编译错误(因为Bright框架代码调整引起)
2021-03-09 18:55:27 +08:00
walon 788b054a06 - db 生成代码由同步事务改为异步事务
- 修复 db 对dynamic_bean类型的字段的序列化时,错误生成 BEAN类型tag的bug,正确应该是DYNAMIC_BEAN
- 修复 db 对于容器类型字段,未生成InitChildrenRoot代码,导致字段未能正确设置root的bug。
2021-02-07 18:15:25 +08:00
walon a552548bfe 【更新】为readme.md中图片链接添加fallback text. 2021-01-02 13:18:37 +08:00
walon 2c9f62cd76 【Revert】 发现使用其他第三方图片服务依然显示异常。回滚readme.md中图片链接。 2021-01-02 13:13:17 +08:00
walon 3b904d68e0 【调整】由于github doc的markdown图片链接在不翻墙的情况下显示不出来,使用其他第三方图片服务来保存文档中使用的图片,相应更新README.md中图片链接。 2021-01-02 13:05:47 +08:00
walon 8ef8ec9196 【完善】README.md 补充 数据约束检查及数据源相关文档 2020-12-26 16:52:49 +08:00
walon c39761273f 【新增】补充start_up.md及manual.md文档(待完待续) 2020-12-19 20:52:51 +08:00
walon 147ce91166 【修复】修复cpp抽象bean不包含字段时,生成的bean代码包含两个空构造函数的bug
【特性】go支持多态普通表
【修复】修复java多态表 getAs 泛型函数的bug
【修复】修复python抽象bean不包含字段时, __init__ 为空,导致编译出错的bug.通过 新增 pass 行解决
【修复】修复java可空变量相关生成的bug
【修复】FileCleaner清理目录时,不再删除meta文件
【优化】优化python的Vector2类缩进过多的问题
【更新】更新 README.md
2020-12-18 20:24:24 +08:00
walon 6e127e3b7a 【完善】完善 README.md 2020-12-14 17:46:55 +08:00
walon c87d6ccc2c 【完善】完善 README.md 2020-12-14 17:19:15 +08:00
walon 63fa73e487 【完善】完善 README.md 2020-12-14 17:02:48 +08:00
walon 2924642c74 【完善】完善 README.md 2020-12-14 16:49:10 +08:00
walon 12f1286c02 【完善】完善 README.md,补充相应的图片资源
【修复】修复生成脚本的bug
2020-12-14 15:29:07 +08:00
walon 8988f57035 【修复】修复 lua proto 对于bytes类型,生成writeString和readString的bug
【调整】将Gen.Client连接超时由100ms延长到3s,生成超时由30s延长到120s
【调整】生成的docker映象由 luban.server 改成 luban-server
【新增】新增 tag_and_push.bat 发布luban-server到 docker hub
2020-12-14 12:34:38 +08:00
bug 623fdee881 fix badge of docker hub 2020-12-06 15:46:13 +08:00
bug 9453bd90e3 add badge of docker 2020-12-02 10:52:08 +08:00
bug 12a41cf651 update doc 2020-11-29 23:10:13 +08:00
walon 334506ea96 【调整】将 Luban.Server的 Docker 相关脚本移到Scripts目录。新增 Luban.Client 项目的docker脚本 2020-11-29 17:46:17 +08:00
walon 3e61051247 [change] remove EMBED_CFG macro 2020-11-29 17:46:16 +08:00
walon 2be7de7eb7 【修复】修复 cfg lua的模块代码bug 2020-11-29 17:46:15 +08:00
walon f9a60b6e63 【修复】修复 proto lua 代码生成。同时支持 可空变量
【重构】将cs serialize 相关的visitor移到 Job.Common 项目
2020-11-29 17:46:15 +08:00
walon fba34e501c 【修复】.travis 配置中 dotnet 由 3.1 升级到 5.0,解决工程升级到5.0后build失败的问题 2020-11-29 17:46:14 +08:00
walon f3aa518526 【修复】修复 db cs 序列化及writeblob的bug
【修复】修复 proto cs proto及bean非空值构造使用default的bug
2020-11-29 17:46:13 +08:00
walon ab559c17ea 【修复】 修复 cs proto 序列化代码的生成bug 2020-11-29 17:46:12 +08:00
walon 5deb0427ca 【特性】完善 db cs 生成 2020-11-29 17:46:11 +08:00
walon 3c34affab2 * support proto generation.
* fix DeepCompareTypeDefine bug
2020-11-29 17:46:10 +08:00
walon 325d19e5ec [change] remove excel attribute: align,multi_rows,ignore. fix excel errors raised by modification. 2020-11-29 17:46:08 +08:00
walon b2a9d97eb5 add db and proto job. fix some compile error. 2020-11-29 17:46:08 +08:00
walon 8aa199e4a1 [upgrade] upgrade dotnet core 3.1 to .net 5 2020-11-29 17:46:07 +08:00
bug 45341a2d21 临时 ip 2020-11-23 00:45:59 +08:00
bug cea5d7273d docker 布署测试通过 2020-11-23 00:44:39 +08:00
bug a73f0ae191 docker 布署链接 2020-11-23 00:26:18 +08:00
bug c77d29730f update doc 2020-11-16 00:55:20 +08:00
bug 27c22cf7d5 doc for enum 2020-11-08 21:39:59 +08:00
bug 1f0e6ece51 部分上传 2020-11-08 21:37:21 +08:00
bug ef4addef1f organize structure 2020-11-08 21:22:12 +08:00
walon 56a6293715
Update README.md 2020-11-02 11:11:15 +08:00
bug f9e1506f4a draft of data 2020-11-01 16:34:48 +08:00
bug ea4c60e8f6 draft: install 2020-10-31 20:25:28 +08:00
bug f9c5d12030 add image linkage 2020-10-25 19:14:54 +08:00
bug e8e38b4d12 arrow fix 2020-10-25 19:12:16 +08:00
bug 998aea31fa linkage 2020-10-25 19:08:44 +08:00
bug 5171b255dc add img 2020-10-25 18:48:16 +08:00
walon b513cde22b add icon 2020-10-23 11:47:03 +08:00
walon 177dc101f4
Update README.md 2020-10-22 22:38:45 +08:00
walon eed902e0fa * fix .travis.yum build error
* add .travis build flag link and MIT license link to README.md
2020-10-22 21:27:51 +08:00
walon e8aad2dc17 * add catalog.md
* add .travis.yml CI config file
2020-10-22 21:12:54 +08:00
walon c700aba868 [change] modify README.md 2020-10-22 18:18:13 +08:00
walon 1755e61c48 modify documents 2020-10-22 12:37:14 +08:00
777 changed files with 40924 additions and 10175 deletions

12
.github/FUNDING.yml vendored 100644
View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # [pirunxi]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: walon
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://raw.githubusercontent.com/focus-creative-games/luban/main/docs/sponsor/weixin.JPG','https://raw.githubusercontent.com/focus-creative-games/luban/main/docs/sponsor/zhifubao.JPG']

View File

@ -0,0 +1,38 @@
# This is a basic workflow to help you get started with Actions
name: sync-gitee-mirror
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
sync:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: sync-gitee-mirror
uses: wangchucheng/git-repo-sync@v0.1.0
with:
# Target Repo URL
target-url: https://gitee.com/focus-creative-games/luban.git
# Target Repo Username
target-username: ${{ secrets.GITEE_USERNAME }}
# Target Token
target-token: ${{ secrets.GITEE_PASSWORD }}

6
.gitignore vendored
View File

@ -265,3 +265,9 @@ __pycache__/
# gen cache meta file
.cache.meta
/config/output_code
/config/output_data
/config/output_lua
/config/output_lua_without_test
/src/Excel2TextDiff/Properties/launchSettings.json
/src/packages

9
.travis.yml 100644
View File

@ -0,0 +1,9 @@
language: csharp
solution: src/Luban.sln
mono: none
dotnet: 6.0
script:
- cd src
- dotnet restore Luban.sln
- dotnet build Luban.sln

View File

@ -1,61 +1,476 @@
# Luban
## What is Luban
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.com/focus-creative-games/luban.svg?branch=main)](https://travis-ci.com/focus-creative-games/luban )
![Docker Auto](https://img.shields.io/docker/cloud/automated/hugebug4ever/luban.svg)
![Docker Build](https://img.shields.io/docker/cloud/build/hugebug4ever/luban.svg)
* Aim
* Less time for trival & repeated work, more time with creativity & leisure .
![icon](docs/images/icon.png)
* Philosophy
* Simpler, Faster
-----
* [Home Page](https://focus-creative-games.github.io/luban/index.html)
## links
* Read this in other languages: [English](README.en-us.md), [简体中文](README.md)
- [README - English](./README.en-us.md)
- [github link](https://github.com/focus-creative-games/luban)
- [gitee link](https://gitee.com/focus-creative-games/luban)
-----
## introduce
luban is your **best game configuration solution**.
Luban efficiently processes data such as excel, json, and xml common in game development, checks data errors, generates codes in various languages such as c#, and exports them into various formats such as bytes or json.
luban unifies the game configuration development workflow, greatly improving the efficiency of planning and programming.
## Core features
- Powerful data analysis and conversion capabilities {excel(csv,xls,xlsx), json, bson, xml, yaml, lua, unity ScriptableObject} => {binary, json, bson, xml, lua, yaml, erlang, custom format }
- Enhanced excel format, which can succinctly configure simple lists, substructures, structured lists, and arbitrarily complex deep nested structures.
- Complete type system, **Support OOP type inheritance**, with data in excel, json, lua, xml and other formats **Flexible and elegant** Express complex GamePlay data such as behavior trees, skills, plots, and copies
- Supports generating c#, java, go, c++, lua, python, javascript, typescript, erlang, rust, gdscript code
- Support generating protobuf(schema + binary + json), flatbuffers(schema + json), msgpack(binary)
- Powerful data verification capability. ref reference check, path resource path, range range check, etc.
- Perfect localization support. Static text value localization, dynamic text value localization, time localization, main-patch multi-region version
- Powerful and flexible customization capabilities, support for custom code templates and data templates
- **Universal generation and caching tool**. It can also be used to generate code such as protocols, databases, and even as an object caching service
- **Good support for mainstream engines, all platforms, mainstream hot update solutions, and mainstream front-end and back-end frameworks**. Supports mainstream engines such as Unity, Unreal, Cocos2x, Godot, and WeChat games. The tool itself is cross-platform and can work well on Win, Linux, and Mac platforms.
See [feature](https://focus-creative-games.github.io/luban-doc/#/manual/traits) for complete features
## Documentation
- [Official Documentation](https://focus-creative-games.github.io/luban-doc/)
- [Quickstart](https://focus-creative-games.github.io/luban-doc/#/beginner/quickstart)
- **Example Project** ([github](https://github.com/focus-creative-games/luban_examples)) ([gitee](https://gitee.com/focus-creative-games/luban_examples) )
- [Version Change Log](https://focus-creative-games.github.io/luban-doc/#/changelog)
- Support and contact
- QQ group: 692890842 (Luban development exchange group). If you have any questions about usage, please join the QQ group to ask in time, and someone will help you solve it at any time.
- Email: luban@code-philosophy.com
## Excel format overview
For a complete example, please refer to [Excel Format Introduction](https://focus-creative-games.github.io/lubandoc/excel.html)
### Normal table
|##var| id | x1 | x5 | x6 | s1 | s2 | v3 | t1 |
| -|- | -| -| -| -| - | - | - |
|##type|int|bool|long|float|string|text#sep=\||vector3|datetime|
|##|id|desc1|desc2|desc3|desc4|desc7|desc1|time|
|| 1|false| 1000| 1.2| hello |key1\|world1|1,2,3|1999-10-10 11:12:13|
|| 2|true| 1000| 2.4|world |key2\|world2|2,4,5|1999-10-12 11:12:13|
### Raw data list
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>arr1</td>
<td colspan="4">arr2</td>
<td>arr3</td>
<td colspan="3">arr4</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</id>
<td>(array#sep=;),int</td>
<td colspan="4">list,int</td>
<td>(list#sep=|),string</td>
<td colspan="3">list,string</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</id>
<td>desc1</td>
<td colspan="4">desc2</td>
<td>desc3</td>
<td colspan="3">desc4</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>1;2;3</td>
<td>1</td><td>2</td><td></td><td></td>
<td>xx|yy</td>
<td>xxx</td><td>zzz</td><td></td>
</tr>
<tr align="center">
<td/>
<td>2</td>
<td>2;4</td>
<td>3</td><td>4</td><td>5</td><td></td>
<td>aaaa|bbbb|cccc</td>
<td>aaa</td><td>bbb</td><td>ccc</td>
</tr>
<tr align="center">
<td/>
<td>3</td>
<td>2;4;6</td>
<td>3</td><td>4</td><td>5</td><td>6</td>
<td>aaaa|bbbb|cccc</td>
<td>aaa</td><td>bbb</td><td>ccc</td>
</tr>
</table>
### substructure
Reward is a substructure containing the three fields of "int item_id; int count; string desc;".
<table border="1">
<tr align="center"><td>##var</td><td>id</td><td colspan="3">reward</td><td colspan="3">reward2</ td><td>reward3</td></tr>
<tr align="center"><td>##type</td><td>int</td><td colspan="3">Reward</td><td colspan="3">Reward</ td><td>Reward#sep=,</td></tr>
<tr align="center"><td>##var</td><td></td><td>item_id</td><td>count</td><td>desc</td><td></td><td></td><td></td><td/></tr>
<tr align="center"><td/><td>1</td><td>1001</td><td>10</td><td>item 1</td><td>1002< /td><td>11</td><td>item 2</td><td>1002,1,item 3</td></tr>
<tr align="center"><td/><td>2</td><td>2001</td><td>10</td><td>item 2</td><td>2002< /td><td>20</td><td>item 4</td><td>2003,2,item 5</td></tr>
</table>
### Structure List 1
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td colspan="6">rewards1</td>
<td colspan="3">rewards2</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td colspan="6">list,Reward</td>
<td colspan="3">list,Reward#sep=,</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</td>
<td colspan="6">reward list desc1</td>
<td colspan="3">reward list desc2</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>1001</td><td>1</td><td>desc1</td><td>1002</td><td>2</td><td>desc2</td>
<td>1001,1,desc1</td><td>1002,2,desc2</td><td>1003,3,desc3</td>
</tr>
<tr align="center">
<td/>
<td>2</td>
<td>1001</td><td>1</td><td>desc1</td><td></td><td></td><td></td>
<td>1001,1,desc1</td><td>1002,2,desc2</td><td></td>
</tr>
</table>
### Structure List 2
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="9">rewards</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="9">list,Reward</td>
</tr>
<tr align="center">
<td>##var</td>
<td></td>
<td></td>
<td colspan="3">0</td>
<td colspan="3">1</td>
<td colspan="3">2</td>
</tr>
<tr align="center"><td/><td>1</td><td>task1</td><td>1001</td><td>10</td><td>desc1</ td><td>1002</td><td>12</td><td>desc2</td><td>1003</td><td>13</td><td>desc3</td> </tr>
<tr align="center"><td/><td>2</td><td>task1</td><td>1003</td><td>30</td><td>desc3</ td><td>1004</td><td>40</td><td>desc4</td><td/><td/><td/></tr>
<tr align="center"><td/><td>3</td><td>task1</td><td>1005</td><td>50</td><td>desc5</ td><td/><td/><td/><td/><td/><td/></tr>
</table>
### Structure List 3
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="9">rewards</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="9">list,Reward</td>
</tr>
<tr align="center">
<td>##var</td>
<td></td>
<td></td>
<td colspan="3">0</td>
<td colspan="3">1</td>
<td colspan="3">2</td>
</tr>
<tr align="center">
<td>##var</td>
<td/>
<td/>
<td>item_id</td><td>num</td><td>desc</td>
<td>item_id</td><td>num</td><td>desc</td>
<td>item_id</td><td>num</td><td>desc</td>
</tr>
<tr align="center"><td/><td>1</td><td>task1</td><td>1001</td><td>10</td><td>desc1</ td><td>1002</td><td>12</td><td>desc2</td><td>1003</td><td>13</td><td>desc3</td> </tr>
<tr align="center"><td/><td>2</td><td>task1</td><td>1003</td><td>30</td><td>desc3</ td><td>1004</td><td>40</td><td>desc4</td><td/><td/><td/></tr>
<tr align="center"><td/><td>3</td><td>task1</td><td>1005</td><td>50</td><td>desc5</ td><td/><td/><td/><td/><td/><td/></tr>
</table>
### Multi-row table
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="6">*stages</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="6">list,Stage</td>
</tr>
<tr align="center">
<td>##var</td>
<td/>
<td/>
<td>id</td>
<td>name</td>
<td>desc</td>
<td>location</td>
<td>item_id</td>
<td>num</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</td>
<td>desc1</td>
<td>desc1</td>
<td>desc2</td>
<td>desc3</td>
<td>desc4</td>
<td>desc5</td>
<td>desc6</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>task1</td>
<td>1</td><td>stage1</td><td>stage desc1</td><td>1,2,3</td><td>1001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>2</td><td>stage2</td><td>stage desc2</td><td>1,2,3</td><td>1001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>3</td><td>stage3</td><td>stage desc3</td><td>1,2,3</td><td>1002</td><td>1</td>
</tr>
<tr align="center">
<td/><td>2</td>
<td>task2</td>
<td>1</td><td>stage1</td><td>stage desc1</td><td>1,2,3</td><td>1001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>2</td><td>stage2</td><td>stage desc2</td><td>1,2,3</td><td>1002</td><td>1</td>
</tr>
</table>
### Multi-level subheadings of type map
<table border="1">
<tr align="center"><td>##var</td><td>id</td><td colspan="4">lans</td></tr>
<tr align="center"><td>##type</td><td>int</td><td colspan="4">map,string,string</td></tr>
<tr align="center"><td>##var</td><td/><td>ch-zn</td><td>en</td><td>jp</td><td >fr</td></tr>
<tr align="center"><td/><td>1</td><td>apple</td><td>apple</td><td>aaa</td><td>aaa</td></tr>
<tr align="center"><td/><td>2</td><td>banana</td><td>banana</td><td>bbb</td><td>bbb</td></tr>
</table>
### Type inheritance (suitable for skills, buff related configuration)
<table border="1">
<tr align="center"><td>##var</td><td>id</td><td colspan="4">shape</td><td colspan="4">shape2</ td></tr>
<tr align="center"><td>##type</td><td>int</td><td colspan="4">Shape</td><td colspan="4">Shape</ td></tr>
<tr align="center"><td>##var</td><td></td><td>$type</td><td>radius</td><td>width</td><td>height</td><td></td><td></td><td></td><td></td></tr>
<tr align="center"><td/><td>1</td><td>Circle</td><td>10</td><td/><td/><td>Circle</td><td>100</td><td></td><td></td></tr>
<tr align="center"><td/><td>2</td><td>Rectangle</td><td></td><td>10</td><td>20</td ><td>Rectangle</td><td>10</td><td>20</td><td></td></tr>
<tr align="center"><td/><td>3</td><td>Circle</td><td>10</td><td/><td/><td>Triangle</td><td>15</td><td>15</td><td>15</td></tr>
<tr align="center"><td/><td>4</td><td>Circle</td><td>10</td><td/><td/><td>Rectangle</td><td>30</td><td>20</td><td></td></tr>
</table>
### Multiple primary key table (joint index)
Multiple keys form a joint unique primary key.
|##var|key1|key2|key3| num|
|-|-|-|-|-|
|##type|int|long|string|int|
||1|1|aaa|123|
||1|1|bbb|124|
||1|2|aaa|134|
||2|1|aaa|124|
||5|6|xxx|898|
### Multiple primary key table (independent index)
Multiple keys are indexed independently.
|##var|key1|key2|key3| num|
|-|-|-|-|-|
|##type|int|long|string|int|
||1|2|aaa|123|
||2|4|bbb|124|
||3|6|ccc|134|
||4|8|ddd|124|
||5|10|eee|898|
### Singleton table
Some configurations only have one copy globally, such as the opening level of the guild module, the initial size of the backpack, and the upper limit of the backpack. In this case, it is more appropriate to use a singleton table to configure these data.
|##var| guild_open_level | bag_init_capacity | bag_max_capacity | newbie_tasks |
| - |- | - | - | - |
| ##type | int | int | int | list,int|
| ## |desc1 |desc2 |desc3 |desc4|
| | 10 | 100 | 500 | 10001, 10002 |
### Vertical table
<table border="1">
<tr align="center">
<td>##var#column</td>
<td>##type</td>
<td>##</td>
<td></td>
</tr>
<tr align="center">
<td>guild_open_level</td><td>int</td><td>desc1</td><td>10</td>
</tr>
<tr align="center">
<td>bag_init_capacity</td><td>int</td><td>desc2</td><td>100</td>
</tr>
<tr align="center">
<td>bag_max_capacity</td><td>int</td><td>desc3</td><td>500</td>
</tr>
<tr align="center">
<td>newbie_tasks</td><td>list,int</td><td>desc4</td><td>10001,10002</td>
</tr>
</table>
## json, lua, xml, yaml format quick overview
Take the behavior tree as an example to show how to configure the behavior tree configuration in json format. For formats such as xml, lua, yaml, etc., please refer to [detailed documentation](https://focus-creative-games.github.io/luban/data_source/).
## Features
* [x] multi data source (json, excel, folder)
* [ ] data type system supported
* [ ] polymorphism
* [ ] rich embeded type
* [ ] user defined type
* [ ] client/server structure & export faster
* [ ] shared cache
* [ ] customizable validataor
* [ ] customizable export format
* [ ] easy to extend with new feature
* [ ] enhanced support with excel
* [ ] dual key
* [ ] horizontal list
* [ ] shared cache for export time optimization
* [ ] sophisticated/polished source available
* [ ] localization & region support
````json
{
"id": 10002,
"name": "random move",
"desc": "demo behaviour tree",
"executor": "SERVER",
"blackboard_id": "demo",
"root": {
"$type": "Sequence",
"id": 1,
"node_name": "test",
"desc": "root",
"services": [],
"decorators": [
{
"$type": "UeLoop",
"id": 3,
"node_name": "",
"flow_abort_mode": "SELF",
"num_loops": 0,
"infinite_loop": true,
"infinite_loop_timeout_time": -1
}
],
"children": [
{
"$type": "UeWait",
"id": 30,
"node_name": "",
"ignore_restart_self": false,
"wait_time": 1,
"random_deviation": 0.5,
"services": [],
"decorators": []
},
{
"$type": "MoveToRandomLocation",
"id": 75,
"node_name": "",
"ignore_restart_self": false,
"origin_position_key": "x5",
"radius": 30,
"services": [],
"decorators": []
}
]
}
}
````
## How to set self hosted server up
* Windows
* run xxx.bat
## Code usage preview
* Docker
* run xxx.bat/xxx.sh
Here we only briefly show the usage of c#, typescript, and go languages in development. For more languages and more detailed usage examples and codes, see [Example Project](https://github.com/focus-creative-games/luban_examples).
* Other
* any .Net core environment
- C# usage example
## How to set development up
* VS2019 commuity
````C#
// One line of code can load all configuration. cfg.Tables contains one instance field for all tables.
var tables = new cfg.Tables(file => return new ByteBuf(File.ReadAllBytes(gameConfDir + "/" + file + ".bytes")));
// access a singleton table
Console.WriteLine(tables.TbGlobal.Name);
// access the normal key-value table
Console.WriteLine(tables.TbItem.Get(12).Name);
// support operator [] usage
Console.WriteLine(tables.TbMail[1001].Desc);
````
## How can I contribute?
- Typescript usage example
We welcome contributions! Many people all over the world have helped make this project better.
```typescript
// One line of code can load all configuration. cfg.Tables contains one instance field for all tables.
let tables = new cfg.Tables(f => JsHelpers.LoadFromFile(gameConfDir, f))
// access a singleton table
console.log(tables.TbGlobal.name)
// access the normal key-value table
console.log(tables.TbItem.get(12).Name)
````
* [Contributing](CONTRIBUTING.md) explains what kinds of changes we welcome
- [Workflow Instructions](docs/workflow/README.md) explains how to build and test
- go example
## Useful Links
````go
// One line of code can load all configuration. cfg.Tables contains one instance field for all tables.
if tables , err := cfg.NewTables(loader) ; err != nil {
println(err.Error())
return
}
// access a singleton table
println(tables.TbGlobal.Name)
// access the normal key-value table
println(tables.TbItem.Get(12).Name)
* [.NET Core source index](https://source.dot.net) / [.NET Framework source index](https://referencesource.microsoft.com)
* other implementation
* [tabtoy](https://github.com/davyxu/tabtoy)
````
## route map
- [ ] Added unity built-in editor
- [ ] Added unreal built-in editor
- [ ] Supplemental unit tests
## License

638
README.md
View File

@ -1,86 +1,586 @@
[//]: # (Author: bug)
[//]: # (Date: 2020-10-20 20:24:07)
# Luban
## 什么是 Luban
[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.com/focus-creative-games/luban.svg?branch=main)](https://travis-ci.com/focus-creative-games/luban)
![Docker Auto](https://img.shields.io/docker/cloud/automated/hugebug4ever/luban.svg)
![Docker Build](https://img.shields.io/docker/cloud/build/hugebug4ever/luban.svg)
Luban 是一个强大的生成与缓存工具,用于但不限于 游戏配置、消息、资源格式转换 之类的用途。
![icon](docs/images/icon.png)
相比传统简单的以excel为中心的表格导出工具它提供了一个**完整的游戏配置数据解决方案**。
-----
Luban 能够良好满足小型、中型、大型及超大型游戏项目的配置需求。
Luban 工具不仅适用于游戏行业,也非常适合传统的互联网项目。
## links
- [README - English](./README.en-us.md)
- [github link](https://github.com/focus-creative-games/luban)
- [gitee link](https://gitee.com/focus-creative-games/luban)
-----
## 介绍
luban是你的**最佳游戏配置解决方案**。
luban高效地处理游戏开发中常见的excel、json、xml之类的数据检查数据错误生成c#等各种语言的代码导出成bytes或json等多种格式。
luban统一了游戏配置开发工作流极大提升了策划和程序的工作效率。
## 核心特性
- 强大的数据解析和转换能力 {excel(csv,xls,xlsx)、json、bson、xml、yaml、lua、unity ScriptableObject} => {binary、json、bson、xml、lua、yaml、erlang、 custom format}
- 增强的excel格式可以简洁地配置出像简单列表、子结构、结构列表以及任意复杂的深层次的嵌套结构。
- 完备的类型系统,**支持OOP类型继承**搭配excel、json、lua、xml等格式数据**灵活优雅**表达行为树、技能、剧情、副本之类复杂GamePlay数据
- 支持生成c#、java、go、c++、lua、python、javascript、typescript、erlang、rust、gdscript 代码
- 支持生成 protobuf(schema + binary + json)、flatbuffers(schema + json)、msgpack(binary)
- 强大的数据校验能力。ref引用检查、path资源路径、range范围检查等等
- 完善的本地化支持。静态文本值本地化、动态文本值本地化、时间本地化、main-patch多地区版本
- 强大灵活的自定义能力,支持自定义代码模板和数据模板
- **通用型生成和缓存工具**。也可以用于生成协议、数据库之类的代码,甚至可以用作对象缓存服务
- **良好支持主流引擎、全平台、主流热更新方案、主流前后端框架**。支持Unity、Unreal、Cocos2x、Godot、微信小游戏等主流引擎。工具自身跨平台能在Win,Linux,Mac平台良好工作。
完整特性请参见 [feature](https://focus-creative-games.github.io/luban-doc/#/manual/traits)
## 文档
* [主页](https://focus-creative-games.github.io/luban/index.html)
* 各语言的简介: [English](README.en-us.md), [简体中文](README.md)
## 使用示例
* Lua 使用示例
``` Lua
local data = require("TbDataFromJson")
local cfg = data[32]
print(cfg.name)
```
* C# 使用示例
``` C#
var tables = new cfg.Tables(file => return new ByteBuf(File.ReadAllBytes("output_data/" + file)));
Console.WriteLine(tables.TbSingleton.Name);
Console.WriteLine(tables.TbDataFromJson.Get(12).X1);
Console.WriteLine(tables.TbTwoKey.Get(1, 10).X8);
```
* [更多语言的例子](docs/samples.md)
## 特性
* [完备的数据类型支持](docs/feature.md#支持的数据类型)
* [多类型数据源支持](docs/feature.md#多数据源支持)
* [多种数据表模式](docs/feature.md#多种数据表模式)
* [按组导出数据](docs/feature.md#如何自定义导出分组)
* [生成速度快](docs/feature.md#生成极快)
* [增强 Excel 的表达](docs/feature.md#增强的-excel-格式)
* [根据开发效率需求定制的数据输出格式](docs/feature.md#支持多种导出数据格式)
* [本地化支持](docs/feature.md#本地化支持)
* [代码提示支持](docs/feature.md#代码编辑器支持)
* [强大的数据校验能力](docs/feature.md#强大的数据校验能力)
* [资源导出支持](docs/feature.md#资源导出支持)
* [自动代码生成](docs/feature.md#优秀的代码生成)
* [数据分组](docs/feature.md#良好的数据组织)
* [多语言支持](docs/feature.md#支持的语言-覆盖主流的语言)
* [多服务器引擎支持](docs/feature.md#支持的服务器引擎-满足语言版本的情况下)
* [多客户端引擎支持](docs/feature.md#支持的客户端引擎-满足语言版本的情况下)
* [扩展能力](docs/feature.md#强大的扩展能力)
* [ ] 提供定制开发服务 ^_^
- [官方文档](https://focus-creative-games.github.io/luban-doc/)
- [快速上手](https://focus-creative-games.github.io/luban-doc/#/beginner/quickstart)
- **示例项目** ([github](https://github.com/focus-creative-games/luban_examples)) ([gitee](https://gitee.com/focus-creative-games/luban_examples))
- [版本变更记录](https://focus-creative-games.github.io/luban-doc/#/changelog)
- 支持与联系
- QQ群: 692890842 Luban开发交流群。有使用方面的疑问请及时加QQ群询问随时有人帮助解决。
- 邮箱: luban@code-philosophy.com
## RoadMap
- [ ] 新增 unity 内置编辑器
- [ ] 新增 unreal 内置编辑器
## excel格式速览
### 普通表
|##var| id | x1 | x5 | x6 | s1 | s2 | v3 | t1 |
| -|- | -| -| -| -| - | - | - |
|##type|int|bool|long|float|string|text#sep=\||vector3|datetime|
|##|id|desc1|desc2|desc3|desc4|desc7|desc1|time|
|| 1|false| 1000| 1.2| hello |key1\|world1|1,2,3|1999-10-10 11:12:13|
|| 2|true| 1000| 2.4|world |key2\|world2|2,4,5|1999-10-12 11:12:13|
### 原生数据列表
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>arr1</td>
<td colspan="4">arr2</td>
<td>arr3</td>
<td colspan="3">arr4</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</id>
<td>(array#sep=;),int</td>
<td colspan="4">list,int</td>
<td>(list#sep=|),string</td>
<td colspan="3">list,string</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</id>
<td>desc1</td>
<td colspan="4">desc2</td>
<td>desc3</td>
<td colspan="3">desc4</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>1;2;3</td>
<td>1</td><td>2</td><td></td><td></td>
<td>xx|yy</td>
<td>xxx</td><td>zzz</td><td></td>
</tr>
<tr align="center">
<td/>
<td>2</td>
<td>2;4</td>
<td>3</td><td>4</td><td>5</td><td></td>
<td>aaaa|bbbb|cccc</td>
<td>aaa</td><td>bbb</td><td>ccc</td>
</tr>
<tr align="center">
<td/>
<td>3</td>
<td>2;4;6</td>
<td>3</td><td>4</td><td>5</td><td>6</td>
<td>aaaa|bbbb|cccc</td>
<td>aaa</td><td>bbb</td><td>ccc</td>
</tr>
</table>
### 子结构
Reward为包含 "int item_id; int count; string desc; " 这三个字段的子结构。
<table border="1">
<tr align="center"><td>##var</td><td>id</td><td colspan="3">reward</td><td colspan="3">reward2</td><td>reward3</td></tr>
<tr align="center"><td>##type</td><td>int</td><td colspan="3">Reward</td><td colspan="3">Reward</td><td>Reward#sep=,</td></tr>
<tr align="center"><td>##var</td><td></td><td>item_id</td><td>count</td><td>desc</td><td></td><td></td><td></td><td/></tr>
<tr align="center"><td/><td>1</td><td>1001</td><td>10</td><td>item 1</td><td>1002</td><td>11</td><td>item 2</td><td>1002,1,item 3</td></tr>
<tr align="center"><td/><td>2</td><td>2001</td><td>10</td><td>item 2</td><td>2002</td><td>20</td><td>item 4</td><td>2003,2,item 5</td></tr>
</table>
### 结构列表 1
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td colspan="6">rewards1</td>
<td colspan="3">rewards2</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td colspan="6">list,Reward</td>
<td colspan="3">list,Reward#sep=,</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</td>
<td colspan="6">reward list desc1</td>
<td colspan="3">reward list desc2</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>1001</td><td>1</td><td>desc1</td><td>1002</td><td>2</td><td>desc2</td>
<td>1001,1,desc1</td><td>1002,2,desc2</td><td>1003,3,desc3</td>
</tr>
<tr align="center">
<td/>
<td>2</td>
<td>1001</td><td>1</td><td>desc1</td><td></td><td></td><td></td>
<td>1001,1,desc1</td><td>1002,2,desc2</td><td></td>
</tr>
</table>
### 结构列表 2
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="9">rewards</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="9">list,Reward</td>
</tr>
<tr align="center">
<td>##var</td>
<td></td>
<td></td>
<td colspan="3">0</td>
<td colspan="3">1</td>
<td colspan="3">2</td>
</tr>
<tr align="center"><td/><td>1</td><td>task1</td><td>1001</td><td>10</td><td>desc1</td><td>1002</td><td>12</td><td>desc2</td><td>1003</td><td>13</td><td>desc3</td></tr>
<tr align="center"><td/><td>2</td><td>task1</td><td>1003</td><td>30</td><td>desc3</td><td>1004</td><td>40</td><td>desc4</td><td/><td/><td/></tr>
<tr align="center"><td/><td>3</td><td>task1</td><td>1005</td><td>50</td><td>desc5</td><td/><td/><td/><td/><td/><td/></tr>
</table>
### 结构列表 3
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="9">rewards</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="9">list,Reward</td>
</tr>
<tr align="center">
<td>##var</td>
<td></td>
<td></td>
<td colspan="3">0</td>
<td colspan="3">1</td>
<td colspan="3">2</td>
</tr>
<tr align="center">
<td>##var</td>
<td/>
<td/>
<td>item_id</td><td>num</td><td>desc</td>
<td>item_id</td><td>num</td><td>desc</td>
<td>item_id</td><td>num</td><td>desc</td>
</tr>
<tr align="center"><td/><td>1</td><td>task1</td><td>1001</td><td>10</td><td>desc1</td><td>1002</td><td>12</td><td>desc2</td><td>1003</td><td>13</td><td>desc3</td></tr>
<tr align="center"><td/><td>2</td><td>task1</td><td>1003</td><td>30</td><td>desc3</td><td>1004</td><td>40</td><td>desc4</td><td/><td/><td/></tr>
<tr align="center"><td/><td>3</td><td>task1</td><td>1005</td><td>50</td><td>desc5</td><td/><td/><td/><td/><td/><td/></tr>
</table>
### 多行表
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="6">*stages</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="6">list,Stage</td>
</tr>
<tr align="center">
<td>##var</td>
<td/>
<td/>
<td>id</td>
<td>name</td>
<td>desc</td>
<td>location</td>
<td>item_id</td>
<td>num</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</td>
<td>desc1</td>
<td>desc1</td>
<td>desc2</td>
<td>desc3</td>
<td>desc4</td>
<td>desc5</td>
<td>desc6</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>task1</td>
<td>1</td><td>stage1</td><td>stage desc1</td><td>1,2,3</td><td>1001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>2</td><td>stage2</td><td>stage desc2</td><td>1,2,3</td><td>1001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>3</td><td>stage3</td><td>stage desc3</td><td>1,2,3</td><td>1002</td><td>1</td>
</tr>
<tr align="center">
<td/><td>2</td>
<td>task2</td>
<td>1</td><td>stage1</td><td>stage desc1</td><td>1,2,3</td><td>1001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>2</td><td>stage2</td><td>stage desc2</td><td>1,2,3</td><td>1002</td><td>1</td>
</tr>
</table>
### 多级多行表
多行表的列表字段,每个列表元素还可以是多行。支持任意多级的多行嵌套。另外也允许有多个多行字段,每个字段的行数还可以不同。
<table border="1">
<tr align="center">
<td>##var</td>
<td>id</td>
<td>name</td>
<td colspan="10">*stages</td>
</tr>
<tr align="center">
<td>##type</td>
<td>int</td>
<td>string</td>
<td colspan="10">list,Stage</td>
</tr>
<tr align="center">
<td>##var</td>
<td/>
<td/>
<td>id</td>
<td>name</td>
<td>desc</td>
<td colspan="3">*tips</td>
<td colspan="4">*rules</td>
</tr>
<tr align="center">
<td>##var</td>
<td/>
<td/>
<td></td>
<td></td>
<td></td>
<td>location</td>
<td>item_id</td>
<td>num</td>
<td>id</td>
<td>name</td>
<td>item_id</td>
<td>num</td>
</tr>
<tr align="center">
<td>##</td>
<td>id</td>
<td>desc1</td>
<td>desc1</td>
<td>desc2</td>
<td>desc3</td>
<td>desc4</td>
<td>desc5</td>
<td>desc6</td>
<td>id</td>
<td>desc</td>
<td>item id</td>
<td>count</td>
</tr>
<tr align="center">
<td/>
<td>1</td>
<td>task1</td>
<td>1</td><td>stage1</td><td>stage desc1</td><td>1,2,3</td><td>1001</td><td>1</td><td>1</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td>2,2,2</td><td>1002</td><td>2</td><td></td><td></td><td></td><td></td>
</tr>
<tr align="center">
<td/><td/><td/><td>2</td><td>stage2</td><td>stage desc2</td><td>1,2,3</td><td>1001</td><td>1</td><td>1</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td></td><td></td><td></td><td>2</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td></td><td></td><td></td><td>3</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td>3</td><td>stage3</td><td>stage desc3</td><td>1,2,3</td><td>1002</td><td>1</td><td>1</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td>2,2,2</td><td>1002</td><td>2</td><td>1</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td>2,2,2</td><td>1002</td><td>2</td><td></td><td></td><td></td><td></td>
</tr>
<tr align="center">
<td/><td>2</td>
<td>task2</td>
<td>1</td><td>stage1</td><td>stage desc1</td><td>1,2,3</td><td>1001</td><td>1</td><td></td><td></td><td></td><td></td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td>2,2,2</td><td>1002</td><td>2</td><td></td><td></td><td></td><td></td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td>2,2,2</td><td>1002</td><td>2</td><td></td><td></td><td></td><td></td>
</tr>
<tr align="center">
<td/><td/><td/><td>2</td><td>stage2</td><td>stage desc2</td><td>1,2,3</td><td>1002</td><td>1</td><td>1</td><td>hello</td><td>5001</td><td>1</td>
</tr>
<tr align="center">
<td/><td/><td/><td></td><td></td><td></td><td>2,2,2</td><td>1002</td><td>2</td><td></td><td></td><td></td><td></td>
</tr>
</table>
### 类型继承适合技能、buff相关配置
<table border="1">
<tr align="center"><td>##var</td><td>id</td><td colspan="4">shape</td><td colspan="4">shape2</td></tr>
<tr align="center"><td>##type</td><td>int</td><td colspan="4">Shape</td><td colspan="4">Shape</td></tr>
<tr align="center"><td>##var</td><td></td><td>$type</td><td>radius</td><td>width</td><td>height</td><td></td><td></td><td></td><td></td></tr>
<tr align="center"><td/><td>1</td><td>Circle</td><td>10</td><td/><td/><td>Circle</td><td>100</td><td></td><td></td></tr>
<tr align="center"><td/><td>2</td><td>Rectangle</td><td></td><td>10</td><td>20</td><td>矩形</td><td>10</td><td>20</td><td></td></tr>
<tr align="center"><td/><td>3</td><td></td><td>10</td><td/><td/><td>Triangle</td><td>15</td><td>15</td><td>15</td></tr>
<tr align="center"><td/><td>4</td><td>Circle</td><td>10</td><td/><td/><td>Rectangle</td><td>30</td><td>20</td><td></td></tr>
</table>
### 多主键表(联合索引)
多个key构成联合唯一主键。
|##var|key1|key2|key3| num|
|-|-|-|-|-|
|##type|int|long|string|int|
||1|1|aaa|123|
||1|1|bbb|124|
||1|2|aaa|134|
||2|1|aaa|124|
||5|6|xxx|898|
### 多主键表(独立索引)
多个key独立索引。
|##var|key1|key2|key3| num|
|-|-|-|-|-|
|##type|int|long|string|int|
||1|2|aaa|123|
||2|4|bbb|124|
||3|6|ccc|134|
||4|8|ddd|124|
||5|10|eee|898|
### 单例表
有一些配置全局只有一份,比如 公会模块的开启等级,背包初始大小,背包上限。此时使用单例表来配置这些数据比较合适。
|##var| guild_open_level | bag_init_capacity | bag_max_capacity | newbie_tasks |
| - |- | - | - | - |
| ##type | int | int | int | list,int|
| ## |desc1 | desc 2 | desc 3 | desc 4 |
| | 10 | 100| 500| 10001,10002 |
### 纵表
<table border="1">
<tr align="center">
<td>##var#column</td>
<td>##type</td>
<td>##</td>
<td></td>
</tr>
<tr align="center">
<td>guild_open_level</td><td>int</td><td>desc1</td><td>10</td>
</tr>
<tr align="center">
<td>bag_init_capacity</td><td>int</td><td>desc2</td><td>100</td>
</tr>
<tr align="center">
<td>bag_max_capacity</td><td>int</td><td>desc3</td><td>500</td>
</tr>
<tr align="center">
<td>newbie_tasks</td><td>list,int</td><td>desc4</td><td>10001,10002</td>
</tr>
</table>
## json、lua、xml、yaml 格式速览
以行为树为例展示json格式下如何配置行为树配置。xml、lua、yaml等等格式请参见 [详细文档](https://focus-creative-games.github.io/luban-doc/#/manual/datasource)。
```json
{
"id": 10002,
"name": "random move",
"desc": "demo behaviour tree",
"executor": "SERVER",
"blackboard_id": "demo",
"root": {
"$type": "Sequence",
"id": 1,
"node_name": "test",
"desc": "root",
"services": [],
"decorators": [
{
"$type": "UeLoop",
"id": 3,
"node_name": "",
"flow_abort_mode": "SELF",
"num_loops": 0,
"infinite_loop": true,
"infinite_loop_timeout_time": -1
}
],
"children": [
{
"$type": "UeWait",
"id": 30,
"node_name": "",
"ignore_restart_self": false,
"wait_time": 1,
"random_deviation": 0.5,
"services": [],
"decorators": []
},
{
"$type": "MoveToRandomLocation",
"id": 75,
"node_name": "",
"ignore_restart_self": false,
"origin_position_key": "x5",
"radius": 30,
"services": [],
"decorators": []
}
]
}
}
```
## 代码使用预览
这儿只简略展示c#、typescript、go、c++ 语言在开发中的用法,更多语言以及更详细的使用范例和代码见[示例项目](https://github.com/focus-creative-games/luban_examples)。
- C# 使用示例
```C#
// 一行代码可以加载所有配置。 cfg.Tables 包含所有表的一个实例字段。
var tables = new cfg.Tables(file => return new ByteBuf(File.ReadAllBytes($"{gameConfDir}/{file}.bytes")));
// 访问一个单例表
Console.WriteLine(tables.TbGlobal.Name);
// 访问普通的 key-value 表
Console.WriteLine(tables.TbItem.Get(12).Name);
// 支持 operator []用法
Console.WriteLine(tables.TbMail[1001].Desc);
```
- typescript 使用示例
```typescript
// 一行代码可以加载所有配置。 cfg.Tables 包含所有表的一个实例字段。
let tables = new cfg.Tables(f => JsHelpers.LoadFromFile(gameConfDir, f))
// 访问一个单例表
console.log(tables.TbGlobal.name)
// 访问普通的 key-value 表
console.log(tables.TbItem.get(12).Name)
```
- go 使用示例
```go
// 一行代码可以加载所有配置。 cfg.Tables 包含所有表的一个实例字段。
if tables , err := cfg.NewTables(loader) ; err != nil {
println(err.Error())
return
}
// 访问一个单例表
println(tables.TbGlobal.Name)
// 访问普通的 key-value 表
println(tables.TbItem.Get(12).Name)
```
- c++ 使用示例
```c++
cfg::Tables tables;
if (!tables.load([](ByteBuf& buf, const std::string& s) { buf.clear(); return buf.loadFromFile("../GenerateDatas/bytes/" + s + ".bytes"); }))
{
std::cout << "== load fail == " << std::endl;
return;
}
std::cout << tables.TbGlobal->name << std::endl;
std::cout << tables.TbItem.get(12)->name << std::endl;
```
## 路线图
- [ ] 新增 unity 内置编辑器
- [ ] 新增 unreal 内置编辑器
- [ ] 补充单元测试
## 布署
TODO
## 友情链接
## 开发环境架设
* 安装 VS2019 社区版
* 安装 .dotnet core sdk 3.1
- [Luban Unity插件](https://github.com/LiuOcean/Luban_Unity_GUI) 在Unity里完成生成命令的配置和生成操作
- [LubanTools](https://github.com/MOMOLAXI/LubanTools) Luban的Win GUI命令配置和生成工具
## 如何贡献?
* [Contributing](CONTRIBUTING.md) explains what kinds of changes we welcome
- [Workflow Instructions](docs/workflow/README.md) explains how to build and test
## Useful Links
* [.NET Core source index](https://source.dot.net)
* 社区的其它实现
* [tabtoy](https://github.com/davyxu/tabtoy)
## 支持和联系
QQ 群: 692890842
邮箱: taojingjian#gmail.com
## License
Luban is licensed under the [MIT](LICENSE.TXT) license.
Luban is licensed under the [MIT](LICENSE.TXT) license.

Binary file not shown.

View File

@ -1,30 +0,0 @@
{
"x1":true,
"x2":3,
"x3":128,
"x4":1211,
"x5":11223344,
"x6":1.2,
"x7":1.23432,
"x8_0":12312,
"x8":112233,
"x9":223344,
"x10":"hq",
"x12": { "x1":10},
"x13":"B",
"x14":{"__type__": "DemoD2", "x1":1, "x2":2},
"v2":{"x":1, "y":2},
"v3":{"x":1.1, "y":2.2, "z":3.4},
"v4":{"x":10.1, "y":11.2, "z":12.3, "w":13.4},
"t1":"1970-01-01 00:00:00",
"k1":[1,2],
"k2":[2,3],
"k3":[1,3],
"k4":[1,5],
"k5":[1,6],
"k6":[1,7],
"k7":[2,3],
"k8":[[2,2],[4,10]],
"k9":[{"y1":1, "y2":true},{"y1":2, "y2":false}],
"k15":[{"__type__": "DemoD2", "x1":1, "x2":2}]
}

View File

@ -1,31 +0,0 @@
return
{
x1 = false,
x2 = 2,
x3 = 128,
x4 = 1122,
x5 = 112233445566,
x6 = 1.3,
x7 = 1122,
x8 = 12,
x8_0 = 13,
x9 = 123,
x10 = "yf",
x12 = {x1=1},
x13 = "D",
x14 = { __type__="DemoD2", x1 = 1, x2=3},
v2 = {x= 1,y = 2},
v3 = {x=0.1, y= 0.2,z=0.3},
v4 = {x=1,y=2,z=3.5,w=4},
t1 = "1970-01-01 00:00:00",
k1 = {1,2},
k2 = {2,3},
k3 = {3,4},
k4 = {1,2},
k5 = {1,3},
k6 = {1,2},
k7 = {1,8},
k8 = {[2]=10,[3]=12},
k9 = {{y1=1,y2=true}, {y1=10,y2=false}},
k15 = {{ __type__="DemoD2", x1 = 1, x2=3}},
}

Binary file not shown.

View File

@ -1,12 +0,0 @@
##,align:true,row:true,,,,,,,,,,,,,,,,,,,,,,
__type__,x1,x2,x3,x4,x5,x6,x7,x8,x8_0,x9,x10,x11,x12,x13,,,k1,k2,k3,k4,k5,k6,k7,k8
,½ûÖ¹,x2:byte,x3:short,x4:int,x5:long, x6:float,x7:double,,,,,,,,,,array:int,array:int,array:int,array:int,array:int,array:int,array:int,map:int:int
DemoD2,TRUE,5,5,10000,13234234234,1.28,1.23457891,1234,1234,111111111,huang,,1988,A,,,"1,2,3","1,2,4","1,2,5","1,2,6","1,2,7","1,2,8","1,2,9","1,2,3,4"
,FALSE,0,6,198704,34523452345,2.5,19870421.2,453234,-345,112233445566 ,qiang,,1987,B,,,"2,4,6","2,4,7","2,4,8","2,4,9","2,4,10","2,4,11","2,4,12","1,10,2,20"
,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
Can't render this file because it contains an unexpected character in line 4 and column 152.

Binary file not shown.

View File

@ -1,24 +0,0 @@
{
"x1" : true,
"x2" : 5,
"x3" : 1234,
"x4" : 120000,
"x5" : 12345566778899,
"x6" : 1.28,
"x7" : 123456789.1234567,
"x8" : 1234,
"x8_0" : 1122,
"x9" : 112233445566,
"x10": "huang",
"x11": "hiasf",
"x12" : { "x1":1987 },
"x13" : "B",
"k1" : [1,2,3],
"k2" : [11,22,33],
"k3" : [1,2,3],
"k4": [11,22],
"k5" : [2,3],
"k6" : [4,5],
"k7" : [10,20],
"k8" : { "1":100, "2":200, "3":300}
}

View File

@ -1,78 +0,0 @@
<data>
<x1>true</x1>
<x2>4</x2>
<x3>128</x3>
<x4>1122</x4>
<x5>112233445566</x5>
<x6>1.3</x6>
<x7>1112232.43123</x7>
<x8>112233</x8>
<x8_0>123</x8_0>
<x9>112334</x9>
<x10>yf</x10>
<x12>
<x1>1</x1>
</x12>
<x13>C</x13>
<x14 __type__="DemoD2">
<x1>1</x1>
<x2>2</x2>
</x14>
<v2>1,2</v2>
<v3>1.2,2.3,3.4</v3>
<v4>1.2,2.2,3.2,4.3</v4>
<t1>1970-01-01 00:00:00</t1>
<k1>
<item>1</item>
<item>2</item>
</k1>
<k2>
<item>1</item>
<item>2</item>
</k2>
<k3>
<item>1</item>
<item>2</item>
</k3>
<k4>
<item>1</item>
<item>2</item>
</k4>
<k5>
<item>1</item>
<item>2</item>
</k5>
<k6>
<item>1</item>
<item>2</item>
</k6>
<k7>
<item>1</item>
<item>3</item>
</k7>
<k8>
<item> <key>2</key><value>10</value></item>
<item> <key>3</key><value>30</value></item>
</k8>
<k9>
<item>
<y1>1</y1>
<y2>true</y2>
</item>
<item>
<y1>2</y1>
<y2>false</y2>
</item>
</k9>
<k15>
<item __type__="DemoD2">
<x1>1</x1>
<x2>2</x2>
</item>
</k15>
</data>

View File

@ -1,23 +0,0 @@
<root>
<topmodule name="cfg"/>
<group name="client,c" default="1"/>
<group name="server,s" default="1"/>
<group name="editor,e" default="1"/>
<group name="ue,u"/>
<import name="."/>
<service name="server" manager="Tables" group="s,server"/>
<service name="client" manager="Tables" group="c,client"/>
<service name="all" manager="Tables" group="c,s"/>
<service name="ue4_editor" manager="Tables" group="e"/>
<service name="unity_editor" manager="Tables" group="e"/>
<service name="ue4" manager="Tables" group="u,ue"/>
</root>

View File

@ -1,212 +0,0 @@
<module name="test">
<const name="DemoConst">
<var name="x1" type="int" value="0"/>
<var name="x2" type="long" value="3242"/>
<var name="x3" type="float" value="444.3"/>
<var name="x4" type="double" value="55.3"/>
<!--var name="x5" type="string" value="abcdefg"/-->
</const>
<enum name="DemoEnum">
<var name="A" value="1"/>
<var name="B"/>
<var name="C" value="4"/>
<var name="D"/>
</enum>
<bean name="DemoType1">
<var name="x1" type="int"/>
</bean>
<bean name="DemoDynamic"> 多态数据结构
<var name="x1" type="int"/>
<bean name="DemoD2" alias="测试别名">
<var name="x2" type="int"/>
</bean>
<bean name="DemoD3">
<var name="x3" type="int"/>
<bean name="DemoE1">
<var name="x4" type="int"/>
</bean>
</bean>
<bean name="DemoD5">
<var name="time" type="DateTimeRange"/>
</bean>
</bean>
<bean name="DemoE2">
<var name="y1" type="int"/>
<var name="y2" type="bool"/>
</bean>
<bean name="DemoType2" >
<var name="x1" type="bool"/>
<var name="x2" type="byte"/>
<var name="x3" type="short" ref="test.TbFullTypes"/>
<var name="x4" type="int?" convert="DemoEnum"/>
<var name="x5" type="long" convert="DemoEnum"/>
<var name="x6" type="float"/>
<var name="x7" type="double"/>
<var name="x8_0" type="fshort"/>
<var name="x8" type="fint"/>
<var name="x9" type="flong"/>
<var name="x10" type="string" path="normal;*.txt"/>
<var name="x12" type="DemoType1"/>
<var name="x13" type="DemoEnum"/>
<var name="x14" type="DemoDynamic" sep=","/>多态数据结构
<var name="v2" type="vector2"/>
<var name="v3" type="vector3"/>
<var name="v4" type="vector4"/>
<var name="t1" type="datetime"/>
<var name="k1" type="array,int"/> 使用;来分隔
<var name="k2" type="list,int"/>
<var name="k3" type="linkedlist,int"/>
<var name="k4" type="arraylist,int"/>
<var name="k5" type="set,int"/>
<var name="k6" type="treeset,int"/>
<var name="k7" type="hashset,int"/>
<var name="k8" type="map,int,int"/>
<var name="k9" type="list,DemoE2" sep="," index="y1"/>
<var name="k15" type="array,DemoDynamic" sep=","/>
</bean>
<table name="TbFullTypes" index="x3" value="DemoType2" input="test/full_type.xlsx"/> 最常见的普通 key-value表
<bean name="DateTimeRange" sep=";">
<var name="start_time" type="datetime"/>
<var name="end_time" type="datetime"/>
</bean>
<bean name="DemoSingletonType">
<var name="id" type="int"/>
<var name="name" type="text"/>
<var name="date" type="DemoDynamic"/>
</bean>
<table name="TbSingleton" mode="one" value="DemoSingletonType" input="test/table_one.xlsx"/> 单例表,只有一个记录
<table name="TbDataFromJson" value="DemoType2" input="test/json_datas"/> 普通表不过数据从tbrole_datas目录递归读入每个文件是一个记录
<table name="TbDataFromXml" value="DemoType2" input="test/xml_datas"/> 普通表不过数据从tbrole_datas目录递归读入每个文件是一个记录
<table name="TbDataFromLua" value="DemoType2" input="test/lua_datas"/> 普通表不过数据从tbrole_datas目录递归读入每个文件是一个记录
<table name="TbTwoKey" value="DemoType2" index="x3,x4" input="test/json_datas" mode="bmap"/>
<bean name="MultiRowType1">
<var name="id" type="int"/>
<var name="x" type="int"/>
</bean>
<bean name="MultiRowType2">
<var name="id" type="int"/>
<var name="x" type="int"/>
<var name="y" type="float"/>
</bean>
<bean name="MultiRowRecord">
<var name="id" type="int"/>
<var name="name" type="string"/>
<var name="one_rows" type="list,MultiRowType1"/>
<var name="multi_rows1" type="list,MultiRowType1" multi_rows="1"/>
<var name="multi_rows2" type="array,MultiRowType1" multi_rows="1"/>
<var name="multi_rows3" type="set,MultiRowType2" multi_rows="1"/>
<var name="multi_rows4" type="map,int,MultiRowType2" multi_rows="1"/>
</bean>
<table name="TbMultiRowRecord" value="MultiRowRecord" input="test/multi_rows_record.xlsx"/>
<enum name="ETestUeType">
<var name="WHITE" alias="白"/>
<var name="BLACK"/>
</enum>
<enum name="ETestEmptyEnum">
</enum>
<enum name="ETestEmptyEnum2">
<var name="SMALL_THAN_256" value="255"/>
<var name="X_256" value="256"/>
<var name="X_257" value="257"/>
</enum>
<bean name="TestUeType">
<var name="x1" type="bool"/>
<var name="x2" type="byte"/>
<!--var name="x3" type="short"/-->
<var name="x4" type="int"/>
<var name="x5" type="long"/>
<var name="x6" type="float"/>
<!--var name="x7" type="double"/>
<var name="x8_0" type="fshort"/>
<var name="x8" type="fint"/>
<var name="x9" type="flong"/-->
<var name="x10" type="string"/>
<var name="x12" type="DemoType1"/>
<var name="x13" type="ETestUeType"/>
<!--var name="x14" type="DemoDynamic" sep=","/-->多态数据结构
<var name="v2" type="vector2"/>
<var name="v3" type="vector3"/>
<var name="v4" type="vector4"/>
<var name="t1" type="datetime"/>
<!--
<var name="x15" type="DemoType1"/>
<var name="y1" type="int?"/> nullable ,多态结构肯定是nullable的
-->
<var name="k1" type="array,int"/> 使用;来分隔
<var name="k2" type="list,int" group="c,s"/>
<var name="k3" type="linkedlist,int"/>
<var name="k4" type="arraylist,int"/>
<var name="k5" type="set,int"/>
<var name="k6" type="treeset,int"/>
<var name="k7" type="hashset,int"/>
<var name="k8" type="map,int,int"/>
<var name="k9" type="list,DemoE2"/>
</bean>
<bean name="H1">
<var name="y2" type="H2"/>
<var name="y3" type="int"/>
</bean>
<bean name="H2">
<var name="z2" type="int"/>
<var name="z3" type="int"/>
</bean>
<bean name="MultiRowTitle">
<var name="id" type="int"/>
<var name="name" type="string"/>
<var name="x1" type="H1"/>
<var name="x2" type="list,H2" multi_rows="1"/>
<var name="x3" type="array,H2" multi_rows="1"/>
</bean>
<table name="TbMultiRowTitle" value="MultiRowTitle" input="test/multi_level_title.xlsx"/>
<!--table name="TbDynamic" value="DemoDynamic" input="多态数据源"/-->
<module name="login">
支持在一个定义文件中 定义多个模块。 一般来说一个定义文件中一个模块比较好,但有些情况下为了方便可以定义多个。
<bean name="RoleInfo">
<var name="role_id" type="long"/>
</bean>
</module>
</module>

View File

@ -1,13 +0,0 @@
..\src\Luban.Client\bin\Debug\netcoreapp3.1\Luban.Client.exe ^
-h 127.0.0.1 ^
-j cfg ^
-- ^
-d Defines/root.xml ^
--input_data_dir Datas ^
--output_code_dir output_code ^
--output_data_dir output_data ^
-s server ^
--gen_types code_cs_bin,data_bin ^
--export_test_data
pause

View File

@ -1 +1 @@
theme: jekyll-theme-cayman
theme: jekyll-theme-slate

View File

@ -1,148 +0,0 @@
[//]: # (Author: bug)
[//]: # (Date: 2020-10-18 15:35:26)
## 特性说明
--------------------
### 支持的数据类型
* 基础内置类型
- bool,byte,short,fshort,int,fint,long,flong,float,double,string,text,bytes
- vector2, vector3,vector4
- datetime
* 可空类型
- bool?,byte?,short?,fshort?,int?,fint?,long?,flong?,float?,double?
- vector2?,vector3?,vector4?
- datetime?
* 自定义枚举 enum
* 自定义常量 const
* 自定义结构 bean
- 可以定义所有类型的字段
- 支持无限制的结构继承,对于表达中大型项目的复杂数据(技能,buff,ai 等等) 极其有用。 (比如基类Shape, 子类 Circle,Rectangle
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
B-->E;
```
* 支持容器类型 array。 value 可以为内置类型,也可以为自定义类型
* 支持容器类型 list。 value 可以为内置类型,也可以为自定义类型
* 支持容器类型 set。 value 只能为内置类型或者enum类型不支持 bean 类型
* 支持容器类型 map。 key 只能为内置类型或者enum类型不支持 bean 类型。 value 可以为内置类型,也可以为自定义类型
### 多数据源支持
* 支持excel族。 csv 及 xls,xlsx等格式
* 支持从指定excel里的某个单元薄读入。
* 支持json。 每个json文件当作一个记录读入
* 支持lua。 每个lua文件当作一个记录读入
* 支持xml。 每个xml文件当作一个记录读入
* 支持目录。 递归目录下的所有文件每个文件当作一个记录读入。允许不同类型的文件混合比如目录下可以同时有json,lua,xml,excel之类的格式。
* 允许指定多个数据源,可以使用以上所有的组合。
* 扩展新的数据源也非常容易 (像支持lua,json,xml数据源只用了200行左右代码)
### 多种数据表模式
* one 格式,即单例表模式
* map 格式即普通key-value表模式。 任何符合set 的value要求的类型都可以做key
* bmap 格式,即双主键模式。 任何符合 set 的value要求的类型都可以作 key1和key
### 如何自定义导出分组
* 可以按照自定义需求选择性导出表及字段
### 生成极快
* 大项目几十M配置数据也能1秒导出
* 生成工具使用客户端/服务器架构
* 服务器使用多线程加速生成,数十倍提高生成速度
* 服务器使用缓存直接返回未改动的代码或者数据的生成结果
* 支持增量生成
### 增强的 excel 格式
* 支持填写任意复杂的数据(比如 常见的 list,bean 这种类型)
* 支持 sep 在单个单元格内填写多个数据
* 支持 多行数据。即 对于 list,bean 类型的字段,可以多行填写
* 支持多级标题头,对填写 层次很深的数据时非常有用
* 支持导出标记。比如 是、否、test 等等,用于标记某行数据是否导出
* 支持用 true,false表示 bool 值,语义更清晰。
* 支持枚举 alias 别名,填写枚举类型不再需要写数字了
* 支持可空变量。可以用null表达空。 某些场合下语义更清晰。
* 支持 datetime 数据类型. 时间格式标准为以下几种最终被转化为utc时间方便程序处理
- yyyy-MM-dd HH:mm:ss
- yyyy-MM-dd HH:mm
- yyyy-MM-dd HH
- yyyy-MM-dd
### 代码编辑器支持
* 根据配置表定义生成相应的json文件的 load 及 save 代码(c#或者c++)方便编辑器加载和导出。每个记录对应一个json文件。
* 支持 unity 下用c# 开发编辑器
* 支持 unreal 下用c++ 开发的编辑器
### 支持多种导出数据格式
* **导出格式与源数据解耦**。无论源数据是 excel、lua、xml、json 或者它们的混合, 最终都被以统一的格式导出,极大简化了生成代码的复杂性。
* 导出binary。 内置binary格式加载最快占空间最少。
* 导出json 格式
* 导出 lua 格式
* 非常容易扩展其他输出格式(一般来说不到300行代码)
### 本地化支持
* 支持**本地化时间**。 配置中的 datetime会根据指定的timezone及localtime转化为正确的utc时间方便程序处理
* 支持**静态本地化**。 配置中的text类型在导出时已经转化为正确的本地化后的字符串
* 支持**动态本地化**。 配置中的text类型能运行时全部切换为某种本地化后的字符串
### 代码编辑器支持
* 支持 emmylua anntations。生成的lua包含符合emmylua 格式anntations信息。配合emmylua有强大的配置代码提示能力。
### 强大的数据校验能力
* 完整的数据内建约束检查
* ref 检查。检查表引用合法性。
* path 检查。检查资源引用合法性,对于防止策划填错极其有用,不再需要运行时才发现资源配置错误了。
* range 检查。检查数值范围。
* 扩展的自定义检查。使用自定义代码进行高级检查。提交配置前就能完成本地检查,避免运行时才发现错误,极大减少迭代成本。
### 资源导出支持
* 支持 res 资源标记。可以一键导出配置中引用的所有资源列表(icon,ui,assetbundle等等)
### 优秀的代码生成
- 良好模块化。比如对于c#语言生成cfg.item.Item,cfg.equip.EquipInfo这样的类
- 内存性能优化。支持c#值类型以及lua的紧凑格式保存数据节约内存。
- 支持为ref的字段生成resolve后的字段定义及加载后设置。读取所引用的字段不用再查表了。
- 支持对 list 类型数据 生成 index, 方便按列表和索引方式访问的需求。
### 良好的数据组织
- 数据模块化。允许策划按模块目录自由组织数据。
- 数据多源化。允许策划按需求选择最合适的源数据类型。
### 支持的语言 (覆盖主流的语言)
* 支持 c# (所有 .net framework 2 及以上, .net core平台)
* 支持 java (java 1.6 及以上)
* 支持 c++ ( c++ 11 及以上)
* 支持 go
* 支持 lua (5.1 及以上)
* 支持 typescript
* **新增其他语言支持非常容易**
### 支持的服务器引擎(满足语言版本的情况下)
* 纯 c# 的所有引擎
* 纯 java 的所有引擎
* 纯 go 的所有引擎
* 纯 c++ 的所有引擎
* 纯 lua 的所有引擎
* 纯 js或typescript的所有引擎
### 支持的客户端引擎(满足语言版本的情况下)
* unity + c#
* unity + tolua
* unity + xlua
* unity + ILRuntime
* cocosx-lua
* cocosx-js
* unreal + 纯 c++
* unreal + unlua
* unreal + puerts (typescript)
* 支持微信小程序和小游戏 sdk
* 支持 lua 的其他任何引擎
* 支持 js 或 typescript的 其他任何引擎
### 强大的扩展能力
* 支持插件形式,扩展其他生成极其方便

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Some files were not shown because too many files have changed in this diff Show More