• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Question on encryption

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
I've tried doing a beta release of my game, but for some reason there is a problem with the encryption, where there are errors with choosing starters and with items, which seems like a problem with the PBS folder
I don't have problems when i do not encrypt it, is there a way to release a game without fear of your work being stolen? or something along those lines
 

Rayquaza.

Lead Dev in Pokémon Order and Chaos
702
Posts
12
Years
What kind of errors (specifically)?
I too have a problem with encryption as the PBS folder is never put in the encrypted archive, there are a couple of solutions I know of to stop your work from being stolen:
- put default graphics in it instead and save custom stuff for the full version.
- find the source of the problem and work around it by getting advice from experienced members.
 

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
What kind of errors (specifically)?
I too have a problem with encryption as the PBS folder is never put in the encrypted archive, there are a couple of solutions I know of to stop your work from being stolen:
- put default graphics in it instead and save custom stuff for the full version.
- find the source of the problem and work around it by getting advice from experienced members.

well when at the beginning you're given a few items, but when you chck your bag, there are no itms, and when you try to withdraw an item from the PC it shows the picture of the item "potion" but does no have the name of it in the list, it is blank, and still counts it (x1) and if you try to withdraw it it says "you bag is full" or something, and you cannot withdraw it
itemerror_zps6272c836.png


when you try to obtain a pokemon it gives this error
screenshot_zps26934977.png


which seems to be caused by the fact the pbs folder is not in the encrypted archive as you mentioned
is there a way to have an installation thing that packs it all up and lets the user see and use only the game application? or something like that, I think ive seen others do it before...
 
Last edited:

Rayquaza.

Lead Dev in Pokémon Order and Chaos
702
Posts
12
Years
As far as I know there is no other way to encrypt absolutely everything. The Audio and PBS folders are always left out of the encrypted archive. Unless you get some external encryption which is worse because its free and not the same format (not written in RGSS/Ruby).
As for the script error I'm unsure of the cause but it is intriguing as to why it is happening. I'm sure this isn't the problem but do you have all the necessary libraries included when you encrypt it and extract it as a separate folder? By libraries I mean "RGSS104E.dll" and "rubyscreen.dll".
 

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
As far as I know there is no other way to encrypt absolutely everything. The Audio and PBS folders are always left out of the encrypted archive. Unless you get some external encryption which is worse because its free and not the same format (not written in RGSS/Ruby).
As for the script error I'm unsure of the cause but it is intriguing as to why it is happening. I'm sure this isn't the problem but do you have all the necessary libraries included when you encrypt it and extract it as a separate folder? By libraries I mean "RGSS104E.dll" and "rubyscreen.dll".

they are there
you say they are always left out, do you mean that it would fix the problem to after encrypting it, put the PBS folder in there? or do you mean that its weird to cause problems since it isnt apart of the encryption in the first place?

iunno what the cause of the error is, but its weird it only happens with the encrypted copy of the game, and when i compress the game not encrypted, it works fine
 

Rayquaza.

Lead Dev in Pokémon Order and Chaos
702
Posts
12
Years
By saying "always left out" I mean they're never put in the archive but are extracted as whole folders instead. The PBS file isn't of RMXP origin so wouldn't be put in the archive, Audio just never gets put in the encrypted archive (the reasons for which I'm unsure).

I think if the error comes about after testing an extracted version suggests there is a problem in the original script (compilers are lazy, unless there's a HUGE change they don't detect problems) so I suggest that you go to the original game, on RMXP, and hold down CTRL and click "Playtest" at the same time. This should force the compiler to be more thorough when checking the scripts and run through every scrap of data possible.
 

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
I did hold down ctrl and did a play test, but nothing changed
the encrypted version has the same error and problems the non encrypted version does not

whats weird is I noticed that the player's name is in red (for a female) on the encrypted version, while it should be and is blue on the non encrypted version
 

Rayquaza.

Lead Dev in Pokémon Order and Chaos
702
Posts
12
Years
I'm stumped. I suggest you ask Maruno. After all, he is more knowledgeable about how essentials behaves than I.
 

~JV~

Dev of Pokémon Uranium
684
Posts
16
Years
I've got some experience with game releases and the first thing you have to know is that you DON'T need the PBS folder after the encryption, JUST DELETE IT, all the data on it is already on the encrypted data folder after you last compiled the game. The only thing left out of the encryption is the audio folder and the needed .dll.

I don't see how the encryption would break your game since it never happened in any of the 8-10 times I did it for a public release. Are you sure you compiled the PBS folder correctly before encrypting? Are you using an alternate version (if you know what I mean) of RMXP? If I were you I would download a clean Essentials folder and try to encrypt it and see what happens, do that to check if it's a problem on your RMXP/PC or if it's something particular to your Game folder.
 

Radical Raptr

#BAMFPokemonNerd
1,121
Posts
13
Years
I tried with the newest essentials and it does it as well

I'm pretty sure I'm doing it right, I've made a release before but its the first time this ever happened, and I only know 1 way to compile the game, maybe I'm doing that wrong, iunno, but I read the wiki and did that, but everything still happens but I cant figure out the cause of it

I also tried it with V11, and it worked fine, it seems like a V13 bug...
 
Last edited:

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
The PBS folder and its contents are user-friendly ways of adding data to the game. They are not used by the game itself. When you compile the game (preferably by holding Ctrl when you playtest it from RMXP to do a full compile), the information in these .txt files are read, converted into different formats and saved in various .dat files in the Data folder. These .dat files are the things that the game uses. The PBS folder and its contents are therefore irrelevant afterwards and can be discarded.

Any and all text that comes from the PBS files (species names, item descriptions, etc.) is written into the messages.dat file in the Data folder (along with a heap of other text). If that's missing or empty or somehow corrupted (or just not being used for whatever reason), then there's nowhere for the game to get item names/descriptions from, so no text will be shown instead. It is vital that you have a messages.dat file in the Data folder. If you've got multiple languages in your game, you can use it as the English language option, but do not rename the file.

As much as I've done for Essentials, I have never made a game with it. Therefore I have never compressed/encrypted it. I don't know how it works, nor what is compressed/encrypted. Don't bother asking me about it.
 

~JV~

Dev of Pokémon Uranium
684
Posts
16
Years
I took a more in depth look right now at the problem, and testing encrypting a clean, new Essentials V13 folder got me the same error, so yeah, that version is currently BROKEN for those that plan on releasing playable content soon since it's kind of a pretty big deal...

I did locate where the error is though, it wasn't much complicated figuring it out through the error messages. The StringInput class on SpriteWindow script has a bunch of problems on it regarding methods calls. I didn't come up with a fix for that yet (it's 1:30am here, kinda tired :/) but using the code from V11 (the version of essentials I use on Uranium) I could make everything work fine.

Simply go to line 1977, delete the WHOLE "Class StringInput " section and add this one on it's place:

Code:
class StringInput
  include Enumerable

  class << self
    def new( str )
      if block_given?
        begin; f = super; yield f
        ensure; f.close if f; end
      else; super; end
    end
    alias open new
  end

  def initialize( str )
    @string = str
    @pos = 0
    @closed = false
    @lineno = 0
  end

  attr_reader :lineno,:string

  def inspect
    return "#<#{self.class}:#{@closed ? 'closed' : 'open'},src=#{@string[0,30].inspect}>"
  end

  def close
    raise IOError, 'closed stream' if @closed
    @pos=nil; @closed=true
  end

  def closed?; @closed; end

  def pos
    raise IOError, 'closed stream' if @closed
    [@pos, @string.size].min
  end

  alias tell pos

  def rewind; seek(0); end

  def pos=(value); seek(value); end

  def seek( offset, whence=IO::SEEK_SET )
    raise IOError, 'closed stream' if @closed
    case whence
      when IO::SEEK_SET
        @pos=offset
      when IO::SEEK_CUR
        @pos+=offset
      when IO::SEEK_END
        @[email protected] - offset
      else
        raise ArgumentError, "unknown seek flag: #{whence}"
    end
    @pos = 0 if @pos < 0
    @pos = [@pos, @string.size + 1].min
    offset
  end

  def eof?
    raise IOError, 'closed stream' if @closed
    @pos > @string.size
  end

  def each( &block )
    raise IOError, 'closed stream' if @closed
    begin
      @string.each(&block)
    ensure
      @pos = 0
    end
  end

  def gets
    raise IOError, 'closed stream' if @closed
    if idx = @string.index(?\n, @pos)
      idx += 1  # "\n".size
      line = @string[ @pos ... idx ]
      @pos = idx
      @pos += 1 if @pos == @string.size
    else
      line = @string[ @pos .. -1 ]
      @pos = @string.size + 1
    end
    @lineno += 1
    line
  end

  def getc
    raise IOError, 'closed stream' if @closed
    ch = @string[@pos]
    @pos += 1
    @pos += 1 if @pos == @string.size
    ch
  end

  def read( len = nil )
    raise IOError, 'closed stream' if @closed
    if !len
      return nil if eof?
      rest = @string[@pos ... @string.size]
      @pos = @string.size + 1
      return rest
    end
    str = @string[@pos, len]
    @pos += len
    @pos += 1 if @pos == @string.size
    str
  end

  def read_all; read(); end

  alias sysread read
end
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
Hmm, interesting. Poccil gave me a new version of that class, which I put into v13. I don't understand any of it, and obviously Poccil didn't test it thoroughly (I already had to fix the version he originally sent me).

Oh well. I'll revert it in the next release. Looks like I'll have to put it out fairly promptly.
 
10
Posts
11
Years
  • Seen Dec 28, 2016
I took a more in depth look right now at the problem, and testing encrypting a clean, new Essentials V13 folder got me the same error, so yeah, that version is currently BROKEN for those that plan on releasing playable content soon since it's kind of a pretty big deal...

I did locate where the error is though, it wasn't much complicated figuring it out through the error messages. The StringInput class on SpriteWindow script has a bunch of problems on it regarding methods calls. I didn't come up with a fix for that yet (it's 1:30am here, kinda tired :/) but using the code from V11 (the version of essentials I use on Uranium) I could make everything work fine.

Simply go to line 1977, delete the WHOLE "Class StringInput " section and add this one on it's place:

Code:
class StringInput
  include Enumerable

  class << self
    def new( str )
      if block_given?
        begin; f = super; yield f
        ensure; f.close if f; end
      else; super; end
    end
    alias open new
  end

  def initialize( str )
    @string = str
    @pos = 0
    @closed = false
    @lineno = 0
  end

  attr_reader :lineno,:string

  def inspect
    return "#<#{self.class}:#{@closed ? 'closed' : 'open'},src=#{@string[0,30].inspect}>"
  end

  def close
    raise IOError, 'closed stream' if @closed
    @pos=nil; @closed=true
  end

  def closed?; @closed; end

  def pos
    raise IOError, 'closed stream' if @closed
    [@pos, @string.size].min
  end

  alias tell pos

  def rewind; seek(0); end

  def pos=(value); seek(value); end

  def seek( offset, whence=IO::SEEK_SET )
    raise IOError, 'closed stream' if @closed
    case whence
      when IO::SEEK_SET
        @pos=offset
      when IO::SEEK_CUR
        @pos+=offset
      when IO::SEEK_END
        @[email protected] - offset
      else
        raise ArgumentError, "unknown seek flag: #{whence}"
    end
    @pos = 0 if @pos < 0
    @pos = [@pos, @string.size + 1].min
    offset
  end

  def eof?
    raise IOError, 'closed stream' if @closed
    @pos > @string.size
  end

  def each( &block )
    raise IOError, 'closed stream' if @closed
    begin
      @string.each(&block)
    ensure
      @pos = 0
    end
  end

  def gets
    raise IOError, 'closed stream' if @closed
    if idx = @string.index(?\n, @pos)
      idx += 1  # "\n".size
      line = @string[ @pos ... idx ]
      @pos = idx
      @pos += 1 if @pos == @string.size
    else
      line = @string[ @pos .. -1 ]
      @pos = @string.size + 1
    end
    @lineno += 1
    line
  end

  def getc
    raise IOError, 'closed stream' if @closed
    ch = @string[@pos]
    @pos += 1
    @pos += 1 if @pos == @string.size
    ch
  end

  def read( len = nil )
    raise IOError, 'closed stream' if @closed
    if !len
      return nil if eof?
      rest = @string[@pos ... @string.size]
      @pos = @string.size + 1
      return rest
    end
    str = @string[@pos, len]
    @pos += len
    @pos += 1 if @pos == @string.size
    str
  end

  def read_all; read(); end

  alias sysread read
end
So I did this and it did fix the error of it not running at all but now when I encrypt it and try to run it I get this error instead (see the attached file)
It says something about NoMethodError Script SpriteWindow line2148 Undefined Neverload=

and I'm not very good at coding or scripting so I have no idea what is going on, if someone could even just point me to the right direction that would be helpful!




EDIT: Nevermind excuse my ignorance, you already said that it still had a bunch of Method call errors.
 
Last edited:
Back
Top