Potion of Hiding & Potion of Sneaking do nothing?

Discussion in 'General Modification' started by Rudy, Mar 15, 2015.

Remove all ads!
  1. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Thanks for the catch on the Potions; missed that for those two when I made the CL 9 versions. Fixed it for the next version.

    As far as the crafting, I already have the shortened names. That is done by the item_creation_names.mes file under data\mes. See entries starting at 8020 there.
     
  2. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Ah, I see what you meant by the double call. Brief testing indicates it happens with double application of the Protection from Elements spell as well. (aka, this is not a problem introduced by my changes :) )

    I lean toward a lack of sound being better than an eternal graphical ring, but I'm going to see if I can figure out why that is happening. It's something that could easily happen in normal play, too: if one Protection from Fire gets down to, say, 2 points remaining, you might just apply a second one rather than let that one finish completely.

    EDIT: Oh, regarding the potion names, see this post to see how it should look.
     
  3. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Why do I always forget about that item_creation_names.mes file. :blush: Forgive me.

    It's really a beautiful thing to see, and have them all available both for crafting and for random finds in treasure hoards.

    Brew Potion.jpg

    I notice that a lot of key potions are still missing, and there are over 850 available slots in protos.tab. (hint, hint) Potions like Cat's Grace, Owl's Wisdom, Bear's Endurance, Fox's Cunning, Shield of Faith, Protection from evil/chaos/good/law, Barkskins of various levels, and many more.

    Also, do you think the potions of sneaking/hiding/vision/glibness could be craftable?


    EDIT: lol, you beat me to the punch with the picture while I was posting.
     
  4. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    From your screenshot I take it you elected to keep the original icons? I don't mind, just curious.

    These should all be fairly easy to add; I don't want to get into adding too many different levels of most potions, though, because that may be made redundant by future work that allows variable level crafting.

    They certainly could be. The problem is that, since they do not exist in PnP, any requirements I would create for them would be somewhat arbitrary. I suppose you could give them the same requirements as the corresponding elixir. I wouldn't mind it, because Brew Potion can always use more love, but I'm not sure what the general opinion on such a thing would be.



    Still trying to figure this Protection thing out. Found out how to play sounds manually in spell files; if I can only find the right ones...
     
  5. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Yeah, I had to stick with the unidentified color, as I'll be having these show up as random treasures over the course of the campaign, and I don't want to give away what they are before they are identified. I know read magic is a cantrip and they'll be know almost immediately in most cases, but I'm sticking with the unknown factor for now.

    I'll probably add all the potions I listed above myself; as you said pretty easy. Some others might be Shield, Expeditious Retreat, Mirror Image. There's no hoops to run thru like you did with the protection stuff so it should go quickly. I think at least all 6 of the ability buff spells should be available.

    One last thing, if you think you will update a fixed release with that bug I found. Ioun Stone Scarlett and Red should be Ioun Stone Scarlett and Blue. I know that's a little off track from what your are doing, but it's one of those pesky things that has bothered me.
     
  6. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Re. the particles bug

    I think that's because you're manually applying a particle system via script

    Code:
    	target_item.obj.condition_add_with_args( 'sp-Protection From Elements', spell.id, spell.duration, element_type )
    	target_item.partsys_id = game.particles( partsys_type, target_item.obj )
    You should change it so that it checks if the condition was actually applied:
    Code:
    	if target_item.obj.condition_add_with_args( 'sp-Protection From Elements', spell.id, element_type , spell.duration):
    		target_item.partsys_id = game.particles( partsys_type, target_item.obj )
    I've tested and it seems to work fine. You may also wish to add a 'fizzle' sound and particle system though.

    Alternately, you can play a sound manually via script, if you want to allow potions to stack (though it seems it wasn't intended to be so). For the 'protection from elemenets' effects it plays sound # 13390.

    As for the element_type not accounting for 16 or greater, that is probably a bug. Or is Sonic not considered an element? The next elements in the element_type enum list are
    'SONIC': 16,
    'TELEPORTATION': 17,
    'AIR': 18,
    'EARTH': 19,
    'WATER': 20,
     
    Last edited: Mar 23, 2015
  7. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Yep, that fixed it. :thumbsup:

    The particle effect on the 'dud' potion was never being removed I guess, since the spell will never actually end. So now we have the sound without the possible lingering halo effect.
     
  8. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Yup, that fixes the base spell as well. Thanks, Sitra; I'll document and include the fix to both the base spell and the potions I made in the next iteration of my thingy.

    Resist Energy & Endure Elements have the same issue, so I'll fix that too, both for the base spell and the potions.

    Best guess now is that this is some sort of weird workaround to deal with the fact that the sound played varies based on the element (which is unique to these spells; no other spells that I can think of have differing sounds based on how you cast it).


    I do regret that there is no way to "override" an earlier Protection from Elements, though. Like if your first Protection from Fire is down to 2 points, and you try to cast another, what should happen is that the new one overrides the old one, giving you a full 60 points, for example. What does happen is that the new casting fizzles completely.

    Is there a way to get a useable list of active conditions on a target? I'm hoping there is a way to check to see if there is a specific condition on someone and, if so, manually end the associated spell.
     
  9. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Just FYI that I am in the process of making these, in case you wanted to wait and copy them rather than duplicate the work yourself.

    Mirror Image, Expeditious Retreat and Shield, which you also mention, are not valid potions because they are 'Personal' range only spells, which cannot be made into Potions.
     
  10. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Regarding Caster Level of brewed potions:

    I'm noticing inconsistencies in the caster level of potions crafted. When a pc brews a potion, the caster level of the potion is not always set to the level in the proto. If the spell is based from a spell with the "INTERNAL" label attached (like 'Potion of Haste (INTERNAL)' domain_special 3), then the potion CL will always be set to the level in the proto. However, if it is based from a normal spell (like 'Bulls Strength' domain_special 2), the caster level is almost always set to the level of the crafter.

    But I've noticed it can sometimes be set to the level in the proto too, though I'm not sure what causes this.

    For example I had an 11th level Cleric brewing Resist Energy potions, and whether he chose to brew the CL3, CL7 or CL11 version, the caster level still came out to CL11 version (Duration 110 minutes, DR 30). Then I did it with a sorcerer and the correct version was made. I don't know if the inconsistency was because of class or maybe what had been brewed before, or what had been drunk before. (I want to make it clear that I timed out each potion he drank before taking another one, and I never had 2 potions in effect at the same time, so stacking issues were not involved.)

    I'll keep testing, because this may be a concern.
     
  11. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    The way I believe it works is that IF the caster can cast the spell that the potion duplicates, then it overwrites the caster level of the proto with the caster level of the caster. This happens with cure potions, for example (I've done extensive testing on those). It's not the 'INTERNAL' label that does it, it's the fact that the PC does not have that spell on their list.

    In theory, creating separate spells as I did should bypass this. 'Resist Fire', for example, one of the spells I created, is not on anyone's spell list; they all have 'Resist Elements', which means they should be unable to overwrite the base protos level of the potion. And indeed, all of my testing so far confirms this.

    The fact that it seems that your cleric is doing so is reason for concern. I have been unable to duplicate that with my crafters, but let me know what else you have found out.
     
  12. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    I think I've got it. Oversight on my part.

    Go into data\rules\spells\593 - Resist Sonic.txt. Remove the "Clr 2" from the Level entry. That should resolve the issue with your cleric overwriting the spell level.

    Basically, I'm an idiot and put my custom spells on the cleric spell list.

    Thanks so much for your testing on this.
     
  13. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Yep, that's it, it gives them the spell as known, since clerics know all spells.

    Cleric Spells.jpg
     
  14. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Okay, yeah, I confirmed that is the cause of the problem. If you look at the spell list of the cleric you are testing with, you will see that he/she actually has "Resist Fire" and so on on their spell list, which they should not.

    The fix is to edit the data\rules\spells\5xx - Resist x.txt files, to remove them from the cleric spell list. Similarly for the protection from x.txt files. I will make the change for the next iteration.

    If they are already on the spell list of the cleric, though, making this change will not remove them from it, it will just prevent them from being added to the spell list of clerics.

    EDIT: Ninja'd
     
  15. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Okay, fixed for next iteration. That's what I get for only testing with a druid and wizard.

    Thanks again.
     
Our Host!