Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Entropy

Astrology stones graphical interface

Recommended Posts

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

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 :huh:.
  • 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 by Grum

Share this post


Link to post
Share on other sites
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

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 by kibora

Share this post


Link to post
Share on other sites

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

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 by Grum

Share this post


Link to post
Share on other sites

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×