kibora Report post Posted September 18, 2007 Changed the ranges and updated the patch Share this post Link to post Share on other sites
Florian Report post Posted September 18, 2007 Could someone please commit that patch into CVS so that we can test it? Share this post Link to post Share on other sites
Entropy Report post Posted September 18, 2007 I think it would be best if the positive numbers are green, and negatives are red. The harvest range is in the -90 +90 range. A/D is between -5% +5% of your a/d Share this post Link to post Share on other sites
Grum Report post Posted September 18, 2007 (edited) I took a look at the current patch, it looks good, so I've applied it with a few minor modifications (noted below). A couple of comments: I think we should move the call to is_astrology_message() out of multiplayer.c, and move it into filter_or_ignore_text() where all other text message parsing is done. Could you do that? Also, do we really want to not display the text messages at all? (not sure how this is supposed to work). TRUE and FALSE don't exist. No, really. I've changed them to 1 and 0 to get it to compile. calculate_width_coefficient, for easier grepping . The switch statements at lines 267 and 317 rightfully complain about certain atrology_types not being handled. I've added empty default statements, can you please check if that's correct? I've added some signedness casts to shut gcc up. Also, when you don't intend change a string (or other pointer) argument in a function, please pass it as const char*. This way the compiler can check if the string really isn't changed, and it makes debugging somewhat easier. The current binary config's will be broken with this patch. In theory, this could be fixed by using some of the reserved floats for the values you want to save, but I don't think it's worth it. People will simply have to delete their el.cfg in the unlikely case it's causing trouble. And anyway, it'll be overwritten when you exit the game anyway. EDIT: I've moved some stuff that didn't need to be exported from the header file to astrology.c. Can you add function descriptions to the two remaining functions in astrology.h? (probably mostly a copy-paste job). Edited September 18, 2007 by Grum Share this post Link to post Share on other sites
Florian Report post Posted September 18, 2007 (edited) Some ranges are not right: - http://www.superfloh.dyndns.org/el/predict1.png - http://www.superfloh.dyndns.org/el/predict2.png - http://www.superfloh.dyndns.org/el/predict3.png - http://www.superfloh.dyndns.org/el/predict4.png /EDIT dang, vsync and screeny don't match Edited September 18, 2007 by Florian Share this post Link to post Share on other sites
bkc56 Report post Posted September 18, 2007 The harvest range is in the -90 +90 range. Is that a recent change? Because while the #da command was still active I clearly have Actual Harvest values ranging from -180 to +180. Share this post Link to post Share on other sites
kibora Report post Posted September 18, 2007 (edited) Submitted a new patch https://developer.berlios.de/patch/index.ph...p;group_id=1256 Changes: 1. Harvest is now +/- 90, and to hit and to damage +/- 8 (they are surely moer than 5 but not sure if 8 is the max). As for the accuracy, it's being calculated as +/- 5% of the attack. No idea if that is correct 2. Moved the is_astrology_message to filter_or_ignore_text in text.c 3. There are now positive_bar_colors and negative_bar_colors defined in astrology.c. I am not good with colors. Whoever wants can tweak them as necessary @ Grum Yes i know about the el.cfg. But i wasn't sure if i should place the astrology part at the end of it. Deleting el.cfg does help though Edited September 18, 2007 by kibora Share this post Link to post Share on other sites
Learner Report post Posted September 18, 2007 I took a look at the current patch, it looks good, so I've applied it with a few minor modifications (noted below). A couple of comments: I think we should move the call to is_astrology_message() out of multiplayer.c, and move it into filter_or_ignore_text() where all other text message parsing is done. Could you do that? Also, do we really want to not display the text messages at all? (not sure how this is supposed to work). TRUE and FALSE don't exist. No, really. I've changed them to 1 and 0 to get it to compile. calculate_width_coefficient, for easier grepping . The switch statements at lines 267 and 317 rightfully complain about certain atrology_types not being handled. I've added empty default statements, can you please check if that's correct? I've added some signedness casts to shut gcc up. Also, when you don't intend change a string (or other pointer) argument in a function, please pass it as const char*. This way the compiler can check if the string really isn't changed, and it makes debugging somewhat easier. The current binary config's will be broken with this patch. In theory, this could be fixed by using some of the reserved floats for the values you want to save, but I don't think it's worth it. People will simply have to delete their el.cfg in the unlikely case it's causing trouble. And anyway, it'll be overwritten when you exit the game anyway. EDIT: I've moved some stuff that didn't need to be exported from the header file to astrology.c. Can you add function descriptions to the two remaining functions in astrology.h? (probably mostly a copy-paste job). Any time the binary format of el.cfg changes, you need to increment CFG_VERSION in init.c to force the old el.cfg's to be deleted and prevent problems like http://www.eternal-lands.com/forum/index.php?s=&showtopic=35028&view=findpost&p=385390[/uTL] and problems when it goes live. When ever possible yout should use the existing reserved variables to prevent having to wipe el.cfg this way. Share this post Link to post Share on other sites
Grum Report post Posted September 19, 2007 (edited) Any time the binary format of el.cfg changes, you need to increment CFG_VERSION in init.c to force the old el.cfg's to be deleted and prevent problems like http://www.eternal-lands.com/forum/index.p...st&p=385390 and problems when it goes live. When ever possible yout should use the existing reserved variables to prevent having to wipe el.cfg this way. Okay, didn't know about the version number. Anyway, there's still some space reserved (apparently) for floats, but we might as well cram the two new integers for the astrology window in there. 't isn't pretty, but it should keep the current binary configs working. EDIT: kibora, I applied your patch, thanks. Edited September 19, 2007 by Grum Share this post Link to post Share on other sites
Florian Report post Posted September 19, 2007 (edited) No window pops up anymore (Or maybe it's not visible because it's x/y coords are messed up? alt-w doesn't seem to work on OSX) /EDIT rm el.cfg fixed it ... /EDIT2 negative bars seem to be one or two pixels too short http://www.superfloh.dyndns.org/el/predict5.png Edited September 19, 2007 by Florian Share this post Link to post Share on other sites
kibora Report post Posted September 19, 2007 /EDIT2 negative bars seem to be one or two pixels too short http://www.superfloh.dyndns.org/el/predict5.png Could you try adding glLineWidth(2.0f);afterglDisable(GL_TEXTURE_2D);and see if the problem still occurs Share this post Link to post Share on other sites
Florian Report post Posted September 19, 2007 Could you try adding glLineWidth(2.0f);afterglDisable(GL_TEXTURE_2D);and see if the problem still occurs Looks good now Share this post Link to post Share on other sites
kibora Report post Posted September 19, 2007 (edited) Could someone apply that change in CVS pls. Oh and also increase the CFG_VERSION to 8 perhaps Edited September 19, 2007 by kibora Share this post Link to post Share on other sites
Grum Report post Posted September 19, 2007 Could someone apply that change in CVS pls. Done Oh and also increase the CFG_VERSION to 8 perhaps Well, since I move the astrology vars to use some space previously reserved, I assumed it wouldn't be necessary. The few people who managed to break their el.cfg in the past 24 hours can probably delete it again. Learner? Share this post Link to post Share on other sites
Learner Report post Posted September 19, 2007 Could someone apply that change in CVS pls. Done Oh and also increase the CFG_VERSION to 8 perhaps Well, since I move the astrology vars to use some space previously reserved, I assumed it wouldn't be necessary. The few people who managed to break their el.cfg in the past 24 hours can probably delete it again. Learner? With what you did, whether or not the version number needs to be bumped or not depends on whether the new code likes the default values of 0 it will get. You'll want to test it with an el.cfg that has not been altered yet, and if there are problems the version should be bumped up. If you're not sdure if there will be problems or not, the safest bet is bumping the version (better to reset defaults, then get confused numbers). Share this post Link to post Share on other sites
Grum Report post Posted September 20, 2007 With what you did, whether or not the version number needs to be bumped or not depends on whether the new code likes the default values of 0 it will get. Zeros should be okay, it's the astrology window position. Share this post Link to post Share on other sites
bkc56 Report post Posted November 29, 2007 I was going to put this in suggestions, but I decided it was better in this (old) existing thread. I like the new astro interface, but could it ALSO print the values like it used to? I want to be able to capture the astro values in my chat log (so I can collect trends/curves and such) and that's a lot harder to do if I have to manually write down the day/time/values anytime I use a stone. Share this post Link to post Share on other sites
kibora Report post Posted November 30, 2007 That would be easy. A single line needs to be //-ed. But ask Radu if that's how he wants it Share this post Link to post Share on other sites