YSE - Patch System

Yami Engine Ace - Patch System

​



Last Update: 2012.03.17

​



patchsystem.png

Introduction

This script will help you make patches for your games in order to fix bugs for Encrypted games. Patch file is a single small file, players can copy it to game's folder.

Features

- Patch Maps and Database.

- Security Method for anti fake patches.

How to Use

- Copy this script and YSE - Basic Module into your project.

- To call Patch Maker, use custom script: YSE.patch_start

Script

- Requirement: YSE - Basic Module

- Core Script: YSE - Patch System

Credit and Thanks

Yami World - Terms of Use
Ah! Great to see you've brought the Patch System over here, Yami. One of the best and most useful scripts I've ever seen. I'd wholeheartedly recommend this as a "staple" utility script to use, seeing as so many projects go through updates and revisions, and this will make the entire process so much smoother. I really hope you manage to get to allowing the database patching, too.
Update 2012.03.17:

- Released Full version.

- Have Database patching.

- Have a button Patch All.

- Have a hash checking.

Remember to download Basic Module again (Last update: 2012.03.17)
Little problem... I've changed everything properly, I've changed also "rgss2a" to my own format "add", and... Well... If I make a installer, and unpack my project on desktop, it works fine with every patch. But if I send my project, and then a patch to anyone, it will always show Fake Patch Alert... I think it can be because of compressing installer into *.rar, but...

I've tried also unpacking compressed game on my desktop, and then making an installator in install maker. And it doesn't work even on my computer...
Little problem... I've changed everything properly, I've changed also "rgss2a" to my own format "add", and... Well... If I make a installer, and unpack my project on desktop, it works fine with every patch. But if I send my project, and then a patch to anyone, it will always show Fake Patch Alert... I think it can be because of compressing installer into *.rar, but...

I've tried also unpacking compressed game on my desktop, and then making an installator in install maker. And it doesn't work even on my computer...
I have just changed a little in fake-patch detection. You can turn off this function too. Sorry about that inconvenient.
Ok, thanks, I'll try 🙂
can I use this to make game expansions?
can I use this to make game expansions?
Most likely tbh. Just give it a try?
I'm sorry for reviving old threads or anything -- but I was wondering if this works with old save files? I want players to be able to start from where they left off but still see the changes.
That I think is based on how you set-up the save files... plus this script should have been inside the game already, else your players will need to redownload the whole game which has this script before they can do patches, and if you changed anything on save files during that, then most probably it won't...
Oh, what do you mean by "how I set-up my save files"? >.> I haven't really changed anything with the saves except using Yanfly's save engine, which to my very poor programming knowledge, only changes the interface ...
Then I guess almost everything will work fine, but maybe actors already in your party won't... since actor data is saved in the save file, while the others are not...


basically, normally:


When loading a saved file:


Actor Data -> loaded from the save file


Other database data -> loaded from the database


from what I've seen, the script redirects the reading from the database so it should work on other database entries but probably not on actors...
Dumb question: If my patch includes any new physical files such as new custom tileset(not in stock RTP), a new music track, sound, or anything of that nature, would I need to simply include that file in the patch folder and it would "auto-import" it?
Would there be any way to add a button to the start screen that runs this script? I feel as though it would make patching my game a lot easier 🙂
Was just wondering, is there any real difference between your normal version and the lite version of these scripts? I've had a look over them and cant really notice anything - except a huge difference in the amount of code 😛

Edit:

Your script inspired me to see if I could 'patch' scripts... I've literally just started some basic tests, but it would seem that it can be done. 🙂
Here is some code if you wanna have a peek. 😀

Spoiler
script = %Q( module UT def self.method p "Sucessfull" end end ) script1 = Marshal.dump( script ) script2 = Marshal.load( script1 ) args = [ $RGSS_SCRIPTS.size-3 , [rand(999999),"MyNewPatchedScript",script1,script2] ] $RGSS_SCRIPTS.insert(*args) $RGSS_SCRIPTS.compact.each_with_index do |script, index| p "#{index} = #{script.first}, #{script[1]}, #{script.size}" endThen call UT.method from somewhere, I done it after the title screen had processed, which obviously printed 'Successful' to the console. Obviously, it aint much, but its proof that scripts can also be patched. Thats very exciting for me, especially with the online crap im doing right now. 😀
So yea... Your script has inspired me 😀
Was just wondering, is there any real difference between your normal version and the lite version of these scripts? I've had a look over them and cant really notice anything - except a huge difference in the amount of code 😛

Edit:

Your script inspired me to see if I could 'patch' scripts... I've literally just started some basic tests, but it would seem that it can be done. 🙂

Here is some code if you wanna have a peek. 😀

Spoiler
script = %Q( module UT def self.method p "Sucessfull" end end ) script1 = Marshal.dump( script ) script2 = Marshal.load( script1 ) args = [ $RGSS_SCRIPTS.size-3 , [rand(999999),"MyNewPatchedScript",script1,script2] ] $RGSS_SCRIPTS.insert(*args) $RGSS_SCRIPTS.compact.each_with_index do |script, index| p "#{index} = #{script.first}, #{script[1]}, #{script.size}" endThen call UT.method from somewhere, I done it after the title screen had processed, which obviously printed 'Successful' to the console. Obviously, it aint much, but its proof that scripts can also be patched. Thats very exciting for me, especially with the online crap im doing right now. 😀
Spoiler
So yea... Your script has inspired me 😀
Is this script stable? as in does it work as intended?
Well yea it does, but there are some issues. I am currently looking deeper into it. 🙂

I have a much ore complex version of it now, which works fully (its used in PiNG and autoupdates and patches the scripts perfectly) but that versino wont be released 😀
Well yea it does, but there are some issues. I am currently looking deeper into it. 🙂

I have a much ore complex version of it now, which works fully (its used in PiNG and autoupdates and patches the scripts perfectly) but that versino wont be released 😀
So you're posting this just to brag about it and let us feel envious ?

Ok, you win.
Lol yea, a little bit ^_^... Probably best not to derail Yamis thread cause of a little script 😉
Lol yea, a little bit ^_^... Probably best not to derail Yamis thread cause of a little script 😉
well considering I don't know what a UT.method is i'm SOL

Original thread: https://forums.rpgmakerweb.com/threads/yse-patch-system.56/