• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Reduce Enemy and crew money and weapon quality

giuliootto

Freebooter
Storm Modder
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Mates,

I want reduce the died enemy and crew money and weapon quality available for looting, because it's a little bit easy do money with corpsemode enable.

Anybody know how can I do?

Please let me know.

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> bye, bye,
giuliootto
 
Not entirely sure. I CAN tell you that I saw some code of Maximus' in his latest game version to set the money of all enemy boarders to 0. That should solve at least part of the trouble. I don't recall testing if it works though. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
<!--quoteo(post=248479:date=Apr 1 2008, 06:54 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Apr 1 2008, 06:54 PM) <a href="index.php?act=findpost&pid=248479"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Not entirely sure. I CAN tell you that I saw some code of Maximus' in his latest game version to set the money of all enemy boarders to 0. That should solve at least part of the trouble. I don't recall testing if it works though. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Pieter,

I didn't found anything about enemy or crew money in the ealry Build version,
BTW, I manage to reduce money from loot just by set QualitySkipTrade and QualitySkipSell to true for all blade and gun with quality less than nice.

So I need to spend money to repair loot stuff before to sell.
Also Store in my game just sell nice blade and gun (no more long stuff list), i think that it's a little bit more realistic, what do you think?

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> bye, bye,
giuliootto
 
I think something like that might actually be a really good idea. Only good/fine weapons sold (no excellent and no average) and no fine/excellent weapons to be found at random. I'd like those files you changed. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
<!--quoteo(post=248905:date=Apr 4 2008, 07:35 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Apr 4 2008, 07:35 PM) <a href="index.php?act=findpost&pid=248905"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I think something like that might actually be a really good idea. Only good/fine weapons sold (no excellent and no average) and no fine/excellent weapons to be found at random. I'd like those files you changed. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Pieter,

I attached my modify file from Build14A6 (do not use over other Build Version neither Build14A6.2).

I just change there two funtion from the original:
InitBlade
InitGun

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> bye, bye,
giuliootto
 
I'm sorry; I don't see an attached file. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
<!--quoteo(post=249402:date=Apr 5 2008, 11:30 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Apr 5 2008, 11:30 PM) <a href="index.php?act=findpost&pid=249402"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm sorry; I don't see an attached file. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
yesterday I didn't notice this message:

Upload failed. You are not permitted to upload this type of file

BTW, here the code that I change in initItems.c:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->int InitBlade(  ref    ItemIndex,
            string    id,
            string    ModelID,
            string  picTexture,
            int        picIndex,
            float    Rare,
            int        MinLevel,
            int        Price,
            float    DmgMin,
            float    DmgMax,
            int        Piercing,
            int        Blocking,
            string    nation,
        float    Disarm) // NK 05-04-06 itemtrade, // PB: Added to enable disarming with weapons mod on
{
    ref    blade;
    int    i;
    int    BladeIndex;
    int    QualityPiercing;
    int    QualityBlocking;
    int    QualityMinLevel;
    int    QualityPrice;
    float    QualityDisarm; // PB: Added to limit disarming
    float    QualityRare;
    float    QualityDmgMin;
    float    QualityDmgMax;
    bool    QualitySkipRand;
    bool    QualitySkipTrade;
    bool    QualitySkipSell; // NK 05-04-06 so traders can buy items but not sell them.
    bool    QualitySkipEquip; // PB
    bool     Unique = false; // PB: Unique Blades
    string    QualityTexture;
    string    QualityName;
    string    BladeID;
    string    typetemp; // NK 05-04-06

    BladeIndex = ItemIndex;
    nation += ""; // NK 05-04-14 for some reason we have to do this.
    for (i = 0; i < 6; i++)
    {
        QualityDmgMin    = (0.5 + i * 0.25) * DmgMin;
        QualityDmgMax    = (0.5 + i * 0.25) * DmgMax;
        QualityPrice    = (0.5 + stf(i * 0.25)) * Price;
        if ( IT_RPG_STYLE ) QualityRare    = Rare * (1.0 - 0.12 * makefloat(abs(1-i))); // TIH so the low quality items show up for low level characters (they get purged at higher levels)
        else                 QualityRare    = Rare * (1.0 - 0.17 * makefloat(abs(2-i))); // NK 05-04-05 mod so bad items are rarer, as well as excellent, average = Rare
        QualityBlocking    = makeint(-2 + i + Blocking); // TIH 'makeint' instead of 'sti' Nov21'06
        QualitySkipTrade = false;
        QualitySkipRand    = false;
        QualitySkipSell    = false; // NK 05-04-06 so traders can buy items but not sell them.
        QualitySkipEquip = false; // PB
        QualityDisarm    = (-2 + i) * Disarm // PB: Added to limit disarming to good sabers and up
        switch(i)
        {
            case 0:
                QualityTexture    = "ITEMS_" + picTexture + "-2";
                if(BLADEDAMAGE_ENABLED) QualityName    = "Broken"; // PB: Replace Badly Worn with Broken
                else QualityName    = "Badly worn";
                BladeID        = id + "-2";
                QualitySkipSell    = true;
                QualitySkipTrade = true;
                if(BLADEDAMAGE_ENABLED) QualitySkipEquip    = true; // So enemies don't carry broken blades
            break;

            case 1:
                QualityTexture    = "ITEMS_" + picTexture + "-1";
                QualityName    = "Worn";
                BladeID        = id + "-1";
                QualitySkipSell    = true;
                QualitySkipTrade = true;
            break;

            case 2:
                QualityTexture    = "ITEMS_" + picTexture;
                QualityName    = "Average";
                BladeID        = id;
                QualitySkipSell    = true;
                QualitySkipTrade = true;
                QualitySkipRand    = true;
            break;

            case 3:
                QualityTexture    = "ITEMS_" + picTexture + "+1";
                QualityName    = "Good";
                BladeID        = id + "+1";
                QualitySkipSell    = true;
                QualitySkipTrade = true;
                QualitySkipRand    = true;
            break;

            case 4:
                QualityTexture    = "ITEMS_" + picTexture + "+2";
                QualityName    = "Fine";
                BladeID        = id + "+2";
                QualitySkipRand    = true;
            break;

            case 5:
                QualityTexture    = "ITEMS_" + picTexture + "+3";
                QualityName    = "Exellent";
                BladeID        = id + "+3";
                QualitySkipSell    = true;
                QualitySkipRand    = true; // You won't find excellent blades
            break;
        }

        if(QualityBlocking < 0)
        {
            QualityBlocking = 0;
        }
        QualityPiercing = makeint(-2 + i + Piercing); // TIH 'makeint' instead of 'sti' Nov21'06
        if(QualityPiercing < 0)
        {
            QualityPiercing = 0;
        }
        //QualityMinLevel = sti(-2 + i + MinLevel);
        //QualityMinLevel = makeint(((-2 + i) * 1.5) + MinLevel); // TIH wider scale method (outcommented for now)
        QualityMinLevel = makeint(-2 + i + MinLevel); // TIH 'makeint' instead of 'sti' Nov21'06 // TIH number change Aug24'06 - TIH fixed to restrict better quality to higher levels
        if(QualityMinLevel < 0 && MinLevel != 0) // NK fix for too many daggers 05-07-09
        {
            QualityMinLevel = 0;
        }
        makeref(blade,Items[BladeIndex]);
        // quality invariant properties
        blade.id            = BladeID;
        blade.baseid        = id; // TIH
        blade.BladeQuality    = i;
        blade.groupID        = BLADE_ITEM_TYPE;
        blade.name            = "itmname_" + id;
        blade.describe        = "itmdescr_" + id;
        blade.model            = ModelID;
        // quality affected properties
        blade.QualityName    = QualityName;
        blade.picTexture    = QualityTexture;
        blade.picIndex        = picIndex;
        blade.minlevel        = QualityMinLevel;
        blade.price            = makeint(QualityPrice * IT_WEAP_PRICE_SCL); // TIH possible cause for problems // NK 05-04-03
        blade.dmg_min        = QualityDmgMin;
        blade.dmg_max        = QualityDmgMax;
        blade.piercing        = QualityPiercing;
        blade.block            = QualityBlocking;
        blade.rare            = QualityRare;
        blade.skiptrade        = QualitySkipTrade;
        switch(id)
        {
            case "blade18": Unique = true; break; // PB: Saber of Nicholas Sharp
            case "blade28": Unique = true; break; // Bartolomeu: Francis Drake's Sword
        }
        // PB: Unique Blades -->
        if (Unique)
        {
            blade.skiprand        = true;
            blade.skipequip        = true;
            blade.skipsell        = true;
        }
        else
        {
            blade.skiprand        = QualitySkipRand;
            blade.skipequip        = QualitySkipEquip; // PB
            blade.skipsell        = QualitySkipSell; // NK 05-04-06 so traders can buy items but not sell them.
        }
        // PB: Unique Blades <--
        if ( IT_RPG_STYLE && QualityRare < IT_WEAP_RARITY_CUTOFF ) blade.skipsell = true; // TIH do not ever sell extremely rare items
        if(i<5) blade.replacewith = GetWeaponIDByQuality(id, i+1); // NK 05-04-06 so that if a weapon sellability gets lost due to quality upping (or they buy a -2 or -1 one), we replace with the next up.
        // PB: Disarm mode toggles -->
        if (DISARM_MODE == 2)
        { blade.disarm        = 100;    }    // Testmode
        else {blade.disarm    = QualityDisarm;}    // Default
        // PB: Disarm mode toggles <--
        // invariant properties
        blade.folder        = "ammo";
        blade.param.time    = 0.1;
        blade.param.colorstart    = argb(64, 64, 64, 64);
        blade.param.colorend    = argb(0, 32, 32, 32);
        // NK 05-04-06 add types
        typetemp = BLADE_ITEM_TYPE;
        blade.types.(typetemp) = true;
        if(nation != "")
        {
            typetemp = IT_TYPE_NATION + nation;
            blade.types.(typetemp) = true;
            typetemp = BLADE_ITEM_TYPE + "_" + typetemp;
            blade.types.(typetemp) = true;
        }
        // NK <--
        BladeIndex++;
    }
    return BladeIndex;
}



int InitGun(    ref    ItemIndex,
            string    id,
            string    ModelID,
            string    picTexture,
            int        picIndex,
            float    Rare,
            int        MinLevel,
            int        Price,
            float    DmgMin,
            float    DmgMax,
            int        Accuracy,
            int        Charges,
            int        ChargeSpeed,
            string    nation,
            string    sound,
            string    shottype)
{
    ref    gun;
    int    i;
    int    gunIndex;
    int    QualityAccuracy;
    int    QualityChargeSpeed;
    int    QualityMinLevel;
    int    QualityPrice;
    float    QualityRare;
    float    QualityDmgMin;
    float    QualityDmgMax;
    bool    QualitySkipRand;
    bool    QualitySkipTrade;
    bool    QualitySkipSell; // NK 05-04-06 so traders can buy items but not sell them.
    string    QualityTexture;
    string    QualityName;
    string    gunID;
    string    typetemp; // NK 05-04-06

    nation += ""; // NK 05-04-14 for some reason we have to do this.
    gunIndex = ItemIndex;
    for (i = 0; i < 6; i++)
    {
        QualityDmgMin    = (0.5 + i * 0.25) * DmgMin;
        QualityDmgMax    = (0.5 + i * 0.25) * DmgMax * WEAPMOD_GUNDMG;
        QualityPrice    = (0.5 + stf(i * 0.25)) * Price;
        if ( IT_RPG_STYLE ) QualityRare    = Rare * (1.0 - 0.12 * makefloat(abs(1-i))); // TIH so the low quality items show up for low level characters (they get purged at higher levels)
        else                 QualityRare    = Rare * (1.0 - 0.17 * makefloat(abs(2-i))); // NK 05-04-05 mod so bad items are rarer, as well as excellent, average = Rare
        QualityAccuracy    = makeint(-2 + i + Accuracy); // TIH 'makeint' instead of 'sti' Nov21'06
        QualitySkipTrade = false;
        QualitySkipRand    = false;
        QualitySkipSell    = false; // NK 05-04-06 so traders can buy items but not sell them. Fix type 05-04-07
        switch(i)
        {
            case 0:
                QualityTexture    = "ITEMS_" + picTexture + "-2";
                QualityName    = "Badly worn";
                gunID        = id + "-2";
                QualitySkipTrade = true;
                QualitySkipSell = true;
                QualitySkipRand    = true;
            break;

            case 1:
                QualityTexture    = "ITEMS_" + picTexture + "-1";
                QualityName    = "Worn";
                gunID        = id + "-1";
                QualitySkipTrade = true;
                QualitySkipSell = true;
            break;

            case 2:
                QualityTexture  = "ITEMS_" + picTexture;
                QualityName     = "Average";
                gunID         = id;
                QualitySkipTrade = true;
                QualitySkipSell = true;
                QualitySkipRand    = true;
            break;

            case 3:
                QualityTexture    = "ITEMS_" + picTexture + "+1";
                QualityName    = "Good";
                gunID        = id + "+1";
                QualitySkipTrade = true;
                QualitySkipSell = true;
                QualitySkipRand    = true;
            break;

            case 4:
                QualityTexture    = "ITEMS_" + picTexture + "+2";
                QualityName    = "Fine";
                gunID        = id + "+2";
                QualitySkipRand    = true;
            break;

            case 5:
                QualityTexture    = "ITEMS_" + picTexture + "+3";
                QualityName    = "Exellent";
                gunID        = id + "+3";
                QualitySkipSell    = true;
                QualitySkipRand    = true;
            break;
        }
        //QualityMinLevel = sti(-2 + i + MinLevel);
        QualityMinLevel = makeint(-2 + i + MinLevel); // TIH 'makeint' instead of 'sti' Nov21'06 // TIH number change Aug24'06 - TIH fixed to restrict better quality to higher levels
        if(QualityMinLevel < 0)
        {
            QualityMinLevel = 0;
        }

        QualityChargeSpeed = ChargeSpeed;

        makeref(gun,Items[gunIndex]);
        // quality invariant properties
        gun.id                = gunID;
        gun.baseid            = id; // TIH
        gun.sound             = sound;    //JRH
        gun.shottype        = shottype;//JRH
        gun.gunQuality        = i;
        gun.groupID            = GUN_ITEM_TYPE;
        gun.name            = "itmname_" + id;
        gun.describe        = "itmdescr_" + id;
        gun.model            = ModelID;
        gun.chargeQ            = Charges;
        // quality affected properties
        gun.QualityName        = QualityName;
        gun.picTexture        = QualityTexture;
        gun.picIndex        = picIndex;
        gun.minlevel        = QualityMinLevel;
        gun.price            = makeint(QualityPrice * IT_WEAP_PRICE_SCL); // TIH possible cause for problems // NK 05-04-03
        gun.dmg_min            = QualityDmgMin;
        gun.dmg_max            = QualityDmgMax;
        gun.chargespeed        = QualityChargeSpeed;
        gun.accuracy        = QualityAccuracy;
        gun.rare            = QualityRare;
        gun.skiptrade        = QualitySkipTrade;
        gun.skiprand        = QualitySkipRand;
        gun.skipsell        = QualitySkipSell; // NK 05-04-06 so traders can buy items but not sell them.
        gun.skipequip         = false; // PB: Fix
        if ( IT_RPG_STYLE && QualityRare < IT_WEAP_RARITY_CUTOFF ) gun.skipsell = true; // TIH do not ever sell extremely rare items
        if(i<5) gun.replacewith = GetWeaponIDByQuality(id, i+1); // NK 05-04-06 so that if a weapon sellability gets lost due to quality upping (or they buy a -2 or -1 one), we replace with the next up.
        // invariant properties
        gun.folder            = "ammo";
        // NK 05-04-06 add types
        typetemp = GUN_ITEM_TYPE;
        gun.types.(typetemp) = true;
        if(nation != "")
        {
            typetemp = IT_TYPE_NATION + nation;
            gun.types.(typetemp) = true;
            typetemp = GUN_ITEM_TYPE + "_" + typetemp;
            gun.types.(typetemp) = true;
        }
        // NK <--
        gunIndex++;
    }
    return gunIndex;
}<!--c2--></div><!--ec2-->
 
Could you put the files in a ZIP file please? <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
<!--quoteo(post=249473:date=Apr 6 2008, 05:56 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ Apr 6 2008, 05:56 PM) <a href="index.php?act=findpost&pid=249473"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Could you put the files in a ZIP file please? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
as you ask <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />
 

Attachments

  • initItems.zip
    20.9 KB · Views: 72
Thank you. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
Back
Top