Jump to content

Upgrade weapon based on Number of Kills


Recommended Posts

Posted

I was thinking of creating a cursed weapon which gets stronger depending on the number of kills by the wielder. So if the sword was available early game and the wielder kills 100 enemies, the sword item will be replaced by a stronger variant. I can sort out minute details later like if someone has 99 kills using other means and then they equip the sword....

Anyway, I can write a script to replace the weapon. I noticed in the BALDUR.GAM save file, there is the "# kills (game)" parameter.

Can this parameter be read by a script?

Posted

As it's neither a stat of the CRE nor a variable - a party member's kill count is a field in the "party member" or "non-party character" object in the GAM file - you'd need a specific trigger to have any possibility of using it in a script.

Checking the IESDP trigger list ... huh, what do you know.

Quote
Returns true if the total count of killed creatures by the party equals the specified number.

 

Returns true if the total count of killed creatures by the party is greater than the specified number.

 

Returns true if the total count of killed creatures by the party is less than the specified number.

 

The total number of kills by the party is something you can use in a script (in the EE). But counts for individual characters aren't.

Posted (edited)

I just got flashbacks to the Cursed Shield > Paladin Shield conversion from Final Fantasy 6, a concept I don't wonder why Square never revisited (and that game had ways to nullify/alleviate the inconveniences, tho not the grind). Wouldn't be enough for the item simply being weak instead of cursed?

Edited by Connelly
Posted

Maybe you want the party to gain a reputation for killing a specific creature type - zombie, kobold, human, goblin, golem, elemental, etc.

Maybe you want to mimic it growing in power by absorbing EXP.  Perhaps it reduces its wielder's EXP gain and siphons some of it to itself.  (If the base game doesn't work for this, maybe EEex does.)

Maybe it gains power by eating magic items for EXP with the base sell value directly proportionate to the power gained.

Enjoy the inspiration!

Posted (edited)
On 7/2/2023 at 5:21 AM, pete_smith1229 said:

Interesting, shame it's not available to individual characters but at least I can use it for the party. Thanks very much!

I would implement it via the summoning by .spl of an invisible creature on any killing blow with the weapon which executes the following script (or something similar):

IF
  OnCreation()
THEN
  RESPONSE #100
    IncrementGlobal("SlainByXXXX","GLOBAL",1)
	SmallWait(1)
	DestroySelf()
END

Then ofc an addition to the background script with TakeItemReplace()... which won't equip the new weapon unfortunately, might be annoying if it happens in combat, but of course you can check for the condition CombatCounter(0)

As for the conditions for triggering this, could set it up via opcode #232 as an equipping effect, like Dorn's sword, but this is a problem if dual wielding because it will still trigger on killing hits with the other weapon (and this condition isn't available on non EE games).

Otherwise you can EFF target actors which are dead, in the feature block of the weapon, i.e. #177 matching parameter 2 (ids file) = 3 (general), parameter  (dead)1 = 3 (dead).

However, in my tests EFF targeting dead actors with shell spells can be buggy, so you might instead prefer to have the #146 directly in the weapon's feature block, and exclude actors who aren't dead (by #324 on EE, #177 otherwise).

Edited by polytope
Posted
On 7/1/2023 at 11:07 PM, Connelly said:

I just got flashbacks to the Cursed Shield > Paladin Shield conversion from Final Fantasy 6, a concept I don't wonder why Square never revisited (and that game had ways to nullify/alleviate the inconveniences, tho not the grind). Wouldn't be enough for the item simply being weak instead of cursed?

It would certainly start off as weak. Considering the kills would be party-based and not individual character-based, I probably will not have it cursed, at least not early on.

 

On 7/2/2023 at 12:55 AM, Endarire said:

Maybe you want the party to gain a reputation for killing a specific creature type - zombie, kobold, human, goblin, golem, elemental, etc.

Maybe you want to mimic it growing in power by absorbing EXP.  Perhaps it reduces its wielder's EXP gain and siphons some of it to itself.  (If the base game doesn't work for this, maybe EEex does.)

Maybe it gains power by eating magic items for EXP with the base sell value directly proportionate to the power gained.

Enjoy the inspiration!

Thanks, I was initially thinking having it grow either experience based or by number of kills. Perhaps I'll make another weapon using the former idea!

 

On 7/3/2023 at 2:41 PM, polytope said:

I would implement it via the summoning by .spl of an invisible creature on any killing blow with the weapon which executes the following script (or something similar):

IF
  OnCreation()
THEN
  RESPONSE #100
    IncrementGlobal("SlainByXXXX","GLOBAL",1)
	SmallWait(1)
	DestroySelf()
END

Then ofc an addition to the background script with TakeItemReplace()... which won't equip the new weapon unfortunately, might be annoying if it happens in combat, but of course you can check for the condition CombatCounter(0)

As for the conditions for triggering this, could set it up via opcode #232 as an equipping effect, like Dorn's sword, but this is a problem if dual wielding because it will still trigger on killing hits with the other weapon (and this condition isn't available on non EE games).

Otherwise you can EFF target actors which are dead, in the feature block of the weapon, i.e. #177 matching parameter 2 (ids file) = 3 (general), parameter  (dead)1 = 3 (dead).

However, in my tests EFF targeting dead actors with shell spells can be buggy, so you might instead prefer to have the #146 directly in the weapon's feature block, and exclude actors who aren't dead (by #324 on EE, #177 otherwise).

Very interesting, I might test this out. Sounds a fair bit is involved but would be great if it works!

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...