Cellspread/Range - Printable Version +- Renegade Projects Network Forums (https://forums.renegadeprojects.com) +-- Forum: Modding (https://forums.renegadeprojects.com/forumdisplay.php?fid=3) +--- Forum: C&C Modding Encyclopedia (https://forums.renegadeprojects.com/forumdisplay.php?fid=7) +--- Thread: Cellspread/Range (/showthread.php?tid=1399) |
Cellspread/Range - patric20878 - 24.11.2009 Just updated ModEnc's cellspread page. To be brief, I found out that range is calculated exactly to the decimals using the Pythagorean Theorem/Distance Formula. If you want to see if a weapon with a certain range, d, can reach a certain distance, (x, y), away, plug in horizontal and vertical distance into the formula, and see how it compares. Better update the table and graph. Because it's like completely wrong, the minimum range part. RE: Cellspread/Range - Renegade - 25.11.2009 For reference, the block added to the page was patric/ModEnc Wrote:Note that diagonal range, as well as cellspread range is, exactly, to the decimal, calculated using the Pythagorean Theorem/Distance Formula. For example, using (8,6) and (7,7): The distance away in cells for (8,6) is 10, and (7,7) is 9.8995. A weapon with cellspread 9.9 will not reach (8,6), but will reach (7,7). Using this, (1,1) would require approximately a 1.415 cell spread/range. Please update the table and graph. (Patric20878 12:12, 24 November 2009 (UTC)) I have taken it off the page for the moment based on the following reasons:
Having read your post a dozen times or so, I do think you're ultimately just showing mathematically that the graph is wrong. That's alright, and that's certainly correct, given that the graph is for the old assumption of how CellSpread works; I simply didn't get around to updating it yet - I will do that now. If that's all you were trying to do (point out that the graph is wrong), I hope an updated graph resolves the issue. Mind, though, that such things are best done on the talk page, not in the middle of the article. Independent from all of this, signing your contributions within article pages should not happen. That's for talk pages, to attribute positions in discussions and other messages. As said, if that the graph was wrong was all that was the issue, we acknowledge that, it simply hasn't been updated yet (that's the reason why it's in the "traditional view" part of the page). If you meant something else, please try to explain, because that's all I got out of it. :/ RE: Cellspread/Range - DCoder - 25.11.2009 I went and rewrote the "reality" section based on the EXE, as neither one of you got it completely right... I guess it's my own fault for giving you summaries instead of full details. RE: Cellspread/Range - Renegade - 25.11.2009 I added a new diagram and cleared up some of the phrasing. We'll have to see how the table needs to be fixed. RE: Cellspread/Range - patric20878 - 25.11.2009 @Renegade: Eh, dunno. And oh, don't sign, ok. Is my first time editing a wiki, but yeah, you can write an edited version. It is calculated with Pythagorean/Distance formula though. I guess Distance formula is more correct, since it isn't about triangles. Doesn't take game code to confirm that, as it is accurate to the hundredth decimal, and I haven't tested it to the thousandth or more. But really, even if it wasn't distance formula, it still has the exact same results. Might as well just say that 2 isn't equal to 1 + 1; it's equal to 4 - 2. I was providing an example with the 9.9 thing. The paragraph I wrote was to clarify exactly how distance for range and cellspread is calculated. Though I guess, implicitly, it does imply that the graph is wrong, but that wasn't the point. RE: Cellspread/Range - Renegade - 26.11.2009 I was not questioning the validity of your results, I was wondering what the point of the formula in the page was RE: Cellspread/Range - patric20878 - 26.11.2009 ...So people can use it to figure exactly how far a warhead with cellspread d will reach, coordinates of (x,y) distance away from the impact point? RE: Cellspread/Range - Renegade - 26.11.2009 Well, that is taken care for by the image now. RE: Cellspread/Range - patric20878 - 26.11.2009 You do realize how hard it is to read that graph, since now it's based on radius? A user will have to look if a circle with a certain radius hits the middle of a cell. Hard to guess. And by the way, the graph is still wrong. By the way, did some extreme range tests: cellspread 10 and 11. Reference: I'll use (radius, lateral distance). Radius is 10, or 11. Lateral distance is across horizontally from that radius. Picture it, and you'll get a T shape, the vertical part of the T is radius, the horizontal part of the T is lateral. Onto the below. Cellspread 10: Same distance formula calculation . Still spreads damage in a perfect circle. It won't damage (10,1), only (10,0), as expected. Cellspread 11: Interesting. Well, it still only damages (11,0), not (11,1). But it does damage (10,x) weird. For reference, by distance formula, (10,4) should be the max y value that can still meet the distance formula, sqrt(100+16) < (121). Cellspread 11 is buggy as stated in ModEnc though, so. Anyways, I did a test with the grizzly tank, and changed it's [AP] warhead to a cellspread of 11. Only on the up-left and bottom-right, cellspread 11 will damage (10,-3) to (10,3), 7 cells across. But on the up right and bottom left, cellspread 10 will only damage (10,-1) to (10,1). Buggyness. I really can't tell by the radius circle graph thing, and I'm not sure if the graph already represents what I found. Fix if it isn't. Also, I didn't do lateral tests both left and right for all 4 directions. Might not be symmetrical. Random Moment From Patric20878 (Post Script*): Cellspread 11 sucks anyways. 10 is a nice even number. 11 is not a nice even number. Cellspread 11 should GTFO. Then there will be no exceptions to the distance formula calculations. (26.11.2009, 05:50:53)patric20878 Wrote: You do realize how tedious it is to read that confusing graph, since now it's based on radius? A user will have to look if a circle with a certain radius hits the middle of a cell. Hard to guess. And by the way, the graph is still wrong. RE: Cellspread/Range - Renegade - 26.11.2009 "Fix it if it isn't" is cute. One can't even read out of your post what supposedly needs fixing.
And wth is "x" in (10,x)? No warhead should damage anything other than (10,3), (10,2), (10,1), (10,0), (10,-1), (10,-2), (10,-3). Anything else is outside of the lookup table. Same goes for 11 - only less than half of (11,1), (11,0) and (11,-1) should be damaged anyway - so if you test with an InfantryType in the top-right corner of (11,1), it's no wonder you detect no damage. Your "reference" of (10,4) being the max that should be reachable by the distance formula also suggests that you still haven't fully grasped how the system works - (10,4) is irrelevant. It doesn't matter if it's the mathematical maximum reachable. It's not on the lookup table. The game doesn't check it. So, really...if you can provide simple, reproducible test cases which show the game does damage cells not on the graph, or doesn't damage areas it should on the graph, or something similar, I'll be happy to update the graph. But a claim it doesn't damage (11,1), for example, when less than half of that cell is even within radius in the first place, there is no guarantee your shooter hit the center of the cell, no one knows how damage and PercentAtMax are set, or how you actually tested for damage, is nothing I can act on. As said - if you had an InfantryType standing in the top right corner of that cell, it's perfectly feasible it didn't get damaged, and the graph would still be correct. So in order to determine whether anything is inaccurate, I really need more, very precise, details, down to at least the approximate area the shooter hit the impact cell in, and the position and type of testing target in the outer ring. Also, I'm not sure what you're complaining about with the graph in general...the fact that it's a circle running through the middle of cells is exactly what was now unveiled. If that's the way the game works, that's the way the game works. I can't just make the graph inaccurate to make it easier to read? RE: Cellspread/Range - patric20878 - 26.11.2009 Quote:# What is PercentAtMax set to?I told you that I used the AP warhead, only that I changed cellspread to 10/11. What do you think the PercentAtMax default for AP is? Where? A very large formation of tanks,from radius 9 to 13. And laterally, 7 in both directions. Do the math, I made about 30 tanks to record all damage on each side, and being 4 sides, I spammed about 120 tanks to measure it. If a tank got damaged, I recorded it as being damaged. Every time after I test, I had them all repaired. I only recorded damage for the grizzly tank. Everything else was no where near. And you should know that even when a target takes 1 damage, it will still display as not having full health. Of course I know if a target got damaged. Quote:And wth is "x" in (10,x)? No warhead should damage anything other than (10,3), (10,2), (10,1), (10,0), (10,-1), (10,-2), (10,-3). Anything else is outside of the lookup table. Read the below. Quote:Reference: I'll use (radius, lateral distance). Radius is 10, or 11. Lateral distance is across horizontally from that radius. Picture it, and you'll get a T shape, the vertical part of the T is radius, the horizontal part of the T is lateral. Onto the below. Quote:Your "reference" of (10,4) being the max that should be reachable by the distance formula also suggests that you still haven't fully grasped how the system works - (10,4) is irrelevant. It doesn't matter if it's the mathematical maximum reachable. It's not on the lookup table. The game doesn't check it. Quote:For reference, by distance formula, (10,4) should be the max y value that can still meet the distance formula, sqrt(100+16) < (121). Wow, what do you think I said "for reference" then, hmm? Is it not obvious that I referenced it to point out that at cellspread 11, range doesn't follow the distance formula all the time anymore? Can it get much more obvious that it wasn't irrelevant, since right after that, I also said that cellspread 11 is buggy, so it won't follow the formula? Either you paid no attention to what I said, or you seriously have trouble understanding it. Quote:So, really...if you can provide simple, reproducible test cases which show the game does damage cells not on the graph, or doesn't damage areas it should on the graph, or something similar, I'll be happy to update the graph. But a claim it doesn't damage (11,1), for example, when less than half of that cell is even within radius in the first place, there is no guarantee your shooter hit the center of the cell, no one knows how damage and PercentAtMax are set, or how you actually tested for damage, is nothing I can act on. Obviously it doesn't damage (11, 1). Because it's not in radius, and neither do the buggy properties extend the range. And you really have no clue eh. So now my shooter isn't guaranteed to hit the center of the cell. What do you think the 105mm weapon is? Inaccurate, with flakscatter, and ballisticscatter set to 50,000 leptons? Again, had you actually read carefully, you'd know exactly the unit I was using: a regular grizzly battle tank. Allied Grizzly Battle Tank, yes, that one that costs 700 credits and is built from a War Factory. And you would know that I did a test with the grizzly tank, not infantry. I know perfectly well that 3 infantry occupy a cell at most, and they don't occupy the center. Really, how much more information do I have to give to qualify this to be a simple reproductible test? It's not that hard. 1) Use an unmodded Grizzly Battle Tank. 2) Change the cellspread of its weapon's warhead, [AP], to 10/11, depending on which range you need to test. 3) Build lots of grizzly tanks, run several trials, record results. 4) Wow, done. I don't know if I really need to tell you everytime I test, but it is implied that I will run several trials before reaching a conclusion, and I've done years of bug testing to test random weapons in my mod and know the game well enough to not make dumb mistakes like using infantry to test range. Did I say you need to change up the graph to not fit the game? Maybe if you added a dot or cross or something in the middle of each cell, it would far easier to tell if the range circles hits it? RE: Cellspread/Range - Renegade - 27.11.2009 ROFL so now it's my fault I'm not guessing your test setup? The fact that you said you used the Grizzly and changed its warhead neither tells me that you didn't change weapon or projectile, nor does it tell me on what targets you measured the damage. As for PercentAtMax, given the vast amount of information you didn't tell us, and given that you were testing Damage propagation, it was very possible you set it to PercentAtMax=1.0 and just neglected to tell us. So spare me your "I told you..." tirades. If you posted all test data + media up front, people wouldn't endlessly have to inquire about the exact circumstances of your test. The fact of the matter is, you would get vastly better results if you set PercentAtMax to 1.0, the damage to 5, the health of the tanks to 10, and ensured all other "weird" factors like crates, bonuses etc. were gone as well. Shoot straight into the middle, see which tanks have half strength and which have full strength, select all, make screenshot. Simple. It's not my fault I assumed you might actually go and simplify your test scenario. So sorry I overestimated you. I'll assume less smart scenarios from now on. Your explanation of what x is supposed to be actually made it harder to understand for me. I thought you were making weird assumptions about the tenth column of the graph before, but now I don't even know which cells you're talking about anymore. "Across horizontally from that radius"? The radius is all around. The line I drew in the graph is horizontal, and for the large majority of cells in the graph, going horizontally from the edge of the circle would either lead far out of the circle, or deep into it. So the only logical explanation is that you used some sort of tangent to the circle, which makes your instructions all but impossible to follow without active measuring and a ruler. All of this, of course, could be avoided if you just used the coordinates in the graph, alas, that would be too easy, would it? To answer your question, no, it's not obvious that you referenced that cell for any purpose. I'm guessing now, from what I said above, that we may be talking about totally different cells, but I still don't know what you're trying to tell us? Should 10,4 be hit? Should it not be hit? Is it hit, but shouldn't be? What is the significance of 10,4? Why is it important enough to be pointed out for reference? Because your explanation makes no sense at all, on multiple levels: "(10,4) should be the max y value that can still meet the distance formula, sqrt(100+16) < (121)" - for one, (10,4) is a point, not a y value, at least not in that formula. For two, in the distance formula used by the game, cells don't even appear, so cell coordinates are irrelevant. For three, I have no idea what the hell your formula is supposed to be there - a single cell has 256 leptons, so the cutoff value at CS 10 would be 2560, at 11 2816. That is important. Not, what I assume you meant, the square root of 121. Lastly, if you say something is the max y value of a formula, and then provide a formula, it makes sense to provide a formula that actually includes y. I am guessing, from your fascination with Pythagoras, and after reading it for the fifth time, that that formula is meant to tell us that the result of 10² + 4², that is, "the distance", is supposed to stay below 11² - how the hell you figure that, I don't know. 10² + 4² equals 116, the root is 10.7703296, times 256 is 2757.20438, which is above the cutoff for CellSpread=10, and below the cutoff for CellSpread=11. How the hell 121 factors into that, I still don't know. Maybe it's a weird attempt to calculate the reach of CellSpread in cells, figuring out the furthest cell reachable, after you've been told multiple times that cells don't matter, leptons do. Why exactly you need to do that, when the graph is showing you exactly which cells could potentially be touched by CellSpread, I don't know. I don't even know if that's what you're doing, because whatever you're doing there seems to not make any sense at all. So would you please enlighten me what exactly you are calculating, which exact cell (10,4) is, and what its significance is? Because as far as I can tell, your math is making no sense at all, and even if it did, it wouldn't tell me why (10,4) is important. And the irony of telling me that you do know that there can be multiple InfantryTypes in one cell, not centered, and yet, a few lines before, go on some ranty tangent about whether I had illusions about the weapon using scatter is hilarious. Think long and hard about infantry getting attacked, and maybe you'll know why I considered it a possibility your shot was off-center. Had you provided information about how exactly you conducted your test up front, I wouldn't even have had to ask. And, in fact, given that you still didn't specify under what conditions your shot impacted the ground, I still can't be sure it was centered on the impact cell. So, for another round: You have claimed the graph is still wrong. Would you tell us, in simple terms, what exactly is wrong with it, and provide the simplest possible complete explanation of how exactly you determined that, and how to reproduce your results? If you choose to use math for that, please provide an explanation why you are using the functions you're using, what the individual parameters are, and what the results are telling us, so we'll all be clear about what exactly you're calculating and why. Same goes for cells - if you reference cells, and your coordinates differ from the ones in the graph, please give a simple, unambiguous explanation of where exactly those cells would be located. RE: Cellspread/Range - patric20878 - 27.11.2009 I am not going to waste my time arguing about whether I was clear enough or not. I'll tell you one final time in the below. Whether you understand it or not doesn't concern me, because if you really can't understand such simple things, there is no hope for you, and then, I have lost even more reason to stay here. Quote:Reference: I'll use (radius, lateral distance). Radius is 10, or 11. Lateral distance is across horizontally from that radius. Picture it, and you'll get a T shape, the vertical part of the T is radius, the horizontal part of the T is lateral. Onto the below.What does that sound like to you? Obviously it's tangent. You don't need a damn ruler to know if it's tangent or not. You fire in one direction, the direction of the radius, and lateral distance is relative to the direction you fired in. And yeah, I could use coordinates, though why should I bother posting coordinates when the game obviously is diagonal, not straight up vertical and horizontal? Think already. And if ever took precalculus or calculus, you'd know that the radius way of expressing it (r, x, (direction)) is far easier to understand and is more consistent to express for a game like this than (x, y). (x,y) isn't the only way. I have said multiple times that the only value I changed for the grizzly tank is the cellspread for AP. You really fail at modding if you just can't connect the dots to know that nothing is changed besides that. And how many times do I have to say that a unit will be displayed as damaged even if it takes the smallest of damage? I don't need to have half the unit's health depleted to know that it's damaged. I'm testing for whether a warhead with a certain cellspread reaches and damages a certain cell. I'm obviously not seeing how much damage it does. On the 11^2 thing: -_- 11^2 is the maximum range^2 value there should be, according to the formula. All other combos of horizontal and vertical distances away should be less than that value. And it is. The max distance a CS 11 will reach is (11,0), and the max it should reach with CS 10 is (10,-4)/(10,4). And it is also. Scatter: Wow, need I tell you again that I only used the tank in the test? And given the fact that the only value was changed was the cellspread, its weapon did not scatter? What's wrong with the process of elimination part of your thought? And I don't understand why you keep on going back to leptons. A cell is 256 leptons wide and long. Why can't you just substitute "cell" for "256 leptons" and get on with it? Wow, it's like you're trying to get me to use meters instead of miles. And using your coordinates, which isn't diagonal at all like the game is: Wrong: As far as I understand from that graph right now, CS 11 only goes to 11,0. Why is (11,3) to (11,3) colored when the line only goes to the center of 11,0? Process: Baby step explanation: Grizzly tanks, completely unmodded, besides changing cellspread to 10 and 11. Used grizzly tanks to see if cannons damaged them. A grizzly tank fires on 0,0. There is are tanks from (9, -7) to (13, 7), a large rectangular formation of tanks. There are also tanks on the other 3 directions as well, ie: -9 - -13, etc. If they lost health, they got damaged. If they didn't lose health, they didn't get damaged and the CS didn't reach it. CS 10: All normal. 10,0 got damaged. 10, x, where x doesn't = 0, didn't get damaged. -9 to 9, 4 got damaged. All consistent with distance formula. CS 11: 11, 0: damaged. 11, x, where x isn't 0, didn't get damaged. The up left side and bottom right side in game in relative to 0,0, not consistent with distance formula: CS 11 damaged 10, -3 to 10, 3. (If it were consistent, it would damage up to 10,-4 and 10, 4, integer only,as 100 + 16 is still less than 11^2 = 121.) Up right side and bottom left side only damaged 10, -1 to 10,1. Reverts back to normal for radius <= 9. RE: Cellspread/Range - DCoder - 27.11.2009 Quote:Whether you understand it or not doesn't concern me, because if you really can't understand such simple things, there is no hope for you, and then, I have lost even more reason to stay here.K, thx, bye then. RE: Cellspread/Range - Renegade - 27.11.2009 God man, it's a miracle you even manage to open the INIs. Once again, in list format, since I doubt it'll go through your skull anyway:
So if your only complaint keeps being that the game behaves exactly as the graph predicts it would, I guess we're done here. |