Same Stat handles Accuracy of Close, and Ranged?

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
After doing a bunch of pre-planning, in brain and on paper, which includes some ways to differentiate ranged weapons from melee, it occurred to me that being able to hit a target with a club... and with an AK-47... will both pull from the actors sole HIT RATE%.

Whoa.

Now I like that to hit rate is avoided and based on a separate success stat when using magical attacks...

But I am guessing there isn't a non-plugin core engine way of taking this one step further and having ranged accuracy pull from yet another 'to hit rate type'.

The idea being to have an actor that could potentially be a frail sharpshooter... or a musclebound barbarian that couldn't hit the broad side of a barn with a shotgun. Oh and all in a universe where any character can pick up and use any weapon (granted with varying degrees of success).

Anyone ever tackled this issue head on?
 

jonthefox

Veteran
Veteran
Joined
Jan 3, 2015
Messages
1,320
Reaction score
470
Primarily Uses
I agree, it would be nice if the engine had a separate hit rate for physical and magical attacks (which could be used for a sci fi game that differentiated melee vs. ranged).

The only thing I can think of would be, for one of the attack types (probably ranged), you give particular skills that use the skill's "success rate" as the accuracy rate. the downside of this is that you don't get to factor in the enemy's individual evasion rate (EDIT - whoops, forgot there's magic evasion though too, duh), but for "ranged" attacks, it's not like bullets can really be dodged anyway.
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
For it to happen, we first need to actually have a "ranged" mechanic/tag in the engine coz as it currently stands there's no melee or ranged differentiation. So lets hope they add it and also quite a few ways to make ranged things different to melee ones.

@Jon-thats exactly what success rate does, except that for physical skills, it becomes a multiplier of HIT Rate. Also there's MEV (magical evasion) that actually works as evasion for magical type skills. The only real problem to this approach of using "magic" as ranged is 1) if ur also using actual magic, 2) There's no way to increase the "hit rate" of the "ranged" ratesskills mid-game since the hit rate stat is only applied to physical ones

ofc without plugins and so on..

PS: So basically, I hope they make 3 hit rates, melee ranged magic.. And also that would mean skills will now need the ability to also be tagged as ranged aside from melee,magic,certainhit
 
Last edited:

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
There's no way to increase the "hit rate" of the "ranged" ratesskills mid-game since the hit rate stat is only applied to physical ones
Oooo, can we explore this for a second?

You're saying the issue is we can't toy with "success" in traits right?

However it occurs to me, we can affect MEV... so hear me out on this one...

In a 'using magic as ranged, no actual magic in gameverse' scenario (low fantasy, sci-fi, urban/modern/apocalyptic, etc)...

Couldn't we sort of reverse engineer an mid-game adjustable earn/learn "ranged to hit/evade rate" based on "success" (magic to hit)?

First off, for my clarity, there is no factor that decides the accuracy of a magical attack whatsoever besides that little unassuming success box when paired with hit type magical. Correct? IOW nothing can be set in the traits of an actor/class that improves the to hit rate of a magical attack (aka natural born magic users don't exist in RM world).

If I have that straight...

Couldn't we use hit type magic with the success value being the "ranged to hit" -- and then give all enemies a base MEV, which in this proposed game is their ability to evade ranged attacks. Then have actors that are building their expertise with ranged weaponry slowly reduce MEV of their targets as they become more proficient?
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
Exactly, but can you actually make actors reduce enemy MEV via the default systems as they become "more proficient"?

You can probably do it via states that reduce mev and troop events to add the correct state to enemies but that would end up with the enemy losing MEV without regards to who is targetting them while in this case I believe you would want it to be based on the proficiency of whoever is targetting them.
 

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
What about affecting b.mev in the damage formula box? Either directly or through setVariable?

However, what actually may be even more t̶e̶r̶r̶i̶f̶y̶i̶n̶g̶ revealing about all of this is that there is no way to have a magic user progress/grow their ability to more accurately hit targets with their magic. Of course we've also proven there is no straight forward way to do this with physical accuracy either, alas...

I hope they make 3 hit rates, melee ranged magic.. And also that would mean skills will now need the ability to also be tagged as ranged aside from melee,magic,certainhit
I wonder what kind of scope of project we'd be talking about to script in a third hit rate. Just the tag and a separate to hit rate variable. The model would be an exact copy paste of current hit rate with a new naming convention.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
Erm, the damage formula box is only ran during damage part, which means the skill already hit the enemy before it runs so you cant do that to alter the success rate or the enemy MEV before the skill hits

but, you can also opt to use it to calculate the "actual hit rate", meaning aside from the success chance, you would actually check again in the damage formula for the actual hit. But you'd then want the base MEV of enemies to be 0 together with magic success rate of 100%, so that the ranged skills will always go to the calculation part of your damage formula, meaning you'd actually then asign the correct mev or hit formula using the damage formula itself. Then if the formula results to a miss, you will just force a miss message to the battle log though it will probably still show a 0 damage message.

But then again, if Im gonna do that, I'll just write the hit formulas in scripts and use tags or something as it looks cleaner xD but thats me coz I still always prefer writing in the scripts window. Heck even my damage formulas are mostly in the scripts window and I just use the formula box to call those

as for your 2nd question, any project that will use melee, ranged and magic will benefit from all of them having actually settable, different hit rates.
 
Last edited:

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
Erm, the damage formula box is only ran during damage part, which means the skill already hit the enemy before it runs so you cant do that to alter the success rate or the enemy MEV before the skill hits
Right, I might be OK with altering it after the damage, as long as it was permanent. So then the subsequent combats would use the reduced MEV to calculate.

but, you can also opt to use it to calculate the "actual hit rate", meaning aside from the success chance, you would actually check again in the damage formula for the actual hit. But you'd then want the base MEV of enemies to be 0 together with magic success rate of 100%, so that the ranged skills will always go to the calculation part of your damage formula, meaning you'd actually then asign the correct mev or hit formula using the damage formula itself. Then if the formula results to a miss, you will just force a miss message to the battle log though it will probably still show a 0 damage message.
I am not sure what you mean by success chance vs actual hit. Do you mean the percentage chance it had of hitting vs what it actually rolled? Because in our scenario, for a "ranged" combat (magic combat) there would be no HIT param, as in physical hit rate % (right?).

Also it sounds like you are dangerously close to describing checking for hit, prior to damage, in the formula box.

Very curious on all of this if you are able to expand (or even toss out a formula string for clarification)

But then again, if Im gonna do that, I'll just write the hit formulas in scripts and use tags or something as it looks cleaner xD but thats me coz I still always prefer writing in the scripts window. Heck even my damage formulas are mostly in the scripts window and I just use the formula box to call those
I see my own style of working ending up in a similar pattern.

By "Script Window" do you mean the contents section of the events tab?

Also, you mention calling external damage formulas via the formula box. Can you call a js function via that formula box by any chance?


as for your 2nd question, any project that will use melee, ranged and magic will benefit from all of them having actually settable, different hit rates.
I agree with that assessment. And by "scope" I actually meant how labor intensive it would be, considering it is in essence just duplicating an existing mechanic. AKA create HIT2... xparam(10).
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
If you change it "permanently" after every hit, well you might not even be able to do it as it reloads enemy data from the database every run of the game, it doesn't save enemy values. Anyway you can still do that per battle..

What I mean was to just make all "magic" skills hit (hence 100% success rate + 0 mev), and just use your damage formula to check if your skill will actually do damage (meaning it "hit") or not (missed) just to give you more freedom with manipulating the "hit chance". Take note though that if ur using the Effects box, then you need to do it via the formula box too in this scenario.

Also it sounds like you are dangerously close to describing checking for hit, prior to damage, in the formula box.
to an extent, yes

basically, since were already talking about using the formula box, I thought might as well not keep ourselves to the stats/params defined inside the engine.

and yes, you can make the damage formula call any JS code (if ur using MV) since that box basically evaluates JS codes (everything you type there actually is consodered JS code). So as long as what you put there is a valid JS code, it would run
 
Last edited:

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
So enlightening...

If you change it "permanently" after every hit, well you might not even be able to do it as it reloads enemy data from the database every run of the game, it doesn't save enemy values. Anyway you can still do that per battle..
I was thinking you'd set the enemy MEV to a variable, then deal with it in thebox v[badguyMev].

But good to know directly changing b.param in the formula box will retain its value the remainder of the battle though, I was actually worried these would reset per turn.

just use your damage formula to check if your skill will actually do damage
but, you can also opt to use it to calculate the "actual hit rate",
Then if the formula results to a miss
I would buy you a coffee if you showed me how to "roll for to hit" inside that damage formula box, a box that by all accounts "the damage formula box runs during damage phase, AKA the skill has already hit the enemy before it runs".

Unless you meant you would have to do this, down here ▽


and yes, you can make the damage formula call any JS code
Can I make it call an external .js file?
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
You actually cant just call MEV=something to change the value of MEV because the value of MEV is a collection or sum of all features that add the MEV param. So to modify it, you'd actually need to add/remove features which isnt as simple. The only params that are actually doable via a simple param=value would be hp and mp afaik

When I say use the formula.box to "roll for hit" I mean something like

if (random===1){do damage};

so basically a simple if-then, if it "hits" it deals damage, if it "misses" no damage. So technically the skill itself actually hit (which is needed since were doing it via the formula box), which is also why I said that you cant use it if ur also using the Effects box since the effects will be applied even if the damage box ends up doing a "miss"

It's more of a rough workaround in case you dont want to make/use a plugin that allows you to tag skills as ranged, and define an actors ranged hit rate and evasion. I think there is a plugin for changing hit calculation, you can probably use it together with a plugin that allows you to define extra params, or if you know how to read the notetags in JS, you can even do this with just the hit calculation plugin.

Yes, it can call functions inside external JS files (in essence, the default js files are also "external"), as long as they are included in the plugins list (afaik this step is needed so the game recognizes your js file)

PS: If you really need a nicely working solution, I'd suggest really just getting a plugin that changes the hit calculations and optionally, a plugin for defining custom parameters. Im merely suggesting the other way coz its a nice brain exercise and since u said there might not be a non plugin way to do this :)
 
Last edited:

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
You actually cant just call MEV=something to change the value of MEV because the value of MEV is a collection or sum of all features that add the MEV param. So to modify it, you'd actually need to add/remove features which isnt as simple. The only params that are actually doable via a simple param=value would be hp and mp afaik
I mean you would put current MEV into a variable outside of battle, then call that variable into the formula via v[ ], and continue to control it via the variable when you are back outside the game.

When I say use the formula.box to "roll for hit" I mean something like

if (random===1){do damage};
Ah, OK Crystal clear now.

So what's interesting here is, it seems, you could then keep track of your own "range to hit" / "range evade" stats, set with variables outside the battler - and call those into the damage formula box for calculations with something like - a.RangedHit * (1 - b.Ranged Evasion) = HitChance : If (random >= Hit Chance){do damage}

Pretty cool idea actually, and if seemingly too impractical for this application we're kicking around, surely this approach lends itself to some other cool little tricks. I like.

Would a "certain hit" work with this as well? The certain hit takes you to the damage formula where you then do your own to hit roll calcs?

Yes, it can call functions inside external JS files (in essence, the default js files are also "external"), as long as they are included in the plugins list (afaik this step is needed so the game recognizes your js file)
OK, well then this may be another disconnect of mine. When people occasionally (read as every 3 seconds) answer with "Plugin, followed by plugin and then plugin" I assumed this meant a third party pre-created mod with an accessible menu with author determined parameters for consumer manipulation, etc, etc. While I am constantly thinking, huh? I'd rather "code a script" for it that overrides the base code. I think you are saying that both, albeit completely different approaches on many levels from a RM user perspective, are accessed by the game in the exact same way. They both end up being a "plugin".

PS: If you really need a nicely working solution, I'd suggest really just getting a plugin that changes the hit calculations and optionally, a plugin for defining custom parameters.
As you know by now I would rather dip my toe in the water by coding something like this myself. However I thought I was just going to be writing some functions on my own .js file and having the game reference that. Besides this fact what I wasn't grasping is in order to do that, I have to make it a plugin, albeit my own.

(However, I still swear I watched a couple of separate tutorials where the guy was overriding/manipulating the game with a js file in the js folder and did not put any of the "plugin" protocols at the top. It was clearly him coding his own thing, not prepping something for mass consumption. But I may have been drunk.)

Im merely suggesting the other way coz its a nice brain exercise
Too say the least! And not to mention exactly what OP had asked/dreamed for.

But seriously... There is no straight forward way in editor for a magic user to increase their ability "to hit" with magic? Let that sink in for a sec...

I've mentioned this before, and my conviction grows stronger everyday, I feel like the creators of RM must have considered damage the criterion for a good shot... as opposed to actually being good at the shooting. It's just not something I've come across in my gaming/game design experience.
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
You certainly dont need to set it up as a plugin (meaning you can opt not to put the plugin setup at the top of the js file, just like those people you've watched), but afaik the game doesnt recognize it if its not in the plugins list, so at the very least you need to add it to the plugin list (and the js file itself doesnt actually need you to have the plugin setup at the top).

Certain hit would work too to make sure the skill hits, but if ur using the features pdr/mdr (physical/magical damage reduction), those doesnt apply to certain hit skills since the engine also just checks the hit type to determine which reduction feature to apply.

And yes, there's no super straightforward way for magic to have more hit chance based on the user's parameter/s coz the engine didnt add a thing for that.

I think its more of because the engines were made somehow to recreate traditional turn based jrpg styled games (its japanese made anyway), and tbh I've played a lot of those and there was like only a few (if any) games that has separate hit/miss for melee and ranged, and especially no hit chance for magic (in most traditional jrpgs, magic is the way to go when ur fighting an enemy with high evasion since magic doesnt miss). But yeah, they've added success chance and MEV so Im kinda stumped they didnt add a skill success feature for use in actors etc.
 
Last edited:

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
You certainly dont need to set it up as a plugin (meaning you can opt not to put the plugin setup at the top of the js file, just like those people you've watched), but afaik the game doesnt recognize it if its not in the plugins list, so at the very least you need to add it to the plugin list (and the js file itself doesnt actually need you to have the plugin setup at the top).
Noted.

but if ur using the features pdr/mdr (physical/magical damage reduction)
My brain simply cannot process that their is an 8th way to reduce damage. Another day, another inquiry.

I think its more of because the engines were made somehow to recreate traditional turn based jrpg styled games (its japanese made anyway)
Could totally be a western RPG thing where a To Hit roll is way out front and center of the action.

Yes, it can call functions inside external JS files
How would one do this from the damage formula box? File and function.

Somehow you get me excited about the adventure that awaits me, even though the more holes I uncover I think it's going to be hell. Regardless, Bravo sir!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,670
Reaction score
2,992
First Language
Tagalog
Primarily Uses
The same way you call JS codes everywhere else in the game.

Normally that would be in the format of object.function_name(parameters)

Let's take for example this line of code which gives you the value stored in a game variable

$gameVariables.value(index)

$gameVariables is the object, value is the function name and index is the parameter

So the thing to do is basically learn how to make and call valid JS functions

While I am constantly thinking, huh? I'd rather "code a script" for it that overrides the base code.
Well, not everyone knows how to write codes or willing to learn. That's where using these plugins made by other people come in. It also saves you the time needed to make the code on your own so its kinda alluring even to coders. And if ur using a plugin that a lot of people use, its also normally easier to find help in debugging. and plugins are basically the "scripts" equivalent for MV
 
Last edited:

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,625
Reaction score
10,927
First Language
English
Primarily Uses
RMVXA
@Guanto and @Engr. Adiktuzmiko Please note - 'Game Mechancis Design' is for looking at aspects of game play at a more conceptual level, it is not for discussing implementation. It seems to me that this discussion has become almost exclusively implementation, which is not appropriate here.

You might like to continue this in Learning Javascript.

If this thread does not revert to the conceptual level, I shall have to close it.
 

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
So the thing to do is basically learn how to make and call valid JS functions
The good news is I know how to do this.
The bad news is, I was way overthinking what had to be done via editor to make it happen.
Thanks per the norm.

And if ur using a plugin that a lot of people use, its also normally easier to find help in debugging.
That is the most optimistic take on plugin "debugging" i have read to date. First thing in every issue is "disable all plugins, then see which plugins are conflicting with each other, then a dozen back and forths before you realize the poster actually didn't disable 'all' plugins, and on and on and on..." Hehehe. The forums do seem littered with these accounts, kind of off putting, but again you are right I am probably of a slightly different mindset - I'm a control freak, who is using this experience to brush off the old JS skills more than anything (gamification is the best method for me to learn) and the least variables I have to debug when I start breaking my own shiz the better ;)

I guess the allure of coding my own things is stronger than grabbing a plugin (easy for me to say at this phase of course). But when I see these videos and screenshots of peoples plugin lists just infinitely scrolling it sort of makes my skin crawl. But I'm odd man out I know.

and plugins are basically the "scripts" equivalent for MV
This was the bit I wasn't understanding, semantics. The guys coding their own games on the tutorials dont call it "making plugins" - and then later those same guys do tutorials on actually "making plugins" - so I assumed they were separate and distinct. Got it now though, its how MV uses script overrides whether its from a highly touted youtube star third party... or if I'm just coding my own stuff for my own game.


Hey Kes,

The real world functional tips Engr. Adiktuzmiko has provided are going to enable me to directly implement the very specific and exact concepts that we worked out in the first half of the discussion. Seems like it would be more taxing on a reader to separate these components revolving around the singular task. More so I am not sure I'm equipped at quickly identifying that it is even happening in the moment, since its all one goal in my minds eye.

Plus as a quick sidebar to the thread he helped me identify a serious problem I had with understanding plugin vs script that I am not sure even deserves its own post, but will help me with every future post.

But I'm not denying that the dream and the resolution did intertwine a bit in this instance. She's winding down now, no worries.
 
Last edited:

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
but for "ranged" attacks, it's not like bullets can really be dodged anyway.
Ya know... the more I dwell on this, you have a pretty darn good point here.

I think, in my world anyway, it would all be about the ranged attacks accuracy (success), and save some unforeseen very very special circumstance, all targets of ranged attacks would probably be unable to avoid a well aimed shot... AKA all targets MEV = 0, which might make using magic as ranged even a bit more simple/appealing.

Only problem now is I would want their actual 'physical DEF' to be the factor in lessening the ranged (magic) attack.

But I'm sure there is a super simple way in editor (ahem) to have an actors MDEF always = DEF.
 
Last edited:

jonthefox

Veteran
Veteran
Joined
Jan 3, 2015
Messages
1,320
Reaction score
470
Primarily Uses
Or you could just use DEF in the ranged attack damage formula, and scrap the MDF stat. :)
 

Guanto

Auteur
Veteran
Joined
Jul 18, 2018
Messages
111
Reaction score
10
First Language
English
Primarily Uses
RMMV
Very true. Not to mention the thought of not using MEV was a dumb one on my part, I forgot the whole reason I was using MEV was because I cant manipulate success to mimic "ranged accuracy fluctuating over time/proficiency".

One step forward and... well you know...
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

convention concluded, i'm glad the books well received and sold out
not every content is decent, but i'll be better for the next work.

now back to game developing
I hope to be able to post my vxace resource edits this Wednesday.
Not sure if I'll get to the library though.
Me: Man, I'm definitely burned out this time. Time for a break. Me three hours later: I'm ready to work again, let's go! Me another hour later: Okay, I can't do this anymore. Repeat for infinity.
Just got MV and am working on porting over my new game from VX Ace to it! I haven't done much with my new game so it should be pretty quick.
I was doing forge runs on D2 with my wife last night, and singing like a leprechaun to annoy her XD. I was calling it 'The Farge'

Forum statistics

Threads
94,448
Messages
921,040
Members
124,279
Latest member
Lacy
Top