Jump to content

Photo

Power bracelet tile modification


  • Please log in to reply
5 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 23 July 2017 - 01:54 PM

Hello i have a little problem with the power bracelet script's tile modification. I have 3 LTM items for the power bracelet. 

LTM: Catch
LTM: Hold
LTM: Pull

and i don't know the tile modification of Link. I don't use the same tiles as the demo does here. http://www.purezc.ne...e=scripts&id=32

 

I do want to use those tiles of this page. 

 

2017-011.png

Someone can figures out this please ? 



#2 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 24 July 2017 - 07:37 AM

The demo quest that comes with that script expains your questions,look at the setup of the bracelet in the questfile and look athe script all constants.

Edited by judasrising, 24 July 2017 - 07:38 AM.


#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 24 July 2017 - 10:05 AM

the problem is the demo doesn't have the same tileset as mine. It's basely inspired by the LA style and mine is inspired by the Oracle Series and LA. and if i do paste those Link tiles at the same place of the demo does i can corrupt or screws my quest project. Because some tiles i have to use is already used by another tiles.

Edited by Cedric, 24 July 2017 - 10:41 AM.


#4 NoeL

NoeL

    Legend

  • Members
  • Real Name:Jerram

Posted 24 July 2017 - 11:34 PM

Short answer:

 

If you've got those items in your item list and their item numbers match the constants in the script, all you need to do is calculate the new LTMs:

 

LTM = first frame of new animation - first frame of default animation

 

LTMs work by offsetting Link's graphic tile by the LTM value, showing a different tile instead. For example, if Link's current graphic is tile 100, and he has an item equipped with a LTM of 60, Link's graphic will appear as tile 160. For a simpler example, a LTM of 20 will use the row of tiles directly beneath Link's default tiles (since a row of tiles in ZC is 20 long). If your Link tiles are all over the place (this is bad tile table management and should be avoided) you can calculate the LTM by subtracting the tile number of Link's first default frame (walking, facing right) from the tile number of the first frame of Link's new animation. Another thing to bear in mind is that the animation frame order and placement for catching/pulling/holding need to match Link's default animation.

 

-----------------------------------

Long answer:

 

Look for these three lines at the top of the script:

const int LTM_CATCHING = 135; // LTM for Link catching a block with the Power Bracelet
const int LTM_PULLING = 136; // LTM for Link pulling a block with the Power Bracelet
const int LTM_HOLDING = 133; // LTM for Link holding a block with the Power Bracelet

The way this script works is by toggling dummy items in Link's inventory on and off, and those dummy items have Link Tile Modification (LTM) values. If you look at the Item list in the demo example you'll see the items "LTM: Catch" (#135), "LTM: Pull" (#136) and "LTM: Hold" (#133) (and a few other "LTM" items that aren't relevant here, for things like Roc's Cape).

 

LTMs work by offsetting Link's graphic tile by the LTM value, showing a different tile instead. For example, if Link's current graphic is tile 100, and he has an item equipped with a LTM of 60, Link's graphic will appear as tile 160. For a simpler example, a LTM of 20 will use the row of tiles directly beneath Link's default tiles (since a row of tiles in ZC is 20 long). If your Link tiles are all over the place (this is bad tile table management and should be avoided) you can calculate the LTM by subtracting the tile number of Link's first default frame (walking, facing right) from the tile number of the first frame of Link's new animation. Another thing to bear in mind is that the animation frame order and placement for catching/pulling/holding need to match Link's default animation.

 

If we look at the data for the item "LTM: Catch" we can see it has a LTM of 600. This means when the script toggles this item on (when Link grabs a rock) Link's graphic changes from his default tile number to his default tile number +600. If we look at the tile page for this quest we can see that the tile ID for the first frame of Link's default animation is 18200, and if we look at the tile +600 (tile 18800) we find the first frame of Link's "catch" animation. Again, notice that the number of frames and Link's direction in his "catch" animation (and his "hold" and "pull" too) line up exactly with his default animation.

 

SO!

 

With all that explained, can you figure out what you need to do in order to recreate this functionality in your own quest? If not, here's a step-by-step guide of how to set it up:

  1. Arrange your new "catch", "pull" and "hold" tiles so that they match Link's default walking animation (hopefully you have some free space near Link's default tiles, but that's not necessary).
  2. Calculate the LTM values for each of those actions (LTM = first frame of new animation - first frame of default animation). Write these down somewhere.
  3. Create three new blank items, one for each new animation (give them meaningful names like "LTM: Catch"). The demo has them as shield class items and "Catch" has block flags set to 128 but I'm not sure if this is necessary.
  4. Give each item the corresponding Link Tile Modification value you calculated and wrote down earlier.
  5. Write down the item number for each of these new items (highlight them in the Item list and look just below their graphic).
  6. Edit the global script and change the values for LTM_CATCHING, LTM_PULLING and LTM_HOLDING to their corresponding item number.


#5 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 25 July 2017 - 05:58 AM

Thank you Noel for further info of that script setup ,my english is not that good.

#6 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 July 2017 - 11:37 AM

oook i try that but i still get a glitched Link. (Up/Down is the Link tile when he pickup an item in water, Left/Right is nothing an invisible Link.
(and if i put the same tiles from the exemple quest in the tiles already used in my quest i'll got more problems and glitchs/bugs then make the quest better. Actually i used different tiles then the exemple quest of this script. (Scripted is already hard for me but tiles modifications is more hard for me to setup. i was tried for the Death Darknut as playable character and that was make the previous quest ever worst or nothing happens)


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users