Ruby/RGSSx questions that don't deserve their own thread

The simplest answer is that accuracy and evasion won't go up at all on level up, and very few items will increase it a substantial amount. It should be nearly impossible to have a full 20 in either. (Save for, like, one really annoying enemy who can only ever be hit on that lucky 5%). Thanks for your concern, though I'd have to be really dumb to think having that style of chance-to-hit with acc and eva increasing on level-up is a good idea.
you CAN make any stat change/increase/decrease upon level up depending on the scripts you use..

Example.. THIS + THIS

Depending on how much you experiment and "perfect" your formula's for things like evasion and critical, coupled with how easy it is to gain such statistics and based against how high the enemys statistics are would determine whether increasing those stats upon level up would be a good idea ^_^ (imo)
Trying to extract scripts from the rgssad file using an external program would be breaking the terms of the EULA.
Sorry for the much later reply, I forgot I had asked this question.

I'm not trying to get the scripts out of an encrypted archive, I don't need that. I am trying to make a program outside of RPG Maker that can read the scripts file. I already got it to the point of where it can display the file in plain text, but now I'm trying to load the files into a Ruby environment in my program, but the hidden classes (Graphics, Sprite, Window, etc) aren't defined because they're built in the DLL file. Now, because Ruby can sue Win32DLL files, I was wondering it anyone knew where in the DLL it was so I could run that in the ruby environment before I loaded the scripts file so that it would load properly. It's easy to find a list of methods that are in the DLL (look here and go to the file detail tab, then scroll down a bit), but I can't find the one method that actually builds the scripts in the runtime. I had thought RGSSInitialize3 would be the one to use, but it didn't work.

So does anyone know specifically which method in the DLL file defines the default scripts? I'm not trying to open it and see them, I'm just trying to use them. I'm not trying to do anything bad, or to break the EULA, I just want to be able to use the hidden classes.
I want to modify yanfly's skill restrictions script to display the number of uses left on a limited use skill but I can't really figure it out, it's weird that it doesn't do that by default.
I am trying to make a program outside of RPG Maker that can read the scripts file.
The structure of the script-file is not made public by enterbrain, so you would have to reverse engineer part of the software, to understand how that data is stored. And reverse engineering the software is breaking the EULA of the RPGMaker itself.
you CAN make any stat change/increase/decrease upon level up depending on the scripts you use..

Example.. THIS + THIS

Depending on how much you experiment and "perfect" your formula's for things like evasion and critical, coupled with how easy it is to gain such statistics and based against how high the enemys statistics are would determine whether increasing those stats upon level up would be a good idea ^_^ (imo)
Thanks, but this isn't actually what I wanted... That's for if I want Accuracy and Evasion to increase on level up. I don't. What I DO want is to change how the chance-to-hit is determined. If Accurracy and Evasion must be a percentage, then it'd be something like this

chance to hit = (100%-b.evasion+a.accuracy), then have it be a minimum of 5% and a maximum of 95%

rather than the default which is (something like)

chance to hit = a.accuracy*(100%-b.evasion)
So does anyone know specifically which method in the DLL file defines the default scripts? 
I would assume, (after looking at the link you provided)  it could be concealed within the " RGSSSetupRTP " as they are the default scripts that the program uses for every single project, so i would imagine them to be in the RTP data ? 

anyway, just a thought 😛

@Varkarrus

I dont have vx ace with me atm so i cant really help right now, but if i remember later i will have a look 😛
Thanks, but this isn't actually what I wanted... That's for if I want Accuracy and Evasion to increase on level up. I don't. What I DO want is to change how the chance-to-hit is determined. If Accuracy and Evasion must be a percentage, then it'd be something like this

chance to hit = (100%-b.evasion+a.accuracy), then have it be a minimum of 5% and a maximum of 95%

rather than the default which is (something like)

chance to hit = a.accuracy*(100%-b.evasion)
Hit or miss is calculated in the item_apply method of Game_Battler, specifically the line that starts with "@result.missed =". By default, it gets the value of the skill to hit out of 100 (as a decimal), then compares this to a random of 0 up to but not including one to determine if it hits (if the random value is greater, the attack missed). You just need to replace this calculation with the one you have described.

Basically, what you would need to do is just rand(20), if the result is 0 or 19, skip all further calculation and set @result.missed appropriately, otherwise, return the skill's chance to hit instead as an integer, then add that value to your previous random and compare to target's evasion to determine if it is missed. Since you are incorporating evasion into your to-hit formula, @result.evaded should always be false (the default state after being cleared) so we won't do any calculation for this.

I'll go ahead and elaborate on this, but in the future, if you need in-depth instruction on how to set something up, it is probably best to make a separate thread.

End result, you'd end up with something like this:

Code:
class Game_Battler  def item_hit(user, item)    to_hit = item.success_rate - 50 # Get success rate adjustment of item as base to_hit, adjust by -50 to allow positive and negative adjustments to to_hit based on skill    real_hit = user.hit * 100 # get user's real hit rate scaled to while numbers     to_hit += real_hit if item.physical? # add user's to hit adjustment if physical attack    return to_hit # Return calculated to_hit adjustment  end  def item_eva(user, item)    return eva * 100 if item.physical?    # Return evasion if physical attack (as whole num)    return mev * 100 if item.magical?     # Return magic evasion if magic attack (as whole num)    return 0 # if not physical or magical  end  def item_apply(user, item)    @result.clear    @result.used = item_test(user, item)    # this is the part of the formula we are altering from the norm    v = rand(20) + 1 # your 'roll' of 1-20    if v == 1      @result.missed = true # fumble    elsif v == 20      @result.missed = false # auto-hit    else # values 2-18      @result.missed = item_eva(user, item) >= item_hit(user, item) + v # miss if evasion of target is greater than or equal to hit of user plus roll    end    # end part of the formula we are altering from the norm    if @result.hit?      unless item.damage.none?        @result.critical = (rand < item_cri(user, item))        make_damage_value(user, item)        execute_damage(user)      end      item.effects.each {|effect| item_effect_apply(user, item, effect) }      item_user_effect(user, item)    end  endend
Note that the above would make the "success rate" field of your items/skills into a "to hit adjustment" with the zero point at 50 (eg., 50 is +0, 51 is +1, 49 is -1) which would also accomplish your other goal of having hit adjustments for skills. Since the field is restricted from 0 to 100, this was the easiest way to get it done, just remember you have to change skills success rate values to 50 (as well as remove all default +hit% bonuses, including from classes and enemies) or the system falls apart right away (each 1% difference in hit is calculated as 1 accuracy for the purposes of the formula, and since both negative and positive inputs are allowed for hit% adjustments, zero is actually zero for this).
oh my god thanks

this totally helps

I mean, I'm still having problems (I don't think it calculates it quite right, even though looking at your code it should work... It'd help if I could somehow print the values of v, item_hit, and item_evade)

Also it's incompatible with Lanfy's Battlecore... So yeah I guess I should make a thread about this?
To print the values, throw in a

Code:
msgbox_p self.name, item_hit(user, item), item_eva(user, item), v
But yeah, for the other issues, make another thread. Make sure to include the scripts you are using.
Looks like my other issues were all false alarms. While making the thread to ask for help, I readded all the other scripts I used (one at a time) and had no problems, and I'm not sure what caused the other problem but it just kinda went away.

so thanks very much you are a very helpful person!
it's  usually the matter or arrangement of the script. some scripts works if put below another script (because of aliasing). some works if put above another script (because of overwriting)
If I have a skill that costs both MP and TP, is it possible to show both costs rather than just the TP cost?
one of yanflys scripts allows that, cant think which one though sorry.
In Ace, is there a script call I can use in a conditional branch to determine whether or not the player is dashing?
$game_player.dash?
$game_player.dash?
Lulz that simple huh, that worked fine, thank you 🙂

EDIT - Hrm, actually that script call will activate the conditional branch if I just press shift, regardless of whether or not I'm moving.

EDIT - and as it turns out, it was another nestled branch of $game_player.moving? to fix that. Nice and simples!
EDIT - and as it turns out, it was another nestled branch of $game_player.moving? to fix that. Nice and simples!
most of the default rgss3 code is very simple.
Does anyone know how to make items teach skills to classes directly instead of actors? I can't find the command within any of the default scripts. Once I do, I can change it, somehow.
Does anyone know how to make items teach skills to classes directly instead of actors? I can't find the command within any of the default scripts. Once I do, I can change it, somehow.
Does it require level to learn?
It could do, but I have other scripts that can specify level.

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/