by GB » Fri Jul 04, 2008 4:08 pm
So, I gather I could do something like:
If condition 1 then
goto 30
if condition 2 then
goto 30
if condition 3 then
goto 30
if condition 4 then
if condition 5 then
goto 30
SET SUCCESS = 0
SMSG 14
goto 31
30: MAPSET X Y
31: SET M = 0
other execution
STOP
And that would serve to test for (condition 1 OR condition 2 OR condition 3) AND (condition 4 AND condition 5) if those were satisfied it would do the deed on line 30 (for example). If those were not satisfied it would report failure with the success value of 0 AND with short message 14, and then skip over 30, to do some housekeeping and value incrementing that we want to do whether the attempt succeeds or fails.
I've been trying something like this though. (without trying to lists of OR operations yet.) And I have been getting some behavior that I really didn't expect. Blank lines really screw with the functioning of this thing. At one point I had it replacing ANY map square with a door, whether the condition that the GETADJ returned 202 or not. I thought (mistakenly) that the locked door was being stored in variable M, and so put in a line to set M to 0. After making other changes I no longer think this was happening, I think it was just that I had left blank lines and they were screwing with me.
And about the value incrementing and housekeeping:
Setting the lock-pick to work 20 percent of the time seems to work ok, but testing this made me realize that this chance is still too high, if you can just stand around trying to pick the same lock turn after turn. So I figure that I need to have the macro remember that I tried that door already, and not let me try again for a few hours.
This is tricky.
I want it to get a variable that represents that door, and store it somewhere. But hold on; which variable? Not variable M. M stands for generic locked door 202, which is stronger than average and which there are 5 of in this town, and 5 of in each of the next 6 areas, some of which are towns, and some of which are dungeons. It is unique, not in its object number, but in its map location and the description it gives when you examine it. (Most of them just give message 12, "This looks like a rather solid door.")
So, First it seems I must get some other variable in addition to X Y M, something that tells me the region and room, and store that along with X and Y, and not check anything else until the time limit between lockpick attempts has elapsed.
And I have to store these values until all of my countdown variables are 0.
Is this less tricky than it looks to me? Or is it even currently doable?
It seems to me, that what I want, might not be either the map location or the object number, but the instance number, that which tells you that this custom object plays message 12 and not message 11.
And in deciding how flexible the macro should be I ought to take into account what the maximum number of instances 10 custom objects might have.
I think this leads to an excellent question of game design philosophy. How does having support for leveling up an RPG type character stats comport with a very limited number of doors that open to unique keys?
Ultimately I would like the macro to base the chance of success not on a fixed percent, but on a skill vs the lock difficulty, such that some doors could be absolutely certain to open, and others would open various percentages of the time. I'll probably study the lock-pick skill in the Palladium system and mimic its mechanics if it seems appropriate.
It would be good if lock difficulty and door strength could be independently set, but I'm leaning towards creating another skill for forcing doors, simply because I don't think that breaking down a door is something that should always work just because you have a weapon that can do so many points of damage. I want to add some randomness to it, because I think that any time you can keep players guessing it adds to the fun of this kind of thing.
So, I gather I could do something like:
If condition 1 then
goto 30
if condition 2 then
goto 30
if condition 3 then
goto 30
if condition 4 then
if condition 5 then
goto 30
SET SUCCESS = 0
SMSG 14
goto 31
30: MAPSET X Y
31: SET M = 0
other execution
STOP
And that would serve to test for (condition 1 OR condition 2 OR condition 3) AND (condition 4 AND condition 5) if those were satisfied it would do the deed on line 30 (for example). If those were not satisfied it would report failure with the success value of 0 AND with short message 14, and then skip over 30, to do some housekeeping and value incrementing that we want to do whether the attempt succeeds or fails.
I've been trying something like this though. (without trying to lists of OR operations yet.) And I have been getting some behavior that I really didn't expect. Blank lines really screw with the functioning of this thing. At one point I had it replacing ANY map square with a door, whether the condition that the GETADJ returned 202 or not. I thought (mistakenly) that the locked door was being stored in variable M, and so put in a line to set M to 0. After making other changes I no longer think this was happening, I think it was just that I had left blank lines and they were screwing with me.
And about the value incrementing and housekeeping:
Setting the lock-pick to work 20 percent of the time seems to work ok, but testing this made me realize that this chance is still too high, if you can just stand around trying to pick the same lock turn after turn. So I figure that I need to have the macro remember that I tried that door already, and not let me try again for a few hours.
This is tricky.
I want it to get a variable that represents that door, and store it somewhere. But hold on; which variable? Not variable M. M stands for generic locked door 202, which is stronger than average and which there are 5 of in this town, and 5 of in each of the next 6 areas, some of which are towns, and some of which are dungeons. It is unique, not in its object number, but in its map location and the description it gives when you examine it. (Most of them just give message 12, "This looks like a rather solid door.")
So, First it seems I must get some other variable in addition to X Y M, something that tells me the region and room, and store that along with X and Y, and not check anything else until the time limit between lockpick attempts has elapsed.
And I have to store these values until all of my countdown variables are 0.
Is this less tricky than it looks to me? Or is it even currently doable?
It seems to me, that what I want, might not be either the map location or the object number, but the instance number, that which tells you that this custom object plays message 12 and not message 11.
And in deciding how flexible the macro should be I ought to take into account what the maximum number of instances 10 custom objects might have.
I think this leads to an excellent question of game design philosophy. How does having support for leveling up an RPG type character stats comport with a very limited number of doors that open to unique keys?
Ultimately I would like the macro to base the chance of success not on a fixed percent, but on a skill vs the lock difficulty, such that some doors could be absolutely certain to open, and others would open various percentages of the time. I'll probably study the lock-pick skill in the Palladium system and mimic its mechanics if it seems appropriate.
It would be good if lock difficulty and door strength could be independently set, but I'm leaning towards creating another skill for forcing doors, simply because I don't think that breaking down a door is something that should always work just because you have a weapon that can do so many points of damage. I want to add some randomness to it, because I think that any time you can keep players guessing it adds to the fun of this kind of thing.