caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ

Cae_Tweaks

v09 updated 2023-10-27​

Terms of Use​


Description​

The plugin file must be named Cae_Tweaks.js.

This plugin contains a bunch of different things. It's mostly just me slowly making a game and coding some more stuff whenever I think "I wish I could do X". Since I'm up to v03 as of writing this, I thought I'd make a thread for it.

Since v09, many values can be customised via plugin parameters. The code is thoroughly commented and not obfuscated. Each feature's code is enclosed in its own block and can be independently enabled/disabled via the Plugin Manager. The help section is now extensive and should cover most queries.

This plugin was written for, and tested with, a front-view TPB system. It has not been specifically written to be compatible with other plugins, but many things should be cross-compatible.

Feel free to post feedback on what's already here, e.g. bug reports, problems understanding the help, or favourite features!

If you have a feature suggestion, consider starting a thread in Plugin Requests. :kaohi:

Features​

Here is the plugin's "quick reference" feature summary:
• M01: HIT > 100% multiplies evade fail rate. • M02: Reinstate speed/Through on vehicle exit. • M03: High relative TGR => taunt opponents. • M04: States can <persist> after death. • M05: Conditional state chaining <next: X, Y>. • M06: Blank equip type names make duplicate slots. • M07: Luck effect applies to hit/crit chances. • M08: Use TP as a damage shield. • M09: <max TP base: X> & <max TP plus: X>. • M10: Left/right actor selection in TPB-Wait. • M11: Adds Active TPB Mode in-game option. • M12: States add min turns on apply, up to max. • M13: Random encounter rate [R, 2R]. • M14: Speed > 0 actions give bonus TPB charge next turn. • M15: "Remove State X%" removes X% of max turns. • M16: Enemy tag <actor: X> copies traits from actor X. • M17: <follow-up: A, B, C> for Skills/Items. • M18: "X Random" scope: <forbid repeats>, <avoid repeats>. • M19: "Add State: Normal Attack" effect => this is an attack. • M20: Casting states for Skills/Items: <cast state: X>. • M21: Elemental HP Regen traits: <HRG element: X>. • M22: Turn-based state stacks: <stack: X>. • M23: Gain TP -> Lose TP on opponent-scoped actions. • M24: Replace Guard skill: <guard skill: X>. • M25: Ignore weapon for certain Skills/Items: <no weapon>. • M26: Change speed on bush/ladder tiles. • M27: "Item" skill type to limit battle item usage. • M28: Change save slot count. • M29: Custom skill cost types: <cost: type ext: jsCost>. • M30: Per-actor formation locking: <lock formation>. • M31: Change follower-event collisions. • M32: Disable event "locking": <no lock>. • Q01: Finer volume controls. • Q02: Front-view battle effects on actor status window. • Q03: More info on status scene. • Q04: Skips blank messages on battle start. • Q05: More actor info on equip scene. • Q06: Pauses audio & video when game loses focus. • Q07: Disables WindowLayer masking. • Q08: Scroll down to last item, change column if needed. • Q09: Process text codes in any game window. • Q10: Suppress map fast-forward behaviour. • Q11: Attack animation controls. • Q12: Add "Quit Game" command for non-web games. • Q13: Support weather effects in battle. • Q14: New message codes: \AF[n], \PF[n], \S[n], \ALIGN[0|1|2]. • Q15: Group duplicate drops in battle rewards. • Q16: Adds in-game option for audio dynamic range compression. • Q17: Adds a help window to the options scene. • Q18: Enemy opacity: <ghost: X>. • Q19: Render at integer coordinates to avoid blurring. • Q20: Show remaining state/buff turns on battle icons. • Q21: Per-map BGS muffling: <muffleBGS>. • Q22: All enemies are closer to the bottom of the screen. • Q23: Tile/event draw offsets: <offset: X, Y>. • Q24: Hide MP or TP gauges with a maximum of 0. • Q25: Segmented gauges. • Q26: "Saving" indicator appears when saving. • Q27: Touch UI toggles immediately when option is toggled. • Q28: Show options on first session. • Q29: Pre-title static/movie splash screens. • Q30: Enemy gauges. • Q31: Adds WASD movement, moves W -> E. • Q32: Event hue shift/cycle: <hue: H, D>. • Q33: Parallel Show Text => auto/gab message. • Q34: TPB cast time gauge overlay. • Q35: Death effects: <death var: X, Y>, <death anim: X>. • Q36: Show Picture snapshot.png uses snapshot. • Q37: Orbital motion for events: <orbit: id, R, T, ro>. • Q38: Hold touch to dash. • Q39: Attack/Guard commands show skill names. • Q40: Hover-select on menus plays Cursor SE. • Q41: Shadowless hard/soft colour map lighting shader. • Q42: Skip Buy/Sell/Cancel when appropriate. • Q43: Adds a Game Speed in-game option. • Q44: Place Guard command immediately after Attack. • Q45: Vertical scrollbar indicators. • Q46: Remodels main status scene window. • Q47: Adds a Full Screen in-game option. • D01: Prefix Troop 1 events to all other Troops. • D02: JS: char1.los(char2, fov) => true|false. • D03: Catch ConfigManager.save errors. • D04: Prefix Item 1 effects to all other Items & Skills. • D05: Set _targetIndex for enemy actions. • D06: Track all HP, MP, TP changes per result. • D07: Audio pitch can change without restarting track. • D08: Reset opposed "Last" data. • D09: Draw face from enemy image: $NAME$X-Y-S.png. • D10: Enemies use Attack|Guard skill when picking skill 1|2. • D11: Tile events contribute tile flags. • D12: Adds plugin commands to force battle advantage. • D13: Show Picture "!picture.png" pins to the map. • D14: Support showing left/right arrows on game windows. • D15: More info & clipboard-copy button on qualifying errors. • D16: Don't process message codes during measurement. • D17: Merge BGM Volume and ME Volume. • D18: Add members from listed troops: <add: X, X, X>. • D19: Allow processing multiple move commands per frame.
Each feature has a code, e.g. M01, for ease of reference. Detailed help on each feature can be found in the plugin's help description.​

View/Download​

 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ
Updated to v04!
  • M16: now enemy Add Skill traits draw from learned skills for associated <actor>.
  • M17: now <follow-up:7,8,9> picks one skill at random, rather than queueing all of them. Also, enemy "known" skills are now drawn from their Add Skill traits, rather than their attack pattern.
  • M20: no longer auto-removes cast state - use Action End auto-removal for that.
  • Q11: now base anim ID 0 does not receive an offset (e.g. actor without off-hand weapon). Also, the tags work on items/skills: specific beats general, i.e. if the item/skill is tagged then the traits are ignored.
  • Q14: added \s[n] for text speed, inspired by RM2k3.
  • Q18: now e.g. <ghost: 2> can cancel out <ghost: 0.5>.
  • Q21: fixed crash on playing BGS: None.
  • Q29: now each splash screen can be timed independently.
  • Q30: now gauges are unaffected by enemy hue. Also, their scaling (x, y, and parent-relative anchor) is floored for crisp/accurate visuals.
New additions:
  • M23: Gain TP acts as Lose TP on opponent-scoped actions.
  • Q32: event notetag <hue: H, D>: +H hue, optional +1 per D frames.
  • Q33: Show Text is non-interrupting if used in a Parallel event.
  • Q34: represent cast time as a dark overlay on the TPB gauge.
  • D06: track total HP/MP/TP change per apply (normally only tracks most recent per apply).
  • D07: changing BGM pitch does not cause it to replay from start.
  • D08: "Last" data convenience, e.g. setting "Last Subject Actor" will set "Last Subject Enemy" to 0. Makes it easier to work with when you're not sure if, e.g. the most recent subject was an actor or enemy.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ
Updated to v05!
  • M09: DFAULT_MAX_TP = null now works as advertised.
  • Q04: fixed double-substitution in emerge messages.
  • Q23: now <offset> notetag works for non-tile events.
  • Q26: icon now shows even if save completes in <1 frame.
  • Q32: fixed off-by-one error in hue cycle timing and added type checks in getTag, just in case.
  • Q33: now initialises itself on new game and clears face area immediately before redraw.
  • Q34: now the charge time overlay uses gradient fill.
  • D03: added user feedback (audio + text) on failure.
New additions:
  • M24: <guard skill: X> trait notetag: like the Attack Skill trait, but for Guard.
  • M25: <no weapon> Skill/Item notetag: ignore weapon(s) for this action. E.g. for a punching attack.
  • M26: everyone automatically moves slower on bush and/or ladder tiles.
  • Q35: trait notetags:
    • <death var: X, Y> => +Y to game variable X when bearer dies.
    • <death anim: X> => play animation X on bearer when they die.
  • Q36: Show Picture: snapshot.png => takes a snapshot and sets that as the image for that picture until further notice. Snapshot can persist through save/load.
  • Q37: <orbit: charId, rx:ry, Tx:Ty, ro> event notetag => event will undergo orbital motion:
    • Around character charId (-1 = player, -2 = follower 1, 1 for map event 1, etc);
    • Radii rx and ry (px) (defaults are tile width/height);
    • Periods Tx and Ty (frames) (defaults are 60);
    • Basis rotation ro (degrees, no effect for circular orbits) (default 0).
    Values with defaults can be omitted. If a single value is used for radius or period, the X and Y values for that attribute will be the same. (This is basically a plugin implementation of the script call from this post.)
  • D09: showing a face with filename $NAME$X-Y-S.png or $NAME$X-Y.png will instead show a sub-region of img/enemies/NAME.png: top-left at (X, Y) (px), optionally scaled up by integer factor S. (Each enemy image may only have up to 1 such redirect.)
  • D10: the Attack/Guard enemy action pattern makes them use their current attack/guard skill.
  • D11: tile events now contribute ladder, bush, counter, and damage flags.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ
Updated to v06!
  • M06: now maps equip slots in place (reduces garbage, micro-optimisation).
  • M09: now caches max TP value on battler refresh.
  • M17: no longer has a chance to fail a valid follow-up.
  • M18: fixed soft-lock when selecting randomly from 0 targets.
  • Q09: now supports text codes in any game window, at the cost of no text "squashing" in narrow spaces. Added a legacy toggle (currency unit & enemy select windows only) to the feature's code: change const anyWindow = true; to false.
  • Q14: text code \a[n] should now load & display the face correctly in all cases.
  • Q18: minor redesign to avoid unintended opacity stacking.
  • Q29: now supports any subfolder, not just titles1, and supports booting to scenes other than Scene_Title. Now defaults to img/system/rpgmakerlogo.
  • Q37: single values for radius/period should now work as advertised.
New additions:
  • Q38: holding touch acts like holding the dash button (if both are held, they should cancel out). Move destination changes only on new touch, not on hold.
  • Q39: actor Attack/Guard commands show the respective skill names (unless they're blank).
  • Q40: touch hover plays the cursor SE in menus. It's a more concise but slightly more aggressive form of what I posted here.
  • Q41: shadowless colour lighting shader for party members or events.
    • Map notetag: <dark:r,g,b,a>, e.g. <dark:0,0,0,255> or just <dark>.
    • Event/Actor/Class/Armor/Weapon/State notetag: <light:radius,r,g,b,a,dir>, e.g. <light:100,128,128,0,96,1>. Also supported as a comment tag in events. Use dir = 1 for FoV, or 0 for a point source.
    Includes an in-game option to toggle between hard/soft shaders.
  • D12: adds script calls to control the surprise/ambush modifiers for next battle:
    • setSurprise()
    • setPreemptive()
    These won't be saved. They're intended for use immediately before a Battle Processing command.
  • D13: !pictureName.png will pin to the map instead of the screen. (The Show/Move coordinates are all still screen-based.)
[Edit: just re-uploaded v06 to include option description (Q17) for "Soft Lighting" option (Q41).]
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ
Updated to v07!
  • Q03: major rewrite: now includes a sub-window "belt" framework. The belt can be navigated with the left/right buttons or click & drag. Added 2 new windows to this belt: element rates and state rates.
  • Q05: tidied up portrait alignment.
  • Q09: added rounding to fix potential alignment blur.
  • Q14: renamed \a[n] to \af[n]. Added \pf[n], a "show face" equivalent of \p[n].
  • Q16: added optional ON/OFF text replacers (not used by default, check the code).
  • Q17: now reduces options window max height by 1 row to fit better with the help window.
  • Q21: patched theoretical preload/redirect BGS bug.
  • Q25: now gauges should not fill behind partitions (fingers crossed).
  • Q33: now parallel nameboxes should display correctly! Use \^ in a parallel Show Text to queue it and proceed without waiting for it to finish. Added standalone support for \af[n] and \pf[n], as in feature Q14.
  • Q34: now the charge time overlay should fill to 100%.
  • Q36: now supports prefixes ! and/or $, e.g. !snapshot.png. In case that's useful.
  • Q39: now shows icon if database term starts \i[.
  • Q40: now respects isHoverEnabled.
  • Q41: now darkness does not obscure pictures/timer/weather.
  • D05: now patches on boot for compatibility with feature D10.
  • D07: now scales audio pitch with tick rate (see new feature Q43), and references pitch getter when creating source nodes.
  • D13: now accounts for setDisplayPosition (e.g. for transfers on the same map) and caches pinned picture IDs to reduce lookup time.
New additions:
  • M27: the Item battle command can now be controlled as skill type of same name. E.g. if the command is named "Item" in-game, and you make a skill type named "Item", then if someone has that skill type sealed, they won't be able to use items in battle.
  • M28: maxSavefiles now counts only the non-autosave slots. Yeah, that's all.
  • Q42: skip Buy/Sell/Cancel for buy- or sell-only shops. Sell-only shops are shops with no goods to buy, that aren't marked Purchase Only.
  • Q43: in-game speed option, e.g. for accessibility or speedruns.
  • Q44: "Guard" battle command is now placed immediately after "Attack", instead of after the skill types.
  • Q45: show vertical "scrollbar" indicators on vertically-scrollable windows.
  • Q46: slight rearrangement of main window on status scene to fill the space in the middle (at default game resolution).
  • D14: support showing left/right arrows for game windows. Like the up/down arrows that show when you can scroll vertically. This is a resource, it doesn't do anything by itself. I've used it in the new Q03 feature update, to indicate horizontal navigation.
  • D15: show error trace when appropriate, plus a "Copy to Clipboard" button for convenient error-reporting.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ
Updated to v08!
  • Q03: param names now use the system colour as usual. Added optional icon prefix for state rates - enabled by default. Changed element/status "heading" name regex.
  • Q05: added basic "portrait = enemy" support for compatibility with D09.
  • Q06: should now pause audio as intended in all cases (touch wood). Now pauses video as well (click/gesture to resume).
  • Q09: now should correctly measure visible text width. Also accounted for showing text codes via the text codes \G, \N, and \P (e.g. \i[n] in the currency unit).
  • Q14: now \af[n] & \pf[n] only proc when drawn, not during text measurement.
  • Q28: cleaned up the automatic title-to-options transition - now the fade-in happens on the options screen instead of before it.
  • Q29: now supports video splashes, BGM, and ME. Video might be a bit janky, I've simply used RM's built-in video handling.
  • Q30: now enemy gauges refresh when enemy image changes (e.g. on enemy transform).
  • Q32: now <hue: 0, D> will cycle as intended.
  • Q33: now \af[n] & \pf[n] don't proc during measurement (parallel messages).
  • Q46: new optional EXP gauge (% progress from current level to next). Also added separate optional replacement: "to next" (remaining EXP) -> "for next" (total required EXP).
  • D09: now draws the correct sub-area of source image in narrow spaces, e.g. parallel message from Q33.
New additions:
  • M29: Skill notetag: <cost: type ext: jsCost> - assigns 1+ custom costs to that skill.
    • Predefined type values: TP, MP, HP, Item, Weapon, Armor, Gold, Var, Cooldown, Warmup.
    • ext is an optional extra number, used to refine certain cost types, e.g. Item 1 for Item ID 1.
    • jsCost variables: subject, item, ext. Don't use > (that will close the notetag).
    • 1 line per cost, multiple lines allowed, e.g.

      <cost: hp: return subject.mhp * 0.2; item 2: 1 >
    • Lines without a return will have return prefixed to them.
    Replaces cost display and incorporates core MP/TP costs from database. May not display all costs if there is not enough space.
  • M30: notetag <lock index> on actor trait objects locks the actor's party position, so they can't be moved via the Formation command on the pause menu. Includes visual "locked" indicator when changing formation.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
5,260
Reaction score
4,736
First Language
EN
Primarily Uses
RMMZ
Updated to v09!
  • Added plugin parameters & commands for all features. Also rewrote the help section.
  • M07: no longer affects hit chance for Certain Hit.
  • M22: changed stacks to round up (ceil) instead of down (floor). No change for stack size 1.
  • M27: removed Item skill type from skill scene.
  • M28: now simply changes maxSavefiles count, for consistency.
  • M29: fixed typos in preset "variable" skill cost type - it wasn't working before. Also fixed MP/TP stacking on skill scene: switching between actors without leaving the scene caused the core cost to be added again each time.
  • Q03: values for TP Regen and all Sp-params now display correctly. Added option to show element/state rates as resistances instead (1 - rate). Also added configurable (de)buff colours for Ex- and Sp-params.
  • Q09: Sprite_Name (actor name in battle status) now supports pre-message text codes. Mid-message codes like \c[n] or \i[n] are simply removed. This is because it's a sprite, not a window.
  • Q14: added message code \align[0|1|2]: left|mid|right. Now \af and \pf can be set to only use face name, retaining current face index (e.g. for "expression" face sets). Updated for compatibility with new feature D16.
  • Q30: added notetags for per-enemy gauge offsets/widths.
  • Q33: can now use \. and \| to extend display duration. Now auto-message \af and \pf can also be configured to not set face index.
  • Q37: now only Touch-trigger events can orbit-trigger. Orbit events can now animate & proc move routes. Now a single negative radius => anticlockwise orbit.
  • D12: the script calls have been re-expressed as plugin commands.
New additions:
  • M31: allow events to trigger on followers, or allow them to move through followers.
  • M32: adds a <no lock> note/comment tag, and optional _noLock property, for events, to prevent facing player on activation.
  • Q47: adds an in-game Full Screen option.
  • D16: skip processing message text codes when not drawing.
  • D17: merge BGM Volume and ME Volume options.
  • D18: troop name tag <add: X, X> adds all members from listed troop IDs. A workaround for the editor's hard limit of 8 enemies per troop.
  • D19: allow processing more than 1 move command per route, per frame.
 

Latest Threads

Latest Profile Posts

One day someone will build independent items for MZ. ONE DAY!
"This will be the game I actually finish!" Every dang time.
Kes
I now officially hate moustaches.
I have a couple of NPCs who are important enough to need faces. I have learned that I can't really do moustaches, & now wish I'd never started this.
A sad day for me. A monitor that served me loyally for more than 5 years is getting replaced. It's begun to throw very large sparks.
skill.gif
experimenting with outlines in GIMP. found out it's EXTREMELY easy to do actually.

Forum statistics

Threads
136,817
Messages
1,270,374
Members
180,578
Latest member
JesterGameDev
Top