1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

XML cleanup

Discussion in 'Civ4Col - Medieval: Conquests' started by Nightinggale, May 2, 2014.

  1. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    I started reviewing XML to make it ready for release. UnitInfos turned out to be quite a mess :eek:

    I added a test unit to test savegame compatibility and it was never meant to enter git. Nobody noticed :eek:

    There is a general desync between description and what the units are called internally. I added a table of all 133 units and we should consider naming schemes. Renaming is easy (rename.pl A B renames A to B everywhere in all XML files). The issue is that we should agree on what to do here.
    Spoiler :
    Column 1 Column 2 Column 3 Column 4
    Unit UnitClass Description comments/proposed name
    UNIT_TEST_UNIT UNITCLASS_SERF A Test Unit debug data, which needs to go
    UNIT_SERF UNITCLASS_SERF Serf
    UNIT_SLAVE_WARRIOR UNITCLASS_SLAVE_WARRIOR Slave Soldier warrior or soldier?
    UNIT_COLONIST UNITCLASS_COLONIST Free Peasant UNIT(CLASS)_FREE_PEASANT ?
    UNIT_ARAB_COLONIST UNITCLASS_COLONIST Peasant UNIT_ARAB_FREE_PEASANT ?
    UNIT_COTTER UNITCLASS_COTTER Cottar
    UNIT_CRIMINAL UNITCLASS_CRIMINAL Outlaw outlaw or criminal?
    UNIT_CONVERTED_NATIVE UNITCLASS_CONVERTED_NATIVE Converted Barbarian native or barbarian. I would go with native as barbarians is something else
    UNIT_HUNTSMAN UNITCLASS_HUNTSMAN Master Huntsman
    UNIT_SCOUT UNITCLASS_SCOUT TXT_KEY_UNIT_SCOUT
    UNIT_ARAB_SCOUT UNITCLASS_SCOUT TXT_KEY_UNIT_SCOUT
    UNIT_PIONEER UNITCLASS_PIONEER Hardy Worker pioneer or worker ?
    UNIT_ARAB_PIONEER UNITCLASS_PIONEER Hardy Worker pioneer or worker ?
    UNIT_CHRISTIAN_MISSIONARY UNITCLASS_CHRISTIAN_MISSIONARY Benedict Monk what? is it a missionary or monk?
    UNIT_ARAB_MISSIONARY UNITCLASS_CHRISTIAN_MISSIONARY Sunni Missionary unitclass shouldn't be Christian if it is used by non-Christian units
    UNIT_VETERAN UNITCLASS_VETERAN TXT_KEY_UNIT_VETERAN
    UNIT_MONGOL_VETERAN UNITCLASS_VETERAN Veteran Archer mongol or archer?
    UNIT_VIKING_VETERAN UNITCLASS_VETERAN Viking Explorer veteran or explorer?
    UNIT_ARAB_VETERAN UNITCLASS_VETERAN TXT_KEY_UNIT_VETERAN
    UNIT_PAGE UNITCLASS_PAGE Page
    UNIT_RECRUIT UNITCLASS_RECRUIT Recruit
    UNIT_ENUCH UNITCLASS_EUNUCH Eunuch typo in UNIT_EUNUCH?
    UNIT_SQUIRE UNITCLASS_SQUIRE Squire
    UNIT_ARAB_SQUIRE UNITCLASS_CALVARYMAN Calvaryman horseback squire? :lol:
    UNIT_CHAMBERLAIN UNITCLASS_CHAMBERLAIN Chamberlain
    UNIT_NOBLEMAN UNITCLASS_NOBLEMAN Nobleman
    UNIT_ARAB_NOBLEMAN UNITCLASS_ARAB_NOBLEMAN Commander nobleman or commander?
    UNIT_VESTARCH UNITCLASS_VESTARCH Vestarch
    UNIT_ARISTOCRAT UNITCLASS_ARISTOCRAT Aristocrat
    UNIT_DIGNITARY UNITCLASS_DIGNITARY Brilliant Dignitary
    UNIT_ELDER UNITCLASS_ELDER Elder
    UNIT_PREACHER UNITCLASS_PREACHER Parish Priest
    UNIT_BURGHER UNITCLASS_BURGHER Burgher
    UNIT_INVENTOR UNITCLASS_INVENTOR Prolific Inventor
    UNIT_TRADER UNITCLASS_TRADER Wily Trader
    UNIT_JESTER UNITCLASS_JESTER Jester
    UNIT_INN_KEEPER UNITCLASS_INN_KEEPER Inn Keeper
    UNIT_MINER UNITCLASS_MINER TXT_KEY_UNIT_MINER
    UNIT_QUARRYMAN UNITCLASS_QUARRYMAN Hardy Quarryman
    UNIT_LUMBERJACK UNITCLASS_LUMBERJACK TXT_KEY_UNIT_LUMBERJACK
    UNIT_HERDSMAN UNITCLASS_HERDSMAN Expert Herdsmans
    UNIT_SHEPARD UNITCLASS_SHEPARD Expert Shepherd
    UNIT_COTTON_PLANTER UNITCLASS_COTTON_PLANTER Expert Cotton Farmer
    UNIT_VINEYARD_PLANTER UNITCLASS_VINEYARD_PLANTER Expert Vinedresser
    UNIT_BARLEY_PLANTER UNITCLASS_BARLEY_PLANTER Expert Barley Farmer
    UNIT_FARMER UNITCLASS_FARMER TXT_KEY_UNIT_FARMER
    UNIT_TRAPPER UNITCLASS_TRAPPER TXT_KEY_UNIT_TRAPPER
    UNIT_FISHERMAN UNITCLASS_FISHERMAN TXT_KEY_UNIT_FISHERMAN
    UNIT_WEAVER UNITCLASS_WEAVER TXT_KEY_UNIT_WEAVER
    UNIT_WINE_MAKER UNITCLASS_WINE_MAKER Master Vintner
    UNIT_BLACKSMITH UNITCLASS_BLACKSMITH TXT_KEY_UNIT_BLACKSMITH
    UNIT_GUNSMITH UNITCLASS_GUNSMITH Master Weaponsmith UNIT(CLASS)_WEAPONSMITH?
    UNIT_ARMORSMITH UNITCLASS_ARMORSMITH Master Armorer
    UNIT_CARPENTER UNITCLASS_CARPENTER TXT_KEY_UNIT_CARPENTER
    UNIT_TANNER UNITCLASS_TANNER Master Tanner
    UNIT_COAT_MAKER UNITCLASS_COAT_MAKER Master Coat Maker
    UNIT_SILVERMINER UNITCLASS_SILVERMINER Expert Silver Miner
    UNIT_DISTILLER UNITCLASS_DISTILLER TXT_KEY_UNIT_DISTILLER
    UNIT_BUTCHER UNITCLASS_BUTCHER Master Butcher
    UNIT_BAKER UNITCLASS_BAKER Master Baker
    UNIT_RANCHER UNITCLASS_RANCHER Master Groomsman UNIT_GROOMSMAN?
    UNIT_REGULAR UNITCLASS_REGULAR Imperial Guard ???
    UNIT_CRUSADER_REGULAR UNITCLASS_REGULAR Crusader ???
    UNIT_OTTOMAN_REGULAR UNITCLASS_REGULAR Infidel ???
    UNIT_CANNON UNITCLASS_CANNON Catapult UNIT(CLASS)_CATAPULT
    UNIT_TREBUCHET UNITCLASS_TREBUCHET Trebuchet
    UNIT_ARTILLERY UNITCLASS_TREBUCHET Imperial Trebuchet UNIT_IMPE...
    UNIT_NATIVE UNITCLASS_COLONIST Barbarian are barbarians raiders or native? They shouldn't be both!
    UNIT_LONGSHIP UNITCLASS_CARAVEL Longship
    UNIT_CARAVEL UNITCLASS_CARAVEL Coastal Merchant name
    UNIT_MERCHANTMAN UNITCLASS_MERCHANTMAN Kogge name
    UNIT_PRIVATEER UNITCLASS_PRIVATEER Pirate Galley name
    UNIT_RAIDER_GALLEY UNITCLASS_PRIVATEER Raider Galley name
    UNIT_GALLEON UNITCLASS_GALLEON Carrack name
    UNIT_FRIGATE UNITCLASS_FRIGATE War Galley name
    UNIT_MAN_O_WAR UNITCLASS_FRIGATE Imperial Carrack name
    UNIT_SUPPLY_TRAIN UNITCLASS_SUPPLY_TRAIN Supply Train
    UNIT_AI_PEDLER UNITCLASS_AI_PEDLER Foreign Peddler
    UNIT_WAGON_TRAIN UNITCLASS_WAGON_TRAIN Caravan name
    UNIT_RELIC UNITCLASS_RELIC Relic
    UNIT_PILGRAM UNITCLASS_PILGRAM Pilgrims typo?
    UNIT_MARAUDER UNITCLASS_MARAUDER Marauder
    UNIT_SARACEN UNITCLASS_MARAUDER Saracen
    UNIT_BANDIT UNITCLASS_MARAUDER Bandit
    UNIT_TREASURE UNITCLASS_TREASURE TXT_KEY_UNIT_TREASURE
    UNIT_PLUNDERED_TREASURE UNITCLASS_TREASURE Plundered Treasure
    UNIT_GREAT_GENERAL UNITCLASS_GREAT_GENERAL TXT_KEY_UNIT_GREAT_GENERAL
    UNIT_ARAB_GREAT_GENERAL UNITCLASS_GREAT_GENERAL TXT_KEY_UNIT_GREAT_GENERAL
    UNIT_SLAVE UNITCLASS_SLAVE Slave
    UNIT_BEAR_BLACK UNITCLASS_BEAR_BLACK TXT_KEY_UNIT_BEAR_BLACK
    UNIT_BEAR_BROWN UNITCLASS_BEAR_BROWN Grizzly Grizzly is from north-west America :crazyeye:
    UNIT_BEAR_POLAR UNITCLASS_BEAR_POLAR TXT_KEY_UNIT_BEAR_POLAR
    UNIT_COUGAR UNITCLASS_COUGAR TXT_KEY_UNIT_COUGAR
    UNIT_TRADER_GUARD UNITCLASS_TRADER_GUARD Trader Guard
    UNIT_DOG UNITCLASS_DOG TXT_KEY_UNIT_DOG
    UNIT_ELEPHANT UNITCLASS_ELEPHANT TXT_KEY_UNIT_ELEPHANT
    UNIT_HYENA UNITCLASS_HYENA TXT_KEY_UNIT_HYENA
    UNIT_LION UNITCLASS_LION TXT_KEY_UNIT_LION
    UNIT_PANTHER UNITCLASS_PANTHER TXT_KEY_UNIT_PANTHER
    UNIT_PIG UNITCLASS_PIG TXT_KEY_UNIT_PIG
    UNIT_BOAR UNITCLASS_BOAR Boar
    UNIT_DEER UNITCLASS_DEER Buck deer or buck
    UNIT_WOLF UNITCLASS_WOLF TXT_KEY_UNIT_WOLF
    UNIT_DOG_PACK UNITCLASS_DOG TXT_KEY_UNIT_DOG
    UNIT_FOOD UNITCLASS_FOOD Food
    UNIT_GRAIN UNITCLASS_GRAIN Luxury Food perhaps we should rename grain now as we should do it eventually anyway
    UNIT_LUMBER UNITCLASS_LUMBER TXT_KEY_UNIT_LUMBER
    UNIT_SILVER UNITCLASS_SILVER TXT_KEY_UNIT_SILVER
    UNIT_COTTON UNITCLASS_COTTON TXT_KEY_UNIT_COTTON
    UNIT_FUR UNITCLASS_FUR Hides fur or hides?
    UNIT_SUGAR UNITCLASS_SUGAR Silk sugar or silk :eek:
    UNIT_LEATHER UNITCLASS_LEATHER Leather
    UNIT_ORE UNITCLASS_ORE TXT_KEY_UNIT_ORE
    UNIT_CLOTH UNITCLASS_CLOTH TXT_KEY_UNIT_CLOTH
    UNIT_COATS UNITCLASS_COATS Coats
    UNIT_RUM UNITCLASS_RUM Ale should be ale, right?
    UNIT_TOOLS UNITCLASS_TOOLS TXT_KEY_UNIT_TOOLS
    UNIT_MUSKETS UNITCLASS_MUSKETS Weapons weapons ?
    UNIT_HORSES UNITCLASS_HORSES TXT_KEY_UNIT_HORSES
    UNIT_TRADE_GOODS UNITCLASS_TRADE_GOODS TXT_KEY_UNIT_TRADE_GOODS
    UNIT_CATTLE UNITCLASS_CATTLE Cattle
    UNIT_BARLEY UNITCLASS_BARLEY Barley
    UNIT_SHEEP UNITCLASS_SHEEP Sheep
    UNIT_WOOL UNITCLASS_WOOL Wool
    UNIT_STONE UNITCLASS_STONE Stone
    UNIT_GOLD UNITCLASS_GOLD Gold
    UNIT_SPICES UNITCLASS_SPICES Spices
    UNIT_GRAPES UNITCLASS_GRAPES Grapes
    UNIT_WINE UNITCLASS_WINE Wine
    UNIT_LEATHER_ARMOR UNITCLASS_LEATHER_ARMOR Leather Armor
    UNIT_SCALE_ARMOR UNITCLASS_SCALE_ARMOR Scale Armor
    UNIT_MAIL_ARMOR UNITCLASS_MAIL_ARMOR Mail Armor
    UNIT_PLATE_ARMOR UNITCLASS_PLATE_ARMOR Plate Armor

    Another thing: 64 out of 133 units are non-human. Maybe we should make a JIT class for human only units. It would not only save memory, but also reduce the number of times certain loops execute. Right now the code checks if the school in a city can teach all units, including UNIT_WINE and UNIT_GALLEON. As adding a new JIT type to savegames affects savegame compatibility, it would likely be a good idea to add before a release.

    I think we should review professions the same way. We should possibly also move them to exploit sub professions better. Also we can make subprofessions be invented by something else than the parent profession. We don't use that right now, but maybe we should.
     
  2. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    The Jit class for Human units only is a grand idea, and maybe a class for "constructed units" also.

    Hmm, I thought I added that test unit when I was testing my new models :) I changed it to graphical only so it would not appear in the pedia, but was going to remove it for any final release. I have plans to add new units so I just left it in. I have to test each model after adjusting it for Civ4Col so that is why I use it.

    Well, when I was modding it was easier to just change the name than to go through the whole mod changing the class name, plus I was still somewhat new to modding at that time. This is just something I have never taken the time to change. Doing this means I'm not doing something else:) Also, with units names sometimes I change them when I get new ideas or change them while playing because one unit name seems to fit better. So, with some names I just haven't decided on a final version.

    I'll look over your comments when I get the chance and give you some feedback. I know I would like to go with Outlaw and not Criminal as people were "Outlawed" at that time, meaning that you could actually legally kill anyone who was labeled an Outlaw.
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    Ok, I have a few comments on the names...

    Free Peasant: The Unique Arab version should just use an Arabic term for peasant or basic citizen since their unit would be unique to that Civ alone.

    Outlaw/Criminal: as pointed out I would go with Outlaw to be more historically correct. Perhaps if you leave Outlaws in your Realm for too long someone could randomly kill them and take a reward from your reserves, heh:)

    Native/Barbarian: Since the Romans called them Barbarians we should go with that. Native reminds me too much of Indians. A lot of the Barbarians were not "native" as they had just arrived looking for a new home.

    Slave Warrior/Soldier: I first had Warrior, then changed it to Soldier. The reason is Warrior seemed more of a wild barbaric term, and this unit would be more organized and trained Soldier seem to fit better. Islamic Civs would have their own Class called a Mamluk.

    Worker/Pioneer:
    I would go with Worker as Pioneer is to much related to Colonization in America more

    Missionary/Monk: This one is tricky as Islamic Civs did not have "monks" but they did have missionaries. But monks in Europe at this time were the Missionaries. So perhaps just call it a UNITCLASS_MISSIONARY and each Civ would then have its own Unique name.

    Mongol Veteran/Arab Veteran/etc: These can be renamed as such. But what if we create a new tag for this and like units called "bUseCivAdj", and then in the "getName" code we could check for this attribute and if so then the Civs adjective is always added to the beginning of its name. So, we can then just call it a "Veteran" and the game will change it automatically.

    Hmm, perhaps for units like "Free Peasant" we could actually just call them all "Peasants", unless there is a unique name as mention above with the Arabs. But then have a tag called "bUseForeignCivAdj", and this tag would put the "CivAdjective" at the beginning of all foreign units but leave it off for the player himself. So when you selected your own peasants they would be called a "Peasant" but when he looked at a Lombard unit, it would say, "Lombardian Peasant"

    Recruit/Cavalryman/Commander:
    These units represent the Islamic cultural types or Units under similar Civics. I did a bunch of research on this and these terms were the English version of what I found. We could use the Arabic instead though, but then the Civ that uses the related Civic may not be Arabic in origin, so it would seem out of place. These guys are different than the Page/Squire/Knight relationship so that does not fit either.
     
  4. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    I already made one for cargo yields. While it might make sense for a virtual yield array, I didn't make one. The problem is that yield 5 is also cargo yield 5. However virtual yield 5 isn't yield 5, which makes it problematic. Sub-arrays shouldn't use different indexes for the same element.

    That could explain why I wrote it and was quite sure it didn't make it into git and that it is there anyway :lol:

    I'm not sure I like that for the very simple reason that players tend to be more skilled at English than any other language. Getting unit names in non-English while playing the game in English could make it more tricky to remember what each unit is.

    We would end up with something like this :crazyeye:
    Spoiler :


    I agree that most if not all civs are native to Europe, which makes it stupid to declare just some of them natives. We even have non-European natives :crazyeye:
    Barbarians is still wrong though as barbarians in the civ world are units, which turns up without a real owner and attack at random. We have those (black). Native civs should be called something else or it will be confusing. Minor civ or something.

    I wonder if you came up with something brilliant, odd or plain stupid, because I'm not fully getting what you want to do.

    We could add the civ prefix to all units as argument when writing the name. We can then use TXT_ based names, where we can add %1s or whatever it is to insert first argument as a string. All the units not using the prefix will get the prefix string, but it will just be ignored.

    We could deal with descriptions later (I plan to move all of them to TEXT files). My current goal is to set <Type> correctly as this string is added to savegames for increased compatibility. Descriptions are not and we will not get problems loading savegames if we change those. UnitClass is also saved as they are <Type> in a different XML file ;)
     
  5. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    How do I tell if a unit is a human :confused:

    I thought I could use bMechanized, but it turns out that animals aren't mechanized either. Surprisingly UNIT_LONGSHIP isn't mechanized, but I guess that's a bug.

    Looking around it would appear that humans and only humans have UNITAI_COLONIST. There are a few exceptions though as natives and slaves do not have it. I wonder if it would be ok to use it anyway.

    Alternatively we can assume everything before the bMechanized to be humans.

    I also thought about checking for professions, but I'm not sure how to do that from XML info only.


    I will have to add that JIT array length is set before XML is fully loaded. This doesn't make it any easier, but not completely impossible either.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    Only People Units "canfound" (at first when you asked I thought, "isHuman(), duh:blush:")

    As in they are the only ones who can found a settlement. However, some modders could create a Settler Unit which isn't a person but can still found. So, perhaps we just need to create our own tag for maybe, "bPopulationUnit". Some units like, Serf, that can not found a settlement in M:C still have the bFound or bcanFound (which ever) as true, because you need this true in order to Join a Settlement. So, I created a new tag that says for domestic travel only that prevents them from founding.

    I am pretty sure when the code checks for total population (for Fealty calculations and such) it checks the units bFound ability. But I am thinking we should just add a new tag like I said for "bPopulationUnit" and then to check total Population it checks for that tag.

    Also, you could check for default profession, all people should be Profession_colonists, by default. You would just then need to cache that profession. Hmm, but then maybe not as Peddlers could be Profession_Peddler, and Benedict monks would be Missionaries, so that probably wouldn't work.

    I added code for the "Barbarian Player" which controls animals so that when it counts his units it doesn't check for "bfound" since none of his units found, but I needed a total of his units so the code simply counts any Barbarian Unit as a population unit. Now that I think about it I wonder if there is a variable that keeps up with the total amount of all Units owned by a player?

    We should maybe come up with another term for the Barbarian/Animal/Bandit player, so as not to be confused with the Barbarian Civs, such as Lombards. Maybe call it the NPC_PLAYER. NPC in the Role Playing game world stands for None Player Character.
     
  7. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,776
    In FFH and other mods there can be several NPC Player civs that can control various subsets of the "wild" units, so for instance some civs can be at peace with Bandits/Raiders group of NPC units but not with Animals; would something like that be possible in M:C? (maybe the display name of NPC civs could even be blank, since we don't want to display combat messages such as "your Page was attacked by an NPC Player Bear!":lol:)
     
  8. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    Right now here is only one "human" unit of the Barbarian Player and that is the Bandit. I added a few places where this Bandit and the animals are coded different. I thought about dividing this player into an Animal only player but I haven't felt the need just yet since there is that only one human unit. However, I thought about adding the ability for the Bandits to found raider camp bases that would function like cities. Maybe then we could create a new type of npc player and seperate animals into its own Player_animal type.

    Also, the civ name is not displayed for hidden nationality units and all the Barbarian player units are hidden in M:C. I never liked animals roaming around carrying a "barbarian" flag.
     
  9. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,283
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Technically speaking this does not exist.

    You have:

    Can take professions or not.
    Can be built or not.
    Can found colonies or not.
    Can attack or not.
    ...

    Then you have UnitAIs.

    UNITAI_COLONIST
    UNITAI_OFFENSIVE
    UNITAI_WORKER
    UNITAI_SCOUT
    ...

    The combination of these settings will more or less define what the unit is.

    But of course it would always be possible to add another XML tag that says "<bHumanUnit>" or something like that.
    (I flagged the animals in RaR as "<bAnimal>" as well to simplify my logic.)

    Edit:

    There is actually much more possibility to mess up here, than most unexperienced modders believe.
    Specific settings (booleans and ints) need to match the Default UnitAI and the allowed UnitAIs or problems can occur.
     
  10. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    I have just decided that I will not try to autodetect human units before next release. I might be able to do so, but the change ended up being major and we shouldn't spend the time needed to test it before next release.

    I will still reserve room for it in the enum and stuff like that. That way savegames will be ready for this addon.

    Looks like you just pointed out more XML sanity checks to add.
     
  11. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    5,283
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Not necessarily.

    If you configure nonsense, usually Asserts will be fired when testing with DebugDLL.
    (Or you will get CTDs when playing or simply broken AI / stupid AI behaviour which should be noticed as well when doing test playing.)

    Problem is, that unexperienced modders (or non-programmers) often

    1. Do not test with DebugDLL
    2. Do not know what to do when they get a CTD
    3. Do not understand AI logic

    If you have experienced modders with decent programming skills on board, nothing special will probably need to be done.
    (Because usually these guys set up new units and do some decent testing anyways.)

    If you want to make this failsafe for beginners though ...
     
  12. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    I started committing changes to XML types. I went through professions and units. There are still some incorrectly named units though.

    I started to wonder if UNITCLASS_COLONIST has a special meaning somewhere and I dare not to touch without further investigation.
    Spoiler :
    Column 1 Column 2 Column 3 Column 4
    Unit UnitClass Description comments/proposed name
    UNIT_COLONIST UNITCLASS_COLONIST Free Peasant UNIT(CLASS)_FREE_PEASANT ?
    UNIT_ARAB_COLONIST UNITCLASS_COLONIST Peasant UNIT_ARAB_FREE_PEASANT ?
    UNIT_CONVERTED_NATIVE UNITCLASS_CONVERTED_NATIVE Converted Barbarian native or barbarian. I would go with native as barbarians is something else
    UNIT_MONGOL_VETERAN UNITCLASS_VETERAN Veteran Archer mongol or archer?
    UNIT_VIKING_VETERAN UNITCLASS_VETERAN Viking Explorer veteran or explorer?
    UNIT_ARAB_SQUIRE UNITCLASS_CALVARYMAN Calvaryman horseback squire? :lol:
    UNIT_ARAB_NOBLEMAN UNITCLASS_ARAB_NOBLEMAN Commander nobleman or commander?
    UNIT_RANCHER UNITCLASS_RANCHER Master Groomsman UNIT_GROOMSMAN?
    UNIT_REGULAR UNITCLASS_REGULAR Imperial Guard ???
    UNIT_CRUSADER_REGULAR UNITCLASS_REGULAR Crusader ???
    UNIT_OTTOMAN_REGULAR UNITCLASS_REGULAR Infidel ???
    UNIT_NATIVE UNITCLASS_COLONIST Barbarian are barbarians raiders or native? They shouldn't be both!

    One name we really should figure out is what to call the natives. Barbarians is a really bad name as we already have barbarians appearing randomly and civ veterans know quite well what barbarians are. Maybe they could be considered barbaric by monks, but the game suffers if we have two kinds of barbarians and it is hard to tell them apart.

    There are also the yield units. I will do those together with yields. We really should get rid of YIELD_GRAIN. It makes no sense that we gain grain from hunting animals, but not from farmers.



    We need assert checks to catch issues, not always a debug DLL. It is enough to use the assert DLL, which we have been doing more or less since 2.0. I added that ability to the makefile and I'm not sure anybody outside CMC have used assert builds.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    I made some comments on the names below, you can use that, or if I made no mention of a name just go with what you feel fits best.

    I agree. I think we should just rename the Barbarian player to something else, like NPC_PLAYER, or WILD_PLAYER, or WILD_CARD_PLAYER, UNCIVIL_PLAYER, something along those lines. That would be the easiest as I have lots of text that refer to the Minor Civs as Barbarians. In M:C I have all of the Barbarian/Animal units as Hidden nationality so the name of the leader doesn't matter. Then the name is just what ever the name of the Unit is, Bandits, Raiders, Brown Bear, etc.

    For sure change that.
     
  14. Trade Winds

    Trade Winds Warlord

    Joined:
    Nov 21, 2013
    Messages:
    235
    Locals, Aborigines, Natives, Indigenes, even Insiders
     
  15. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    It should be the natives in Europe. I know Aborigines like walkabouts, but I don't think they are that long :lol:

    I thought about minor nations, but that sucks as that would result in one civ being a major nation with just one city while the minor nation next to him has 15 cities.
     
  16. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    I updated the yields. It turned out that YIELD_SALT used UNITCLASS_SUGAR and was printed silk ingame :crazyeye:
    I also updated the DLL to fit the new names.

    I started wondering about one thing about yields though. We expose all yield names to python, but as we have a shared DLL and shared python, it would likely cause havoc if we actually used mod specific yields. Maybe the python exposed enum should only contain the yields common to all mods, like YIELD_FOOD. I made a list at some point to tell which yields are hardcoded in DLL and as such common to all.

    Also nobody really replied on the list in post #12. It would be nice to know what to call those units.
     
  17. Trade Winds

    Trade Winds Warlord

    Joined:
    Nov 21, 2013
    Messages:
    235
    I know Aborigines are called the local people in Australia. But in Latin it literally means &#8220;From Origen&#8221;. So imagine an Aztec crossing the Atlantic and arriving at our shores before Columbus voyage. We could have been easily named Aborigines by them.
    That doesn't mean that I like the name though.
     
  18. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,354
    No, because the Aztec wouldn't have used latin :lol:
    Besides wouldn't that make the Aztec Aborigines to the Chinese :confused:
     
  19. Trade Winds

    Trade Winds Warlord

    Joined:
    Nov 21, 2013
    Messages:
    235
    :aargh:

    :wallbash:
     
  20. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,095
    Location:
    Marooned, Y'isrumgone
    UNIT_COLONIST UNITCLASS_COLONIST Free Peasant
    UNIT_ARAB_COLONIST UNITCLASS_COLONIST Arab Peasant or Arabic transliteration
    UNIT_CONVERT Converts just call them converts
    UNIT_MONGOL_VETERAN Keshik
    UNIT_VIKING_VETERAN Viking Explorer
    UNIT_ARAB_SQUIRE UNITCLASS_CALVARYMAN Calvaryman
    UNIT_ARAB_NOBLEMAN Commander
    UNIT_RANCHER Master Groomsman
    UNIT_REGULAR Imperial Guard
    UNIT_CRUSADER_REGULAR Infidel
     

Share This Page