Random Battle Transitions Script, leads to crash on encryption

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Hi guys,

Thought I'd throw up a topic for this and see if anyone has the knowledge to help with what's likely and hopefully a simple solution..

I'm using the below script, it's a short one.

-----------------------------------------------------

-----------------------------------------------------

#==============================================================================
# ** NAMKCOR's Random Battle Transition
#------------------------------------------------------------------------------
#  Override to the standard Scene_Map to allow for random selection of
#  multiple battle transition graphics.
#
#  Configuration:
#  > Ensure that all of your BattleStart graphics are named as follows:
#    BattleStart_X.png, where X is the number.
#
#  > Example: if we had 3 BattleStart graphics, I would name them:
#    BattleStart_1.png, BattleStart_2.png, and BattleStart_3.png
#
#  > At Configuration Point A, set the 'return' value to the number
#    of BattleStart graphics in your System folder.
#==============================================================================

module NAMKCOR
 
  #============================================================================
  # Configuration Point A
  #============================================================================
  def self.battle_transition_count
    return 13
  end
 
#==============================================================================
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!
# YOU HAVE BEEN WARNED!
#==============================================================================
 
  def self.battle_transition_graphic
    return "Graphics/System/BattleStart_" +
           (rand(battle_transition_count) + 1).to_s
  end

end

class Scene_Map < Scene_Base
  def perform_battle_transition
    Graphics.transition(60, NAMKCOR.battle_transition_graphic, 100)
    Graphics.freeze
  end
end

----------------------------------------

----------------------------------------
I have everything in place and the script works fine, until i encrypt the game.

I receive an error to say

"Unable to find file"
Then lists the transition number it was trying to find.

I thought it might be because the it uses File or FileTest to check for the existence of a file and due to encryption it can't find it, but I don't see any references to check for existence.

Then again, I'm no scripter, any advice or help would be amazing!

Thanks
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


Next time, please just link to the script wherever it is originally hosted, instead of pasting the whole thing into your post. For various reasons that I will only go into if you ask me to.


If you HAVE to paste it, wrap it in code tags, and spoiler tags if it's more than a few lines, to preserve formatting, avoid automatic changes of character sequences to emoticons, and improve readability.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Next time use Spoiler tags to enclose the script, as well as posting a link to where you got the script from.

 Derp ninja'd

Providing a screenshot of the error window in question would help as well.
 
Last edited by a moderator:

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
The error was

"Unable to find file"
Then lists the transition number it was trying to find.

I have fixed this problem by placing the battle transition PNG's in to the RTP graphics/system folder.

For some strange reason, following encryption, the projects graphics/system folder could/can not be read.

All other things within that graphics/system folder can be read, just not the battle transition PNGs.

Consider the above to be a fix, although not ideal, it does the job.

EDIT

"Scroll down for more perma fix."

.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Are you sure the transition number it generated exists?
 

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Are you sure the transition number it generated exists?
Yes, because it can find them when i place them in the RTP folder  - "graphics/system."

It just can not find them, after encryption, in the compressed folder (graphics/system)
 

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
If i remove the transition images from Graphics/system in the project

and place them in RTP system folder,

Then encrypt again,

It works fine.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Create a new project with the transition script and a couple transitions set up and send me an encrypted demo.


All files in the Data and Graphics folders should be automatically packed up but we can always check that.
 
Last edited by a moderator:

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Create a new project with the transition script and a couple transitions set up and send me an encrypted demo.

All files in the Data and Graphics folders should be automatically packed up but we can always check that.
Where shall i send it?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Just post it here. It's a new project so there shouldn't be any proprietary data. Just provide dummy transitions or something.
 
Last edited by a moderator:

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Just post it here. It's a new project so there shouldn't be any proprietary data. Just provide dummy transitions or something.
Ok, and you want to receive it, encrypted?
 

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Just post it here. It's a new project so there shouldn't be any proprietary data. Just provide dummy transitions or something.
Hmm, I tried attaching the compressed .exe file as a file here but it wont allow me, saying I'm not permitted to upload this file.

During the compression process, I can see it is also compressing the transition PNG's.

Is there any other way to send the file?

Are you sure you wouldn't prefer it unencrypted?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Dropbox or mediafire.


Send both the encrypted version and the unpacked version.


The transition files should be placed in the System/Graphics folder in your project (not the RTP)


I would simply unpack the encrypted archive and see whether it matches the unpacked version, and then pack the project myself to verify that I get the same results.


If not, then you might have something wrong with RM itself.
 
Last edited by a moderator:

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Dropbox or mediafire.

Send both the encrypted version and the unpacked version.

The transition files should be placed in the System/Graphics folder in your project (not the RTP)

I would simply unpack the encrypted archive and see whether it matches the unpacked version, and then pack the project myself to verify that I get the same results.

If not, then you might have something wrong with RM itself.
I think it's something wrong with RM personally..

But ok, is it possible for me to send via skype instead if i message my id?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Just upload it publicly. Others may want to see if it is really an RM problem.
 

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
This should work, download and extract.

Testing = Encrypted

testing.zip
 

Attachments

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Here's the problem:


Well, I think it's the problem.

encrypt.jpg
 
Last edited by a moderator:

Kwerty

Veteran
Veteran
Joined
Feb 22, 2014
Messages
385
Reaction score
616
First Language
English
Primarily Uses
RMMV
Fixed.

Thank you so much Tsukihime!

I can now remove those transitions from my RTP and place them in to the project graphics/system folder, they 

work now, with a simple deletion of the extension!

This happened because I used gimp to resize the images to 640x480, in that process it must have included the .png in the file name.

I'll let Namkcor know.

Thanks for looking at this and fixing it!

Have a great day!
 
Last edited by a moderator:

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,848
Messages
1,016,974
Members
137,562
Latest member
visploo100
Top