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

School system

Discussion in 'Civ4Col - Medieval: Conquests' started by Nightinggale, Aug 8, 2013.

  1. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Checking if the player has invention X shouldn't be too difficult, neither should adding a flag to XML telling if the unit can be a journeyman. There are a few ways to solve that issue.

    The most important question here is what do we want? Gameplay balancing or historical accuracy and how precisely do we define those?

    When making an Expert Weaponsmith, assign 100 Blacksmith experience to him to make him a journeyman. It would still be capped at 400 like they normally would. The issue with this approach is that it would screw the Pedia change I made, but I can modify that one, which I likely should anyway.

    The best way I can think of to do something like that would be to set Journeyman and Expert thresholds in XML for each unit. This would not only allow some units to train faster than others, it would also allow setting Journeyman threshold higher than expert threshold. The expert threshold is max experience meaning journeyman is never reached.
    We should likely set up defaults and then allow assigning non-default values to each unit as needed. The default values can then depend on iTeachLevel once I implement that one (remember the one telling if the unit can be trained in which level of schoolbuilding).

    This looks less and less like the modcomp and it adds complexity. However I'm still certain I can do this. What worries me a little bit is the complexity is far greater than I predicted. Not really coding, but performance. Remember this is called for all units every single turn. Maybe the complexity will make me write a cache lookup table like I did for getYieldEquipmentAmount(). I will deal with that if it turns out to be a problem.
     
  2. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    Hmm I like those ideas, but it's already getting kind of complicated & is gonna start getting very fiddly to use and keep track of if there are unique custom rules made for multiple individual professions. (I sometimes already have a hard time even knowing what yield icons in the pedia mean :crazyeye:)

    Maybe becoming a Journeyman could grant an actual Promotion that applies the desired bonus, so it's easier to see/remember what units have what bonuses, and view these in Pedia. Then each profession could have an optional tag <LearnsPromotion> that could let you gradually earn the appropriate promotion while working at it. Professions could also have an optional <LearnsUnitClass>; where if <LearnsPromotion> is null or you've already earned it, then you can gradually earn the appropriate "Expert" unitclass status. That would let you have a mix of professions with and without journeyman promotions, all using a single system.

    I'm not sure the map professions like Scout/Pioneer would really have a true "journeyman" status through guilds. But it still might be interesting to allow them to earn a special promotion or two. IIRC scouts can already get experience from scouting ruins / chiefs etc which they can spend on scouting Promotions. For map professions, maybe their <LearnsPromotion> tag could allow them to pick that unique promotion as a special choice when they'd earned enough regular Experience. This could work for the combat map professions too - if you were an Archer and earned enough experience to gain a promotion, you could choose Expert Marksman which could give an extra First Strike, while as a Heavy Knight you could get something like Chivalry or Charge. Pioneers currently don't get anything; I guess it might be interesting to have each improvement built give a small amount of Experience that they could spend on a unique Promotion to buff their moves or workrate.

    Yeah, would be cool to have the earning of work experience activate after discovering Guilds. Also might be a nice touch for the experience to accrue a bit faster if you're producing lots of Education in that city.

    Yeah, definitely better to go with unitclass & buildingclass instead of unittype/buildingtype wherever possible. I remember I got all kinds of errors from unittypes in 2071 :crazyeye:
     
  3. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    At first I didn't like it because that mean writing a whole lot of promotions into XML. However after thinking a bit about it, I guess it's not so bad after all. It mean that production modifier lookup would go ProfessionInfo->PromotionInfo->(look for +X% and +Y, or two ints). Sounds doable.

    Expert Weaponsmith would then have Journeyman Blacksmith promotion as unit promotion. Journeyman experience can't provide a promotion the unit already has. On the other hand clear speciality should check Journeyman experience and assign promotions accordingly.

    Units should not be able to get Journeyman promotion in their field of expertise. Alternatively they can, in which case say an Expert Blacksmith would only gain +50% because the other +50% comes from the Journeyman promotion, which would then be a Unit promotion.

    Pedia production bonuses should check Unit promotions for modifiers as well.

    Only one promotion can give a boost to the profession in question. This allows looking up the promotion from ProfessionInfo rather than looping though all promotions each time the info is needed. Remember the AI calls this a million times every turn.
    Another potential bonus could be that the promotion might lack info on which production it boosts as it boosts whatever profession, which mentions it in ProfessionInfo. Writing code where A point to B expecting B to point to A leaves room for errors. Alternatively this could be checked with asserts when XML have been loaded.

    How is that better than setting thresholds for journeyman and expert? Ok <LearnsUnitClass> contain new info and this info should be added one way or another.

    At the moment I'm not really sure what to do with those and will not touch them until the in-city professions work.

    Now that really depends on what you store :)
     
  4. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, it "would" require a whole lot of new Promotions, one for each profession and then the art for all those promotions or just one generic one. But, here is another idea, why not just add a "JourneymanProfessions" array to the UnitInfos then when a Unit is created it checks the JourneymanProfessions to see if any of the professions that he gets an automatic Journeyman for. In the mod there is only a few Units that gain a hypothetical "Journeyman Bonus" anyway, mostly the smiths and Benedict Monk. We could also remove those bonuses to simplify it all or just do what I suggested above. I like the idea of unit starting a bit more versatile. Even the Expert Miners, LumberJacks, and such get a +50% bonus to improving land and some get a free Promotion like Lumberjacks get Ranger I.

    EDIT: Also, once a unit is a Master in a profession what stops him from being able to get a Master in another profession? In my code if I remmber correctly I think I added a check where it would cycle through all of the Yields and check for a 100% bonus, if it found one then that unit was considered a Master already. In the Mod I already added a <iCasteAttribute>4</iCasteAttribute> for UnitInfos where 4 = Craftsman/Nobleman. I been meaning to flesh out the Caste attributes and actually put names to them but I haven't yet. Anyway, what I am getting at is that Units with Caste of 4 can not train to be Masters as they already are.
     
  5. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I was thinking in the line of only allowing becoming a master if the unit's iTeachLevel is 100. The key here is that everything taught at a school is 1-3 and 100 means it can never be taught at a school.
    iTeachLevel could be set to 150 or something if the unit can't become a master and can't be taught at school (like the Bishop special unit in RaR).

    I have been thinking. I have been focusing on how to become journeyman, which I now believe is the wrong approach. The right approach is to list events based on how often they are called and design to make the common ones fast.

    The most common is clearly getting the production modifier. This clashes somewhat with the ability to set up complex rules for modifiers and caches appears to be the solution.
    Code:
    if (m_isJourneyman[eProfession){
      return (GetPlayer(owner).getJourneymanModifier(eProfession)
    }{
      return 0
    }
    
    Two JustInTime arrays. The first one is often not allocated, which mean it's a NULL pointer and the actually executed code is
    Code:
    if (m_isJourneyman == NULL) return 0
    the code from before, which is rarely reached
    That should be fast enough while it allows the flexibility of per unit type settings. We can even have inventions affecting this as it's a per player cache.
    It returns 0 when it fails to modify or it isn't a Journeyman, which mean the caller can just add the returned value without caring for it's value.

    Next up is experience gaining. This should also be a JustInTime array of Journeyman and Expert thresholds for each player, in which case it would be
    Code:
    Add experience
    return if new experience is 0
    check for journeyman promotion
    check for expert promotion
    The rest of the code appears to be less important regarding speed.

    One thing I noticed is that the modcomp appears to be based on +50% bonus. Shouldn't we have both +X and +Y% meaning two different types of bonuses?
    Alternatively it is percentage with a minimum of 1.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
  7. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    It's working... sort of and in an early stage.

    I have the data structure. The units gain experience when working in a city. They set the Journeyman flag when they have enough experience.

    However for some reason units gain +1 instead of +50%. 3 changes into 4, which is ok as 50% of 3 is 1 (integer division). However 50% of 6 shouldn't be 1 :eek:
    Also it's added to the base meaning now bonus from other stuff comes in addition. Say you have +50% due to invention. You do not get +100%, you get (X+50%)+50%. I think I found the wrong place to add it, but in that case I copied a modcomp bug :p

    If anybody know where to add something like this, then please tell me.

    Another issue is reading from XML. It's not how or what to read, but where it should be stored. I need the following:
    • ExpertUnitClass (has to be in ProfessionInfo)
    • ExpertThreshold (experience to become expert)
    • JourneymanThreshold (experience to become expert)
    • JourneymanProductionModifier (how many % to increase production)
    There are 4 possible locations
    1. UnitInfo
    2. UnitClassInfo
    3. ProfessionInfo
    4. global define
    I wonder if the best approach would be to use all those in that order, meaning if nothing is written, then it moves on to the next. It will be powerful tools for XML editing, but is it too confusing to spread it that much? Coding it in C++ is not the issue. It's more: "how do we want it to work?"

    And I still haven't touched GUI or savegames. The latter is not a problem and I assume the first one shouldn't be too hard.

    Also I haven't figured out how to add experience in a way, which could be balanced. Adding them right now is more or less a hack. If somebody has any idea on how it should work, then tell me.
     
  8. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    You could put ExpertThreshold and JourneymanThreshold in GameSpeed Infos, that way you could modify it directly from there and per GameSpeed. You could put JourneymanProductionModifier as a GlobalAltDefine so we can tinker with it for game balancing.

    You could add Experience to the void CvCity::doYields(). It could be set under Education the same way I done with education Squires, Criminals, and Pages. Do the check for if a Unit is eligible for journeyman experience there as the code already cycles through each unit in a city.

    I just had a thought about scouts. The only thing about a Seasoned Scout is that it gets better results from Ruins and Chiefs. I have already added a new promotion that does the same thing that even Peddlers can get so I am thinking Scouts don't need to be part of the Journeyman system, just workers. They can gain experience each turn they spend working. The code has a value for each teams build progress when that changes the unit can gain experience.
     
  9. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    The whole system is designed to allow each profession for each player to have individual thresholds, which would make it possible to have different learning times for different units. However placing the data where you propose is not a bad idea and then each unit can get an optional modifier. Say we have the fast learning civ. They have a unit, where the modifier is 50, meaning they become journeymen twice as fast.
    Still the global system should work before we consider what to do individually. The important part for customization right now is that the storage can handle it meaning it will not be a redesign to add something like that later.

    I looked a bit at it, but now I will take a better look to figure out precisely how it's called and stuff like that.

    In which case PROFESSION_SCOUT should use a modifier for journeyman threshold of 1000 or something meaning they will never reach the condition for being journeymen. They can still earn experience to become seasoned.

    Perhaps a special number should be used for "disabled", like setting the modifier to 12345 or something.
     
  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Would -1 not work? Anyway, we need to exempt Pages, Squires, and outlaws from the journeyman system as well as they have their own education system. Should Nobles be a part of the system at all? As far as I know they wasn't really part of the Craftmens caste?

    Edit: That gives me an idea, should Noblemen be removed from all City production except Fealty perhaps and just be more like a Special Military Unit?
     
  11. drjest2000

    drjest2000 Chieftain

    Joined:
    Dec 8, 2001
    Messages:
    332
    Location:
    retired
    In a historical context, early on Nobles did more than just administration, they were kind of like American pioneers, only with a sword instead of a musket, they did whatever needed doing. Later on, after they got things set up and working (and a bunch of peasants to do the work for them), then they did administrative and military things exclusively (mostly military, they usually left the administrative work to someone who could read and write).

    The medieval class system was pretty rigid. Clerical sorts (meaning monks, priests, etc) could read and write and because they were supposedly trustworthy, they also did a lot of the money-counting jobs. Contrary to what film and fiction portray, nobles were usually illiterate and gladly so, because they saw the ability to read and write as an emasculating thing (meaning they thought it made them gay or something).

    Diplomats were most usually clerics of some sort, because they could read and write, were generally considered neutral parties, and -- plainly-stated -- they were expendable. Also, if anyone gave a cleric rough-handling, then he would have to deal with the Pope, which could be unpleasant, because the Pope might see fit to tell some other Prince he was now king in your lands.

    Peasants very rarely were elevated to any position above a tradesman or craftsman, because there was a very strong belief that God had made peasants a peasant for a reason. In history books they like to emphasize the very rare instances where a peasant is elevated by the king, which leads to a very unhistorical view of the facts. But this almost always led to a good deal of difficulty, because all the nobles who thought they should have gotten the boon made the fellow's life a living Hell.

    Even in religious orders, peasants were not allowed to rise very high. There were at different times rule formulated to preserve the temporal order of the world within the spiritual order of the church. Meaning: peasants did not become popes any more than they became kings.

    Once feudalism took root in Europe, you could pretty much say that Europe adopted the Caste System or a version of the Caste System. If you look at the old laws of Anglo-Saxon times and compare them to the laws of the Norman period, you start to see the establishment of a very rigid class hierarchy that prohibits change.

    Generally speaking, colleges and universities are kind of the same thing. The difference has more to do with size than what they do. And in a medieval context, going to a university simply made you a "doctor of the church", not a doctor of medicine. It's only after the Renaissance that universities begin to take on a purpose that modern people might recognize as what colleges and universities are supposed to do.

    I've always sort of disliked the way the education system works in Col because it doesn't reflect historical or modern reality very accurately. Certainly it conforms to a certain idealized, mostly American view of "anyone can become anything", but that isn't entirely true even in the United States, and it certainly was not true in Colonial or Medieval times.

    I don't think the buildings should replace one another as they do in the vanilla game, but should be treated as unique buildings that teach only a portion of the full spectrum of units. I'm not sure than anyone should even go to school to become an expert cotton planter, trapper, lumberjack or fisherman. As far as I know, there's never been a school that taught any of those skills, although it wouldn't surprise me if you could get degrees for any of those from an online university.

    So I think an experience/journeyman system should be what "teaches" trade/production skills, not a school. Or maybe the guild hall building, which would make more sense than the school.

    I've thought about this a couple of days before posting, but I haven't come up with anything to change the education system that really "improves" it. I can see are the defects and peculiarities that aren't historical or realistic, but I'm not sure that I can come up with an idea that solves the defects AND remains enjoyable for most players. :/
     
  12. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    After reading your message, I asked the question "When was the first college established in the New World?"
    "New College" (later Harvard University) was founded in 1636. You can follow this link and find "List of Colonial Colleges".

    From this it follows at least three conclusions.

    1. We can fully exclude Schools from our colonies. All simpliest professions (Farmer, Fisherman, etc.) may be studied through, for instance, "Learn by Doing" system realized in TAC/RaR.

    2. All second-level professions (Blacksmith, Carpenter, etc.) may be studied through "Journeyman". It would be historically correct because the parents sent their children in local workshops where during years they were trained and finally get a "Journeyman", later full Blacksmith, Carpenter, etc. professions.

    3. The first and maybe last education building in our colony may be the College (or University) where all high-level professions (Statesman, etc) would be available. Such professions cannot be educated through "Learn by Doing" or "Journeyman" systems.

    One additional remark concerning names:

    "College" for all mods in Discovery Era (and only for English colonies)
    "University" mainly in Europe (for "Medieval: Conquests") or for Spanish/French/Portugal colonies in New World instead of "College".
     
  13. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Sounds like an ant nest or bee hive. The queen starts alone, does everything and eventually she just sits in the middle and does nothing but lay eggs and getting fed by workers. However queen bees does have one important task. They check the larvas to kill any new queens because failure to do so mean the new queen will leave with half the workers.

    Somehow I'm happy that I can read and write. Thinking they would become happy if they obtained this skill appears to be a flawed argument for avoiding it :lol:

    You mean serfs should not be allowed in school? That would make the game tricky.

    Also that elevated peasant showed that the problem was with the elite, which wanted "elite-ness" for themselves. While we are taught and think it's different today, it's not. The really good jobs often depends on connections rather than skills. In the 19th century university professors were unpaid and had to get their income from their family. This was to ensure that only people with rich families had anything to do with universities.

    Vanilla appears to be the great for promoting US greatness at the cost of historical accuracy. It also appears that development was very controlled by costs, which makes sense, but it's not brilliant for the end product.

    Lumberjacks are taught at a school inside the forest and fishermen are taught at a school in a major fishing port (at least where I am). However that's today and medieval times were somewhat different. Those "poor man's education" where most likely just get started to earn money and watch what coworkers did.

    As for buildings replacing each other. We could leave all school buildings in the city at once. We could also make the TeachLevel of units a list, meaning you can set which buildings can be used to educate which unit. I had an alternative (but compatible) idea on this: make building demands for education. For example in addition to the expert fisherman, the city must have docks to teach fishermen. I have not considered how to code that though.

    That's always the issue. Personally I would pick gameplay over historical accuracy if I can't have both. It makes no sense to make a historical accurate game, which nobody wants to play.

    As interesting as it may be, M:C is about Europe, not America.
     
  14. Don Senglar

    Don Senglar Chieftain

    Joined:
    Nov 8, 2010
    Messages:
    76
    As I mentioned in my previous post, University may be first and last education building in M:C mod.

    Such University will educate only high-level professionals.
    All second-level professions may be studied through "Journeyman" in Guilds or in city workshops.
    All low-level professions may be studied through "Learn by Doing" system exactly as you described here:

    This system is historically correct, very simple to understand for usual player (not a modder) and rather easy to realize.
     
  15. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    At the same time it's the proposal, which demands the most code changes. For starters I would like to skip Learning by Doing as Journeyman should be able to handle that. If we want to, then we could set journeyman threshold higher than expert (assuming we can set on a per unit basis), and that would skip the journeyman phase.
     
  16. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Well, we can start with the simpler system that you are working on now and build on to it later if we decide too.

    This is some good discussion. One thing about the early medieval schools is they were all tied to churches, they were taught in churches, and they were simply taught to read and write and studied the classics. But just how to tie all this information into the mod and make it enjoyable is the question. I am one who "learns by doing" so once we get the current Jorneyman mod going we can playtest things and see what other ideas we can come up with. While playing games I am always having thoughts of "wouldn't it be cool if we could do this" :D
     
  17. drjest2000

    drjest2000 Chieftain

    Joined:
    Dec 8, 2001
    Messages:
    332
    Location:
    retired
    I have been looking through my books to find the exact name for the position and building name, but I haven't found it so far. Each manor/castle had a building or area near the gate where an officer of the lord (let's call him the foreman for the moment) assigned the jobs to all the peasants/serfs. The work assignments were most typically based on what needed done rather than professions/skill sets. This arrangement was as typical of medieval England as it was of late pre-revolutionary France and Russia. So, as Nightinggale rightly and wryly observes, in a purely historical setting, peasants shouldn't get education, ever. For the most part, they were regarded as beasts of burden and there is a good deal of medieval writing that seeks to prove that peasants are no more intelligent than animals. Certainly, there is a sizable volume of theological work from the period that goes in that general direction.

    Would that make game play better or more fun? No, it most certainly wouldn't.

    And I think we need to understand that there is a distinct difference between things like "modern responsible forestry" (which does require education) and "cutting down trees" (which requires nothing more than a tool to do it). The medieval world view was very markedly different from that of the modern world. God made the world, so nothing would ever run out. If something did go wrong, say the trees did not grow back, there was a magical reason for this, usually involving a witch or a Jew or the king's sinful ways, but there was not a mental connection made between the lack of a forest and the fact the people had cut it down. Things were supposed to grow back. That was the way God had made the world.

    The guys who went to the medieval Universities wrote quite a few books about this kind of thinking. Very few of them made the connection that you have to moderate the use of natural resources or they become depleted. They genuinely believed that if you let a depleted mine set long enough, the gold or coal or whatever would grow back. Seriously, they believed this nonsense.

    As they came to realize that things didn't always grow back, it started or contributed to the millennialist panic in the late 10th century. The European Christian thinkers had believed for a long time that God had designed the world so that resources would last until the end of the world, and if they were running low, that meant the end of the world was nigh at hand. It is not a mode of thinking that is unique to the high middle ages. This is the kind of reasoning and logic of people like Peter Abelard and William of Ockham, who are mostly counted as the Einstein and Hawking of the Middle Ages.

    I think that pretty clearly illustrates the limits of the medieval educational system and the problems we face trying to make things too historically accurate. There has to be some "wiggle room" on historical accuracy so that the game continues to be playable and fun to play.

    I keep trying to find the middle ground on this. My inner beadle wants things to be precisely as they were in history, but my inner gamer keeps saying something like "that's bovine excrement, no one would want to play that". Certainly the education system needs changed, but as I said before, I am uncertain how best to do that. I'm on board with the Journeyman system, I played some older mods with an early version of that. I saw the potential of it being a complete replacement for the existing educational system.

    And I agree with Don Senglar, the University should be the first and last educational building in the M:C environment. But that presents the problem of how to make that a reality. Maybe, since medieval universities only really trained "princes of the Church", universities could only be built in monastic cities and then they could only teach units like Bishops (super preachers), brilliant dignitaries or diplomats (statesmen).

    So maybe limiting the training of certain profession units to nobility units (page, quire, noble). I.e., only units created by luxury food can go to university, units created with common food use the Journeyman system. How that would complicate the code, I can't fully imagine. I can see it would mean a degree of duplication of the code (i.e., two education loops tracking two different kinds of YIELD_EDUCATION) Maybe it's easier than I can imagine, but I don't think there being a YIELD_EDUCATION and a YIELD_EDUCATION_2 holds much promise of stability.

    How that would work out in-game, I can't fully foresee. I worry that it could make creating needed high level units more difficult than is reasonable. So, for what it's worth, I am totally willing to overlook any historical inaccuracies in order to make the game more fun to play. My dissatisfaction with the vanilla education system has never stopped me from using it to my advantage.
     
  18. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    This is what I hoped for when I made this thread.

    The last part is incorrect. Sure it takes very little skill to cut down a tree given you have proper tools, but then you have to make sure you aren't hit by the tree. This level is fairly easy to reach and is likely the level you considered as medieval skill level.
    However just cutting down a tree damages it severely and makes it no good for other than fire-wood. What you need to do is to take branches into account, remove really troublesome ones, but often not all of them and then make sure the tree will not hit other trees on the way down. While they may have viewed resources as endless, they did know that the supply from the forest wasn't unlimited and you couldn't just cut down 10 times the amount you usually do. Sure the trees would grow again, but like fields you had to wait for them to be done.

    One serious issues regarding trees is finding suitable trees for masts. They had to be tall and strait, which mean they had to be kept in wind protected areas where other trees forced them upwards but was so far away that they didn't bend each other. Also a tree is ready to become a mast when it's around 200 years old, at least that's the age needed for a frigate. The medieval sized ships might accept 100 year old trees, but it's still not as trivial as you made it sound.

    Another partly related thing. Lot's of ships were lost during the Napoleon wars, which made people (kings) plant more wood and order them to be kept to make masts. Those are ready today, but there is a shortage of customers who wants to build a fleet of wooden ships. In fact these years are likely the best years in history to go shopping for a proper tree for a new mast due to supply/demand ratio.

    Even back in the stone age cutting down a tree was more complex than just cutting it down. For a start they had different axes for bark and tree center and those axes needed different cutting technique. Used correctly they were surprisingly fast compared to iron ages. Their main drawback wasn't that they were a bit slower, but rather durability. They were horribly slow if you didn't know how to use them correctly though.

    Basically you are saying that certain education buildings should only accept certain professions and possibly have multiple education buildings at once. Did I understand that right?

    Right now we should figure out what we actually want for historical accuracy and gameplay. Once we know the goal, we can figure out if coding it is realistic.

    As for coding I say we should think of coding this like making a bunch of boxes and then code a feature into each one. Each box should work independently from the others. The XML files (presumably UnitInfo, but possibly UnitClassInfo) can then have an on/off switch for each, meaning whatever combo of features each unit should be exposed to will be controlled by XML while the DLL should support all possible combos. I assume this is the easiest approach to code and test and it pushes as much setup as possible to XML.

    This mean rather than asking if a full picture can be coded, we should ask. Can the following be coded individually?
    1. Universities can only train a select few units
    2. A select few units can be set to train at a university
    3. Some, but not all can become journeyman though working
    4. Some, but not all can become experts through working
    None of those tasks looks really scary and if all of those are accessible in XML, then it's the task for the XML editor to set up the units like you proposed.
    It's possible that the list should be even longer than this. I just made up some "boxes" really quickly. For one thing I completely missed out of schoolhouse and college.

    For starters I'm coding Journeyman. I more or less ended up recoding everything while looking at the original mod for inspiration because I kind of disagrees with some design decisions. Sure that makes coding it take longer, but it makes it more flexible and (hopefully) faster.

    Once it's implemented the next goal is to make a per unit/unitclass setting for it (I'm making a global setting for a start). This willl allow picking which units can be journeymen and which can become experts. That would be step 3 and 4, which mean from this simplified plan it would already be half way towards what you proposed, while it's still modular enough to be turned into something else if we want that.
     
  19. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    That is a good way to go about it, just make it moddable. Here are my thoughts, we could drop schools and just add in Learn By Doing. Add journeyman with Guilds. Reasearch colleges and university for the high level classes only. At feudalism, nobles are set to military only then you can get an Master Steward to take its place.

    At that you'd have close to a medieval simulation:)

    Or at least make it moddable that way so I can try it out:)

    Edit: Units working in churches are educated to Parish Priest, Brilliant Dignitary, Benedict Monk, and Master Steward
     
  20. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    The DLL is to supply features. XML is to pick which features to use for which unit. My plan is to make journeyman so generic that once committed it should change absolutely nothing. However once somebody starts to mod XML, then stuff happen. Ideally the change in the DLL should be generic enough to be interchangeable with other mods, kind of like how the domestic advisor is written to work with the both M:C and RaRE. The difference ingame appears due to different XML settings. (and yield setup, which is hardcoded in DLL, but could be XML).
     

Share This Page