海盗时代2沉船之城 百慕大火炮口径升级修改方法

时间:2010/11/30 09:37:58 编辑:Ocean

最近玩了下沉船,发现百慕大船厂只能够升级到32磅火炮,感觉比较郁闷

于是我对相关文件做了下小小的改动总算能够升级到48磅了。呵呵。


首先要感谢ccxq,他提供了相关文件的信息,所以修改还是在priates_shipyard.c中。


原文件有段
             if (cannonMax < 32 && !CheckAttribute(&RealShips[sti(Pchar.Ship.Type)], "Tuning.Cannon"))
                    {
                        Link.l1 = DLG_TEXT_SHY[57];
                        Link.l1.go = "ship_tunning_cannon";
               }
把褐红字部分的32改成48.在游戏中,32是限制火炮最大口径的条件,如果超过32,那么我们是不会再看到升级口径的选项了。


当然还没有结束呢,后面有段具体判断火炮口径的语句必须加以修改,否则你会百花钱而不见效果。(呵呵,冤大头了)
case "ship_tunning_cannon_complite":
                    AddTimeToCurrent(6, 30);
                    shTo = &RealShips[sti(Pchar.Ship.Type)];
                    DeleteAttribute(NPChar, "Tuning");
                    // 桤戾龛?
            int iCaliber = sti(shTo.MaxCaliber);
                   switch(iCaliber)
            {
                case 12:
                        iCaliber = 0;
                break;
                case 16:
                        iCaliber = 1;
                break;
                case 24:
                        iCaliber = 2;
                break;
                case 32:
                        iCaliber = 3;
                break;
                case 42:
                        iCaliber = 4;
                break;
                case 48:
                        iCaliber = 5;
                break;
            }
            iCaliber = iCaliber + 1;
            if (iCaliber > 5) iCaliber = 5;
            switch(iCaliber)
            {
                case 0:
                        iCaliber = 12;
                break;
                case 1:
                        iCaliber = 16;
                break;
                case 2:
                        iCaliber = 24;
                break;
                case 3:
                        iCaliber = 32;
                break;
                case 4:
                        iCaliber = 42;
                break;
                case 5:
                        iCaliber = 48;
                break;            }
            shTo.MaxCaliber = iCaliber;
                         //shTo.Tuning.Cannon = true;
            // finish <--
            NextDiag.TempNode = "ship_tunning_again";
                        dialog.Text = DLG_TEXT_SHY[102];
                        Link.l1 = DLG_TEXT_SHY[103];
                        Link.l1.go = "Exit";
                       
                        AddQuestRecord("ShipTuning", "End");
                        CloseQuestHeader("ShipTuning");
                break;

不好意思,这里偷懒了,褐红字部分是改动的地方。原意是将火炮口径加入了42,48两种规格,后面的双斜杠是将升级一次的限制去掉,这样就可以升级到48磅了。


我把修改了的文件传上了,不过升级的时候我只是去掉了材料部分,前还是照算的。否则玩起来一点意思也没有了。

在船厂中添加48口径炮,必须开新游戏。
修改goods.h
#define GOODS_QUANTITY  45 // boal

#define GOOD_BALLS            0
#define GOOD_GRAPES            1
#define GOOD_KNIPPELS        2
#define GOOD_BOMBS            3
// boal -->
#define GOOD_POWDER     4
#define GOOD_FOOD       5
#define GOOD_WEAPON            6
#define GOOD_MEDICAMENT 7

#define GOOD_SAILCLOTH  8
#define GOOD_PLANKS     9
#define GOOD_CHOCOLATE        10
#define GOOD_COFFEE            11
#define GOOD_TOBACCO        12
#define GOOD_SUGAR            13
#define GOOD_WHEAT      14
#define GOOD_WINE            15
#define GOOD_RUM            16
#define GOOD_ALE            17
#define GOOD_COTTON            18
#define GOOD_LINEN            19
#define GOOD_LEATHER        20
#define GOOD_SILK            21
#define GOOD_CLOTHES        22
#define GOOD_EBONY      23
#define GOOD_MAHOGANY         24
#define GOOD_SANDAL            25
#define GOOD_CINNAMON   26
#define GOOD_COPRA      27
#define GOOD_PAPRIKA    28
#define GOOD_FRUITS     29
#define GOOD_OIL        30
#define GOOD_BRICK      31
//
#define GOOD_SLAVES     32
#define GOOD_GOLD       33
#define GOOD_SILVER            34
//   cannons ............
#define GOOD_CANNON_12   35
#define GOOD_CANNON_16   36
#define GOOD_CANNON_24   37
#define GOOD_CANNON_32   38
#define GOOD_CANNON_42   39

#define GOOD_CULVERINE_12 40
#define GOOD_CULVERINE_16 41
#define GOOD_CULVERINE_24 42
#define GOOD_CULVERINE_32 43
#define GOOD_CANNON_48   44

再到initGoods.c 最后大括号内添加以下一段
Goods[GOOD_CANNON_48].Name                        = "Cannon_48";
        Goods[GOOD_CANNON_48].CannonIdx                = CANNON_TYPE_CANNON_LBS48;
        Goods[GOOD_CANNON_48].Cost                        = Cannon[CANNON_TYPE_CANNON_LBS48].Cost;
        Goods[GOOD_CANNON_48].Weight                = Cannon[CANNON_TYPE_CANNON_LBS48].Weight;
        Goods[GOOD_CANNON_48].Units                        = 1;
        Goods[GOOD_CANNON_48].AfraidWater        = 0;
        Goods[GOOD_CANNON_48].type                                = TRADE_TYPE_CANNONS;
        Goods[GOOD_CANNON_48].canbecontraband        = 0;
        Goods[GOOD_CANNON_48].FireRange                    = Cannon[CANNON_TYPE_CANNON_LBS48].FireRange;
        Goods[GOOD_CANNON_48].DamageMultiply        = Cannon[CANNON_TYPE_CANNON_LBS48].DamageMultiply;
        Goods[GOOD_CANNON_48].ReloadTime                = sti(GetCannonReloadTime(&Cannon[CANNON_TYPE_CANNON_LBS48]));

现在在新开的游戏中可以看到48口径火炮了,不过图片还是42的。

必须是新开的游戏,在修改前请备份源文件,切记!!!

相关攻略
相关游戏