Jump to content

Set armor pieces for additional bonuses


Recommended Posts

Posted

I'm wondering if it's possible to allow equipping specific pieces of armor (body, helmet, boots etc) in order to gain additional bonuses (incrementing attributes, effects such as blur, unlocking an ability...)?

- Perhaps via a global script which keeps checking if a party member has equipped the required armor pieces and if the condition is met then provide the bonus, of course there'll need to be a global variable to ensure if the condition is met then the script won't repeat.

- Or perhaps it could also be done using a combination of .EFF files and creating custom effects so that one or two armor pieces give a permanent effect and then a third armor piece will have an .EFF file tied to it which fires a spell enabling the bonus.

Has something similar been done, and what would be the best method to achieve this?

Posted

Using scripts could produce strange results although should be possible.

Second option seems better to me. You can apply some marker next to normal effects. Set bonuses you can apply with custom effs on one of the element and protect against this resources if marker not set. (Opcode 318)

Marker could be splstate or anything you can create condition in splprot. Splstates are limited resources so better to use as little as possible. In your case it is kind of problem because the cleanest way would be to have one for every piece of every set. 

Just to clarify: I've never done that. I hope someone would correct me if I'm saying something stupid (what is very probable) ;)

Posted

I just realized that equipment effects are applied only in moment of equipment or on game load. This would make applying of set effects dependent on equipping order.

Suddenly option with scripts doesn't seems that bad...

Posted

Hm. Maybe set effects could be applied with custom eff that is attached to every set piece. After this eff, protection against this eff should be applied, to protect against applying it more then once on game load. I suppose it should work that way.

And then of course protection against this eff on every piece set if any other piece set is not equipped (this protection needs to go before eff application).

Posted

@marchitek @subtledoctor

Thanks for the tips! I haven't started learning the scripting yet so using .EFF files is the way to go for me at the moment. For a 2-piece set, it should be simple. I think it becomes more convoluted when more set pieces are added. I haven't considered protection against .EFF which may be necessary if equipment order doesn't matter.

I just tested a simple example for a 2-piece set where one armor piece provides a constant custom effect when equipped. The second armor piece contains an .EFF file which checks if the custom effect is active and if it is, trigger a spellstate containing the bonus. The second armor would have to be equipped last but atleast I know it works.

I'll have to play with protection against .EFF files to avoid equipment order and see if this can be extended to a 3-piece set or more.

I wish weekends lasted longer.............

Posted

It would simplify things if there was a 'central' or primary piece of equipment that would be required for anything else to work. Then you could do this fairly simply wiht nothing but opcodes 177, 321, and 206. I think.

Posted
38 minutes ago, subtledoctor said:

It would simplify things if there was a 'central' or primary piece of equipment that would be required for anything else to work. Then you could do this fairly simply wiht nothing but opcodes 177, 321, and 206. I think.

That sounds like an efficient way of doing this, I'll test this out too thanks!

Posted

Very interesting project. I'm curious about how you will handle those sets effects and the possibilities you'll discover !

Posted

One caveat on the ordering; the fixed ordering only applies when you load a save. If you're taking items on and off during gameplay, their equip effects will be applied using timestamp order.

Posted

The more I think about it, the more this seems like it will be fairly difficult/complex. It will depend bvery much on the particulars of exactly what you are trying to implement. (Which of course nobody ever wants to spell out in posts like this... :rolleyes: )

Posted (edited)
16 hours ago, ptifab said:

Very interesting project. I'm curious about how you will handle those sets effects and the possibilities you'll discover !

Thanks, will take a lot of experimenting so will see how much of this can be achieved!

16 hours ago, jmerry said:

One caveat on the ordering; the fixed ordering only applies when you load a save. If you're taking items on and off during gameplay, their equip effects will be applied using timestamp order.

Yeah I was hoping for a one-solution-fits-all but that probably won't be the case for this setup. I'm starting to think maybe a combination of a global script and opcodes may be ideal: have the armor pieces give a status effect then have the script check if the PC has these equipped and if so, provide a buff...

16 hours ago, subtledoctor said:

The more I think about it, the more this seems like it will be fairly difficult/complex. It will depend bvery much on the particulars of exactly what you are trying to implement. (Which of course nobody ever wants to spell out in posts like this... :rolleyes: )

HA! I like to generalize posts to try and make solutions easier to be adaptable to other scenarios.

One example of what I want to do is create an armor set which consists of the "Helm of Balduran" and the "Cloak of Balduran" (I brought these to Icewind). Each of these gives the user -1 AC bonus. So wearing both normally would give an overall -2 AC bonus. What I want to do is when someone equips both of these, he/she would receive an additional benefit. So for argument's sake, let's say the additional benefit is another -1 AC bonus. So now equipping these two armor pieces would give an overall -3 AC bonus instead of the original -2 AC bonus.

What I have done so far to enable the additional benefit (without taking the ordering into consideration) is to:

1. Create a new state id using Weidu and @subtledoctor's script (https://www.gibberlings3.net/forums/topic/36079-how-to-create-new-spell-states/)

2. Add an Effect to the "Helm of Balduran" .ITM file using "Set spell state (328)" = new state; Timing mode = "Instant/While equipped - 2".

3. Create a new .SPL file with a Spell Ability to give the Caster an AC bonus (this is the additional benefit).

4. Add an Effect to the "Cloak of Balduran" .ITM file using either "Apply effects list (326)" or "Use EFF file (177)". The former works immediately; the latter requires creating a new .EFF file which uses Type = "Cast spell on condition (232)"; Condition = "CheckSpellState(Myself,'Special') / per round (21)"; Resource = the new .SPL file; Special = new state. So once both armors are equipped, the additional benefit will kick in after 6 seconds.

So gaining the additional benefit works. At the moment, my issue is what happens taking one of the armors off because right now, the additional benefit remains active. I'm having to play around with various opcodes as mentioned by others earlier: "Use EFF file (177)", "Protection from spell (206)", and "Remove effects by resource (321)". I have added opcode 321 to the helmet so if you unequip the cloak and re-equip the helmet, the additional benefit is removed. Not ideal. I need to find the right combination of opcodes and timings.

Once this is solved for 2-set armor piece, I would like to extend to a 3-set and potentially more if it's feasible. I'll continue playing around in my free time and see how far this can go using opcodes or if global scripts should also be used.

Thanks for attending my TEDTalk 😁

Edited by pete_smith1229
Posted

Minor progress: if both items are equipped and you remove the cloak, the additional buff is removed. This requires using another .EFF file with similar settings and another .SPL file to remove the effects of the cloak. Both these files are tied to the helmet. Unfortunately, the additional buff stacks each time either armor is re-equipped. There's a lot of circular logic going round (hah!) but will see if there's a way to completely reset the buff.

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...