Jump to content

GemRB IESDP


Grammarsalad

Recommended Posts

Not really; I think it would be best done as another game type in IESDP itself. The way effects and actions have been refactored on the backend means little need for duplication.

Sure, we have some extra opcodes and actions, depending from which engine you look from. Also some things that are new to all or are just extra parameter extensions. Or the projectile externalization that I think EEs adopted partially.

DLTCEP supports the gemrb-only projectile stuff, but I had no luck preparing a DAT file for it. Things just broke.

The reason it's not documented yet is that some things might still change ("not a stable API"), but more practically, you're the first one to ask.

Link to post
3 hours ago, lynx said:

Not really; I think it would be best done as another game type in IESDP itself. The way effects and actions have been refactored on the backend means little need for duplication.

Sure, we have some extra opcodes and actions, depending from which engine you look from. Also some things that are new to all or are just extra parameter extensions. Or the projectile externalization that I think EEs adopted partially.

DLTCEP supports the gemrb-only projectile stuff, but I had no luck preparing a DAT file for it. Things just broke.

The reason it's not documented yet is that some things might still change ("not a stable API"), but more practically, you're the first one to ask.

A lot of the new 2das seem pretty intuitive. I was mainly interested in information on the opcodes. But, yeah, I can understand the reluctance to document something that may change in the future.

As an aside, I wonder if it would make sense to have a forum for GemRB only mods (in the spirit of 'if you build it, they will come'.) It's really coming together and there is some serious potential in this project.

Edited by Grammarsalad
Clarity
Link to post

Can I ask this: I think I read somewhere that you altered effect 206 to act like a conditional protection, similar to 318 or 324 in the EEs (i.e. https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op324)

Is there anything similar to EEs 326 (https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op326)?

 

Edit: also, what about 321: https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op321

 

That is, in bg2

Edited by Grammarsalad
Link to post

This subforum is low volume enough to host also modding discussions.

206: yes, that's the iwd variant. To use it in bg2, you'd have to add a new entry to an ids file and in this case we'd also have to  rename the internal function, since they match in both systems. So trivial stuff.

326: looks like we don't have it yet, but it will need to be added anyway. Do I see correctly it's just an Apply Spell with the same iwd-style targetting?

321: same, but it looks very easy to do, since we do this sort of thing internally all the time.

Are there any publicly available files, users of these two opcodes? Is the IESDP description correct (as far as you know)?

Link to post
3 hours ago, lynx said:

326: looks like we don't have it yet, but it will need to be added anyway. Do I see correctly it's just an Apply Spell with the same iwd-style targetting?

321: same, but it looks very easy to do, since we do this sort of thing internally all the time.

Is the IESDP description correct (as far as you know)?

321: Leaving the resource field empty will remove any effect on the creature without a parent resource.  Level-up Proficiency, HLA markers, Stealth, Turn Undead(Paladins Panic only), etc...   Local Variable effects are however safe (if they are even stored on the creature during gameplay).

326 has a lot of quirks (whether or not they're intended is something else):
Unlike op146, when targeting "Self" or "Original Caster", the resource is still cast on the ability target, not the caster.

For the purpose of dispelling effects only, the target of op326 (not necessarily the caster) determines the caster level for effects in it's resource.  It also determines the "Caster location" saved to the V2 effect on creatures.  It doesn't transfer full ownership though - the caster is still credited for damage.

If the resource uses a projectile other than #(0|Default):

  • effects in the resource that target "Self" will affect the target of op326, not the caster.
  • if op326 is reflected/turned, only effects in the resource targeting "Original Caster" will be affected, now affecting the target.

If the resource uses projectile #(0|Default):

  • the resource will ignore it's projectile field, defaulting to use projectile #(1|None) for all effects.
  • effects in the resource that target "Self", "Preset Target", or "Original Caster" will all affect the target of op326.
  • if op326 is reflected/turned, the target of effects in the resource is reflected.

All of these are also shared with op333 (Static Charge), and op146 param2=2 (cast instant at specific level).

edit: Effects in the resource will also bypass Magic Resistance, of every target, as if the caster targeted themselves, regardless of who they target with the spell or op326.

Edited by kjeron
Link to post
5 hours ago, kjeron said:

326 has a lot of quirks (whether or not they're intended is something else):
Unlike op146, when targeting "Self" or "Original Caster", the resource is still cast on the ability target, not the caster.

This is very useful as you can cast spells differently depending on caster stats. As an example, this spl acts differently depending on the casters wisdom (actually, it's done through an item, a 'healing kit', but same idea):

https://github.com/Grammarsalad/Proficiencies/blob/master/proficiency/lib/heal.tpa#L79

%wis_ls% is set in splprot.2da which references items in stats.ids:

https://github.com/Grammarsalad/Proficiencies/blob/master/proficiency/lib/splprot_attributes.tpa#L24

And

https://github.com/Grammarsalad/Proficiencies/blob/master/proficiency/lib/splprot_attributes.tpa#L43

Edit: splprot.2da:

https://gibberlings3.github.io/iesdp/files/2da/2da_bgee/splprot.htm

 

~80% of my mods make heavy use of these opcodes. I have plenty of other examples if you need them but they all work about the same

 

"edit: Effects in the resource will also bypass Magic Resistance, of every target, as if the caster targeted themselves, regardless of who they target with the spell or op"

Oh, I didn't know about this. Hmm, don't like that at all

Edited by Grammarsalad
Ids
Link to post
Quote

and op146 param2=2 (cast instant at specific level)

Are you saying param2==2 is different from param2==1? We don't have it documented yet, but I don't see how it would differ.

In my testing in 2014 also something else was fishy: contingency spells use type 0 yet expect an instant cast.

@Grammarsalad: thanks, I'll take a look.

 

 

Link to post
13 hours ago, Grammarsalad said:

This is very useful as you can cast spells differently depending on caster stats. As an example, this spl acts differently depending on the casters wisdom (actually, it's done through an item, a 'healing kit', but same idea):

Oh yes, I'm well aware of what it allows to be done with the opcode, but for the purpose of reproducing the opcode, it's an important distinction.

This specific aspect is actually similar to how the Sequencer Activation opcodes work (they target self, but cast their spells on the ability target).  However, sequencers don't share any of those other features.

30 minutes ago, lynx said:

Are you saying param2==2 is different from param2==1? We don't have it documented yet, but I don't see how it would differ.

In my testing in 2014 also something else was fishy: contingency spells use type 0 yet expect an instant cast.

Yes.

op146*p2=0 isn't really "normal cast", as it cannot be interrupted by damage (it's more similar to ForceSpell() than SpellNoDec()), but can specify a level (or leave 0 to use caster level).

op146*p2=1 cannot specify the casting level, it's just instant-cast using caster level for whatever type of spell the resource is.

op146*p2=2 works identically to op326, bar trading the splprot filter for a level specifier, but otherwise has all the same quirks.

Not sure what you mean by contingency spells, they no longer use op146.  The op146 they did use was a cheap way to prevent you from casting other spells immediately after the Contingency, as the Contingency spells ignored the once/round rule (they no longer do).  All it did was interrupt whatever you were doing 4 seconds later (were it instant it would not interrupt you).  The spell they cast is labeled "DO_NOTHING", and has no effects, so I don't think it had any other purpose than to interrupt you.

Link to post

 

11 hours ago, kjeron said:

Oh yes, I'm well aware of what it allows to be done with the opcode, but for the purpose of reproducing the opcode, it's an important distinction.

Lol, I would never claim otherwise.  I was just using that as a jumping off point to introduce an example.  

Btw, I'm having a blast playing around with GemRB.  I'm going to start creating GemRB specific components for my mods.  I'll be keeping notes on everything new and interesting I find, and I'll be happy to help with documentation and tweak ideas.  

Link to post
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...