Disable weapons breaking when parrying?

Talk about Severance Blade of Darkness modifications and maps here. No tips or tech support questions please, use the forum above. Note that the game is rated 18 so some content may be unsuitable for younger readers.

Moderators: Ade, prospero

Buckyohare

Disable weapons breaking when parrying?

Postby Buckyohare » Mon May 02, 2016 11:36 am

Hi guys, I was wondering if anyone knew of a mod (or how to change the code somewhere) to prevent weapons breaking when parrying attacks.

I have been playing as a barb, and it's frustrating not being able to parry attacks without the fear of your weapon breaking, as the barb weapons are few and far between.

Thanks for your advice.

User avatar
Tomash
Dragon
Posts: 246
Joined: Sat Oct 25, 2008 11:23 am
Location: Russia
Contact:

Re: Disable weapons breaking when parrying?

Postby Tomash » Tue May 03, 2016 11:23 am

Find function Damage.BreakMySword which looks like:

def BreakMySword(EntityName):
me=Bladex.GetEntity(EntityName)
if me.InvRight<>"":
Actions.Stop_Weapon (EntityName,"Stop_Weapon")
if Breakings.ExplodeSpecialObject ( me.InvRight , 24000.0)==1:
if Reference.EntitiesObjectData.has_key(me.InvRight):
del Reference.EntitiesObjectData[me.InvRight]
DropInvalidObjectsOnImpact (EntityName)
me.Wuea=Reference.WUEA_ENDED
me.LaunchAnmType("sword_broken")
inv=me.GetInventory()
inv.RemoveWeapon(me.InvRight)
inv.LinkRightHand("None")
if me.Data.NPC:
me.Data.ResetCombat (EntityName)

Make it look like:

def BreakMySword(EntityName):
print "no more breaks"
#me=Bladex.GetEntity(EntityName)
#if me.InvRight<>"":
#Actions.Stop_Weapon (EntityName,"Stop_Weapon")
#if Breakings.ExplodeSpecialObject ( me.InvRight , 24000.0)==1:
#if Reference.EntitiesObjectData.has_key(me.InvRight):
#del Reference.EntitiesObjectData[me.InvRight]
#DropInvalidObjectsOnImpact (EntityName)
#me.Wuea=Reference.WUEA_ENDED
#me.LaunchAnmType("sword_broken")
#inv=me.GetInventory()
#inv.RemoveWeapon(me.InvRight)
#inv.LinkRightHand("None")
#if me.Data.NPC:
#me.Data.ResetCombat (EntityName)

User avatar
prospero
Ancient Dragon
Posts: 1728
Joined: Wed Nov 21, 2001 1:42 am
Location: United Kingdom

Re: Disable weapons breaking when parrying?

Postby prospero » Tue May 03, 2016 5:31 pm

You could edit the tables in Reference.py.

DefaultObjectData['Chaosword']= [OBJ_WEAPON, 5, 0, 2.0, THR_STRAIGHT, [W_FLAG_2W,PI,2000,750,100,100,GolpeArmaEscudoMetal]]

If you change the brk data in the last number (in this case 100 I have highlighted in purple) to 0 you may find the sword will become unbreakable.
I say 'may find' because I'm half-guessing. :roll:

You'll have to do the same to all other weapons you want unbreakable, but I think it's easier than trying to hook into functions.


Return to “Severance BoD: Modding Community”

Who is online

Users browsing this forum: No registered users and 2 guests