• 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!

Swords decreasing in quality

<!--quoteo(post=140965:date=Mar 1 2006, 10:42 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Mar 1 2006, 10:42 AM) [snapback]140965[/snapback]</div><div class='quotemain'><!--quotec-->

You don't want the player level vs. blade level to be implemented, because you use to play on a higher difficulty level with harder enemies, right?<!--QuoteEnd--></div><!--QuoteEEnd-->
You remember! <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
Yeah, and with all there is to do in Oxbay/Greenford, with caves, forts, and mad monks, a la CCC, the better sword is a life saver.
Add to that the fact that at first you have no money and there are no Blacksmiths on Oxbay island anyway.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->
Maybe I can add a difficulty level influence as well, so that this mod will be properly balanced on other difficulties as well. <!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" /> , That wouldn't work for me unless you made it less likely that the blade would break on a harder level ... but that wouldn't make sense either. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->
Of course, this mod has not been balanced at all yet. <!--QuoteEnd--></div><!--QuoteEEnd-->

Yeah, and I don't want to keep you from making progress here. <img src="style_emoticons/<#EMO_DIR#>/no.gif" style="vertical-align:middle" emoid=":no" border="0" alt="no.gif" />
Don't worry about me.
Keep up the good work. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
You have several good points. I will try to keep as many of your points into account while finishing this mod. It isn't supposed to make (game)life impossible, after all. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
I hope I will get it to work so well that you will happily use it as well.

Maybe decreasing the breaking chance on higher difficulties isn't such a bad idea. As long as the game remains playable on all difficulty levels WITH my mod enabled... <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
Fighting will be hard enough if your blade doesn't break all the time on higher difficulties. Do you have any comments on how frequently enemies' blades should break on higher difficulties? Should that be more frequent, less frequent or just as frequent as on the lowest difficulty?
 
<!--quoteo(post=140968:date=Mar 1 2006, 05:25 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Mar 1 2006, 05:25 PM) [snapback]140968[/snapback]</div><div class='quotemain'><!--quotec-->
You have several good points. I will try to keep as many of your points into account while finishing this mod. It isn't supposed to make (game)life impossible, after all. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
I hope I will get it to work so well that you will happily use it as well.

Maybe decreasing the breaking chance on higher difficulties isn't such a bad idea. As long as the game remains playable on all difficulty levels WITH my mod enabled... <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
Fighting will be hard enough if your blade doesn't break all the time on higher difficulties. Do you have any comments on how frequently enemies' blades should break on higher difficulties? Should that be more frequent, less frequent or just as frequent as on the lowest difficulty?
<!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Pieter,

I like your new mod, every new stuff that introduces a new challenge is always welcome <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />

Your mod let me have an idea about a simple change in Blacksmith mod:
I think that all merchants should buy or sell just fine or excellent swords and pistols.

For me this should introduced the following good things:

1) So if you collect bad swords and pistols from dead corpes you have to repair that before to buy and Blacksmit can became really important in the game.

2) Reduce the item list in the trade interface, I fell bored to have three or four type of the same sword when I want buy just the better.

3) Reduce the earn from the Sword/pistol selling, that returns more money than other way.

What do you think about.

I've already make the changes in my initItems.c to reflect my ideas, I you want I can send it <img src="style_emoticons/<#EMO_DIR#>/huhh.gif" style="vertical-align:middle" emoid=":eek:k" border="0" alt="huhh.gif" />

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> Bye,bye,
giuliootto
 
I think that originally excellent blades and guns weren't supposed to be sold by traders. But it might indeed be a good idea to limit the selling of items at traders to just good and fine items and no more avarage ones. Traders used to sell worn and badly worn stuff as well, but that has been changed in the Post Build 12 modpack. I reckon it is a pretty good idea; I'm getting fed up with the ridiculous amount of stuff the traders sell. Please send the file and I'll see if there are any changes of your I can use. <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Pieter. I´m trying to figure out the chances for a sword to brake in your mod.
Am I right that only badly worn blades may brake?

Also, braking when blocking is a too good thing to be missing. I mean fencing is not that hard in the game & notorius blockers may get some problems... <img src="style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" />
 
You are right that only badly worn blades can break. Worn blades will first be decreased in quality to badly worn. I am going to add the breaking code to the blocking as well. And even make blocking count worse than attacking for bladedamage. I think I'll make it so that every stroke with a blade counts once, but every block counts at least DOUBLE! So blockers will get SERIOUS trouble! <img src="style_emoticons/<#EMO_DIR#>/danse1.gif" style="vertical-align:middle" emoid=":dance" border="0" alt="danse1.gif" />
 
I am having some pretty serious trouble with the bladedamage mod. For some reason, my changes seem to cause bugs and I can't figure out why. If any coder is wanting to have a look at it, please DO! <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
Code is in LAi_events.c and INTERFACE\itemsbox.c in the latest modpack update (25 March) available from the Post Build 12 thread.

Any modder who would want to help out for a bit, please post here. <img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />

If somebody can figure out what's wrong, please do, because it isn't working the way it should. If anybody can code it in a better way, feel free to do so. I wouldn't be surprised if my code isn't very efficient.

Code from <i>void LAi_CharacterAttack()</i>:
<!--QuoteBegin-"Lai_events.c"+--><div class='quotetop'>QUOTE("Lai_events.c")</div><div class='quotemain'><!--QuoteEBegin--> // PB: Blade Damage mod
if(BLADEDAMAGE_ENABLED == 1 && attack.equip.blade != "bladeX4" && attack.location != "Tutorial_Deck")
{
if(!CheckAttribute(attack,"bladedamage.counter"))
{
if(sti(attack.index) == GetMainCharacterIndex())
{attack.bladedamage.counter = 0;}
else
{attack.bladedamage.counter = rand(BLADEDAMAGE_RAND + BLADEDAMAGE_BASE);}
}
attack.bladedamage.counter = sti(attack.bladedamage.counter) + 1;
// Counts the amount of strokes you performed with your blade

string BladeID = attack.equip.blade;
string BladeBaseID;
if (findSubStr(&BladeID, "+", 0) > -1 || findSubStr(&BladeID, "-", 0) > -1)
BladeBaseID = strcut(&BladeID, 0, strlen(BladeID) - 3);
else
BladeBaseID = BladeID;

bool DecreaseQuality = false;

bool BladeBreak = false;

// Bladedamage based on the usage of your blade
// -------------------------------------------------------
int bladedamage_usage;
bladedamage_usage = attack.bladedamage.counter;

//LogIt("Bladedamage Usage = " + bladedamage_usage);

// Bladedamage based on your level vs the blade's minlevel
// -------------------------------------------------------
int bladedamage_level;
bladedamage_level = sti(weapon.minlevel) - sti(attack.rank);
if(bladedamage_level < 0) bladedamage_level = 0;

//LogIt("Bladedamage Level = " + bladedamage_level);

int total_chance;
total_chance = sti(bladedamage_usage) + sti(bladedamage_level);

if(total_chance > rand(BLADEDAMAGE_RAND) + BLADEDAMAGE_BASE)
{DecreaseQuality = true;}

//LogIt("Total chance points = " + total_chance + " for character " + attack.name + " " + attack.lastname);

if(DecreaseQuality)
{
RemoveCharacterEquip(attack, BLADE_ITEM_TYPE);
TakeItemFromCharacter(attack, BladeID);

attack.bladedamage.counter = 0;

switch(GetItemQualityByID(BladeID))
{
case 0:
PlaySound("OBJECTS\duel\sword_broken.wav");
BladeBreak = true;
break;

case 1:
GiveItem2Character(attack, BladeBaseID + "-2");
EquipCharacterByItem(attack, BladeBaseID + "-2");
break;

case 2:
GiveItem2Character(attack, BladeBaseID + "-1");
EquipCharacterByItem(attack, BladeBaseID + "-1");
break;

case 3:
GiveItem2Character(attack, BladeBaseID);
EquipCharacterByItem(attack, BladeBaseID);
break;

case 4:
GiveItem2Character(attack, BladeBaseID + "+1");
EquipCharacterByItem(attack, BladeBaseID + "+1");
break;

case 5:
GiveItem2Character(attack, BladeBaseID + "+2");
EquipCharacterByItem(attack, BladeBaseID + "+2");
break;
}

if(BladeBreak)
{
if(sti(attack.index) != GetMainCharacterIndex() && !CheckAttribute(attack, "nodisarm") && attack.chr_ai.group != LAI_GROUP_PLAYER && !bAbordageStarted && rand(2) > 0)
{
LAi_SetCitizenTypeNoGroup(enemy);
}
else
{
if(!FindCharacterItemByGroup(attack, "bladeX4"))
{GiveItem2Character(attack, "bladeX4");}
EquipCharacterByItem(attack, "bladeX4");
}
}
}
}<!--QuoteEnd--></div><!--QuoteEEnd-->
Code from <i>void LAi_CharacterBlock()</i>:
<!--QuoteBegin-"Lai_events"+--><div class='quotetop'>QUOTE("Lai_events")</div><div class='quotemain'><!--QuoteEBegin--> // PB: Bladedamage mod -->
int bladedamage_usage;
int bladedamage_level;
int total_chance;
string BladeID;
string BladeBaseID;
string weaponID;
aref weapon;
bool DecreaseQuality;
bool BladeBreak = false;

// Code for the bladedamage for the enemy:
if(BLADEDAMAGE_ENABLED == 1 && enemy.equip.blade != "bladeX4" && enemy.location != "Tutorial_Deck")
{
if(!CheckAttribute(enemy,"bladedamage.counter"))
{
if(sti(enemy.index) == GetMainCharacterIndex())
{enemy.bladedamage.counter = 0;}
else
{enemy.bladedamage.counter = rand(BLADEDAMAGE_RAND + BLADEDAMAGE_BASE);}
}
enemy.bladedamage.counter = sti(enemy.bladedamage.counter) + 2;
// Counts the amount of strokes you performed with your blade

BladeID = enemy.equip.blade;
if (findSubStr(&BladeID, "+", 0) > -1 || findSubStr(&BladeID, "-", 0) > -1)
BladeBaseID = strcut(&BladeID, 0, strlen(BladeID) - 3);
else
BladeBaseID = BladeID;

weaponID = enemy.equip.blade ; // defines weaponname
weapon;
Items_FindItem(weaponID, &weapon); // defines object for weaponattributes

DecreaseQuality = false;

BladeBreak = false;

// Bladedamage based on the usage of your blade
// -------------------------------------------------------
bladedamage_usage = enemy.bladedamage.counter;

//LogIt("Bladedamage Usage = " + bladedamage_usage);

// Bladedamage based on your level vs the blade's minlevel
// -------------------------------------------------------
bladedamage_level = sti(weapon.minlevel) - sti(enemy.rank);
if(bladedamage_level < 0) bladedamage_level = 0;

//LogIt("Bladedamage Level = " + bladedamage_level);

total_chance = sti(bladedamage_usage) + sti(bladedamage_level);

if(total_chance > rand(BLADEDAMAGE_RAND) + BLADEDAMAGE_BASE)
{DecreaseQuality = true;}

//LogIt("Total chance points = " + total_chance + " for character " + enemy.name + " " + enemy.lastname);

if(DecreaseQuality)
{
RemoveCharacterEquip(enemy, BLADE_ITEM_TYPE);
TakeItemFromCharacter(enemy, BladeID);

enemy.bladedamage.counter = 0;

switch(GetItemQualityByID(BladeID))
{
case 0:
PlaySound("OBJECTS\duel\sword_broken.wav");
BladeBreak = true;
break;

case 1:
GiveItem2Character(enemy, BladeBaseID + "-2");
EquipCharacterByItem(enemy, BladeBaseID + "-2");
break;

case 2:
GiveItem2Character(enemy, BladeBaseID + "-1");
EquipCharacterByItem(enemy, BladeBaseID + "-1");
break;

case 3:
GiveItem2Character(enemy, BladeBaseID);
EquipCharacterByItem(enemy, BladeBaseID);
break;

case 4:
GiveItem2Character(enemy, BladeBaseID + "+1");
EquipCharacterByItem(enemy, BladeBaseID + "+1");
break;

case 5:
GiveItem2Character(enemy, BladeBaseID + "+2");
EquipCharacterByItem(enemy, BladeBaseID + "+2");
break;
}

if(BladeBreak)
{
if(sti(enemy.index) != GetMainCharacterIndex() && !CheckAttribute(enemy, "nodisarm") && enemy.chr_ai.group != LAI_GROUP_PLAYER && !bAbordageStarted && rand(2) > 0)
{
LAi_SetCitizenTypeNoGroup(enemy);
}
else
{
if(!FindCharacterItemByGroup(enemy, "bladeX4"))
{GiveItem2Character(enemy, "bladeX4");}
EquipCharacterByItem(enemy, "bladeX4");
}
}
}
}

// Code for the bladedamage for the attack:
if(BLADEDAMAGE_ENABLED == 1 && attack.equip.blade != "bladeX4" && attack.location != "Tutorial_Deck")
{
if(!CheckAttribute(attack,"bladedamage.counter"))
{
if(sti(attack.index) == GetMainCharacterIndex())
{attack.bladedamage.counter = 0;}
else
{attack.bladedamage.counter = rand(BLADEDAMAGE_RAND + BLADEDAMAGE_BASE);}
}
attack.bladedamage.counter = sti(attack.bladedamage.counter) + 2;
// Counts the amount of strokes you performed with your blade

BladeID = attack.equip.blade;
if (findSubStr(&BladeID, "+", 0) > -1 || findSubStr(&BladeID, "-", 0) > -1)
BladeBaseID = strcut(&BladeID, 0, strlen(BladeID) - 3);
else
BladeBaseID = BladeID;

weaponID = attack.equip.blade ; // defines weaponname
weapon;
Items_FindItem(weaponID, &weapon); // defines object for weaponattributes

DecreaseQuality = false;

BladeBreak = false;

// Bladedamage based on the usage of your blade
// -------------------------------------------------------
bladedamage_usage = attack.bladedamage.counter;

//LogIt("Bladedamage Usage = " + bladedamage_usage);

// Bladedamage based on your level vs the blade's minlevel
// -------------------------------------------------------
bladedamage_level = sti(weapon.minlevel) - sti(attack.rank);
if(bladedamage_level < 0) bladedamage_level = 0;

//LogIt("Bladedamage Level = " + bladedamage_level);

total_chance = sti(bladedamage_usage) + sti(bladedamage_level);

if(total_chance > rand(BLADEDAMAGE_RAND) + BLADEDAMAGE_BASE)
{DecreaseQuality = true;}

//LogIt("Total chance points = " + total_chance + " for character " + attack.name + " " + attack.lastname);

if(DecreaseQuality)
{
RemoveCharacterEquip(attack, BLADE_ITEM_TYPE);
TakeItemFromCharacter(attack, BladeID);

attack.bladedamage.counter = 0;

switch(GetItemQualityByID(BladeID))
{
case 0:
PlaySound("OBJECTS\duel\sword_broken.wav");
BladeBreak = true;
break;

case 1:
GiveItem2Character(attack, BladeBaseID + "-2");
EquipCharacterByItem(attack, BladeBaseID + "-2");
break;

case 2:
GiveItem2Character(attack, BladeBaseID + "-1");
EquipCharacterByItem(attack, BladeBaseID + "-1");
break;

case 3:
GiveItem2Character(attack, BladeBaseID);
EquipCharacterByItem(attack, BladeBaseID);
break;

case 4:
GiveItem2Character(attack, BladeBaseID + "+1");
EquipCharacterByItem(attack, BladeBaseID + "+1");
break;

case 5:
GiveItem2Character(attack, BladeBaseID + "+2");
EquipCharacterByItem(attack, BladeBaseID + "+2");
break;
}

if(BladeBreak)
{
if(sti(attack.index) != GetMainCharacterIndex() && !CheckAttribute(attack, "nodisarm") && attack.chr_ai.group != LAI_GROUP_PLAYER && !bAbordageStarted && rand(2) > 0)
{
LAi_SetCitizenTypeNoGroup(attack);
}
else
{
if(!FindCharacterItemByGroup(attack, "bladeX4"))
{GiveItem2Character(attack, "bladeX4");}
EquipCharacterByItem(attack, "bladeX4");
}
}
}
}
// PB: Bladedamage mod <--<!--QuoteEnd--></div><!--QuoteEEnd-->

Code from <i>void InitInterface_RS(string iniName,ref itemsRef,string faceID)</i>:
<!--QuoteBegin-"itemsbox.c"+--><div class='quotetop'>QUOTE("itemsbox.c")</div><div class='quotemain'><!--QuoteEBegin--> // PB -->
bool HasFists = false;
if(GetCharacterEquipByGroup(itemsRef, BLADE_ITEM_TYPE) == "bladeX4")
{TakeItemFromCharacter(itemsRef, "bladeX4")
HasFists = true;}
// If character has fists equipped, take fists away and set HasFists true

if(FindCharacterItemByGroup(itemsRef, "bladeX4"))
{TakeItemFromCharacter(itemsRef, "bladeX4")}
// If character has fists, but didn't have them equipped, just take the fists away
// PB <--<!--QuoteEnd--></div><!--QuoteEEnd-->

Code from <i>void ProcessExit_yes()</i>:
<!--QuoteBegin-"itemsbox.c"+--><div class='quotetop'>QUOTE("itemsbox.c")</div><div class='quotemain'><!--QuoteEBegin--> // PB -->
if(HasFists)
{GiveItem2Character(attack, "bladeX4");
EquipCharacterByItem(attack, "bladeX4");}
// If character had fists equipped, give them back and equip them again
// PB <--<!--QuoteEnd--></div><!--QuoteEEnd-->
 
CCC made a new fixed invisible item for your fists. Funnily enough, you can still see it a bit. See attached picture. Any chance of an even smaller file, CCC? <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Back
Top