52PCGame

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 569|回复: 0

[报告] 关于钢铁雄心4中国工业疏散只拆不建bug的分析

[复制链接]

1

主题

37

帖子

106

积分

中士

Rank: 3

积分
106
威望
106
金圆券
1683 PB
小红花
0
臭鸡蛋
0
法币
0 FB
发表于 2019-6-14 22:01 | 显示全部楼层 |阅读模式
直接说结论
工厂数的变量未事先声明,故原文件在调用变量当场声明时,处在state下,故声明为state变量,故在应转移的state无此变量,缺省值为零,故不建。
应将几个变量声明为全局变量,例如global.af_to_move。另外原版的0.75也是个大坑,我就不详细说了,那段直接删掉吧。

附修改结果
remove_effect = {
                        if = {
                                limit = {
                                        controls_state = 283
                                }
                                283 = { #283 #gansu
                                        set_variable = {
                                                var = global.af_level
                                                value = arms_factory_level
                                        }
                                        set_variable = {
                                                var = global.af_to_move
                                                value = arms_factory_level
                                        }
       
                                        set_variable = {
                                                var = global.ic_level
                                                value = industrial_complex_level
                                        }
                                        set_variable = {
                                                var = global.ic_to_move
                                                value = industrial_complex_level
                                        }
       
                                        custom_effect_tooltip = CHI_industrial_evacuations_remove_AF
                                        custom_effect_tooltip = CHI_industrial_evacuations_remove_IC
                                        hidden_effect = {                               
                                                remove_building = {
                                                        type = arms_factory
                                                        level = global.af_level
                                                }
                                                remove_building = {
                                                        type = industrial_complex
                                                        level = global.ic_level
                                                }
                                        }
       
                                        #Move AF
                                        CONTROLLER = {
                                                random_owned_controlled_state = {
                                                        prioritize = { 605 603 601 }
                                                        limit = {
                                                                is_fully_controlled_by = ROOT
                                                                 
                                                                free_building_slots = {
                                                                        building = arms_factory
                                                                        size > 2
                                                                        include_locked = yes
                                                                }
                                                        }
       
                                                        custom_effect_tooltip = CHI_industrial_evacuations_add_AF                                               
                                                        hidden_effect = {
                                                                add_extra_state_shared_building_slots = global.af_to_move
                                                                add_building_construction = {
                                                                        type = arms_factory
                                                                        level = global.af_to_move
                                                                        instant_build = yes
                                                                }
                                                                CONTROLLER = { set_country_flag = CHI_industrial_evacuations_moved_AF }
                                                        }
                                                }
       
                                                #If no states are really safe or all safe are filled
                                                #Move to random controlled state
                                                if = {
                                                        limit = {
                                                                NOT = { has_country_flag = CHI_industrial_evacuations_moved_AF }
                                                                NOT = {
                                                                        any_state = {
                                                                                is_fully_controlled_by = ROOT
                                                                                free_building_slots = {
                                                                                        building = arms_factory
                                                                                        size > 2
                                                                                        include_locked = yes
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                        random_owned_controlled_state = {
                                                                prioritize = { 605 603 601 }
                                                                limit = {
                                                                        is_controlled_by = ROOT
                                                                        free_building_slots = {
                                                                                building = arms_factory
                                                                                size > 2
                                                                                include_locked = yes
                                                                        }
                                                                }
       
                                                                custom_effect_tooltip = CHI_industrial_evacuations_add_AF                                               
                                                                hidden_effect = {
                                                                        add_extra_state_shared_building_slots = global.af_to_move
                                                                        add_building_construction = {
                                                                                type = arms_factory
                                                                                level = global.af_to_move
                                                                                instant_build = yes
                                                                        }
                                                                }
                                                        }
                                                }
                                                clr_country_flag = CHI_industrial_evacuations_moved_AF
       
       
                                                #Move IC
                                                random_owned_controlled_state = {
                                                        prioritize = { 605 603 601 }
                                                        limit = {
                                                                is_fully_controlled_by = ROOT
                                                                 
                                                                free_building_slots = {
                                                                        building = industrial_complex
                                                                        size > 2
                                                                        include_locked = yes
                                                                }
                                                        }
                                                       
                                                        custom_effect_tooltip = CHI_industrial_evacuations_add_IC
                                                        hidden_effect = {
                                                                add_extra_state_shared_building_slots = global.ic_to_move
                                                                add_building_construction = {
                                                                        type = industrial_complex
                                                                        level = global.ic_to_move
                                                                        instant_build = yes
                                                                }
                                                                CONTROLLER = { set_country_flag = CHI_industrial_evacuations_moved_IC }
                                                        }
                                                }
       
                                                #If no states are really safe or all safe are filled
                                                #Move to random controlled state
                                                if = {
                                                        limit = {
                                                                NOT = { has_country_flag = CHI_industrial_evacuations_moved_IC }
                                                                NOT = {
                                                                        any_state = {
                                                                                is_fully_controlled_by = ROOT
                                                                                free_building_slots = {
                                                                                        building = industrial_complex
                                                                                        size > 2
                                                                                        include_locked = yes
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                        random_owned_controlled_state = {
                                                                prioritize = { 605 603 601 }
                                                                limit = {
                                                                        is_controlled_by = ROOT
                                                                        free_building_slots = {
                                                                                building = industrial_complex
                                                                                size > 2
                                                                                include_locked = yes
                                                                        }
                                                                }
       
                                                                custom_effect_tooltip = CHI_industrial_evacuations_add_IC
                                                                hidden_effect = {
                                                                        add_extra_state_shared_building_slots = global.ic_to_move
                                                                        add_building_construction = {
                                                                                type = industrial_complex
                                                                                level = global.ic_to_move
                                                                                instant_build = yes
                                                                        }
                                                                }
                                                        }
                                                }
                                                clr_country_flag = CHI_industrial_evacuations_moved_IC
                                        }                       
                                }
                        }
                }

评分

参与人数 1威望 -10 收起 理由
15826301378 -10 无意义回复 这里是新手报道区

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|52PCGame

GMT+8, 2024-9-25 20:28 , Processed in 0.048205 second(s), 21 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表