LUCKY 7 ABILITY [2K3]

Posts

Pages: 1
So, I've recently decided to add a new ability to my game to make it more interesting and unique (or to at least fit in with the character's gimmick. She uses Gadgeteer/Tinker abilities from FFTA/FFTA2, which if you don't know, are abilities that have a 50% chance of working on either your entire party or the enemy party, and her secondary command is a Slot type ability, minus the Slots). This ability, as you can guess, is the Lucky 7 ability. Now, my question is, can I mimic what it does in FFIX? For those who don't know, this is what it does in FFIX:

If the last digit of Zidane's HP is 7, then the skill will either deal 7, 77, 777, or 7777 damage

Is it possible to mimic this precisely, or will I have to forgo the whole last digit HP thing and just have a 30/30/30/10 chance for the damage?
Store the hp value into variables for the 1's, 10's 100's place, etc and compare the 1's place against the number you are looking for.

You could even check all the places and make it deal extra damage if the hp score is 77777.

What I usually do whenever I'm doing a picture based menu or whatever is to copy the hp (or the value I'm checking for) into a variable. Lets call it TempHP.

Label 1
If TempHP >99
Hundred'sPlace + 1
TempHP - 100
End
If TempHP>99
Goto Label 1
End

Label 2
If TempHP>9
TensPlace +1
TempHP - 10
End

If TempHP>9
Goto Label 2
End
Label3
If TempHP>0
One'sPlace = TempHP
End

If One'sPlace = 7
Fun Stuff Happens!
Alright, coolio. Got this ability set up (used something that I was told on another forum, setting current HP and then doing Modulus 10 and checking that way). That seems a lot easier to do too. @_@
Sure, if you want to do things the easy way, but where would be the fun in that?

I just went with what I started using back in 2k. The Modulus function gives me an idea for something else though. Technically, one could track 10 states with each numerical place in a variable, of which you get 7, un-modified. That should give you a total of 282475249 possible states per variable.

Using pointers, lets say you feel like stopping at 10,000 variables beyond the 5,000 that show in the editor.

That would give you a total number of 4237128735000 possible states, and you could go even higher with theoretical variables, so...


Nobody should ever run out of "switches" ever again.

Of course, I am severely sleep deprived so my math could be a little off, but still - there is some great potential here for switch limit workarounds.
I have no idea what you are talking about here at all lol. You lost me with the 10 states part @_@
It doesn't really relate to the lucky 7 ability, but here goes.

Lets say, for some reason, a person ran out of switches, but still has events left to build.

You could use variables as switches, and you could track multiple states for a single variable. Lets say a variable is set to 1234567. With the modulus command you could read it back as 7, 67, 567, 4567, 34567, 234567, or 1234567. You could use the one's place to track 10 different states, being 0-9. It just grows out from there.

You could store a lot of information in a single variable, and then let the events read it back out. For a custom battle system, you could use the ones position for the type of attack (up to ten different choices, or nine and a null), the tens place for the target, the hundreds place an added effect, the thousands place for whether the attack hits/misses/goes critical in either direction, and so on.

You can have almost every bit of data you need shoehorned into a single variable.

From basic testing, it doesn't appear to let you grab each place individually, but you could filter previous checks back out to work around that.
Ah, I see. That's actually relatively clever, though would you have to call the variable and use the Modulus command each and every time you want to do it, or call the variable and Modulus command only once the entire time in a single event?
I always try to work with indirect variables. I built my events around a specific set of them, and then use commands to put the values from character specific variables into the ones I use in the event.

It was an approach I figured out during the inventory and picture coding section of a point and click adventure I was working on a few years back in RM2k/3. If I used referred variables, it made it much easier to add new functions in. I just had to make an event to transfer the info from the new object into the existing routine. It let me add in new objects just by making a new index number for them and storing their pixel dimensions so they would be properly click-able in the menu.

Of course, the Modulus encoding could also come in handy if you wanted to "protect" your variables in an RM2k3 game. Instead of there being a clear "Pieces of Treasure to complete dungeon" variable that anyone could mess with by F9'ing during a test play, the required variable could be nested within any seven digit number, which you could go ahead and use pointers to throw beyond the 5000 range that is even visible in the debug menu. You could even set it so that each time a new game was started, it would randomly assign a decimal place to check for relevant info, as long as you kept track of the address and made any future calls reflect that.

But I'm kind of way off the main track of your topic though, so I'm going to stop now!
Well, thinking of the modulus command, I'm wondering if it's not possible to do something like this with say, Level ? Holy (yes, you made me think of another ability I wanted to put in the game). So that people know what I'm talking about, copy/pasted from the FFWiki:

"Level ? Holy, also known as L? Pearl, is a Lore learned by Strago Magus that deals Holy damage to all enemies whose level is a multiple of the last digit of the party's current gil. In other words, if the enemy was level 44, and the party's gil amount ended with the digit 2, it would work, but if it ended with 3, it would not. Also, if the final digit is 1 or 0 (although there is no logical way to divide by 0), it will hit all enemies, guaranteed"


Obviously, this won't be used on enemies since they don't have levels (unless you manually put in levels yourself since they were silly enough to not let you give enemies levels), but would it be possible to do at all?


In addition, speaking of Levels, there's also an ability called Dark Shock/Dischorder, which halves the target's level. If you do this in battle, would it reset to the right level after battle, or would you have to put the character's actual level in a separate variable and call it after battle to fix levels?




(There was another ability I wanted to ask about here as well, but I completely forgot about it while thinking about this one....confound it all...).
author=Xenomic
Obviously, this won't be used on enemies since they don't have levels (unless you manually put in levels yourself since they were silly enough to not let you give enemies levels), but would it be possible to do at all?

You want the enemies to have skills like Lvl 5 Death, that would only effect party members who meet the criteria? Entirely possible. Make the enemy skill turn on a switch, and you can put the event code for targeting on the page with that switch as a trigger.

author=Xenomic
In addition, speaking of Levels, there's also an ability called Dark Shock/Dischorder, which halves the target's level. If you do this in battle, would it reset to the right level after battle, or would you have to put the character's actual level in a separate variable and call it after battle to fix levels?

The level drop remains after battle ends, so in the event page the skill triggers, you should make sure to record the target's current level before you knock it down. That way you could restore it later via an event.
Well, I already know about how to do Level 5 Death for the party. I meant I'd have to give the enemies themselves levels via coding since Enterbrain or whoever didn't give a Level field for enemies. So if I made Level 5 Death an enemy skill usable by a Blue Mage to use on enemies, then I'd have to do it that way (granted, I'd only have to check to see the level of the enemies instead of doing modulus, unless I made abilities that increased/decreased levels...not that that would matter at all for enemies. I'm just curious if Level ? Holy is possible to do in 2k3 (or if modulus would be helpful with that bit like it is with other Level spells...though I have a feeling it'd require a bit more coding with this one. Probably the same type of coding for this ability used for both levels and money, then check one against another).


I see. I'd probably want to record the target's current level at the very start of the battle in the Turns Elapsed event instead (since if the skill would be used again in the same fight on the same character, it'd call the variable again which would more than likely override the recorded target's current level with the new level) and in the Battle Cleanup common event have it restore the levels to the correct values?


Another reason I asked about the level is that I had the idea of having an accessory that changes the character's level to a fixed level. For instance, once the character equipped the accessory, the game would prompt for the player to choose a number to decrease your level by (this was meant for sidequests that had a level cap...not sure how much this idea will be used though, or if at all), and then the character's level is at that level until the accessory is removed.
If you handle the effects of the skill in a battle event page, you can do almost whatever you want. An easy Level X Death/whatever on an enemy could be accomplished simply by making up a level for the enemy in your head, and then making them weak to the skill and setting the other attributes to 0, so that anyone who wasn't weak to the skill would not be effected.

There's nothing keeping you from pretending the enemies have levels. You could even put it in their name to keep things straight. Lv 44 Catopbleas or whatever. Store the money amount in a variable, use modulus to grab the last digit and do your if/then work in a battle event for the skill.

Just remember, without patches (I'm not sure if there is one to address this yet since I haven't used many besides Powermode) I believe you are capped to 100 battle event pages.

Plan accordingly.
I actually didn't think of putting it in their name truth be told (considering how long some names get...). May actually do that.


I'm thinking it might be possible to do the If/Then work in a common event actually in the event that I change anything in it. It does seem like it'd be easier to do than I thought though.


Aye, that's the biggest issue I've had thus far is the lack of battle events (no patches so far for this, but never heard of Powermode). I've been trying to plan as best as I can (I put 28 battle events into one common event, and another battle event in the Turns Elapsed event, so saved about 29 battle events, dropping from around 75 to 40 something). Not enough pages though when there's so many ideas floating around that requires them ;_;
If you're using the DBS in any way shape or form, especially if you are bouncing out to common events or using the key input function, you might want to steer clear of Powermode.

I used it for a point and click type game due to its mouse support function, the ability to create animated title screens as well as quick save/load functions, and the ability to track the entire keyboard for input. I've had it cause errors in complicated DBS modifications before, so I don't tend to use it in anything even remotely dependent on the DBS.
Pages: 1