Hime-Works / Requests

Bug reports and requests that may require longer discussions and is not suitable to leave on the blog
http://himeworks.com/
GNU General Public License v2.0
7 stars 9 forks source link

Stealing from enemies during battle #84

Open HimeWorks opened 10 years ago

HimeWorks commented 10 years ago

There are many things you could steal from battlers.

There are also many ways to implement stealing in your game, with a variety of HUD's and other things. Those are not important to me.

A stealing script would typically focus on a very specific aspect, such as stealing gold, or stealing items.

In addition to stealing, there is a "steal rate", which determines whether you successful steal an item or not. The steal rate can be based on anything, so a formula may be a preferable solution.

There are several stealing scripts available, focusing mainly on drops and items

http://www.rpgmakervxace.net/topic/7441-effect-steal-drops/ http://www.rpgmakervxace.net/topic/232-simple-steal-command/ http://www.rpgmakervxace.net/topic/20568-battle-symphony-v115-skill-effect-steal/

Mine does not come with any graphical stuff beyond a message, while the others come with their own menus.

Roguedeus commented 10 years ago

The problem I have with the currently available 'Stealing' systems is the flat nature of the rates involved and the lack of stat factoring in the results.

Whatever the alternative is, it should support custom formula options per target, and per item type, and per skill used to initiate the stealing action. In my opinion, that is. :)

HimeWorks commented 10 years ago

I think the reason for that is because they've limited themselves by their HUD's. For example, if you want to show that the steal rate is 70%. You can of course calculate that on the fly, but that means you need a way to translate your formula into a percentage.

Simple formulas, like whether a switch is on, or whether you have a state applied or not (these are pretty much 0% or 100%, are easy to do. Other formulas where the steal rate could be 10% in one instance, but 99% in another instance, would cause problems.

Roguedeus commented 10 years ago

Yanlfy's solution manages to allow you to offset the players skill chances with a flat enemy % reduction. But there is no way to factor in differences in AGI or LUK...

# <steal rate: -x%>
# <steal rate: +x%>
# This is the defending modifier used for enemy. All success rate calculations
# will apply the defending enemy's steal rate against success.

I would think that an option to 'Super Charge' your next steal attempt via a big AGI buff, would be something people would have requested. But if they have it wasn't added. Right now the stealing mechanic isn't something I have leveraged much, so I have not looked at altering it myself.

More specifically to your point though, would it be difficult to just assign the % result to a game variable and then reference it in the skill descriptions, etc..., ???

HimeWorks commented 10 years ago

My point was more about calculating the percentage. For example, let's say my formula was literally

rand < 0.5

rand returns a number between 0 and 1, so this should be easy to describe as 50% chance. But...how exactly do I take this formula and show that your steal rate is 50%?

HimeWorks commented 10 years ago

Possible solution to the issue described above:

The steal rate formula allows you to specify the steal rate that the engine uses to determine whether the item is stolen or not, and the steal rate display formula allows you to specify how the engine will display the steal rate.

For things like rand < 0.5, the percentage is obviously 50%, but from the formula alone, I cannot figure that out myself. However, you can make it much easier by just writing down that the chance is 50%.

What about formulas like user.steal_level * user.luk / 5 ? Let's say your actor's steal level is 10, and luck is 5. The formula evaluates to 10...but what exactly does that mean? Is that 10 / 100? Or is it 10/1? To me, that's not important: I simply provide the functionality; it's the dev's job to figure out how to use it properly.

Now say you have a steal rate formula that's just this

<steal rate: s[1] == true>

If switch 1 is on, then the chance is 100%. If the switch is off, then it's 0%. I can't think of a way to write a method that will consider every possible formula that you can think of. Therefore, I would just let the dev write

<steal rate display: s[1] == true ? 100% : 0% >

Very simple, problem solved. I have effectively pushed the problem onto devs while providing a flexible solution.

Roguedeus commented 10 years ago

Put that way, I now understand your conundrum.

What about multiple conditions on a single skill?

<steal rate: s[1] == true>
or
<steal rate: user.steal_level * user.luk / 5>
Roguedeus commented 10 years ago

Personally, I wouldn't display the specific % rate of an action like stealing. I would instead give an approximate likelihood. Such as 'Unlikely' or 'Very-Easy' with % windows...

Certain = 96-99%
Very-Easy = 80-95%
etc...

Maybe keep it simple and only supply three... [Unlikely, Possible, Certain] That way the player is blindly rolling dice and has no real way to know it something is completely impossible, or 100% certain.

HimeWorks commented 10 years ago

If you want to introduce multiple conditions, then I would assign a display formula to a particular steal rate condition and whichever condition is satisfied I would just calculate the percentage from there.

You'd still have to calculate the percentage in order to correctly map it to a category, but I see your point.