Page 1 of 3 123 LastLast
Results 1 to 20 of 53

Thread: Ab Urbe Condita

  1. #1
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default Ab Urbe Condita

    I was starting to get annoyed by the whole AUC thing instead of real years, and I was too lazy to constantly do the math to convert. So I made a little program in C++ to convert the years for me. It works, and its helping me learn C++. Win-win. I thought I'd upload it here in case anyone else wanted it.

    Here's the code too.
    Spoiler Alert, click show to read: 
    Code:
    #include <iostream>
    #include <stdlib.h>
    using namespace std;
    
    int main()
    {
        char again('y');
        while (again == 'y')
        {
            system("cls");
            int yearAUC, yearME;
            cout << "Enter year AUC: ";
            cin >> yearAUC;
            yearME = (753 - yearAUC);
            if (yearME <= 0)
            {
                --yearME;
            }
            if (yearME >= 1)
            {
                cout << "\nYear = " << yearME << " BC.";
            }
            else
            {
                yearME = (yearME * -1);
                cout << "\nYear = " << yearME << " AD.";
            }
            cout << "\n\nAgain? y/n  ";
            cin >> again;
        }
    }

    UPDATED! Now does the opposite as well, from Gregorian to AUC.
    Here's the new code.
    Spoiler Alert, click show to read: 
    Code:
    #include <iostream>
    #include <stdlib.h>
    using namespace std;
    
    int main()
    {
        int choice;
        char again('y');
        cout << "Would you like to convert to or from AUC?\n"
                "1. AUC to Gregorian.\n"
                "2. Gregorian to AUC.\n";
        cin >> choice;
        switch (choice)
        {
            case 1:
                while (again == 'y')
                {
                    system("cls");
                    int yearAUC, yearME;
                    cout << "Enter year AUC: ";
                    cin >> yearAUC;
                    yearME = (753 - yearAUC);
                    if (yearME <= 0)
                    {
                        --yearME;
                    }
                    if (yearME >= 1)
                    {
                        cout << "\nYear = " << yearME << " BC.";
                    }
                    else
                    {
                        yearME = (yearME * -1);
                        cout << "\nYear = " << yearME << " AD.";
                    }
                    cout << "\n\nAgain? y/n  ";
                    cin >> again;
                }
                break;
            case 2:
                int time1(0);
                while (again=='y')
                {
                    system("cls");
                    int yearAUC, yearME;
                    if (time1==0)
                        cout << "\nUse '-' for BC. There is no year 0.\n";
                    time1++;
                    cout << "Enter year in Gregorian: ";
                    cin >> yearME;
                    yearAUC=(yearME+753);
                    if (yearAUC <= 0)
                    {
                        --yearAUC;
                    }
                    cout << "\nYear = " << yearAUC << " AUC.";
                    cout << "\n\nAgain? y/n  ";
                    cin >> again;
                }
        }
    }


    SECOND UPDATE!
    I have fixed a few stupid mistakes in my code from the second version. I suppose I should call this version 2.1. Be sure if you want this to download this one. It was giving the wrong date whenever you tried to convert a date in AD. Really should've debugged a bit...
    Spoiler Alert, click show to read: 
    Code:
    #include <iostream>
    #include <stdlib.h>
    using namespace std;
    
    int main()
    {
        int choice;
        char again('y');
        cout << "Would you like to convert to or from AUC?\n"
                "1. AUC to Gregorian.\n"
                "2. Gregorian to AUC.\n";
        cin >> choice;
        switch (choice)
        {
            case 1:
                while (again == 'y')
                {
                    system("cls");
                    int yearAUC, yearME;
                    cout << "Enter year AUC: ";
                    cin >> yearAUC;
                    yearME = (753 - yearAUC);
                    if (yearME <= 0)
                    {
                        --yearME;
                    }
                    if (yearME >= 1)
                    {
                        cout << "\nYear = " << yearME << " BC.";
                    }
                    else
                    {
                        yearME = (yearME * -1);
                        cout << "\nYear = " << yearME << " AD.";
                    }
                    cout << "\n\nAgain? y/n  ";
                    cin >> again;
                }
                break;
            case 2:
                int time1(0);
                while (again=='y')
                {
                    system("cls");
                    int yearAUC, yearME;
                    if (time1==0)
                        cout << "Use '-' for BC. There is no year 0.\n";
                    time1++;
                    cout << "Enter year in Gregorian: ";
                    cin >> yearME;
                    if (yearME >= 0)
                    {
                        --yearME;
                    }
                    yearAUC=(yearME+753);
                    cout << "\nYear = " << yearAUC << " AUC.";
                    cout << "\n\nAgain? y/n  ";
                    cin >> again;
                }
        }
    }
    Last edited by ROFL Copter; September 24, 2010 at 04:49 PM.

  2. #2

    Default Re: Ab Urbe Condita

    AAAAAAAAHHHh, my eyes! Why did i look in the spoiler without first getting my crucifix and special opaque glasses on, i'll have to rinse my eyes out with holy water now, thanks a bunch. (I have to do c programming at uni as part of my course and i was hoping not to see it again until the second year started partly because the anti-christ/satan/personification of evil and c programming are the sme thing in my book .)

    Anyway crazy ramblings over, nice work there ROFL Copter, have some rep for it.


  3. #3

    Default Re: Ab Urbe Condita

    i remember why i didn't take computer programming this year

  4. #4
    Nordmann's Avatar Senator
    Join Date
    Jan 2008
    Location
    Britannia
    Posts
    1,254

    Default Re: Ab Urbe Condita

    Nice one, very useful too.

    Rep on its way for sharing with the rest of us.

  5. #5
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default Re: Ab Urbe Condita

    Quote Originally Posted by General Brittanicus View Post
    AAAAAAAAHHHh, my eyes! Why did i look in the spoiler without first getting my crucifix and special opaque glasses on, i'll have to rinse my eyes out with holy water now, thanks a bunch. (I have to do c programming at uni as part of my course and i was hoping not to see it again until the second year started partly because the anti-christ/satan/personification of evil and c programming are the sme thing in my book .)

    Anyway crazy ramblings over, nice work there ROFL Copter, have some rep for it.
    I tried to avoid this by putting it in spoilers! You should be more careful.

    So now that a few people have downloaded it, does it work?

  6. #6
    Timefool's Avatar Primicerius
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    3,921

    Default Re: Ab Urbe Condita

    Yeah it works. I could do the same thing for java but theres no way for everyone to run the program unless they have a java compiler.

  7. #7

    Default Re: Ab Urbe Condita

    I've always used this site, has lots of others too
    http://www.fusisoft.it/Antiquities/ErasConverter.aspx

  8. #8
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default Re: Ab Urbe Condita

    Quote Originally Posted by John Denver View Post
    I've always used this site, has lots of others too
    http://www.fusisoft.it/Antiquities/ErasConverter.aspx
    Mine tells you if it is BC or AD instead of a negative sign. Plus that site seems to be wrong. I know that 536 AUC is 217 BC, and that site is saying it is 218.

  9. #9

    Default Re: Ab Urbe Condita

    Thank you so much for that ROFL Copter you can't imagine how easier you made my life with this little converter
    Impossible is not a fact It's an opinion. Impossible is nothing.


  10. #10
    Father Jack's Avatar expletive intended
    Join Date
    Apr 2007
    Location
    Ratae Corieltauvorum
    Posts
    5,208

    Default Re: Ab Urbe Condita

    I believe the reason why AUC is used is because you will get a CTD in 55BC (or around then) which cannot be resolved.
    Pedicabo ego vos et irrumabo.

  11. #11
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default Re: Ab Urbe Condita

    Quote Originally Posted by Macky View Post
    I believe the reason why AUC is used is because you will get a CTD in 55BC (or around then) which cannot be resolved.
    I've heard this too. It doesn't change the fact that it is a little annoying.

  12. #12

    Default Re: Ab Urbe Condita

    Quote Originally Posted by Macky View Post
    I believe the reason why AUC is used is because you will get a CTD in 55BC (or around then) which cannot be resolved.
    66 BC-its somewhere in the RS2 release thread i think.
    in any case, how would this work? would this totally remove the AUC or something else? personally i really like the AUC because its realistic and very cool IMHO.
    Quote Originally Posted by SirRobin View Post
    My point is that, while pastries are delicious, they are not a factor in deciding whether or not to start a rebellion against the lord of the realm.
    do leave your name if you give me rep. i may just return the favor. maybe.
    please visit the Tale of the Week forum at: http://www.twcenter.net/forums/forumdisplay.php?f=802 for brilliant writing, people, and brownies. with nuts, if you prefer.

  13. #13
    Timefool's Avatar Primicerius
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    3,921

    Default Re: Ab Urbe Condita

    Wow the code for C++ seems a lot more complex than it would be for Java:
    Spoiler Alert, click show to read: 
    import java.io.*;
    public class abUrbCondita {

    /**
    * @param args
    * @throws IOException
    * @throws NumberFormatException
    */
    public static void main(String[] args) throws NumberFormatException, IOException {
    // TODO Auto-generated method stub
    double newline;
    double number;

    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
    System.out.println(" Enter year in Ab Urb Condita:");
    newline=Double.parseDouble(stdin.readLine());

    number = newline- 753;

    System.out.println("the year in the Gregorian calendar is " + number);
    }

    }


    I just learned how to do that last week too

  14. #14
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default Re: Ab Urbe Condita

    Mine takes in the number of the year in AUC, and then subtracts it from 753. Then it checks to see if it is below zero and if so adds one (because there is no year zero). Then if the number is above zero it displays it and puts "BC". If it was below zero it multiplies it by -1 to get a positive number out of it and displays "AD". That is why it is more complicated. Yours just takes in a number and does the subtraction. Also, mine is in a loop.

    66 BC-its somewhere in the RS2 release thread i think.
    in any case, how would this work? would this totally remove the AUC or something else? personally i really like the AUC because its realistic and very cool IMHO.
    This is just a console program that you execute outside of the game that does the conversion of AUC to Gregorian for you. I couldn't get it in the game if I wanted to.

  15. #15
    Timefool's Avatar Primicerius
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    3,921

    Default Re: Ab Urbe Condita

    I could do that too using the if-then-else statements but I was assuming people would understand a negative outcome would be BC/BCE.

  16. #16
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default Re: Ab Urbe Condita

    You forgot to factor in the fact that there is no year zero, and the program will run like there is. You need to make it so that it will subtract one if the answer equals zero or lower.

  17. #17
    DarthLazy's Avatar Protector Domesticus
    Join Date
    May 2010
    Location
    Karachi
    Posts
    4,867

    Default Re: Ab Urbe Condita

    66 bc but the way to get around this is to skip a turn in the campaign, instead of a 3 digit year system specific to one faction that is super hard to keep track of.....

    But ROFL copter has solved that. Thanks
    Quote Originally Posted by Heathen Hammer View Post
    Real imperialism is shown by Western apologists who are defending Ukraine's brutal occupation of Novorossija.
    Quote Originally Posted by Heathen Hammer View Post
    Sovereignty of Ukraine was recognized by Yeltsin and died with him.

  18. #18
    Brusilov's Avatar Local Moderator
    Citizen

    Join Date
    Sep 2005
    Location
    Dublin, ROI
    Posts
    18,587

    Default Re: Ab Urbe Condita

    Quote Originally Posted by richi the lionheart View Post
    66 BC-its somewhere in the RS2 release thread i think.
    in any case, how would this work? would this totally remove the AUC or something else? personally i really like the AUC because its realistic and very cool IMHO.
    It's not a specific date that RTW experiences a problem it's simply form that date onwards. My understanding is that it's tied into the civil war that breaks out in vanilla RTW.

    It's part of the game engine and the way to by-pass it was the UAC system.

    With the original RTW (1.2) there was a utility called Rome Sage that could be used to change various things in a save game which included the date. There were a number of occasions where I had to use this to move the date forwards in RTR 6 Gold. I could move the date forward a year or so, play a few years and then get another CTD. I'd then go through the whole process again. Eventually after the game went to AD there wasn't a problem.

    Rome Sage does not work with RTW 1.5. I know there is an updated version out there that works with RTW 1.5 but I've heard it can mess up games.

    I'd much prefer to have the minor problem of UAC than have to go through all the problems as before. Dates are just relative numbers anyway.....

    Local Forum Moderator (Total War: Eras Technical Help, Shogun 2: Total War, RSII, RTR, World Of Tanks) - please no PMs

    War Thunder TWC Player Names: here


  19. #19
    ROFL Copter's Avatar Vicarius
    Join Date
    Oct 2008
    Location
    Edmonton, Alberta, Canada
    Posts
    2,616

    Default

    Quote Originally Posted by Brusilov View Post
    It's not a specific date that RTW experiences a problem it's simply form that date onwards. My understanding is that it's tied into the civil war that breaks out in vanilla RTW.

    It's part of the game engine and the way to by-pass it was the UAC system.

    With the original RTW (1.2) there was a utility called Rome Sage that could be used to change various things in a save game which included the date. There were a number of occasions where I had to use this to move the date forwards in RTR 6 Gold. I could move the date forward a year or so, play a few years and then get another CTD. I'd then go through the whole process again. Eventually after the game went to AD there wasn't a problem.

    Rome Sage does not work with RTW 1.5. I know there is an updated version out there that works with RTW 1.5 but I've heard it can mess up games.

    I'd much prefer to have the minor problem of UAC than have to go through all the problems as before. Dates are just relative numbers anyway.....
    Its still fun to compare yourself to the real thing. I just wanted to make that a little easier.

    I'm going to shamelessly bump this to see if anyone else wants it.
    Last edited by apple; September 14, 2010 at 06:07 PM.

  20. #20

    Default Re: Ab Urbe Condita

    Just for the record, AUC is as much ''the real thing'' as any other system, provided that it works.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •