Jump to content

Photo

Multiple charges on an item?


4 replies to this topic

#1 critto

critto
  • Modders
  • 198 posts
  • Gender:Male

Posted 02 June 2018 - 11:51 AM

There's this item on BG2:EE, Gem of Seeing (ohrscrl1.itm), that casts True Sight per day (recharge after rest). I am trying to convert it to have a limited amount of charges instead. This should be trivial enough in theory, one would think, but I've spent three or four hours today and it frustrates me to no end.

 

Things I've done so far:

- set the Magical bit in the Flags field

- played around with "maximum in stack" field (set it to 1)

- in the "Magical" header: set "drained" field to zero (item remains), set number of charges to 10, remove "recharge after resting" flag, tried to switch around the projectile (it has "None" by default)

 

At some point, I've just started to compare the item with another one that behaves in a desired fashion (any wand, basically) and change things around. Nothing helps. The item still ends up having one charge, after that it remains drained. My only theory is that something is up with the kind of effect it uses (146, cast spell from resource).

 

What am I doing wrong?

 

Cheers,

critto



#2 argent77

argent77
  • Modders
  • 825 posts
  • Gender:Male

Posted 02 June 2018 - 01:16 PM

It should be enough to set the "# charges" to the total number of charges and "When drained" to "Item vanishes" in the ability header.



#3 kjeron

kjeron
  • Members
  • 136 posts

Posted 02 June 2018 - 05:52 PM

All items have 1 charge by default.
Any more must be specified in the CRE/STO/ARE file that contains or the EFF/SPL/BCS/DLG that creates the item.

#4 critto

critto
  • Modders
  • 198 posts
  • Gender:Male

Posted 02 June 2018 - 08:04 PM

Thanks guys. I completely forgot that you actually have to specify the amount of charges when placing/creating an item. Figured it would be something simple in the end.

 

However, if that's the case, what does the "# of charges" field do exactly? If I use CreateItem command (from the console, at least), I can create the item with the number of charges higher than the one specified in the ITM file.



#5 kjeron

kjeron
  • Members
  • 136 posts

Posted 02 June 2018 - 10:24 PM

Items that recharge will restore any charges less than that amount.
Either by resting, for x per day items, or by selling/re-buying from shops that recharge magical items.



Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users