Link Tile Mod discussion
#1
Posted 24 January 2005 - 03:28 AM
We know this is possible in theory. But to use it to its fullest extent requires... Math. 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.
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
Posted 24 January 2005 - 10:13 AM
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.
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.
#3
Posted 24 January 2005 - 04:35 PM
#4
Posted 24 January 2005 - 04:43 PM
This is hard!!!!
#5
Posted 24 January 2005 - 05:13 PM
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.
#6
Posted 24 January 2005 - 05:27 PM
#7
Posted 25 January 2005 - 10:27 AM
#8
Posted 25 January 2005 - 11:52 AM
#9
Posted 25 January 2005 - 12:26 PM
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 ()... the player's swinging sprites do NOT change.
#10
Posted 25 January 2005 - 02:24 PM
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
Posted 25 January 2005 - 02:32 PM
#12
Posted 26 January 2005 - 12:45 AM
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!
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).
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
Posted 26 January 2005 - 06:39 AM
#14
Posted 26 January 2005 - 06:58 AM
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 )
#15
Posted 26 January 2005 - 05:16 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users