商品修改

如何添加新商品?

1. `common/trade_goods/00_default.txt`中添加:

<KEY> = {
    # category说明:
    # 0:战略资源
    # 1:食物
    # 2:人力资源
    # 3:军事产品
    # 4:自由民
    # 5:奴隶与部落民
    # 6:其他
    category = <>
    gold = <价格>
    province = {
        <省份修正>
    }
    country = {
        <首都盈余修正>
    }
    # RGB颜色,浮点数,0-1区间
    color = { 1 0 0 }
}

2. `gui/shared/<任何你喜欢的文件名>.gui`中添加:

texticon = {
    icon = <KEY>
    iconsize = {
        texture = "gfx/interface/icons/tradegoods/<KEY>.dds"
        size = { 25 25 }
        offset = { 0 6 }
        fontsize = 16
    }
}

3. `gfx/interface/icons/tradegoods/`中添加贴图文件 4. `localization/simp_chinese/text_l_simp_chinese.yml`中添加本地化:

<KEY>:0 "<本地化名称>"
<KEY>DESC:0 "<本地化描述>"

5. `common/customizable_localization/00_event.txt`中`get_food_trade_good_icon`下添加:

text = {
    localization_key = get_<KEY>_icon
    trigger = { trade_goods = <KEY> }
}

或在`common/customizable_localization`目录下新建一个.txt文件中添加`get_food_trade_good_icon`覆盖原来的亦可。 6. 任意本地化文件中添加:

get_<KEY>_icon:0 "@<KEY>!"

7. `common\customizable_localization\00_generic.txt`中`get_trade_good_here`下添加:

text = {
    localization_key = <KEY>
    trigger = {
        trade_goods = <KEY>
    }
}