">=" does not appear to work in gc_journal_entry
#1
Posté 05 janvier 2012 - 02:40
Has anyone else noticed this? According to the documentation, gc_journal_entry is supposed to work like gc_local_int which, I am pretty sure, accepts >=.
#2
Posté 05 janvier 2012 - 03:49
Have you been overriding the default values, and increasing them by increments of 1 instead?
#3
Posté 05 janvier 2012 - 04:05
#4
Posté 05 janvier 2012 - 05:46
I've got a modified and adjusted version of the convo scripts, i already added support for using D&D style die roll strings ( ie if you put 1d6, 1d20 or 1d4+1 or even 4354+3d25-45 would see where the dice are and add and subtract whereever a + or - is. ) Basically recreating the parsing routines used in real programming when you compile code to assembly.
Its something which if added, would be backword compatible with existing conversations ( assuming no one is doing it yet, or if they do it they intend for it to work )
#5
Guest_Iveforgotmypassword_*
Posté 05 janvier 2012 - 10:13
Guest_Iveforgotmypassword_*
#6
Posté 05 janvier 2012 - 11:44
only the leftmost character is checked, for values of ">" "<" "=" "!" ....
.
#7
Posté 05 janvier 2012 - 04:09
DannJ wrote...
Journal entries by default tend to increase in a progression of 1, 11, 21, 31, etc. It would seem there is a reason for that - so that you can say '>10' or '>20' and be sure to get what you want from gc_journal_entry.
Have you been overriding the default values, and increasing them by increments of 1 instead?
Yes. I always start at 10 in case I want to get something in at the beginning.
#8
Posté 05 janvier 2012 - 04:10
Iveforgotmypassword wrote...
Why not just put >19 it's the same do it like this and you'll never need an = again !
That is what I ended up doing.
#9
Posté 05 janvier 2012 - 04:18
The comments in gc_local_int are basically correct:
string sCheck = The operation to check on the value of the variable.
Default is ==, but you can also specify <, >, or !
e.g. sCheck of "<50" returns TRUE if sVariable's value is <50
a sCheck of "9" or "=9" returns TRUE if sVariable's value is equal to 9
and a sCheck of "!0" returns TRUE if sVariable's value is not equal to 0.
It should say Default is "=", but you can also specify "<", ">", and "!".
Regards
Modifié par Kaldor Silverwand, 05 janvier 2012 - 04:23 .
#10
Posté 06 janvier 2012 - 07:22
For any value using this function, which is technically the second parameter, it can use a standard die roll syntax. ( a string like 1d4, 1d6 ). This allows you to do things like ">=1d20" which allows random results, which i think will add a lot more versatility to how this works.
While it probably won't matter, as there are alternatives as just putting one number lower and this is redundant, it is a lot easier to use the correct operator and let the computer figure things out for you. Really there is a reason features like this are added, they make code easier to read for the person setting things up, and when end users assume things should work a certain way, it's far easier to re-program the computer than it is to re-program the person. Since it only does something when you use the 2 letter operators and existing conversations will not use those, it really remains up to the person setting up the conversations and will work as is with any old modules out there - might even fix some error caused by the writer assuming he could use ">=".
Note that you should use Kaldors examples, as the 2 letter operators I'm describing or the die roll options won't work with the vanilla scripts that come with the game, and you'd need to install the next release of the CSL library after i've installed this as a new feature.
#11
Posté 06 janvier 2012 - 10:28
#12
Posté 06 janvier 2012 - 10:35
http://70.179.46.242.../csl/index.html
The server for nwn2 went down for a bit on gamespy, had to restart it to get it to show up again. That is served on computer next to the NWN2 server i am running on a very simple apache server.
Modifié par painofdungeoneternal, 06 janvier 2012 - 10:36 .
#13
Posté 06 janvier 2012 - 12:06
The reason is for when you forget/discover the need for intermediate steps in your quest, you don't have to redo stuff all over the place.DannJ wrote...
Journal entries by default tend to increase in a progression of 1, 11, 21, 31, etc. It would seem there is a reason for that.





Retour en haut






