Current time: 21.04.2024, 16:51 Hello There, Guest! (LoginRegister)
Language: english | russian  

Thread Closed 
Threaded Mode | Linear Mode
Pandora's API
» технический мод
Author Message
Valery Offline

Posts: 2196
Post: #31

I mean I don't know how to use this:

"In short: %256, %65536" within the code. So first I get the value in y72
then I do what? because if I do y72%256 I get always 0. I am lost...
02.05.2015 21:19
Find all posts by this user
gamecreator Offline

Posts: 7107
Post: #32

Look into the help: y72 means nothing when checking for morale/luck. You need to check y71.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
02.05.2015 21:36
Find all posts by this user
Valery Offline

Posts: 2196
Post: #33

Right, solved for morale and luck, now get correct results with %256.

But neither %256 or %65536 give me valid results for primary skills.

Solved creatures (65536), remains primary skills.
(This post was last modified: 02.05.2015 22:14 by Valery.)
02.05.2015 21:45
Find all posts by this user
gamecreator Offline

Posts: 7107
Post: #34

Show your code.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
02.05.2015 22:22
Find all posts by this user
Valery Offline

Posts: 2196
Post: #35

This allows reading on seer hut/quest guard both quest/reward + date limit (if any) on right-click.


Only this remaining unsolved:
!!VRz3&y70=6:S^+%Y72 %Z4^; y72 gets overflow
(This post was last modified: 02.05.2015 22:43 by Valery.)
02.05.2015 22:29
Find all posts by this user
gamecreator Offline

Posts: 7107
Post: #36

I don't see where you extract primary skill value from y72.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
02.05.2015 22:47
Find all posts by this user
Valery Offline

Posts: 2196
Post: #37

I tried and get strange values, both %256 and %65536 for y72. None is good.

This way then removed wrong code.
(This post was last modified: 02.05.2015 22:51 by Valery.)
02.05.2015 22:50
Find all posts by this user
Valery Offline

Posts: 2196
Post: #38

Ok, I got the right equation:


How is this translated in maths?
02.05.2015 23:07
Find all posts by this user
gamecreator Offline

Posts: 7107
Post: #39

It is equivalent to (y72-1)%256+1, which is equivalent to y72%256 except when y72 is divisible by 256 (then it's 256 instead of 0). Since the bonus to a skill can not be 256 (or 0 for that matter), your expression is the same as the initial one.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
03.05.2015 00:27
Find all posts by this user
Valery Offline

Posts: 2196
Post: #40

Ok, so I leave it as it is right now then, thanks. Mod reuploaded with complete informations.
03.05.2015 00:37
Find all posts by this user
Valery Offline

Posts: 2196
Post: #41

Ok, I have wrong value in the case the first y72 is correct, I guess is related to Seer hut number or position. How can we know when the result is garbage or ok? 36
A solution would be to start %256 process only if y72>100 I think? And let normal value if y72<100 as it is very unlikely that a mapmaker offers more than 100 bonus in a seer?
(This post was last modified: 03.05.2015 00:49 by Valery.)
03.05.2015 00:45
Find all posts by this user
gamecreator Offline

Posts: 7107
Post: #42

Just checked and I see the problem. Computer signed division just works weirdly. Forget everything I (and Berserker) said about %. Use & instead.

(03.05.2015 00:45)Valery Wrote:  Ok, I have wrong value in the case the first y72 is correct, I guess is related to Seer hut number or position. How can we know when the result is garbage or ok? 36
A solution would be to start %256 process only if y72>100 I think? And let normal value if y72<100 as it is very unlikely that a mapmaker offers more than 100 bonus in a seer?
I don't know. Let's hope the problem goes away when you switch to & method.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
03.05.2015 01:07
Find all posts by this user
Valery Offline

Posts: 2196
Post: #43

I think I solved for primary skills:



This gave 100% correct results on "the lone knight" map, where there are 48 seer huts.

Now I have same problem with creatures, so I have to find again.
(This post was last modified: 03.05.2015 01:16 by Valery.)
03.05.2015 01:14
Find all posts by this user
gamecreator Offline

Posts: 7107
Post: #44

No, just use &(number-1) instead of %number. E.g. &255 instead of %256, &65535 instread of %65536. It works.

Alternatively, if you have such liking to % operation, check the result afterwards and if it is less than 0, and the divisor (256, 65536 etc.) to the result.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
03.05.2015 01:22
Find all posts by this user
Valery Offline

Posts: 2196
Post: #45

but I solved the creatures problem also using same way, you advice me to start again and use &?


All huts now work correct.
(This post was last modified: 03.05.2015 01:27 by Valery.)
03.05.2015 01:27
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group