Announcement

Collapse
No announcement yet.

PROJECT: Customizing Civ names at startup (and for Barb civs)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PROJECT: Customizing Civ names at startup (and for Barb civs)

    In regards to this fix by Fromafar...


    Originally posted by Fromafar
    Bug fixes: [list=1][*]Prevent assigning the same civilisation twice at the start of the game.[*]Recycle the civilisation (index) when a civilisation gets killed. This may prevent a game crash that would occur when a new - revolting - civilisation is created and all civilisation indices had been used in the past.[/list=1]
    gs\gameobj\civilisation.cpp
    gs\gameobj\civilisationpool.cpp
    gs\gameobj\civisationpool.h

    2004.08.17.incr.civs.zip

    Note: The solution for problem 1 is incomplete. When the human player selects an index (color) larger than 1, the human player civilisation may be the one that gets reassigned. Modifications in gameinit.cpp to prevent this are still under test, and will follow later.
    this is a curiousity but may seem like a request Is there any way to add in the civilizations section a way to edit on start up the name of your civ like in civ1, civ2, and civ3. unless I've totally missed it in Ctp2 I've never been able to start a game a customize my civ name. Leader name, yes But my civilization, no.


    With that in mind I was wondering if it would then be possible to be able to apply the same customize civ name option in game. By this I mean a situation involving the barbarians where they take a city and the city then becomes a new civilization. I love this feature but it would be cool if the box that says "the are calling themselves the X" had the change name option. I used to do this by cheat mode but it should be standard.

    for example: Barbarian captured city of Venice becomes a regular civilization chances are the game wil say: "The are Calling themselves the Nicauraguans" aNd you click OK. I'd like to see a little box next to OK that says CHANGE or EDIT and you click it and it opens the customize civ name window so you could then Change them to the Venetians or whatever. then hit ok.


    Any comments?





    Formerly known as "E" on Apolyton

    See me at Civfanatics.com

  • #2


    1) If you want a civ not on the list of choices you can add one by modifying the relevant .txt files. (maybe I should reinstall civ3 and look at what you are talking about... )

    2) If the barbarians take over a city it does not become a new civ in the game, it becomes a barbarian city.
    ·Circuit·Boi·wannabe·
    "Evil reptilian kitten-eater from another planet."
    Call to Power 2 Source Code Project 2005.06.28 Apolyton Edition

    Comment


    • #3
      Originally posted by E
      this is a curiousity but may seem like a request Is there any way to add in the civilizations section a way to edit on start up the name of your civ like in civ1, civ2, and civ3. unless I've totally missed it in Ctp2 I've never been able to start a game a customize my civ name. Leader name, yes But my civilization, no.
      Looks like German translation of Civ3 is as bad as the German translation of Civ2. I must admit it has some atmosphere that your partners in diplomacy cannot speak your language very well. But something like this does not belong into a good game.

      For instance you saw in Civ2:

      "dekatent deutsch Reich"

      But actual it should be:

      "dekatentes deutsches Reich"

      And actually this depends on the context. For the adjective deutsch (actual this is the form of the adverb) you have forms for three genders and in a strong and a weak variant and that for four cases, so that makes, so that are 24 possible forms in German instead of one form in English. And the possible forms used in CTP2 for the German version are already restricted.

      So here is a list for one Civ from the German str_loc.txt:

      Code:
      GERMAN_LEADERM_NAME_SIR_CAP "Sir"
      GERMAN_LEADERF_NAME_SIR_CAP "Madam"
      GERMAN_LEADERM_NAME_LEADER_ARTICLE_ACC "den Herrscher"
      GERMAN_LEADERF_NAME_LEADER_ARTICLE_ACC "die Herrscherin"
      GERMAN_LEADERM_NAME_LEADER_ARTICLE_GEN "des Herrschers"
      GERMAN_LEADERF_NAME_LEADER_ARTICLE_GEN "der Herrscherin"
      GERMAN_LEADERM_NAME_DICTATOR "Diktator"
      GERMAN_LEADERF_NAME_DICTATOR "Diktatorin"
      GERMAN_LEADERM_NAME_FRIEND "Freund"
      GERMAN_LEADERF_NAME_FRIEND "Freundin"
      GERMAN_LEADERM_NAME_OUR_GREAT_LEADER_DAT "unserem großen Herrscher"
      GERMAN_LEADERF_NAME_OUR_GREAT_LEADER_DAT "unserer großen Herrscherin"
      GERMAN_LEADERM_NAME_THEIR_NEW_LEADER_DAT "ihrem neuen Herrscher"
      GERMAN_LEADERF_NAME_THEIR_NEW_LEADER_DAT "ihrer neuen Herrscherin"
      GERMAN_LEADERM_NAME_SUPREME_LEADER_ARTICLE_DAT "dem alleinigen Herrscher"
      GERMAN_LEADERF_NAME_SUPREME_LEADER_ARTICLE_DAT "der alleinigen Herrscherin"
      GERMAN_LEADERM_NAME_HONORED_NOM "Verehrter"
      GERMAN_LEADERF_NAME_HONORED_NOM "Verehrte"
      GERMAN_LEADERM_NAME_THEIR_LEADER_GEN "ihres Herrschers"
      GERMAN_LEADERF_NAME_THEIR_LEADER_GEN "ihrer Herrscherin"
      GERMAN_LEADERM_NAME_LEADER "Herrscher"
      GERMAN_LEADERF_NAME_LEADER "Herrscherin"
      GERMAN_LEADERM_NAME_LEADER_ARTICLE_DAT "dem Herrscher"
      GERMAN_LEADERF_NAME_LEADER_ARTICLE_DAT "der Herrscherin"
      GERMAN_LEADERM_NAME_GREAT_NOM "Großer"
      GERMAN_LEADERF_NAME_GREAT_NOM "Große"
      GERMAN_LEADERM_NAME_ARTICLE_DEF "der"
      GERMAN_LEADERF_NAME_ARTICLE_DEF "die"
      GERMAN_LEADERM_NAME_CIV_LORD "Nationsgroßmeister"
      GERMAN_LEADERF_NAME_CIV_LORD "Nationsgroßmeisterin"
      GERMAN_LEADERM_NAME_PRONOUN_HIM "ihn"
      GERMAN_LEADERF_NAME_PRONOUN_HIM "sie"
      GERMAN_LEADERM_NAME_PRONOUN_HE "Er"
      GERMAN_LEADERF_NAME_PRONOUN_HE "Sie"
      GERMAN_COUNTRY_NAME_OF_POSSESSIVE "von Deutschland"
      GERMAN_COUNTRY_NAME_OF_POSSESSIVE_S "Deutschlands"
      GERMAN_COUNTRY_NAME_HAS_FRONT "hat Deutschland"
      GERMAN_COUNTRY_NAME_TO_SOMEONE "an Deutschland"
      GERMAN_COUNTRY_NAME_NOM_SMALL "Deutschland"
      GERMAN_COUNTRY_NAME_NOM_CAPS "Deutschland"
      GERMAN_COUNTRY_NAME_HAS_REAR "Deutschland hat"
      GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_MALE "Deutschland hat seinen"
      GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_FEMALE "Deutschland hat seine"
      GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_NEUTRE "Deutschland hat sein"
      GERMAN_COUNTRY_NAME_WILL_REAR "Deutschland wird"
      GERMAN_COUNTRY_NAME_WILL_FRONT "wird Deutschland"
      GERMAN_COUNTRY_NAME_CAN_REAR "Deutschland kann"
      GERMAN_COUNTRY_NAME_CAN_FRONT "kann Deutschland"
      GERMAN_COUNTRY_NAME_MUST_FRONT "muss Deutschland"
      GERMAN_COUNTRY_NAME_MUST_REAR "Deutschland muss"
      GERMAN_COUNTRY_NAME_FROM_SOMEWHERE "aus Deutschland"
      GERMAN_COUNTRY_NAME_TO_SOMEWHERE "in Deutschland"
      GERMAN_COUNTRY_NAME_TOWARDS "nach Deutschland"
      GERMAN_COUNTRY_NAME_DAT "Deutschland"
      GERMAN_COUNTRY_NAME_IN "in Deutschland"
      GERMAN_SINGULAR_UNDEF_PLURAL_NOM "deutscher"
      GERMAN_SINGULAR_UNDEF_PLURAL_ACC "deutsche"
      GERMAN_SINGULAR_UNDEF_SINGULAR_DAT "deutschen"
      GERMAN_SINGULAR_UNDEF_PLURAL_CAPS "Deutsche"
      GERMAN_SINGULAR_ARTICLE_PLURAL_NOM_CAPS "Die deutschen"
      GERMAN_SINGULAR_ARTICLE_PLURAL_ACC "die deutschen"
      GERMAN_PLURAL_ARTICLE_GEN "der Deutschen"
      GERMAN_PLURAL_DIRECT "Deutsche"
      GERMAN_PLURAL_DAT "Deutschen"
      GERMAN_LEADERM_NAME_DAT "Otto von Bismark"
      GERMAN_LEADERF_NAME_DAT "Brunhild"
      Possibly some them aren't used, but there are some that are needed, so it is much more then just change the name of a civ and the according adjective, you need also to change the article, and you have to do some declining. At least it would need some thinking about getting the interface right, how to store verything, so you need also an extension to the save file format, or you have to store the stuff in a user str_loc.txt and give the civ a unique identifier. Than you have to figure out how to keep the consistency between different machines when exchanging save games, so the stuff belongs into the save file. So finally a lot of work to do it right.

      Originally posted by E
      With that in mind I was wondering if it would then be possible to be able to apply the same customize civ name option in game. By this I mean a situation involving the barbarians where they take a city and the city then becomes a new civilization. I love this feature but it would be cool if the box that says "the are calling themselves the X" had the change name option. I used to do this by cheat mode but it should be standard.

      for example: Barbarian captured city of Venice becomes a regular civilization chances are the game wil say: "The are Calling themselves the Nicauraguans" aNd you click OK. I'd like to see a little box next to OK that says CHANGE or EDIT and you click it and it opens the customize civ name window so you could then Change them to the Venetians or whatever. then hit ok.
      Editing the name of a forgein civ, in my opinion this is cheating, however you can say that this people are calling themselves the Celts and you call them the Gauls.

      -Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #4
        thanks martin,

        its looks hard to do, but you describing what would have to be done is satisfying so if we ever get to the point of doing things atleast there is a trail of what to consider...
        Formerly known as "E" on Apolyton

        See me at Civfanatics.com

        Comment


        • #5
          martin,
          It seems to me like you are mixing apples and oranges. I don't know if I'm right, but I don't think the translational problems (or solutions) associated with localization would change as the name of a civ changed.
          GERMAN_LEADERM_NAME_LEADER_ARTICLE_ACC "den Herrscher"
          Only the GERMAN_ part of every line you quoted would change when the name of the German civ changed, right? All of the language features of the "German localization" would remain intact, wouldn't they?

          Comment


          • #6
            Originally posted by drulius
            martin,
            It seems to me like you are mixing apples and oranges. I don't know if I'm right, but I don't think the translational problems (or solutions) associated with localization would change as the name of a civ changed.

            Only the GERMAN_ part of every line you quoted would change when the name of the German civ changed, right? All of the language features of the "German localization" would remain intact, wouldn't they?
            I never claimed that all of these lines are used or necesarry. I think that the _LEADER lines are unused or not all of them are necesary, in fact they are the same for each civilization but this does not mean that we have to keep it like this, but in this case I would prefer a government dependent title style. And even if we would just consider the lines that aren't dealing with the leaders, there are still enough, so let's see what happens if I change the name of the German civ from "Deutschland" to "Deutsches Reich":

            Code:
            GERMAN_COUNTRY_NAME_OF_POSSESSIVE "vom Deutschen Reich"
            GERMAN_COUNTRY_NAME_OF_POSSESSIVE_S "des Deutschen Reiches"
            GERMAN_COUNTRY_NAME_HAS_FRONT "hat das deutsche Reich"
            GERMAN_COUNTRY_NAME_TO_SOMEONE "an das Deutsche Reich"
            GERMAN_COUNTRY_NAME_NOM_SMALL "Deutsches Reich"
            GERMAN_COUNTRY_NAME_NOM_CAPS "Deutsches Reich"
            GERMAN_COUNTRY_NAME_HAS_REAR "das Deutsche Reich hat"
            GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_MALE "das Deutsche Reich hat seinen"
            GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_FEMALE "das Detsche Reich hat seine"
            GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_NEUTRE "das Deutsche Reich hat sein"
            GERMAN_COUNTRY_NAME_WILL_REAR "das Deutsche Reich wird"
            GERMAN_COUNTRY_NAME_WILL_FRONT "wird das Deutsche Reich"
            GERMAN_COUNTRY_NAME_CAN_REAR "das Deutsche Reich kann"
            GERMAN_COUNTRY_NAME_CAN_FRONT "kann das Deutsche Reich"
            GERMAN_COUNTRY_NAME_MUST_FRONT "muss das deutsche Reich"
            GERMAN_COUNTRY_NAME_MUST_REAR "das Deutsche Reich muss"
            GERMAN_COUNTRY_NAME_FROM_SOMEWHERE "aus dem Deutschen Reich"
            GERMAN_COUNTRY_NAME_TO_SOMEWHERE "zum Deutschen Reich"
            GERMAN_COUNTRY_NAME_TOWARDS "ins Deutsche Reich"
            GERMAN_COUNTRY_NAME_DAT "dem Deutschen Reich"
            GERMAN_COUNTRY_NAME_IN "im Deutschen Reich"
            GERMAN_SINGULAR_UNDEF_PLURAL_NOM "deutscher"
            GERMAN_SINGULAR_UNDEF_PLURAL_ACC "deutsche"
            GERMAN_SINGULAR_UNDEF_SINGULAR_DAT "deutschen"
            GERMAN_SINGULAR_UNDEF_PLURAL_CAPS "Deutsche"
            GERMAN_SINGULAR_ARTICLE_PLURAL_NOM_CAPS "Die deutschen"
            GERMAN_SINGULAR_ARTICLE_PLURAL_ACC "die deutschen"
            GERMAN_PLURAL_ARTICLE_GEN "der Deutschen"
            GERMAN_PLURAL_DIRECT "Deutsche"
            GERMAN_PLURAL_DAT "Deutschen"
            Maybe this list contains some redundance but in the end the user has to fill a huge list, so that everything appears correctly. And actual I am not sure if I filled the list correctly, because I don't know the context for instance:

            GERMAN_COUNTRY_NAME_NOM_SMALL "Deutsches Reich"

            As a name on its own this is ok but if you use an article then it should be:

            GERMAN_COUNTRY_NAME_NOM_SMALL "das Deutsche Reich"

            Same thing nominative singular the first one without and the second one with article.
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #7
              Martin,
              Just playing a little devil's advocate here, but it seems like if the game made a blanket swap of, say, the characters "Drulius" or "Hosebib" for the characters "Deutsch" in each line you quoted, it would not substantially affect the clarity of the meaning of the phrases, since, as you stated, the clarity is already less than ideal. If the Player chooses an even less suitable civ name, the Player is the one who has to deal with the consequences in the game.

              Code:
              GERMAN_COUNTRY_NAME_OF_POSSESSIVE "vom Druliusen Reich"
              GERMAN_COUNTRY_NAME_OF_POSSESSIVE_S "des Hosebiben Reiches"
              GERMAN_COUNTRY_NAME_HAS_FRONT "hat das Druliuse Reich"
              GERMAN_COUNTRY_NAME_TO_SOMEONE "an das Hosebibe Reich"
              GERMAN_COUNTRY_NAME_NOM_SMALL "Druliuses Reich"
              GERMAN_COUNTRY_NAME_NOM_CAPS "Hosebibes Reich"
              GERMAN_COUNTRY_NAME_HAS_REAR "das Druliuse Reich hat"
              GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_MALE "das Hosebibe Reich hat seinen"
              GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_FEMALE "das Druliuse Reich hat seine"
              GERMAN_COUNTRY_NAME_HAS_REAR_THEIR_NEUTRE "das Hosebibe Reich hat sein"
              
              ...etc
              The real issue at the heart of supporting renamable civilisations, I think, is that civ names are localized for each supported language and the Game uses what it reads in the localization text files so that it can speak to the Player in the Player's chosen local language. At this time, the Game only has write access to alter those text files (renaming civ leaders) before a game. Before a game, it might be possible to swap some characters out and rename a civ rather easily, yet crudely in some languages. But once the game has loaded, renaming a revolution-spawned civ is a task much closer to impossible, unless maybe the game offered a "radio button spinner" for selection of any of the predetermined civ names not already in use, instead of just randomly choosing one of them like it does now. Please excuse me if I'm just restating the obvious, I'm only trying to understand.

              Comment


              • #8
                Originally posted by drulius
                Martin,
                Just playing a little devil's advocate here, but it seems like if the game made a blanket swap of, say, the characters "Drulius" or "Hosebib" for the characters "Deutsch" in each line you quoted, it would not substantially affect the clarity of the meaning of the phrases,
                Well you got the adjective declension right, but you did just a small change, namely you renamed the country just from: "Deutsches Reich" to "Druliuses Reich", actual this isn't really an adjective. In English this would be "Drulius' Empire" then "Drulian Empire" it should be rather "Drulisches Reich". However if you rename it to "Frankreich" then you need to do more then just exchange a few characters. And its getting even worse if you use "Vereinigte Arabische Emirate" as country name.

                Originally posted by drulius
                since, as you stated, the clarity is already less than ideal.
                Putting them into example sentences would achieve full clarity, so that's not the problem. Which one to chose is given by the context. My problem as I posted the sentences was that I did not looked on the context.

                Originally posted by drulius
                If the Player chooses an even less suitable civ name, the Player is the one who has to deal with the consequences in the game.
                That's right that the user has to deal with the consequences at the end. This is not a problem under the condition that the user has the chance to make it correct in the first place. And therefore a flexible interface is needed. One that is not hardencoded and fully determined by the *.ldl files. Each field contains an example sentence with a gap to fill in the right form. Therefore you must be able to describe each line on that interface must be able to set the gap-boxes, then this gap boxes must be linked with the value. And you need a structure to save this data. Ideally this should be a hashtable or something like this, the keys are strings you see on the left side of the given table and the values are the quoted strings on the right side. That should be saved on the players level, and that also requires to change the save file format if we do it like this. Alternativly that could be saved in the string database, so no new save file format, but then it must be made sure that the information is intact even after a slic reload.

                I don't say that doing it well is not impossible, but I don't say either that it is trival.

                -Martin
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #9
                  Thanks for taking the time to explain this point to me. I agree, it would be no trivial task. But... It would also add non-trivial amounts of enjoyment to my experience of the game. Perhaps someday soon I will acquire the necessary programming know-how it tackle a project like this on my own initiative. Until that day I will help where I can and try not to be too much of a bother...

                  Comment


                  • #10
                    just for record keeping I found this in spnewgamewindow.cpp

                    Code:
                    void SPProfileBox::SetLeader(uint32 index)
                    {
                    	
                    	if ( spnewgametribescreen_getTribeIndex() < 0 )
                    	{
                    		const MBCHAR *name =
                    			g_theStringDB->GetNameStr(
                    				g_theCivilisationDB->GetLeaderName(CIV_INDEX(index)));
                    
                    		m_spName->SetFieldText(name);
                    	}
                    	else
                    	{
                    		const sint32 size = 100;
                    		MBCHAR lname[ size + 1 ];
                    		spnewgametribescreen_getLeaderName( lname );
                    		m_spName->SetFieldText( lname );
                    	}
                    }
                    Formerly known as "E" on Apolyton

                    See me at Civfanatics.com

                    Comment

                    Working...
                    X