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

Beta Units Resources and Buildings

Discussion in 'Civ4Col - Medieval: Conquests' started by drjest2000, Jul 28, 2013.

  1. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,446
    Location:
    Stuttgart, Germany
    Not to my knowledge, sorry. :(

    Sadly (for community) a lot of technical discussions between modders to solve certain problems have taken place in private team forums or private messages.
    Others are spread over many many threads and really hard to follow. Some of these threads are in other languages (e.g. German).

    My best tip for you is to set up "Extra-Large-GameFonts" really early in your project.
    (As an example check the Gamefonts of RaR. But it is pretty much up to you, how you want to create yours.)

    By the way, the idea of such "Extra-Large-GameFonts" is not mine.
    (It was used in Civ4 mods first and KJ_Jansson brought it to my attention.)

    Leave space for many Yields, Specialbuildings, Missioning Crosses, ...

    If you do that correctly, you will have almost no trouble with shifted icons anymore.
    If you don't you will most likely have shifted icons almost every time you add something new in the GameFonts.

    Otherwise it is a good idea to use a combination of these 3 Tools for working in the GameFonts:
    Gimp2, DXTBmp, GameFontEditor

    -------------

    These GameFonts are the most stupid construct I have ever seen in Programming ...

    Some references are resolved in Namespaces pointing to a certain position, some are direclty related to orders in Enums of the DLL, some are referenced by an XML tag and some ...
    Almost every line fo the GameFonts obeys to a different logic. :crazyeye:

    So even not touching the GameFonts directly but simply inserting a new Yield in DLL and XML may shift the icons.

    -------------

    Edit:

    Here is a discussion about Graphics and GameFonts in one of my old projects.
    (At that point of time I started that project I had almost no idea about GameFonts at all. Without KJ_Jansson I would have been lost.)

    I am not sure however, how much useful information can be found in that thread.
     
  2. drjest2000

    drjest2000 Chieftain

    Joined:
    Dec 8, 2001
    Messages:
    332
    Location:
    retired
    I was browsing through the FPKs of Civ 4 mods and saw in one of them -- I'm fairly sure it was Caveman2Cosmos -- 3D art for walrus, sea-lions (both on land and in water), arctic foxes and a few other oddities. This started me thinking about the Viking Age economy in places like Iceland and Greenland. The sort of resources and economy of places like that are too dissimilar to be easily incorporated into M:C.

    My grandfather had some walrus ivory things, scrimshaw sorts of nicknacks and a pencil case made from a tusk. They were probably no more that 150 years old, but I imagine such things were around in the Viking Era. And my grandmother had a number of tortoise shell combs that had belonged to her grandmother.

    Bone, shell, and horn were used a great deal "back in the day", but I don't see how adding them as resources could embellish M:C. But I admit that I've often wondered what happened to the rest of the beaver. I know that historically beaver fat was used both as a high calorie food item (the East Coast Indians would fight wars with one another over beaver ponds) and later, when whaling voyages started taking three or more years, it was used as a source of trainoil.

    Whale oil/trainoil was used in medieval times too, but I don't know how much or who used it. I know that Greenland was crawling with walrus until the Vikings settled there, so it is difficult to not imagine them hunting walrus until near extinction. That's the problem with natural resources in the real world, they become depleted, but that doesn't happen in Civ4Col. Civ4Col doesn't force the player to seek out fresh, untapped resources the way real life did in colonial times. The driving force behind the westward expansion was the depletion of resources in Europe, then in the Colonial era, the subsequent depletion of resources along the eastern coast of the Americas.

    In Civ4Col, a player can pull the same yield from a mine from start of play until the end, even gain a very realistic boost on production as Revolutionary Spirit takes hold of your citizens.

    I always hate it when the vespene gas runs out in Starcraft, so I'm in no hurry to suggest we put a finite limit on the resources, but in vanilla Col it does seem counter-intuitive that a silver mine you start in 1500 is still producing the same volume nearly 300 years later. So perhaps a routine that could be introduced into the DLL to cause diminishing yield. 4 the first 100 years, 3 the next, 2 the next. This would "force" the player to expand and have conflict with neighboring civs (just like in real life).
     
  3. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,446
    Location:
    Stuttgart, Germany
    KJ_Jansson already implemented something like that.
    (I think it is contained in the last version of 1492: Global Colonization.)

    Well, it is your decision to do something like that.

    But remember:

    AI is not nearly as smart as human player.
    By default, AI does not understand complex new features.

    Features that could be quite interesting for human player might require massive coding to have AI understand only the basics of such a concept.
    (Risk of crippling AI, introducing bugs and ruining performance.)

    I am not saying that new complex features are not possible.
    Just keep thinking about AI and the consequences as well and not only consider human player. :thumbsup:
     
  4. drjest2000

    drjest2000 Chieftain

    Joined:
    Dec 8, 2001
    Messages:
    332
    Location:
    retired
    I suppose something like

    "if player = AI then diminishingYield = False, else diminishingYield = True"

    would keep the AI from breaking and it is in keeping with the "human players must have more obstacles to success" approach of game development
     
  5. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    4,446
    Location:
    Stuttgart, Germany
    Yes, sure. :thumbsup:

    Having AI play by easier rules than human player can be a solution.
    Or you could have AI cheat a bit more to compensate that it does not understand some features.

    In most cases the player will not notice and as long as AI is still at least a bit of competition, everything will usually be fine.

    It is more or less a matter of taste, which approach you will take or maybe different approaches are mixed a bit.
    (easier rules, compensation cheats or improved AI logic.)

    Simply keep AI in mind. :)
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I do this all the time when developing new features and you have to. I would not test out new features on the AI until I tested them on human players because AI coding is tedious and you can spend hours doing it then to only find out the the feature is boring, adds nothing, too complicated, or is flawed in some way. If a new feature turns out to be a fun or good strategic factor then I'll start looking into improving the AI.

    OK, concerning the idea of depleting resources I really like this idea. This happened in Civ4 where old and new sources would randomly appear or disappear from time to time. I believe this would be a good addition to the whole "Diplomatic Trading of Resources" like in Civ4. The idea is to setup trading pacts of so many of this yield for so many of another and each turn you would automatically trade those resources if you had an open trade route between the two kingdoms.

    Historically like you say this would fit nicely and have interesting repercussions on diplomatic affairs. :thumbsup:
     
  7. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    One thing I don't like is the Courthouses producing gold. I added this because historically the court systems was a money maker as people made huge profits collecting fines. People argued over jurisdiction to collect those fines as well. I am thinking though of adding some new Yields. One being YIELD_LAW, produced by your courthouses, the other being its opposite, YIELD_CORRUPTION. As your towns grow they begin to produce Corruption which is a Negative modifier much like Fealty is a Positive one. Also, much like the Corruption in the Civ games. But you can produce Law to restore order, thus increasing profits, thus still simulating the Courts ability to generate money. These two would be simple additions actually but would they add any strategic and or city management fun to the game is the question? Any ideas on Law, Fealty, and Corruption?
     
  8. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    I like that idea, it would be good to have a few different city "meters" rather than just Fealty to independently track several different aspects of society, though it would have to be planned carefully. I had also thought of including an unfavorable abstract yield Pollution which maybe could use that same mechanism. You wouldn't necessarily need several positive and negative meters Law and Corruption for two sides of the same continuum; e.g government buildings could subtract Corruption while some other buildings/Civics could increase it.
     
  9. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    I like your idea about new YIELD_LAW, but yield Pollution to my opinion looks very strange for the medieval ages.

    I found a rather old modcomp "1492: Codex" where similar ideas were discussed and realized.

    There are two yields in "1492: Codex".
    YIELD_CODEX is responsible for the order, law, perfect organization of good's production (positive mechanics).
    YIELD_BELLS is responsible for dis-order, un-law, disorder in good's production, revolution (negative mechanics).

    There are two types of buildings, too.
    Some administrative buildings like Townhall, military college, court etc. produces YIELD_CODEX.
    City markets, taverns, university etc. produces YIELD_BELLS.

    Two types of units are presented in "1492: Codex".
    There are a lot of images where shown how both mechanics are working together.
     
  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, pollution would work for his 2071 mod, which is being updated as well at the moment. I've never noticed KJ's Codex mod. That portrays it much like it really was, as there were loyalists (Torries) that did not want to separate from the king. That is an interesting way he makes them work together. That may not work so well in a Medieval setting but there is some inspiring ideas there so thanks for the links.

    Anyway, I'll keep these thoughts in mind as I play.
     
  11. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    The more I think about it and read up on History the more I feel we do need a Law and Order Yield. Without some kind set rules and the means to enforce it Societies generally resort to chaos aka Anarchy.

    We should consider the definition of Fealty: "the obligation or the engagement to be faithful to a lord, usually sworn to by a vassal". And then compare it to Law: "the principles and regulations established in a community by some authority and applicable to its people, whether in the form of legislation or of custom and policies recognized and enforced by judicial decision".

    When we consider these two it is clear that they are separate aspects, and we can treat them as such. We don't need to add a "Corruption" yield to this, as Law can just be Negative and have this effect.

    Law will effect Production much like Fealty does now except it can go negative if there is no one producing Law in your settlement. Law is also effected by your total population. Units that have no Occupation, or sit idle for a time will start to have a negative effect on Law. Some units like Outlaws, Bandits, and Marauders will have a negative effect on Law as well. Your Garrison will produce Law and the amount is dependent on your Civic choices.

    Ideas on Formulas:

    Perhaps it could work like Food, in that each Citizen requires a Certain amount of Law. This too could be effected by Civics. According to my last complete game, I had tons of Units needing things to do, so this could help fill that.

    Fealty could be akin to a Units Happiness. If a Units Fealty is low it could actually leave your Empire and join another Empires Immigration que, and you can thus persuade others to join your Realm. Fealty would be effected by Demands met, having a Job, having your Desired job, and the Prosperity and Security of your Realm, . Fealty would give a Combat bonus also. Perhaps only Nobles (or Elites) with high Fealty can reach the highest Ranks in your Realm such as Knight.

    I plan to create a branch with this at some point to test out.
     
  12. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    From a coding perspective we should make units able to produce yields. That way if we need to add something else people produce, then it would be an XML change only as the whole DLL setup is already present.

    Please don't make a new branch right now while I'm preparing to move to a new git server. As I intend to split master into multiple submodules, it would be much easier if we don't move any branches.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Right, I want be making any new branches for a while and I will ask you all about that before I do.
     
  14. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I have worked in a new way to gain Luxury Food. The European Bison has made a come back from near extinction and is now a new Bonus resource in M:C(they actually went near extinct in the 1900s). Anyway, they have replaced Deer bonus for the moment.

    Luxury Food is now gained by a new Hunter Profession inside your Cities. They can Hunt(farm) all Forest tiles as forests now produce Luxury Food. Bison Bonus functions much like Deer except they give a bonus to Luxury Food as well. There is a New Improvement, the King's Forest or Game Preserve. This can be built in your Forests once researched, it greatly increases Luxury Food production.

    There is also a new bGraphicalOnly attribute to Bonuses that prevents the Bonus from being placed when the map is created. Improvements can be designed to spawn a Bonus upon creation, so that new attribute can work for that.

    More to come...


     

    Attached Files:

  15. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Any reason why you replaced a bonus rather than adding one?

    bGraphicalOnly usually mean stuff like no real ingame effect and not showing up in pedia. I'm not sure it is a good idea to use it to determine what to add to a newly created map.

    The idea for a bool to tell if the map scripts can place the bonus is good though. It just have to be implemented in a way, which will not cause sideeffects.


    I have been thinking about game and I came up with the idea to have improvements like "King's forest", which will increase the chance of spawning a wild animal unit (possibly a non-attacking one). That way you can create game breeding grounds on plots you can't reach from any cities and that way those plots will not be completely wasted. At the same time it will start to make sense to use the improvements, which hunt wild animal game. Right now that feature is next to useless. I think it gave me luxury food once or so. It's way too rare to have wild animals wander into the line of fire for those things.
     
  16. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Leave it up to Night to make me have to explain my brilliance, or is it madness:confused::crazyeye:

    A few new Bonuses have already been added so I am not sure what the effect of adding another will be. There is only so many Bonuses a Map can support for Balance and Fun and I don't know what that limit is, so as I said "for the moment" I replaced it until I can investigate more. Also, deer, from my thinking, were such a common resource I had to ask is it justifiable to have a Bonus for it and in my research I discovered the European Bison, so I have temporarily swapped the two until further research is done. Another Also, is that I am still working on adding Bonuses so the question is how many different types of Bonuses do we need that give the same effect?

    It doesn't mean they do not have an in game effect. Several aspects of the game have Graphical Only attributes, such as Promotions, and they do have an in game effect. Looking over the code and play testing a bit I saw no reason why it would not work as intended. But play testing can reveal any issues.

    I was thinking the same thing. I had worked up another Bonus before reading this post. As you can see in the screen shot we now have a Boar bonus. I was thinking this Boar bonus could Spawn a Boar Unit from time to time. Remember also that most of the game features are a work in progress as is the Auto Hunt features of some Improvements, while they may appear useless at the moment, Hunting in M:C is far from finished. But, the main reason for the Auto Hunt was to control Bandits, Marauders, Saracens, and such, the Hunt Animals was an extra effect I threw in for testing.

    We do have a Deer Unit, so I could add back the Deer Bonus and work the same way as the mentioned Boar Bonuses. My Game Preserve Improvement graphic I was working on included the Deers inside the fence so that was another reason I "temporarily" removed the Deer to differentiate the Improvement from the Bonus. However, we could just go with an empty Fence then any Bonus animals will get fenced in. And perhaps we could have a way to heard animals into your Preserve to add a Bonus.

     

    Attached Files:

    • boar.jpg
      boar.jpg
      File size:
      30.9 KB
      Views:
      108
  17. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Yeah I was gonna say the boar seems to fit better than the bison, cause in everything medieval the king is always riding around after a boar, followed by said boar being eaten at a banquet by a bunch of fancy pants.

    Deer is the other perfect bonus for luxury food, as venison always sounds posh.
     
  18. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well all three are in the mod. For you carnivorous types we have Venison, Mutton, Beef, Bison, and Pork Chops! There is enough terrain and bonus types to make them each Unique. There is even an option to make Bonuses only appear in one "area". Area being a Continent or Island.
     
  19. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    It's not like vikings wouldn't mind eating boar either. Also think about the boar reputation in Asterix (though not a valid historical source). Boar is certainly an important source of luxury food. It's not without reason. As I remember it is well tasting and kind of sweet. The latter is important in a world where sugar canes haven't been discovered yet.
     
  20. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Yeah my thinking was particuarly in connection to the king's forest, deer and boar are very 'foresty' type creatures, we already have 'cattle/bison' as our 'field' animal, along with sheep and horse.

    I also really like the idea of these bonuses acting also as a spawn source for the boar, deer, whatever, so not only do you get the benefit of a source of 'stable' luxury food to work in town, it can also be good to have a hunter or stronghold near it, to catch those extra 'free' animals.

    Or maybe when you add a kings forest to the bonus, you increase lux. production in town but it stops 'spawning' the extra animals for your hunters and strongholds to get.

    Also that 'area' option is going to be very cool for WH, as we can add the 'continent specific resource bonuses' or CONSREB (What?!) to only appear on their speicific continent. AMERICA, EUROPE, AFRICA, ASIA.
     

Share This Page