Jump to content

Photo

Link Tile Mod discussion


  • Please log in to reply
25 replies to this topic

#1 Radien

Radien

    Courage

  • Members
  • Real Name:Steve
  • Location:Oregon

Posted 24 January 2005 - 03:28 AM

Okay, most of us know about Link Tile Mod: It allows us to do some basic but very useful things with Link's appearance when he gains items. We can even have all sorts of items change is appearance one after the other, or even in different orders.

We know this is possible in theory. But to use it to its fullest extent requires... Math. icon_odd2.gif OMG noes.

But just like in high school, we can't avoid math forever. And once we do figure it out, maybe LTM can put it in his tutorial for everybody's benefit. icon_smile.gif

Okay, here's the basics: Link Tile Mod values add a certain number to the current Tile Mod value. That number becomes the first tile of the series of Link tiles ZC uses for its animations.

Rings are easy, if you make it necessary to obtain them in order. You can simply add the same number every time. (I don't remember how many total Link tiles ZC uses in version 2.10, so I'm going to arbitrarily assume it uses somewhere around 40 tiles.)

No ring: Tile #0

Link obtains Blue Ring / Link Tile Mod value is +40:
0 + 40 = Tile #40

Link obtains Red Ring / Link Tile Mod value is +40:
40 + 40 = Tile #80

Link obtains Gold Ring / Link Tile Mod value is +40:
80 + 40 = Tile #120


....However, if the player somehow managed to gain the Red Ring before the Blue Ring, then Link would suddenly have the appearance intended for the Blue Ring. This is not good. So let's move on to the next instance.


- Let's say you want Link's scabbard to change when he gets the White Sword.

- You would also like Link's shield animations to change in all four directions when he gains the Magic Shield.

- You won't know which one the player will obtain first.


What to do? Well, to assure that the two Tile Mods refer ZC to different sets of tiles, you can't assign the same Tile Mod number to the sword and shield. So, let's assign 40 to the sword and 80 to the shield.

Link gets the White Sword first:
0 + 40 = Tile #40. The White Sword Link tiles start at this tile position.

Link gets the Magic Shield first:
0 + 80 = Tile #80. The Magic Shield Link tiles start at this tile position.

Link obtains BOTH the White Sword and the Magic Shield:
0 + 40 + 80 = Tile #120. The Link tiles which picture Link with both the Sword and Shield start at this tile position.


....Okay, we've reached the end of what I know I understand without any further thought. But what happens when you want to have three items Link can obtain in different orders? Or four? Or five? I'm not entirely sure. In the example above, you couldn't put a third item at Tile position #120, because that would be reserved for the combination of Sword and Shield.

What else can we figure out about standardizing Link Tile Mod values and tile positions?

#2 HappyPuppet

HappyPuppet

    Deified

  • Members
  • Real Name:Palmer
  • Location:Virginia

Posted 24 January 2005 - 10:13 AM

QUOTE(Radien @ Jan 24 2005, 03:28 AM)
(I don't remember how many total Link tiles ZC uses in version 2.10, so I'm going to arbitrarily assume it uses somewhere around 40 tiles.)

That's a bit trickier than you might think... it's hard to specify a constant value. Technically, he only uses 10, but the Magic Shield and Mirror Shield use the Link Tile Mod (Magic Shield is 10 and Mirror Shield is -10). And then there are also other tiles near the standard ones that I don't even know if they're affected or not. For example, the tiles where Link walks up... you'd think that would probably be affected, but then look at the shield tile mod, which obviously doesn't use them. Perhaps the shield tiles are special cases.

I think in the end it's somewhere around 30 (10 standard + 10 for Magic Shield + 10 for Mirror Shield), but to keep things aligned, 40 is probably the better choice.

QUOTE(Radien @ Jan 24 2005, 03:28 AM)
....Okay, we've reached the end of what I know I understand without any further thought. But what happens when you want to have three items Link can obtain in different orders? Or four? Or five? I'm not entirely sure.  In the example above, you couldn't put a third item at Tile position #120, because that would be reserved for the combination of Sword and Shield.

Powers of 2 of course! They are going to be your best friends here. Set the third item to have a mod of 160. Now here's the combinations.

None of the items: 0 mod
Item 1: 40 mod
Item 2: 80 mod
Item 2 + Item 1: 120 mod
Item 3: 160 mod
Item 3 + Item 1: 200 mod
Item 3 + Item 2: 240 mod
Item 3 + Item 2 + Item 1: 280 mod

For each subsequent item, multiply the mod by 2. Item 4 would be 320, and Item 5 would be 640.

EDIT: More discussion on this.

The reason you do powers of 2 here is because each item has only one level. You do the power of how many levels the item has + 1. So supposing you wanted to mod both the shields AND the swords AND the boomerangs...

Sword 1: 40 mod
Sword 2: 80 mod
Sword 3: 120 mod
Sword 4: 160 mod
Boomerang 1: 200 mod (number of levels of swords + 1 * 40, the standard value)
Boomerang 2: 400 mod (add 200 each time)
Boomerang 3: 600 mod
Shield 1: 800 mod (number of levels of swords + 1 * number of levels of bomerangs + 1 * 40 = 800)
Shield 2: 1600 mod

With this you're probably going to end up in the New Enemy Tiles and the standard enemy tiles so... can't have that much modding. icon_xd.gif

#3 SwordOfSeals

SwordOfSeals

    Peace now, food later

  • Members
  • Real Name:Akai, really...
  • Location:Xenia, OH

Posted 24 January 2005 - 04:35 PM

Wait, what does Link Tile Mod do? Maybe I should start experimenting with it. It seems to have loads of potential. I thought it changed the WHOLE thing, not just one part/aspect.....

#4 Reflectionist

Reflectionist

    Apprentice

  • Members
  • Real Name:Jake
  • Location:Missouri, US

Posted 24 January 2005 - 04:43 PM

*dies*

This is hard!!!!

#5 HappyPuppet

HappyPuppet

    Deified

  • Members
  • Real Name:Palmer
  • Location:Virginia

Posted 24 January 2005 - 05:13 PM

Something else I noticed...

Your Ring dilemma about getting the Red Ring before the Blue Ring screwing things up shouldn't happen unless the useless rule Carry Old Items is checked. At least, that's the way it should be. icon_shrug.gif

#6 /M/

/M/

    6♣7♠8♥9♥10♥

  • Members
  • Location:Gotham City

Posted 24 January 2005 - 05:27 PM

So every new item, you can change the way link looks? I don't get it. icon_razz.gif

#7 SwordOfSeals

SwordOfSeals

    Peace now, food later

  • Members
  • Real Name:Akai, really...
  • Location:Xenia, OH

Posted 25 January 2005 - 10:27 AM

I wonder about the Hammer, cause my guy uses gloves/gauntleys for new "shields." It'd look funny if he keeps switching to his old gauntlets just to use the hammer. Hmmm....

#8 HappyPuppet

HappyPuppet

    Deified

  • Members
  • Real Name:Palmer
  • Location:Virginia

Posted 25 January 2005 - 11:52 AM

Wouldn't he switch anyway though assuming he was walking up? icon_shrug.gif

#9 Exate

Exate

    Deified

  • Members

Posted 25 January 2005 - 12:26 PM

Actully SOS, that depends. Make the hammer swing sprites with the correct gauntlets and that shouldn't happen.

As for the ring problem, no occurences of it in MOR (I have test screens for new items and such).

Duno if DN is going to fix it... but there is a problem with the LTM's (icon_razz.gif)... the player's swinging sprites do NOT change. icon_neutral.gif

#10 SwordOfSeals

SwordOfSeals

    Peace now, food later

  • Members
  • Real Name:Akai, really...
  • Location:Xenia, OH

Posted 25 January 2005 - 02:24 PM

QUOTE(PolygonX8 @ Jan 25 2005, 12:26 PM)
Actully SOS, that depends. Make the hammer swing sprites with the correct gauntlets and that shouldn't happen.

I understand, but I know nothing of Link Tile Mod...yet. Once I first locate it, and then experiment, I may be able to do cool stuff. I also hope the "walking up" thing is also affected. New characters is nice, and technically, it won't have to depend on the shield anymore, right?

#11 HappyPuppet

HappyPuppet

    Deified

  • Members
  • Real Name:Palmer
  • Location:Virginia

Posted 25 January 2005 - 02:32 PM

Link Tile Mod is located in Quest -> Graphics -> Sprites -> Items I think.

#12 Radien

Radien

    Courage

  • Members
  • Real Name:Steve
  • Location:Oregon

Posted 26 January 2005 - 12:45 AM

Thanks, Happyman! icon_smile.gif If that's true, it'll be very helpful. Here, I'll do a little test to see if it works. I'll keep using the increment of 40 just for the sake of testing. The base number of Link tiles may very well be different, but let's assume 40 for now.

Okay.... Let's try for shield, ring, and sword mods.

Shield = 40
Sword = 80
Ring = 160

In which case...

~ Shield = +40 tile mod
~ Sword = +80 tile mod
~ ~ Shield (40) + Sword (80) = +120 tile mod
~ Ring = +160 tile mod
~ ~ Ring (160) + Shield (40) = +200 tile mod
~ ~ Ring (160) + Sword (80) = +240 tile mod
~ ~ ~ Ring (160) + Shield (40) + Sword (80) = +280 tile mod


So yeah, it works! icon_biggrin.gif

Okay, in that case, the procedure is the following:

1. Determine the maximum number of tiles any one set of Link tiles will use. (From this point on, write it all down before you begin implementing it. )

2. Now, for the very first item to receive a tile mod, make the value equal to the number in step 1.

3. For the second item, double that number. For the third item, double the number from the second item. Continue doing this on down the line until you have all the items to which you're going to assign a tile mod.

4. Once you're done with step 3, there will be gaps between the items. The further down the list, the more gaps. To fill the first gap (which will come after the second item), add together the first and second items. The result will be the tile position to start the Link tiles for when Link has those two items, but nothing else.

5. Fill the other gaps in a somewhat similar way, except that for every gap you must take the item immediately before the gap and combine that item once for every single item combination before it in the list. So for instance, as in the above example: if you've already done "Shield + Sword," and you get to "Ring," you must fill in the gaps with "Ring + Shield" and "Ring + Sword" AND "Ring + Sword + Shield."



Okay, I'm done reviewing the process for my own benefit and anybody else's who hadn't already understood it (but hopefully does now). icon_smile.gif

BH4 and I were talking about this awhile ago, and it was a lot simpler than we'd thought it might be, even though Josh was right when he thought it would involve exponentials.

#13 HappyPuppet

HappyPuppet

    Deified

  • Members
  • Real Name:Palmer
  • Location:Virginia

Posted 26 January 2005 - 06:39 AM

Don't forget to make the specific procedure for items with multiple levels, as it's quite obvious you explain things better than me. icon_razz.gif

#14 Radien

Radien

    Courage

  • Members
  • Real Name:Steve
  • Location:Oregon

Posted 26 January 2005 - 06:58 AM

Ah, okay. Thanks. icon_smile.gif Well, I'll have to figure out how multiple levels will work. But you're right, it would avoid potential bugs if you uncheck the "keep old items rule." I'm not entirely sure it was useless, but it's definitely dispensible.

With multiple level items, I THINK it will work exactly the same as any other item. I mean... you COULD go in and systematically remove impossible combinations, but the math would be nice and consistent if you just decide to deal with the blank gaps...

...unless you have too many tile mod items, in which case the exponentials could get out of hand. Well, tomorrow I'll pull out my notepad (either on computer or paper) and do some jotting down of numbers to see what happens. I enjoy using anything up to simple trig functions to analyze game systems. (yeah, that's my nerdy side coming through icon_razz.gif)

#15 SwordOfSeals

SwordOfSeals

    Peace now, food later

  • Members
  • Real Name:Akai, really...
  • Location:Xenia, OH

Posted 26 January 2005 - 05:16 PM

I see...Nice! Woot! No more weird /innaccurate color combos, etc.! Thanks Raiden!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users