Difference between revisions of "Ink"

From Ōkami Speedrun Wiki
Jump to navigation Jump to search
(creating ink page)
 
(→‎Mechanics: link to frame page (not yet made))
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Unit}}
{{Unit}}
==Explanation==
==Explanation==
Ammy's level of ink in-game is represented using a signed short int (2 bytes). Every 60 units of ink is equivalent to 1 ink pot in the interface. By default, she has 180 ink (3 ink pots).
Ammy's level of ink in-game is represented using a signed int (4 bytes). Every 15360 units of ink is equivalent to 1 ink pot in the interface. By default, she has a maximum of 46080 ink (3 ink pots), which can be upgraded using praise.


==Mechanics==
==Mechanics==
* Most brush techniques consume 60 ink when the brush is released.
* When the brush is opened, Ammy's Current Ink (main.dll+B205D8) is copied to an address henceforth called "Revert Ink" (main.dll+8928A8), and the same value minus 15360 is copied to another address called "Target Ink" (main.dll+8928A4).  
* Normally, ink replenishes at a rate of 1 point every 4 [[Frame|frames]].
* As you draw on the canvas, Current Ink steadily decreases at a rate of 64 per [[Frame|frame]] of brush movement (including for the first frame the brush is pressed, e.g. for a dot). This gives Ammy a maximum of 240 frames, or 8 seconds, of drawing time per canvas.
* After Ammy uses a brush technique, there is a downtime of roughly 4 seconds where her ink will not regenerate at all.
* The difference between Current Ink and Target Ink represents the amount of ink left in the ink pot at the top-right of the canvas. If you continue drawing until Current Ink falls below Target Ink, the ink pot becomes empty and the Canvas is forced closed.
* If Ammy leaves the brush screen with less than 60 ink, she will become inkless and lose the ability to lose the brush.
* The Canvas will also be forced closed if Ammy tries to draw more than 30 separate brush strokes, regardless of Current Ink and Target Ink. The number of brushstrokes on the current canvas is stored at address main.dll+888C58.
* She will also become inkless if her ink reaches 0 while in a cursed zone, cursed Kusa Village, or from various monster attacks.
* When the canvas is closed (whether by manually releasing the Brush button or by it being forced closed), the game evaluates what was drawn on the canvas.
* While inkless, after the 4 second downtime (or after any ink-draining effects end), her ink will increase by 1 point per frame, except for every 5th (sometimes 6th) frame, where it will not increase. This continues until she has 180 ink, taking roughly 7.5 seconds. Once she reaches 180 ink, her normal abilities will return and her ink will continue replenishing at the usual rate of 1 point per 4 frames.
** If no brush techniques are recognized, Revert Ink is copied to Current Ink. This means that Ammy doesn't lose any actual ink regardless of how much she draws on the canvas.
** If a brush technique which consumes 1 ink pot is recognized, Target Ink is copied to Current Ink, causing Ammy to lose 1 Ink Pot.
** If a multi-pot technique is used (e.g. Fireburst, Whirlwind, Icestorm, etc.), the extra ink consumed (in multiplies of 15360) is subtracted from Target Ink, and then Target Ink is copied to Current Ink.
* If Ammy's Current Ink would ever fall below 0, it's set to 0 instead.
** This applies even while drawing on the canvas. If you allow Ammy's Current Ink to fall below 15360 via a cursed zone or Cursed Kusa Village, then open the brush, Target Ink will be set to a negative value, but as you attempt to draw, Current Ink will reach 0 and stay there. This means that Current Ink is never less than or equal to Target Ink, so Ammy can draw forever. If you leave the cursed zone before opening brush, while still retaining the negative Target Ink, you can crash the game by drawing on the canvas more than intended. Demonstration: https://youtu.be/q1NSMKG4WX0
* If, upon closing the canvas, Ammy's Current Ink is set to a value less than 15360 (less than 1 full ink pot), she becomes Inkless. This is when she loses her markings, instrument, and the ability to use the brush.
* Normally, Ammy's ink increases at a rate of 70 per frame, up to the Max Ink value.
** When Ammy is inkless, her ink recharges at a rate of 210 per frame (3 times as fast). This rate continues until until she reaches 46080 ink, at which point she regains her markings, Divine Instrument, and the ability to use the brush. After this, her ink continues to regenerate at 70 ink per frame.
** When ink has the Golden Ink Pot equipped, her ink regen rate is multiplied by 3 (tripled). This includes when she is inkless.

Latest revision as of 16:27, 25 November 2021

Note: This page describes a unit used in Okami. To learn more about the values representing quantities of these units, see Reverse Engineering.

Explanation

Ammy's level of ink in-game is represented using a signed int (4 bytes). Every 15360 units of ink is equivalent to 1 ink pot in the interface. By default, she has a maximum of 46080 ink (3 ink pots), which can be upgraded using praise.

Mechanics

  • When the brush is opened, Ammy's Current Ink (main.dll+B205D8) is copied to an address henceforth called "Revert Ink" (main.dll+8928A8), and the same value minus 15360 is copied to another address called "Target Ink" (main.dll+8928A4).
  • As you draw on the canvas, Current Ink steadily decreases at a rate of 64 per frame of brush movement (including for the first frame the brush is pressed, e.g. for a dot). This gives Ammy a maximum of 240 frames, or 8 seconds, of drawing time per canvas.
  • The difference between Current Ink and Target Ink represents the amount of ink left in the ink pot at the top-right of the canvas. If you continue drawing until Current Ink falls below Target Ink, the ink pot becomes empty and the Canvas is forced closed.
  • The Canvas will also be forced closed if Ammy tries to draw more than 30 separate brush strokes, regardless of Current Ink and Target Ink. The number of brushstrokes on the current canvas is stored at address main.dll+888C58.
  • When the canvas is closed (whether by manually releasing the Brush button or by it being forced closed), the game evaluates what was drawn on the canvas.
    • If no brush techniques are recognized, Revert Ink is copied to Current Ink. This means that Ammy doesn't lose any actual ink regardless of how much she draws on the canvas.
    • If a brush technique which consumes 1 ink pot is recognized, Target Ink is copied to Current Ink, causing Ammy to lose 1 Ink Pot.
    • If a multi-pot technique is used (e.g. Fireburst, Whirlwind, Icestorm, etc.), the extra ink consumed (in multiplies of 15360) is subtracted from Target Ink, and then Target Ink is copied to Current Ink.
  • If Ammy's Current Ink would ever fall below 0, it's set to 0 instead.
    • This applies even while drawing on the canvas. If you allow Ammy's Current Ink to fall below 15360 via a cursed zone or Cursed Kusa Village, then open the brush, Target Ink will be set to a negative value, but as you attempt to draw, Current Ink will reach 0 and stay there. This means that Current Ink is never less than or equal to Target Ink, so Ammy can draw forever. If you leave the cursed zone before opening brush, while still retaining the negative Target Ink, you can crash the game by drawing on the canvas more than intended. Demonstration: https://youtu.be/q1NSMKG4WX0
  • If, upon closing the canvas, Ammy's Current Ink is set to a value less than 15360 (less than 1 full ink pot), she becomes Inkless. This is when she loses her markings, instrument, and the ability to use the brush.
  • Normally, Ammy's ink increases at a rate of 70 per frame, up to the Max Ink value.
    • When Ammy is inkless, her ink recharges at a rate of 210 per frame (3 times as fast). This rate continues until until she reaches 46080 ink, at which point she regains her markings, Divine Instrument, and the ability to use the brush. After this, her ink continues to regenerate at 70 ink per frame.
    • When ink has the Golden Ink Pot equipped, her ink regen rate is multiplied by 3 (tripled). This includes when she is inkless.