Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the PicPointerPatch #1033

Closed
BlisterB opened this issue Sep 15, 2016 · 7 comments
Closed

Support the PicPointerPatch #1033

BlisterB opened this issue Sep 15, 2016 · 7 comments

Comments

@BlisterB
Copy link
Member

Hello everyone :).
I was wondering if it would be possible to add the support of the PicPointerPatch for the Player.
http://cherrytree.at/cms/download/?did=19
It's used by Aëdemphia (one of the most popular rm2k game in french comunities) (for example in the item menu).
Here's a description of the patch :

The PicPointerPatch, as the name says, lets you use pointers at picture IDs (this means, the destination ID of a Show, Move or Erase Picture command can be choosen at runtime, using a variable). It's very easy to use, if you want to use a fix ID, enter it normally (e.g. Show Picture [7], cloud.png), if you want to get the ID from a variable, use 10000+VarID als picture ID (e.g. Change Variable [208], 7; Show Picture [10208], cloud.png <<< same effect as Show Picture [7], cloud.png). If the variable contains an illegal value, you will get an error.

This also works with transparecy and magnification of pictures at Show and Move Picture commands!

The second important feature (new in version 2) is - you can also make the FILENAME of the picture be choosen through a variable.

If you use 50000+VarID as picture ID...
a) as explained above, the real picture ID will be read out of variable [VarID]
B) a file number will be read out of variable [VarID+1] - the last 4 chars of the picture filename will be replaced with that number

Some useful examples:

<> Show Picture 2, (160, 120), Item_0000
This command shows, as usual, the image "Item_0000" as picture no. 2.

<> Change Variable [0208], 9 set
<> Show Picture 10208, (160, 120), Item_0000
This will show the image "Item_0000" as picture no. 9.

Now look:
<> Change Variable [0208], 14 set
<> Change Variable [0209], 83 set
<> Show Picture 50208, (160, 120), Item_0000
This will show the image "Item_0083" (!) as picture no. 14!

IMPORTANT: The filename should have space for this number! A example how it should NOT be: If you would the example above using a picture "Blue Dragon", the RPG Maker would try to load a file called "Blue Dr0083"! You would get a "File not found" error then.

Another thing: Everything, the patch can not process, it will hand over to the RPG Maker. So - for exmaple - if you use 10500 as picture ID though this variable is unused, the patch hands this over to the RPG Maker, which would try to show a picture with ID 10500 - this would result in an error.

A practical expamle is attached as demo game (just look into the folder "Demospiel"). It's a number display with 6 digits - this only needs 15 event commands! Just open it in your RPG Maker and look at the event (the comments are in german, just ignore them).

The use of this patch? If you didn't understand it until now, I feel sorry for you. But I'll help you: number displays, item/skill/equip menus, etc. - with PicPointerPatch Version 2 you can do all these things in very short time!

At all, who are angry now, because their item menu took them months: SORRY! ;-)

HOW TO INSTALL THE PATCH <<<<<<

  1. open Lips.exe
  2. click at "Apply IPS Patch"
  3. choose version (RM2k or RM2k3)
  4. choose the target RPG_RT.EXE (choose "All files" at the bottom right to see it)

But - the RPG Maker doesn't allow you to use that high picture IDs! So we have to patch the RPG2000.EXE/RPG2003.EXE too.

  1. create a backup of your RPG Maker, so you can restore it, if you destroy it.
  2. start Resource Hacker (available here: http://www.angusj.com/resourcehacker/) and open your RPG2000.EXE/RPG2003.EXE file.
  3. go to RCDATA\TFORMEVCMD11110\0.
  4. look for the line "MaxValue = 20" (RM2k) or "MaxValue = 50" (RM2k3) and replace the 20/50 with 100000. Do the same with the two lines "MaxValue = 100" below. Then click at "Compile Script" and save the file (File>Save).
  5. Do the same with RCDATA\TFORMEVCMD11120\0.
  6. Do the same with RCDATA\TFORMEVCMD11130\0 too, but here you have to change the line "MaxValue = 20"/"MaxValue = 50" only.
  7. Save and close.

At the end a little tip:

Transparency values above 100% can cause very interesting effects. For example - with 400% transparency the image will be displayed with inverted colors (as I could see)!

@Ghabry
Copy link
Member

Ghabry commented Sep 15, 2016

The problem here is that we can't just have PicPointer always enabled because I saw one japanese game which really uses such high IDs ^^'
We need some opt-in mechanism via command line and a game database...
For the new Rpg Maker somebody else created a new picpointer patch which uses different id ranges for this btw m(

@BlisterB
Copy link
Member Author

Arf ^^".
Maybe we could add this feature in EasyRPG Editor, and support it in a clean way in the Player?
A dev using this patch would have to convert its game, but it would be possible.

@Ghabry
Copy link
Member

Ghabry commented Sep 16, 2016

When #627 is ready the Aedemphia devs could provide a new Ini that contains something like.

[EasyRPG]
Patch=PicPointer

About the editor: Additional/extended event commands are planned for the Editor but I have no idea how to encode them yet because current event commands are quite limited and we want to be superior to RPG Maker.
An event command can only hold one string argument and "unlimited" int arguments.
This should be extended to "unliimited" int, string and float.

My plans were a human readable .script-file which is converted on-the-fly to some event command class by liblcf... (human editable is a different topic, just use the editor :P)

And off-topic but no idea how to contact you @BlisterB
You wrote in the French forum Aedemphia is now at constant 60 FPS. How did this happen. Improved tone change code I guess?

@BlisterB
Copy link
Member Author

Your plans sounds cool Ghabry ^^.

You can contact me with that e-mail mehdi.abelha[ aT}gmail.com.
Aëdemphia is at constant 60FPS on my laptop :p. Tone changes are indeed responsible of this performances boost ^^, I wasn't able to test the image cache PR for the moment.

@Ghabry
Copy link
Member

Ghabry commented Sep 17, 2016

I search through my chatlog to recheck my 10k claim and confused something. The japanese game did not use Picture IDs above 10000 but Variables above 10000 and PicPointer is PicID - 10000 = VarID, not VarID+10000...

So it would be probably save to enable PicPointer by default like we already do for Inelukis MP3 patch...

@BlisterB
Copy link
Member Author

Awesome ! Thank you Ghabry :) !

@Ghabry Ghabry added this to the 0.5.1 milestone Sep 17, 2016
Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Sep 17, 2016
@carstene1ns
Copy link
Member

Transparency values above 100% can cause very interesting effects. For example - with 400% transparency the image will be displayed with inverted colors (as I could see)!

This is not supported by #1035 and hopefully no game really depends on that (broken) behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants