The privy forum for sub-mods of THIRD AGE TOTAL WAR; 'Divide & Conquer' and 'Ruins of Arnor' ++ team chat/editing/discussion zone++


    Forum troll
    Forum troll

    Gender : Male Posts : 50
    Join date : 2010-06-19
    Age : 47
    Location : Munic
    Comments : No comment.

    descr_campaign_db.xml Empty descr_campaign_db.xml

    Post  Aramiteus on Thu Sep 23, 2010 10:31 am

    Wow. Just tried to test inheritage of the ring.

    did have a look into the descr_campaign_db.xml to determine the age when a char is likely to die by age. Found this:

    <max_age uint="520"/>
    <max_age_for_marriage_for_male uint="500"/>
    <max_age_for_marriage_for_female uint="500"/>
    <max_age_before_death uint="520"/>
    <max_age_of_child uint="10"/>
    <old_age uint="500"/>
    <age_of_manhood uint="12"/>
    <daughters_age_of_consent uint="16"/>
    <daughters_retirement_age uint="25"/>
    <age_difference_min int="-10"/>
    <age_difference_max int="200"/>
    <parent_to_child_min_age_diff uint="8"/>
    <min_adoption_age uint="20"/>
    <max_adoption_age uint="30"/>
    <max_age_for_conception uint="500"/>
    <age_of_manhood_close uint="11"/>
    <max_number_of_children uint="4"/>

    OK 520. Set the age of Bard to 519 in descr_strat.txt. Started and Bard was 7 years old.
    So our characters could never die by age.
    Seems there is a maximum at 512. And beyond that it wraps around. (Typical behavoir of an unsigned byte storage.)
    Was that your intention?
    Nevertheless I'll change that in my copy for test purposes.
    Or perhaps it is just a display matter. Because an uint depending on the machine it is defined is normally more than only 8 Bit.
    In any case a bug.

    Wow worser than thought. Lowered the ages by 100. 319 results in 35. seems a double or tripple wrap around. Have to find the maximum. Hm 319 - 35 is 384

    Argh. 2 ^ 9 is 512 2 ^ 8 is 256. I'll try it with that.
    Lowered again by 200.
    My 249 year old bard is displayed as 121. Difference 128 = 2^7. Oh holy ... that is even not an unsigned byte. Seems like 128 is the maximum displayable age.

      Current date/time is Mon Apr 22, 2019 5:58 pm