You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
Reward is a substructure containing the three fields of "int item_id; int count; string desc;".
##var
id
reward
reward2
reward3
##type
int
Reward
Reward
Reward#sep=,
##var
item_id
count
desc
1
1001
10
item 1
1002< /td>
11
item 2
1002,1,item 3
2
2001
10
item 2
2002< /td>
20
item 4
2003,2,item 5
Structure List 1
##var
id
rewards1
rewards2
##type
int
list,Reward
list,Reward#sep=,
##
id
reward list desc1
reward list desc2
1
1001
1
desc1
1002
2
desc2
1001,1,desc1
1002,2,desc2
1003,3,desc3
2
1001
1
desc1
1001,1,desc1
1002,2,desc2
Structure List 2
##var
id
name
rewards
##type
int
string
list,Reward
##var
0
1
2
1
task1
1001
10
desc1
1002
12
desc2
1003
13
desc3
2
task1
1003
30
desc3
1004
40
desc4
3
task1
1005
50
desc5
Structure List 3
##var
id
name
rewards
##type
int
string
list,Reward
##var
0
1
2
##var
item_id
num
desc
item_id
num
desc
item_id
num
desc
1
task1
1001
10
desc1
1002
12
desc2
1003
13
desc3
2
task1
1003
30
desc3
1004
40
desc4
3
task1
1005
50
desc5
Multi-row table
##var
id
name
*stages
##type
int
string
list,Stage
##var
id
name
desc
location
item_id
num
##
id
desc1
desc1
desc2
desc3
desc4
desc5
desc6
1
task1
1
stage1
stage desc1
1,2,3
1001
1
2
stage2
stage desc2
1,2,3
1001
1
3
stage3
stage desc3
1,2,3
1002
1
2
task2
1
stage1
stage desc1
1,2,3
1001
1
2
stage2
stage desc2
1,2,3
1002
1
Multi-level subheadings of type map
##var
id
lans
##type
int
map,string,string
##var
ch-zn
en
jp
fr
1
apple
apple
aaa
aaa
2
banana
banana
bbb
bbb
Type inheritance (suitable for skills, buff related configuration)
##var
id
shape
shape2
##type
int
Shape
Shape
##var
$type
radius
width
height
1
Circle
10
Circle
100
2
Rectangle
10
20
Rectangle
10
20
3
Circle
10
Triangle
15
15
15
4
Circle
10
Rectangle
30
20
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
##var#column
##type
##
guild_open_level
int
desc1
10
bag_init_capacity
int
desc2
100
bag_max_capacity
int
desc3
500
newbie_tasks
list,int
desc4
10001,10002
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.
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.
C# usage example
// One line of code can load all configuration. cfg.Tables contains one instance field for all tables.vartables=newcfg.Tables(file =>returnnew ByteBuf(File.ReadAllBytes(gameConfDir+"/"+file+".bytes")));// access a singleton tableConsole.WriteLine(tables.TbGlobal.Name);// access the normal key-value tableConsole.WriteLine(tables.TbItem.Get(12).Name);// support operator [] usageConsole.WriteLine(tables.TbMail[1001].Desc);
Typescript usage example
// One line of code can load all configuration. cfg.Tables contains one instance field for all tables.lettables=newcfg.Tables(f=>JsHelpers.LoadFromFile(gameConfDir,f))// access a singleton tableconsole.log(tables.TbGlobal.name)// access the normal key-value tableconsole.log(tables.TbItem.get(12).Name)
go example
// One line of code can load all configuration. cfg.Tables contains one instance field for all tables.iftables , err:=cfg.NewTables(loader) ; err!=nil {
println(err.Error())
return
}
// access a singleton tableprintln(tables.TbGlobal.Name)
// access the normal key-value tableprintln(tables.TbItem.Get(12).Name)