[ACE] Script error when game encrypted.

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
Hello!

I'm trying to compress my game to upload a demo here but when I test it with encrypted datas, after the first house it puts me that a RGSS error occured on line 106 of cache, unable to create bitmap.

Strangely, when I compress it and don't encrypt the date, the game works normally. How come?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
module Cache def self.normal_bitmap(path) puts path @cache[path] = Bitmap.new(path) unless include?(path) @cache[path] endendput that in a new script in the materials section, and if it has the error again, let me know what it says in the console (Run the game with a console window by selecting 'Console' in the Game dropdown menu)
 
Last edited by a moderator:

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
Hi! 

The problem is : I can't do console diplay as my game works very well on rpgmakervxace editor, it's the compressed version with encrypted datas that screws up. Actually I tried your solution and it still crashes, it says that there is error in line 4 of your script and that it is unable to create bitmap. 
 

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
Yes, I'm using some Yanfly scripts. 
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Do any of these scripts load pictures?
 

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
If you mean stuff like artworks and backgrounds no. If you mean custom menus and shops yes there is.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
If you took your custom menu script (that loads custom pictures) and create a new project and then encrypt it, does it still crash?


If it does, then upload that demo. You can replace the pictures with dummies if necessary as long as it demonstrates the issue.
 

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
Oh ok , now I see better what you mean, so no , these custom menus don't display special pictures as I didn't have to download anything along apart the script itself. 

Edit : Another thing came to my mind : no bitmap is supposed to be displayed at the moment the game crashes, it's just some dialog cutscene. 
 
Last edited by a moderator:

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
Sorry for bumping but I need to notify I have new elements : I tried to export another game using Yanfly scripts and it worked without any trouble.  There was only one script more that I use on the game that crashes, I removed it, exported it again and it crashed still. 
So seems like this has nothing to do with my Yanfly scripts. 



The weird thing being there is nothing special to be displayed at that moment, it's just a dialog, my hero jumps towards his interlocutor and bam, crash. 

I wonder if it's really a script trouble or if I should ask in vx ace support as obviously, the problem occurs with encrypting datas for this precise project, it works very well if datas are not encrypted, rtp added or not.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Oh ok , now I see better what you mean, so no , these custom menus don't display special pictures as I didn't have to download anything along apart the script itself. 

Edit : Another thing came to my mind : no bitmap is supposed to be displayed at the moment the game crashes, it's just some dialog cutscene. 
If the game crashes on creating a bitmap, that doesn't automatically mean you're using the picture command. Show text contains the option to display a face, and even if you don't choose a face picture that option still gets checked by the game on a show text.

You should check if all the face pictures are still at the correct position and correct name...
 

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
I checked already and there is nothing wrong. Therefore what is really weird is that the exported game works if the datas are not encrypted. It's only when I make the game encrypted that the game crashes. 
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Reproduce the problem without any scripts and then it's a general VX Ace problem.


If you're unable to reproduce the problem without some sort of custom script, then it's script issue.


Might as well upload the new project that's crashing.
 

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
That's ok I finally found out what was wrong! There was a file with the same name than the face set that was on Paint.net format and seems like it was creating some data conflict. Why only when datas are encrypted? I don't know but well, now it works and I can release my demo that's the most important!

Thanks a lot for your help! 
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
RM does not care about extensions for the most part.


For example, open an image editor and draw a yellow square, call it "yellow.jpg" and put it in the battler folder.


Then draw a red square and call it "yellow.png" and put it in the battler folder.


When you choose the enemy graphic, you will find only one "yellow" entry. Whichever it picks is up to however RM chooses its files.


Note that when you run it unencrypted, it picks one color, but then when you encrypt it, it picks the other one.


One could possibly conclude that the code for searching your folders for resources is different from the code that reads data from the encrypted archive.


From some simple testing, it looks like when RM is searching through your computer, it picks the last file in whichever order it sorts it in. So if you had


Yellow.jpg (yellow square)


Yellow.png (red square)


It will pick the png and you'll see a red square.


If you renamed Yellow.png to something like Yellow.bmp so that you have


Yellow.bmp (red square)


Yellow.jpg (yellow square)


It will now pick the jpg and you'll see a yellow square.


This is reversed in in the encrypted archive because it picks whatever it sees first.
 
Last edited by a moderator:

Lars Ulrika

I punch Therefore I am Harvest the land Taking the
Veteran
Joined
Nov 7, 2012
Messages
1,363
Reaction score
405
First Language
French
Primarily Uses
N/A
Ok! Thanks for explaining :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top