Jump to content

Photo

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


15 replies to this topic

#1 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 30 March 2018 - 03:07 AM

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, 31 March 2018 - 01:59 AM.


#2 subtledoctor

subtledoctor
  • Modders
  • 2766 posts
  • Gender:Male

Posted 30 March 2018 - 04:36 AM

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

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#3 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 30 March 2018 - 05:34 AM

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.



#4 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6789 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 30 March 2018 - 06:32 AM

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, 30 March 2018 - 06:32 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#5 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 30 March 2018 - 06:40 AM

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?

Spellflag.jpg


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#6 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 30 March 2018 - 06:54 AM

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.



#7 Avenger

Avenger
  • Modders
  • 3803 posts
  • Gender:Male
  • Location:Hungary

Posted 30 March 2018 - 11:41 AM

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



#8 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 31 March 2018 - 01:57 AM

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



#9 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6789 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 31 March 2018 - 02:33 AM

 

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.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#10 subtledoctor

subtledoctor
  • Modders
  • 2766 posts
  • Gender:Male

Posted 31 March 2018 - 05:19 AM

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.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#11 Galactygon

Galactygon

    Nostradoctopus

  • Modders
  • 728 posts
  • Gender:Male
  • Location:Sweden

Posted 03 April 2018 - 09:01 AM

There are a limited number of splstates (255) so I would only use new slots sparingly.


Posted Image

Posted Image

#12 subtledoctor

subtledoctor
  • Modders
  • 2766 posts
  • Gender:Male

Posted 03 April 2018 - 09:47 AM

Well, whose fault is that? :p

 

There are about 100 free spellstates, and about 6 mods which add them.  The situation is okay, for the time being.


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#13 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 03 April 2018 - 09:56 AM

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, 03 April 2018 - 09:56 AM.


#14 hook71

hook71
  • Members
  • 141 posts
  • Gender:Male
  • Location:Hok, Sweden

Posted 13 April 2018 - 10:34 PM

@argent77 - Could you test if this works better in the 2.5.15.1 build (current beta for BG:EE)?



#15 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 14 April 2018 - 01:03 AM

It works in BG:EE 2.5.15.1! :)





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users