Jump to content

Making a consumable item unusable in combat


Aquadrizzt

Recommended Posts

The hacky way:

 

Item1 casts Spell1 and Spell2

 

Spell1 has the "non-combat" flag. It triggers the desired effect, and adds a short 206 protection against Spell2.

 

Spell2 creates a copy of Item1 in the caster's inventory.

 

So the item is used and burns itself up in any event, but if done in combat, the effect fizzles and the player still has the item. If used outside combat, the effect happens and the creation of the new item is prevented.

 

Would only work with single-use items.

Link to comment

Spell1 has the "non-combat" flag. It triggers the desired effect, and adds a short 206 protection against Spell2.

 

The flag only works on normal spell-casting, forcing spells through opcodes (146/258/326/etc...) ignores the flag.

 

Worst case, you could have Baldur.bcs or each area.bcs apply an area-wide spell every round while combat counter is active, using opcode 182, param2=1 to disable the item type. Item type 13(food) defaults to the quick-item slots and is scarcely used, you could switch the few items using it to either 0(miscellaneous) or 12(potion), and use it exclusively for non-combat consumables.

Link to comment

Worst case, you could have Baldur.bcs or each area.bcs apply an area-wide spell every round ...

Why not make the food just take a long time to consume a good amount of ?

 

Like for example, make it restore 1 hit point of health ... it takes 6 seconds to be reused so(as a round in real time)... so getting 20 hit points in a fight that's over in 4 rounds is quite impossible especially if you apply either a speed penalty or say make it's consuming take time(as you have to cast the spell, with a spell casting timer). Scripting anything like this to a cheesing baldur.bcs is INSANE !!!!

Link to comment

Worst case, you could have Baldur.bcs or each area.bcs apply an area-wide spell every round while combat counter is active

This technically would work. But it is worth mentioning that this is not merely "worst case", but monstrous, terrifying case. Baldur.bcs is already stuffed by every modder and his dog with heaps of random trash, making game laggy as hell. Please don't teach people this awful idea of adding more to it. If anything, only things of utmost, gamechanging importance should find their way there, not some little tricks. And really, bog down hundreds of area scripts for the sake of single usability effect? Way too much game engine abuse for that little outcome.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...