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

ahh, so i was thinking in the right direction, thanks once again Mr/Mrs Tsuki ^_^
Has anyone made a gif player for ace..or is it possible?

I'd love to have gif facesets like my avatar!
tis' possible, no one has done a good one yet (that i know of) but it is most definitely possible with a .dll 🙂
Never thought i would actually ask a simple question myself, but i somehow can't figure it out myself.

What i want to do is just load a txt-file, so i can outsource the notetags for my script into an external file.

Sounds simple, right? It is, just for the fact that it doesn't work.

      $: << ".\\"      p filestring      if FileTest.exist?(filestring)        p "File exists"      end      file = open(filestring, "r")This code inside my method produces the expected output for filestring "test.txt", and there is a txt-file with that name in the game-folder.

However the FileTest fails and the open-function gives me "Unable to find file test.txt"

Now it may be something simple, but what am i missing here?
I just ran this test:

1. Created a file "test.txt" with one line "foo" in the project directory (i.e., the directory which contains "game.exe" for my project).

2. Used this code in a "Script..." event command:

file = "test.txt"if FileTest.exist?(file)  p "found"else  p "not found"endf = open(file, "r")p f.lines.first3. Ran the project and executed the event.
The output was "found" and then "foo" (i.e., it opened the file and read the first line successfully).  So, something is wrong in your setup and you haven't given us enough info.  What is different between my test and yours?
What is different between my test and yours?
Apparently stupid windows. I created the txt-file and named it "test.txt" but windows also put the file-extension afterwards itself, so the file was named "test.txt.txt".

So the problem is solved, but thanks for making sure my code was correct.
Oh, you've got your file extensions hidden, by the sounds of it.


Interesting though, that your p filestring gave you test.txt and not test.txt.txt
Interesting though, that your p filestring gave you test.txt and not test.txt.txt
No, that was to be expected. The variable filestring is actually what is read from the notetag.

<mds file test.txt>That was what i wrote in the notes, so of course the filestring should be "test.txt". The script will be published, once it is finished.
Note that you cannot retrieve the text file if you encrypt the game.

Or rather, you'll have to add it after encryption to its relevant path.

*hugs*
Note that you cannot retrieve the text file if you encrypt the game.

Or rather, you'll have to add it after encryption to its relevant path.
I don't know what you mean by that. I just tested it, the test.txt was included in the compressed installer. After installing the "game" in a new location, test.txt was extracted to the main game-folder, like it should. It doesn't became part of the encrypted archive.

Maybe that is only a problem if the txt-file would be in one of the subfolders, that become encrypted (like data), but i assume if i make a new folder for these files, it won't become part of the encrypted archive.

But thanks for the hint, i may add an option to include these files in the encrypted archive (using save_data and load_data).
Yes, only Data and Graphics get thrown into the encrypted archive.


The default load_data only loads rvdata2 and image files as well. You'll need a script to load other stuff like txt.
How do I do custom evasion stuff? (in RPGMakerVX Ace, btw)

P. much I want the check to see if it hits by using a formula like the following:

i = random(20)

if i = 20, always hit

if i = 1, always miss.

if a.acc+i>b.ev, then hit

thanks!
How do I do custom evasion stuff? (in RPGMakerVX Ace, btw)

P. much I want the check to see if it hits by using a formula like the following:

i = random(20)

if i = 20, always hit

if i = 1, always miss.

if a.acc+i>b.ev, then hit

thanks!
I don't have RM in front of me, but on a side note, that is a poor formula.  It doesn't scale because it is not normalized.  What happens when EVA and ACC get large?  Then your range of 1..19 doesn't affect what happens very much.  This means that, early in the game, the random factor will have a *huge* affect on hits and misses, but late in the game, almost none.

Instead, why not simply use a percentage increase?  Normalize ACC and EVA to some value between 0 and 1 and add an additional X% based on a random roll of 0..1, i.e., rand(1.0).
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.
Well, let me put it this way; normalizing stat adjustments costs you nothing and guarantees that your formula won't have to change significantly (or perhaps at all) should you change your mind on stat design.  Your approach is very tightly coupled to the stat curves of your players and enemies.  One choice is simply superior to the other, in all ways.
I'm not sure I exactly understand what you mean by normalize...
Well, perhaps I shouldn't have said "normalize" as we're not dealing with different scales here...

I just meant that everything is scaled.  Instead of using a static value of 0..20, it works like a percentage.  You boost the chance to hit by a percentage instead of a fixed value.  Now if you decide later on to add a weapon that has a lot of +ACC (or an enemy with a lot of evade) it doesn't break your battle system.
Yeah, I see where you're coming from, nut the way I have it in mind, evasion (and magic evasion) and accuracy will not be increased by much at all ever. Because, as you so rightfully put it, it'd be gamebreaking. The average anyone of any level will have 0 accuracy and 3 evasion, meaning a 15% chance to miss.  In some cases, a dagger might add 1 accuracy, or an attack that hits everyone has a -3 accuracy penalty (note to self, figure out how to do this as well). So 99% of the time, we'd be dealing with at most a 50% chance to miss. It's always fun to have the occasional gimmick mook, so there'd probably be at least one enemy with 20 evasion or one with 20 accuracy. In those cases, it's not that gamebreaking. This chance-to-hit system is actually one I've tested before (albeit for a TRPG, not a game), and it works fine. Also, if it sucks, it's my problem, not yours.

Now, I'm sorry if I came off as pretentious, stupid, or rude, but I'm new to scripts and it'd be nice if I could have a hand with this. Please?
can anybody teach me how to use Yanfly Engine Melody (YEM) , i have no idea no idea how to change XP's battle system,

anyhelp would be appreciated please kindly Pm me . . . 
This would be a very in-depth thread - not a "question that does not deserve its own thread". There should be lots of instructions on the various scripts - on the forum posts where they are introduced as well as in the script header. If you look, there might also be a demo somewhere with all the modules.


Search a bit, try a few things, then if you're still stuck, post (in a new thread) your questions on the specific things you are having trouble with, what you've done, what's happened when you did it, and what you want/expect it to do.

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