collapse

* Notice

Important notice: Currently emails from this forum are being automatically blocked by many email providers, claiming Planetvampire.com has a "low reputation". As such you may struggle to register and/or submit password reset requests. If you require help, please email admin@planetvampire.com for assistance. In the meantime we are continuing to work on this issue.

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: One reason dialog checks that appear correct sometimes fail.  (Read 636 times)

Offline Norrwin

  • Ancillus
  • ***
  • Posts: 217
  • Reputation: +5/-1
One reason dialog checks that appear correct sometimes fail.
« on: October 03, 2022, 10:02:31 pm »
A long time ago there was a discussion where I said something like: the check pc.perception sometimes fails when it should succeed but pc.base_perception never seems to fail. Which was an accurate observation but not an accurate conclusion.

The root cause of this apparent inconsistency is that pc.base_perception is instantly updated/consistent with the character sheet but pc.perception only updates after some event happens to trigger the update. Sadly, I don't know what the events are. Changing maps, equipping a weapon, changing armors all seem to trigger the update but I can't say definitively.

I don't literally mean pc.perception, I'm just using that as an example that some character attributes can be out of sync with the data on the character sheet. What typically happens is the player realizes they need to upgrade some attribute to pass a check. So they pop open the character sheet, spend the points, then immediately initiate dialog... and the check fails. Where it looks like it should pass based on looking at the character sheet.

In my mods I created some bad dialog condition checks based on the idea that pc.base_xxxx was "better" than pc.xxxx but the reality is that sometimes pc.base_xxxx is fine and other times only pc.xxxx can be used. In that case I don't see any solution except to live with the fact that some checks will fail that should pass and players will be confused.

Offline Avadonica

  • Methuselah
  • ****
  • Posts: 356
  • Reputation: +11/-0
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #1 on: October 15, 2022, 08:22:09 pm »
I have a similar situation but with another player's check feat(eg Persuasion) + variable(eg G.Know_secret == 1)
I still don't get why in one dialog will work solution: Persuasion 4 and G.Know_secret == 1
And in the other will work only Persuasion 4 & G.Know_secret == 1.
Where's the secret of this focus?

Offline tarulu

  • Antediluvian
  • *****
  • Posts: 505
  • Reputation: +7/-0
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #2 on: October 16, 2022, 02:06:25 am »
I think this is the same problem I had with humanity checks.


Offline SCO

  • Methuselah
  • ****
  • Posts: 432
  • Reputation: +10/-4
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #3 on: October 18, 2022, 01:20:03 pm »
Ironically, this 'appears' to be a problem in a mod i'm making to replace bloodbuff by a combined discipline (the effects of celerity and auspex (maybe will try obfuscate later) and some other things.

I'm using the variable 'Level' as a ... well, variable. Since it's not used by the engine as far as i know, i'm using it as a scratch pad to calculate multi-variable conditions inside the discipline, reseting it to zero at the start and at the end (not the end of the start, the real end of the discipline). This is needed because there is no way to other 'memory' available (python is not available in stats.py).

Level is then used as 'Min' of some disciplines (like celerity). This has the effect of turning on celerity when that other discipline is turned on (and level is left say say, 5, that's celerity 5). (btw this has no problems with activating the 'real' celerity. If the new discipline is active and larger than current celerity, celerity doesn't start, if celerity is larger, the effect running is the 'real' celerity until it runs out then the other takes over).


Anyway, that aside, this is one of those variables that have that cache problem (if i start, then end, the Level still reports something > 0). It just apparently never matters, because 'activate discipline' is apparently one of the things that make this cache update. Anyway if i cancel it, celerity DOES NOT continue even if the level reports 5. It's a bit strange.
« Last Edit: October 18, 2022, 05:14:21 pm by SCO »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 8370
  • Reputation: +926/-31
  • Unofficial Patcher
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #4 on: October 18, 2022, 03:25:15 pm »
Good luck with your combi discipline, I had similar issues with making the hunter Numina work because they are not saved correctly or carried over to a new map!

Offline Norrwin

  • Ancillus
  • ***
  • Posts: 217
  • Reputation: +5/-1
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #5 on: October 18, 2022, 04:55:02 pm »
I have a similar situation but with another player's check feat(eg Persuasion) + variable(eg G.Know_secret == 1)
I still don't get why in one dialog will work solution: Persuasion 4 and G.Know_secret == 1
And in the other will work only Persuasion 4 & G.Know_secret == 1.
Where's the secret of this focus?
In the Mod Dev Guide by Dheu section IV.3  Special Conditions and Colored Responses it explains that only the & operator should be used. When I read that entire section IV and started strictly following it, I saved myself a lot of trouble and discovered a few things.

Apparently, the dialog parser is very fragile and when it breaks or has failures they aren't reported anywhere. Or I don't know where they are reported. In my case I missed a closing parenthesis on a special conditions line. That line worked fine but lines with a special condition check following that line might or might not work. The root of the problem was on line 131 and the symptom of the problem manifested itself 700 lines later on line 831. Which can be a tough issue to solve if searching for the root cause of the issue.

A few things I found that helped me. Strict adherence to the guidelines in the Mod Dev Guide. Opening the dlg file in the SDK Dialogue Editor tool sometimes captures formatting errors. And investigating if the pc and npc pointers are correctly exported during dialog for dlg files that use pc and npc. If they are not, it is almost a sure sign that some error happened with the parser.

What I mean is even though something like Persuasion 4 and G.Know_secret == 1 might "appear" to work it is risking creating issues for lines that follow it if the parser has issues with it. In my experience writing lines like that will create issues later on, and very difficult to diagnose issues.

Offline SCO

  • Methuselah
  • ****
  • Posts: 432
  • Reputation: +10/-4
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #6 on: October 18, 2022, 05:08:56 pm »
Good luck with your combi discipline, I had similar issues with making the hunter Numina work because they are not saved correctly or carried over to a new map!

It works, and even crosses maps. However, i had to keep the normal fist weapons on one part of the discipline (why i needed a variable, it loads the claw weapons on some conditions - low blood - and has to distinguish between toreador and not).

The reason why i couldn't just remove and re-add the fists is because if you change maps, python scripts add the fist weapon if they're not there. Probably because some ancient bug or something.

Anyway, if i had removed it with a trait effect, when changing maps a new fist weapon would be added - which is ugly because of the notification - then when i cancelled or waited it out, it would end with two fist weapons. If i just add the claws, the user can't select the hands anyway (because of the Excluded_Equipment trait), so it's ok, if a bit ugly.

Protean appears to be hardcoded in the engine to cancel the discipline on changing maps so it doesn't have this problem.

« Last Edit: October 18, 2022, 05:18:45 pm by SCO »

Offline SCO

  • Methuselah
  • ****
  • Posts: 432
  • Reputation: +10/-4
Re: One reason dialog checks that appear correct sometimes fail.
« Reply #7 on: October 18, 2022, 05:16:38 pm »
I believe that only the python engine is affected by this cache delay. That would explain why the console read 'pc.level 5' on my test of the my new discipline, but it didn't run celerity anymore after the discipline ended.

The console must be linked to the some kind of python cache, not the 'real engine' that controls the disciplines. So it didn't affect me because the whole discipline was coded in stats.txt

Good luck finding out how to avoid this one. It's quite probable that _some_ command accessible from python allows this to show the correct value.
« Last Edit: October 18, 2022, 06:56:33 pm by SCO »

 

SimplePortal 2.3.7 © 2008-2023, SimplePortal