Jump to content

[solved, kind of] Need help with splprot.2da entry of type 0x106 (area type)


argent77

Recommended Posts

I'm trying to make a consumable item that does only work outdoors. So I tried to use opcode 318 (Protection from spell) with splprot.2da type 0x106 (areatype) where area type doesn't match bit 0 (OUTDOORS).

NOT_OUTSIDE   0x106      0x01       9

But it doesn't seem to work. I also tried different match operators without success. Does this particular type even work?

For now I have to resort to the helper creature approach, but I'd rather do without it.

Edited by argent77
Link to post

318/324/326 check the splprot status of the target of the spell. I'm not sure whether/how you can reasonably use areatype with a target.

 

(You can do a bit of fun target hacking, like I have a 248 on-hit effect wherevthe resulting .eff uses target 9 (original caster) and the resulting .spl uses target 2 (preset target) so now the on-hit effect evaluates the state/stat/etc. of the caster, to conditionally cast a spell at the target.)

Link to post

I'm not so sure if target is really always needed. There are also checks for time of day and current chapter, which both don't really need a target. Unfortunately there are no area type checks in any of the vanilla EE games, so I can't really say if the problems lies with the splprot type or my implementation of it.

Link to post

Unfortunately there are no area type checks in any of the vanilla EE games, so I can't really say if the problems lies with the splprot type or my implementation of it.

Erhm, the druid call lightning has ... the games .spl flag's has outdoors only flag.

Edited by Jarno Mikkola
Link to post

I'm trying to make a consumable item that does only work outdoors. So I tried to use opcode 318 (Protection from spell) with splprot.2da type 0x106 (areatype) where area type doesn't match bit 0 (OUTDOORS).

NOT_OUTSIDE   0x106      0x01       9

But it doesn't seem to work. I also tried different match operators without success. Does this particular type even work?

 

For now I have to resort to the helper creature approach, but I'd rather do without it.

Does this not work?

post-5210-0-28332300-1522421110_thumb.jpg

Link to post

Not in my case. In addition to "Outdoors" I'm using a custom area type (added via areatype.ids) that has to be checked too. Using splprot.2da area type check would be perfect for my needs, if I could figure out how to make it work.

Link to post

 

I... think there is a bug with the area type check :(

That's too bad. It means I have to keep using the helper creature for a while. :(

Depending on what you mean, you could use the area's own script as the "mark", as you can extend the script file with the needed scripting to do the actions... but that might be exactly what you try to avoid, I suppose.

Link to post

There are other things you could do. You could extend the area scripts fir whatecer areas you're talking about to apply a spellstate to PCs while they are there. And then use 326/splprot to filter by that spellstate.

 

Still uses scripting, but it doesn't rely on firing a script (through a creature) as part of a spell being cast. Which for some reason I like to avoid.

Link to post

Using a helper creature works well enough for now. There is a random delay between using the item and the helper creature script being fired, but it's small enough to be tolerable. I'll switch over using splprot effects when the area type check has been fixed.

Edited by argent77
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...