Making accuracy perfect?

Status
Not open for further replies.

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
All battling in my game is done through items instead of skills, and I have an item that has a low success rate. To counter this I have another item I want to cause perfect accuracy for a few turns. The way I tried to do it was have the accuracy item add a state just called "Accuracy" at 100%, with the Ex-Parameter of [HIT]+100%


However, it doesn't work. I mean, it does seem to enhance accuracy when I test it, but it's not flawless. I want it to be an absolute sure hit with 0% chance of missing.


Is there a way to do this?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
HIT +100% is perfect and will always hit - there are only two ways to prevent a hit with HIT +100%:


1) you have another HIT modifier somewhere that substracts from HIT - for example there are a few default weapons that reduce HIT.


Either remove those substractors or give much more HIT so that even with negatives it doesn't drop below 100%


2) the enemy has evasion


EVA is independent of HIT - even a perfect hit can be evaded. If you don't want that, you need to remove EVA (and reflect and critical evasion as well)
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Aha! The monster had evasion. That should fix it :} Thank you!


EDIT: Actually no it's still not working. Gimme a moment to collect all the relevant information...


Okay so here's the main character's features:





Accuracy state:





The dummy enemy I'm using to test this out on:





And the item that's not working:


 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
Invocation : 20% success


That means that even with a perfect hit, that skill/item will only work 20% of the time
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Okie dokes, so how do I lower its accuracy without that?


(Sorry, I haven't worked in this program for like... 5 months, I've forgotten so much)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
???


First you want to increase accuracy, then you want to lower it?


The invocation success is completely independent of the HIT % - both rolls (success and hit) need to succeed in order to make the effect on the enemy.


But the states can only change the HIT%, nothing can change the success % you set in a skill or item (which is why people usually let that stay at 100%)


If you want to give the actor a low HIT% without that state, you need to remove the HIT+100% from the actor and replace it with the base HIT% you want the actor to have.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I think what they want to do is make a skill that is low accuracy, but with that state it is no longer low accuracy. Many games do this with skills. Unfortunately, you would need a script or something to make it so that you can assign a to hit bonus or penalty individually to the skill, then your idea of adding that state will work.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
bgillisp's got it, that's what I want to do.


Damn :/ Do you know if there's a script like that out there? Or should I go to the script part of the forums for answers?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
This would do it: http://pastebin.com/fg7JW3vR It's a script I wrote to overwrite some features of the battle system I didn't like. It has to go above any scripts which alias make_item_damage (like Yanfly's ACE Engine). Free to use for commercial or non-commercial with credit given. To use it to modify the to hit of a skill, add the notetag: <To_Hit_Modify: x> where x is the boost (or deduction) to the to hit you want applied, in percent form. So what you want it would be:


<To_Hit_Modify: -0.80>


It must be typed exactly as that. I'm afraid I never learned enough RGSS to allow for flexible notetags. But if you do that, all to hits will be 80% less than the default to hit, so  you can cancel it out by adding a state which gives +80% to hit.


However, it has way more than you want for this task, as it will also add features to tweak how variance works, increase/decrease critical damage, and force a max or minimum damage, and also puts a minimum damage of 1 and a maximum damage of 9999. You can set those to the values you need, but it might be overboard for your game, just a heads up.


Also, you'd either have to change the settings or not use states 26 - 33, as those would do some very unusual things in your game (state 26 forces max damage, state 27 forces minimum damage, and so on).


However, you can take this link, and then go to the scripting forum and ask someone to parse it down to just the part you need. I'm kinda overloaded right now so don't think I can do that for you anytime soon, but maybe in a week or two if you get no response?


Edit: In case you do decide to go request a modification, here is the link to my original forum post for this script:




if needed, reference this post as any scripter who takes it on has my permission to modify it, just as long as they don't change the terms of use.
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Thank you very much for all this information, but I'm very confused. All I want is the accuracy thing.


I tried putting in  <To_Hit_Modify: -0.80> to the item's notes, then <To_Hit_Modify: +0.80> to the state's notes and it didn't seem to do anything. And what do you mean change the settings? I already have those state numbers used, I'd rather not have to rearrange a bunch of stuff.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
You only use <To_Hit_Modify: -0.80> on the skill. The state just do what you did before (to hit +100%), as the code doesn't read notetags on states. Also remove the 20% chance of success, it won't work with that at all. If you do all of that and keep the +100% to hit on the actor then it should be a skill with 20% chance to hit until a state modifies it.


As for the settings, its under the editable section. You'll have to change those numbers (read the directions to see how), or remove states 26 - 33 I'm afraid.


It might be best though to go to script requests and request someone to remove the extra parts for you (I give the person who does this permission to do so). I'd do it but I don't have the time to do it right now.


Edit: I did look into the code more, and what happens if you do what you originally set up (without the script), give the skill 20% chance of success, but give the state Accuracy 5 +100% to Hits? Will it hit now? If so, then you won't need a script, as what I saw says it takes the chance of success then multiplies it by the to hit rate, so if you could set the to hit rate to 500%, it should be always hitting (as 20% * 500% = 100%).
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Oh my god! I removed your script and notes and did the extra HIT ex-parameters, and it works!


There was a weird moment though were a new window popped up saying just "1" but then went away when I clicked enter... it didn't seem to do anything but it was strange.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I probably had a debug line still in that version of the script (I had it set to print out the to hit value for checking), sorry. But yes, it seems that the to hit formula is chance of success * to hit, so as long as you make the math work out, you can always do perfect hit. Is this thread ready to be closed then?
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Yeah I think this is all fixed :}


If I end up finding more issues... I guess I'll just have to make another post but I tested it a couple of times and it works.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top