Aug 23, 2014

CC_Text_RTL_v2



<< Download Demo >>

--------------------------------------------------------------
 History
--------------------------------------------------------------
 v2.0 : RTL on several windows.
 v1.0 : RTL on message window only.

--------------------------------------------------------------
 Video and Screenshot
--------------------------------------------------------------

https://www.youtube.com/watch?v=0G0I6QScD-8







(Version 2.0)





--------------------------------------------------------------
 Features
--------------------------------------------------------------
This script allows you to show text from Right To Left(RTL).

Windows under effect:
- 'Show Text' in Event Command.
- Item/Skill Description
- BattleLog
- Choice List
- The window on the top of the Save Menu.
- Character description in Status Menu.
- 'Show Scrolling Text' in Event Command.

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
[1] Settings
  By default, effects are controled by switches.
   Switches[1] => RTL, Show text from Right To Left.
   Switches[2] => RL, Reverse letters in line.
   Switches[3] => RS, Reverse the order of words in line.
 
  IDs of those switches are determined in CC::TEXT_RTL controls ON/OFF.
  See CC::TEXT_RTL if you want to change.
  
[2] Control Characters in RTL + Reverse-Letter mode
  Default Control Characters(\C{n], \I[n], \{, \}) will be reserved.
  But you need some attention since numbers also be reserved.
 
  ex. "\C[1]Lorem\C[0] Ipsum\n" => "muspi \eC[0]meroL\eC[2]\n" = white text.

[3] Examples
    (Mode)        : (Text)
    Default                : "Lorem Ipsum" (Left To Right, LTR)
    RTL           : "muspi meroL" (RTL)
    RTL + RL      : "Lorem ipsum" (RTL)
    RTL + RS      : "muspi meroL" (RTL)
    RTL + RL + RS : "ipsum Lorem" (RTL)
    RL            : "muspi meroL" (LTR)
    RS            : "ipsum Lorem" (LTR)
    RL + RS       : "meroL muspi" (LTR)
  
    trial and error.

[4] In-Battle Text
    if CC::TEXT_RTL.enable_in_battle? is true, effects on battle-log will be shown.

[5] Conflict Warning
  This script rely on overwriting methods heavily.
  It may cause conflict against other message scripts.
--------------------------------------------------------------
 Reference
--------------------------------------------------------------
 Bulletxt, "Arabic Reading Right to left", http://sourceforge.net/p/lodestone2d/code/HEAD/tree/.

--------------------------------------------------------------
 Thanks
--------------------------------------------------------------
 q8fft3 for advices (at RPGMakerWeb).

--------------------------------------------------------------
 Compatbility
--------------------------------------------------------------
    This script has partial compability with:
        Yanfly, "Yanfly Engine Ace - Ace Message System v1.05"
         (http://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-message-system/)
        modern algebra, "ATS: Message Options [VXA]", v1.0.7
         (http://rmrk.net/index.php/topic,46770.0.html)
        CC, "CC_FGMSG"
         (http://yellow-mantaray.blogspot.jp/2014/08/CCFGv4.html)
    Place this script under them.
 
--------------------------------------------------------------
 Order of Control Characters
--------------------------------------------------------------
 In RL mode, every control characters will be reversed before processed backward.
 And it may cause error.
 ( Ex. "\C[1]Colored Text\C[0]." => reversed as "\e.C[0]txeT deroloC\eC[1]\n" => appear as "Colored Text]0[C" )
// Please try changing order of Control Characters if it happen.

--------------------------------------------------------------
 Q&A
--------------------------------------------------------------
Q. How to make effects auto enabled?

A. Find "return $game_switches[ * ]" and change them to "return true". It's around line 120.
   By default, $game_switches[ 1 ] controls RTL, $game_switches[ 2 ] => RL, $game_switches[ 3 ] => RS.
   They are written in "module TEXT_RTL".


 ('w')

Aug 21, 2014

personal note 8 - Debug

(1) What happened:
I wanted to see callstack.

(2) Solution
 module DebugView
    def parse_caller(at)
      if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
        return [$2, $3] #file = $1; line = $2.to_i; method = $3
      end
    end
  
    def track
    return if !$TEST
        stack = []
      caller.each { |arr| stack.push( parse_caller(arr) ) }
      stack.pop; stack.pop
      self.trace(stack)
    end
end

call DebugView.track

(3) Remained Problems
caller returns [filename, line, method].
but in rgss3, filename has no meaning since all scripts are loaded in single file.

Q. why DebugView?
A. ('w') < because it was there.

Aug 19, 2014

personal note 7

(1) What happened:
Bias in the random movement.
If you use "Options: Direction Fix" and "Movement Type: Random" simultaneously,
The event biased to move to the fixed direction.

(2) Cause
In the line 114 of Game_Event,

  def move_type_random
    case rand(6)
    when 0..1;  move_random
    when 2..4;  move_forward
    when 5;     @stop_count = 0
    end
  end

Since direction is fixed, that "move_forward" goes to always same direction.



If I remember correctly,

in RPG Maker 2000, inner direction values can be changed even if direction if fixed.
And some crazy people used the direction of events as a substitute of variables.
VX Ace not allow it.


(3) Solution
when 2..4;  @direction_fix ? move_random : move_forward



('w') < ...harmless.

personal note 6

(1) What happened:

If you set event parametes as "Trigger: Event Touch" and "Movement Type: Random",
the event will never touch player.

(2) Cause
"Movement Type: Random" checks whether a movement is possible before it move.
If not, the event do nothing. It will not check an event activation.

(3) Solution
I made a short script...but wait.
Just changing "Movement Type: Player touch" is enough isn't it?

Aug 13, 2014

CC_RPG_Voice


<<Download Demo>>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
This script provides RPG::Voice, akin to RPG::SE.
You can set the Master Volume for Voice.
You have two way to play Voice.
 [1] 'Play SE'. Any SE that filename including the keyword will be regarded as Voice automatically.
 [2] Script call. vo_play(name, volume, pitch).

--------------------------------------------------------------
 Video and Screenshot
--------------------------------------------------------------

https://www.youtube.com/watch?v=Qrfuic_JHxY





--------------------------------------------------------------
 How to use
--------------------------------------------------------------
Written in Script file. please try demo.

詳しい使い方はスクリプトファイルに書いてあります。
日本語もあります。


('w') < black box is not nice

Aug 12, 2014

personal note 5 : Reading RegEx


(1) What happened
I had trouble at RegEx while editing my CC_FG.

In line 300 in Window_Base;
  #--------------------------------------------------------------------------
  # * Destructively Get Control Code Argument
  #--------------------------------------------------------------------------
   def obtain_escape_param(text)
    text.slice!(/^\[\d+\]/)[/\d+/].to_i rescue 0
  end

What is that [/\d+/] ?
That single line crashed my whole night.

Perhaps I'll forget what does this line say, so leaving this note.

(2) Decryption
That bracketed RegEx ([/\d+/]) is one style of [] for String.
It returns a matched part of String.

Example:
"hoge01"[0] => "h"
"hoge01"[/\d+/] => "01"

so a collapsed form of the line means;

begin
  str = text.slice!(/^\[\d+\]/)
  str.match(/\d+/)
  str = $&.to_i
rescue
  0
end


(3) Application

And from there, I made a line to get String parameter.
  str = text.slice!(/^\[.+?\]/)
  str.match(/\[(.+?)\]/)
  str = $1

or
  str.match(/\[(.+?)\]/)[1]

or
  text.slice!(/^\[\S+\]/)[/\[(.+?)\]/, 1]

I will not use the compressed RegEx line though.

(4) Biproduct

Class Window_Base < Window
  def obtain_escape_param_string(text)
    text.slice!(/^\[\S+\]/)[/\[(.+?)\]/, 1] rescue 0
  end
end


This allows us to take a parameter as String for control characters in RMVXA.
I thought I need this method in CC_FG at first, but not in result.

('w')

Aug 9, 2014

personal note 4

(1) What happened:
CACAO's DebugView script (for VX) does not work on RPG Maker VX Ace.
http://cacaosoft.blog42.fc2.com/blog-entry-508.html

(2) Cause
Difference in version of ruby(1.8 and 1.9.2) of RGSS2 and RGSS3.
NKF in 1.9 does not work as in 1.8.
I forgot details.

(3) Solution
Replace 7th line;
  'OutputDebugString.call(NKF.nkf('-s', s))'
with
  'OutputDebugString.call(s.to_s.encode("Shift_JIS"))'.

('w') < DebugView is nice.

Aug 8, 2014

personal note 3

(1) What happened:
Confliction.
When you introduced ろかん's "シンボルエンカウント補助"
with Mog Hunter's "Character EX", latter won't work.

(2) Cause
Aliasing inherited Method.
Aliasing Method(Update) of Class(Game_Character) in "シンボルエンカウント補助".
But Class(Game_Character) does not have own Method(Update).

(3) Solution
I made my own version of it, CC_TracerEvent.
But simply adding Method(Update) before alias might be enough...

Aug 2, 2014

personal note 2

(1) What happened:
In CC_FG;
When F12 is pushed while displaying a picture,
bitmap in (Class Figure) is disposed while FGManager.dispose is not called.

(2) Cause
Unknown. Perhaps embedded (Class Sprite) has some problem.

(3) Solution
Check the case of that the instance of (Class Figure) is not disposed
but inner bitmap is disposed.

personal note

(1) What happened:
When I opened VX ACE's 'Manage Projects', it deleted my projects in 'Save Path' without confirm dialog.

(2) Cause
A file 'Game.ini' in project folder which includes;
  CreationDate= ***
  CloudDate= ***
  SteamOwner= ***
These lines are basically appear in the project folder downloaded from Steam Workshop.
Deleted projects were originally copy of Workshop projects and were edited.

VX ACE checks 'Game.ini' and, if it finds strange lines, automatically delete whole project folder without warning. It is a bit of...

(3) Solution
Avoid to copy workshop projects.
With copied folder, delete these lines or overwrite by default 'Game.ini'

('w') < don't forget to back up.

Aug 1, 2014

CC_TracerEvent



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
In short: This script helps you to make a Romancing SaGa-like encounter(not battle).

In long:
This script makes any event as a tracer-event by putting some comments.
If the player get close to tracer-event, it is activated and start to chase the player.
And if the player get far from activated tracer-event, it back to normal.
Non-activated tracer-event will act as normal events. You can set its move route.

This is especially based on idea of ろかん(Rokan, http://kaisou-ryouiki.sakura.ne.jp/)
and his "シンボルエンカウント補助"(translated as symbol encounter simplifier in rpgmakerweb.).
It has some conflict problem on Class(Game_Character). So I made this.


https://www.youtube.com/watch?v=stXGAbdPw_o

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
Please try demo.

[1] Setup parameters
  Edit 'CC::Tracer::TYPE' and 'CC::Tracer::TYPE_SE'.
 
[2] Put comments in events
  [tracer=(n)] => sets the event as a tracer-event of type (n)
                  TYPE[(n)] and TYPE_SE[(n)] is automatically used.
  [tracer_lv=(n)] => Optional. The tracer-event will run off when the player is greater than (n).


('w')

CC_SimpleLight



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
This script allows you to make characters to have lights.


https://www.youtube.com/watch?v=u02dpNyQuPM

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
Written in script file.
Please try demo.
The light image is 32bit-png (alpha-channeled).

('w')

CC_SetEventZ



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
You can set a Z-value of any event on the map.

https://www.youtube.com/watch?v=Xmw0ip3Sw-0

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
(1)Add a comment on the event page and write like this;
   [evz=(x)] => set a Z-value of the event to (x).

(2)Script call.
   set_z_of_event(id,value) => set a Z-value of the event(id) to (value).
   If id == 0, the effect will be on the event itself.

('w')

CC_Reflection



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
This script allows you to show a reflect image of characters which pararell to the ground.
In default, effect on events are off, on other characeters(player, follower, vehicles) are on.


https://www.youtube.com/watch?v=UWmyW9wrnjk

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
Written in the script file. Please try demo.
You will need transparent-water tilemap like this:


('w')





CC_PMS_VXA



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
Parallax Mapping System(PMS).
You can show multiple layers on the map screen.
As many layers as you want.
Each layer can have a different scroll speed.
Flip animation.


https://www.youtube.com/watch?v=-SNB_ABr_tE

 --------------------------------------------------------------
 How to use
--------------------------------------------------------------
Please try demo.
Check "./Graphics/ParallaxMaps/".

('w')

CC_BattleWeather



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
This script makes a weather on the map appears on the battle and vice versa.
Weather effects appear from very first frame.


https://www.youtube.com/watch?v=fEv9U_EbYvA&list=UUw7cSfTM7TAH-sgV4V2NSMQ

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
 Plug&Play.

 ('w')

CC_FG_v4.3



<< Download Demo >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
In short: A visual-novel like image controller.

In long:
This script gives you more control on character images in a dialog scene.
You can move those images, darken for highlighting a narrator, shake as comical action, et cetra.
(Optional) You can synchronice a timing of actions with text flow by using a controll character.

--------------------------------------------------------------
 Screenshots
--------------------------------------------------------------

https://www.youtube.com/watch?v=keHprIVCaG0&list=UUw7cSfTM7TAH-sgV4V2NSMQ









--------------------------------------------------------------
 How to use
--------------------------------------------------------------
Written in script file.
Please try demo.

--------------------------------------------------------------
 History
--------------------------------------------------------------
  v4.3 : Added Command to change image without fade.
  v4.2 : FGMSG and Control Character.
  v4.1 : Fixed F12 problem.
  v4.0 : Ported from RMVX to RMVXA.


('w')

CC_Adaptor_MRR_PM


<< Download >>

--------------------------------------------------------------
 Features
--------------------------------------------------------------
This tiny script resolves a conflict of two awesome scripts,
Khas's "Pixel Movement" and Yanfly's "Move Restrict Region".

Khas's blog: http://arcthunder.blogspot.jp/

Yanfly Channel: http://yanflychannel.wordpress.com/

--------------------------------------------------------------
 How to use
--------------------------------------------------------------
Set scripts as below.

Material
 Khas's Pixel Movement
 Yanfly's Move Restrict Region
 This



('w')