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

Learning by Doing Exp in Tooltip?

Discussion in 'Civ4Col - We The People' started by historix69, Jun 8, 2021.

  1. historix69

    historix69 Emperor

    Joined:
    Sep 30, 2008
    Messages:
    1,311
    On marathon it may take 100+ turns for a free colonist to adapt a profession. In that time it is possible to switch cities and have the free colonist train on the job in several cities. However management of such LbD-colonists among other free colonists is difficult since the info which profession he is learning is only visible when he is on a job in the city screen.

    It would be useful if tooltips for free colonists in garrison or transport area or on map would show the LbD-status, e.g. free colonist, working to become a lumberjack since 85 turns. This would allow to distinguish LbD free colonists from other free colonists and make handling of them easier.
     
  2. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Not that easy actually because when you put a Colonist on the Map you technically actually assing him a different Profession.

    Thus for LbD this is the Profession you would be learning - if that Profession would use LbD.
    And there are actually Professions on the Map that do ! (e.g. Pioneer - but LbD also has an sub-feature for Military using XP.)

    Technical Comment:

    Every Profession
    change you do manually, resets the LbD counter. :dunno:
    LbD was not designed to move Colonists between Cities and they restart learning.

    Gameplay Comment:

    The idea itself is however not that bad ... :think:
    Considering gameplay I like it.

    Summary:

    Will need to see what I can do with it. :dunno:
    It is more effort than you actually might expect.
    • I could stop the resetting of LbD-Profession-Turn-Counter for Outdoor-Professions that do not use LbD.
    • I most surely can visualize LbD-Profession-Turn-Counter it in the Unit Mouse Over Help outside the City as well.
     
  3. historix69

    historix69 Emperor

    Joined:
    Sep 30, 2008
    Messages:
    1,311
    If you turn a LbD free colonist into a colonist on the map, his LbD-status is not reset. You can move to another city and continue LbD there. This is already in the game and works and I use it for statesman, medic, lumberjack, carpenter, .... (2.8.2.2)
    When assigned to a job in the city screen you see the LbD-info, but not while the colonist is on the map. So an expanded tooltip would be nice since all free colonists look alike.

    Edit :
    There are however some bugs in the LbD-code. (2.8.2.2)
    - Having a free colonist learn as fur trader and switch between the 2 types of fur resets the counter.
    - Having a LbD spice trader switch between salt and spices resets the counter.
    - This will probably also be true for blacksmith and gunsmith when switching products.
     
    Last edited: Jun 9, 2021
  4. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    If it is just the tooltip, then it is simple. :)

    Need to check my old code first before I really know what and how I can implement it best.

    I implemented that feature 10 years ago and potentially it was changed by other team members
    while I was "retired from modding" after I had "abandoned" RaR core mod. :dunno:

    Profession changes - of all kind - normally used to reset the counter - and those are different Professions as well.
    (Maybe I had already coded though that it would only do so if the other Profession also uses LbD. :think:)

    But yes, that is possible to change as well. :thumbsup:
    (It makes sense to do so.)

    ----

    Summary:

    I will take a look at LbD subfeature "Expert" and improve it. :thumbsup:
     
  5. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Ok, checked my old code and the requested improvements are easy todo. :thumbsup:
    (Will do it this evening - will take longer than my lunch break.)

    * changing Professions that have the same Expert does not reset the "LbD turns worked counter"
    * changing to Profession that does not use "LbD Expert feature" does not reset the "LbD turns worked counter"
    * "LbD turns worked counter" (+ "LbD Learn Profession") will be displayed in Unit Tool Tip on Map if it is not "0"
     
    Last edited: Jun 9, 2021
  6. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,851
    That's my main issue with LbD. Switch work for one turn and it resets. Pirate ships are really harmful for progress towards expert fishermen. Fixing this issue without bloating memory and/or hurt performance is however non-trivial.
     
  7. historix69

    historix69 Emperor

    Joined:
    Sep 30, 2008
    Messages:
    1,311
    I never use it for fishermen since LbD can take 100+ turns and native villages are much faster in teaching fishermen.

    A general problem however is the AI governor since it does not consider LbD when shifting free colonists, e.g. a free colonist learned a profession and drops out of colony and then AI shifts the other free colonists breaking LbD unless you disabled the Citizen Automation.

    It would be useful if free colonists would store info about the job they worked on the most turns besides the current job, so that progress does not get lost. Another option would be to lock free colonists on a profession to learn by LbD.
     
    Elirector likes this.
  8. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Guys, not every feature will be perfect instantly. ;)
    Sometimes features need to mature for years like a good wine.

    LbD is in itself a very powerful framework. (Containing lots of sub-features and functionality.)
    It is also good design because it is relatively simple and efficient and performant and AI can use it.

    It may not be perfect yet - but it is much better than in Vanilla where "Learning by Doing" did not exist at all.
    Step by step this mod gets bigger and better. Have some patience. :thumbsup:

    ----

    Oh boy, I coloured that post like I am on some drugs ... :mischief::lol:
    (But I tried to keep it "friendly".)
     
    XSamatan and Mr. ZorG like this.
  9. historix69

    historix69 Emperor

    Joined:
    Sep 30, 2008
    Messages:
    1,311
    I remember from original col that there was a random chance to learn a job by doing, e.g. working a grasland tile growing tobacco could give you an expert tobacco planter. More reliable however was using school, college or university who worked the other way around compared to wtp. The colonists with professions were teaching and the free colonists working in the city had a chance to adapt the profession.
     
  10. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    It is the same here. :)
    The algorithms are just different.
    • We have Schools (Experst in City allow to teach) --> faster and more reliable
    • We have "Learning by Doing" (Experts in City spead up LbD) --> slower and unpredictable
    But if you suggest to change the general feature desing, please forget it. ;)
    I would put a Veto to it instantly. I like LbD as it is.

    By the way:

    Same for Education. I like it as it is.
    (And there are technical reasons why it is designed that way.)

    Summary:

    Please forget to discuss changing the general feature design of Eductation or LbD in WTP.
    You would instantly get a Veto. (And we should not waste our time like that.)
     
    Last edited: Jun 9, 2021
  11. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    This is now implemented. :thumbsup:
     

    Attached Files:

  12. Fürstbischof

    Fürstbischof Chieftain

    Joined:
    Jul 20, 2018
    Messages:
    73
    Gender:
    Male
    Quite some time ago there was also discussed (but not implemened) to have 3-5 LbD counters for each colonist. Thus no knowledge would be lost if your colonist would be randomly displaced by wild animals, attackers or pirates. Positive side effect would be that Free Colonists and Indentured Servants and even slaves could have some random prior knowledge.
     
    HobyMorgan and Ramstormp like this.
  13. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    I am not a big fan of that. :(

    Considering Immersion:
    You can not learn to become an expert of 5 different things at once !
    It becomes an unimmersive feature.

    Considering Gameplay:
    It removes all necessity to actually take care and manage how you use LbD (Colonists in Training).
    It becomes a boring feature.

    ----

    Summary:
    That is a nogo for me.

    ----

    @Nightinggale:

    Considering Fishermen being pushed out of their Job by Privateers.
    It is a much smaller issue than we discuss sometimes.

    If you protect your borders a bit, that will not happen all the time.
    It may happen yes, and if it does it is annoying but that is also part of the game ...

    Maybe we also find a smarter solution for it ...
    And if we do I have of course no issues with solving it. :thumbsup:

    ----

    I however do not want to have 5 LbD counters. :dunno:
    (See above)

    ----

    I might still accept 2 LbD counters. :thumbsup:
    (And always the highest is displayed / used.)

    That should already be enough to prevent "Fishers being pushed out by Privateers" issue.
    But not a single counter more than that.

    ----

    However, I am not going to implement that second counter ... :dunno:
    "Fishers being pushed out by Privateers and resetting LbD" is no real issue for me.
    (I accept it as part of gameplay and also a bit of challenge to prevent it.)
     
  14. Nightinggale

    Nightinggale Deity

    Joined:
    Feb 2, 2009
    Messages:
    4,851
    My experience is that I would need a ridiculously high number of warships to form "walls" or they move around the warships to annoy the colonies. Protecting your colonies from this ever happening is much harder than you make it out to be.

    Gameplay elements, which only serve to annoy players should be avoided. Units prevented from working is a challenge. Units with reset counters isn't a challenge, that's just annoyance. Btw it happens too with wild animals once in a while, which then flee your land. You can't protect yourself from spawning animals.

    It takes forever to finish the counter for one expert. Finishing it for 5 experts takes 5 times as long. Spreading out makes it unrealistic to finish. Besides once a unit becomes an expert, all the counters reset and will no longer count. I can't really see the "becoming multiple experts at once" path.

    I do have a different implementation proposal. Add a list of past experience. When a unit moves towards a new expert, move the old expert to the list. Each turn decrease everything in the list by 1. Experience not used will decay over time. It makes the impact of losing a profession for a single turn minimal while at the same time it prevents learning many experts at once. I think this might be the easiest one to implement because the list does nothing to the existing code. Instead it is only active when the active one changes, making the implementation minimal.
     
    Elirector and HobyMorgan like this.
  15. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Sounds ok to me. :thumbsup:

    Basically I was talking about something like that here:
    However you will need to work with with a pair of variables in the list:
    Professions / Turns Worked in Profession

    -----

    Actually that is a good argument. :thumbsup:

    Making the list too long will still not even be necessary. (Because it should be more performant if it is shorter.)
    2 slots should be enough. (e.g. in your Case of Fisher accidently switching Plots / Professions)

    Currently LbD already checks "Last Profession" and "New Profession" when changing Professions. (It always did.)
    It simply does not store "Last Profession" and "Counter of Last Profession" to be able to reset that data. (That is all that would be needed.)

    -----

    Summary:

    Actually if you like I could simply implement this myself. :thumbsup:

    What I suggest below should solve the issue and still feel immersive and good for gameplay to me.
    Effort is low and it should still be quite performant (no long lists to loop).

    LbD will:
    • Store "Previous Profession" and "Counter of Previous Profession" (a longer List should not be needed.)
    • When the Unit works in another Profession "Counter of Previous Profession" is decreased every turn by 1.
    • When a Unit changes back to "Previous Profession" then "Counter of Previous Profession" is reset.
    • "Previous Profession" and "Counter of Previous Profession" will also be visualized in Citizen Help
    -----

    That will be the easiest solution, because I already have "Last Profession" and would simply have to store and if necessary reset it.

    -----

    Should completely solve the issue of "Fisher Men being removed from Plot". :)
     
    Last edited: Jun 10, 2021
  16. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    Depends on the size of your empire. :)
    With a 30+ Cities empire most of the inland colonies are really safe places.
    Only the frontier Cities are harassed a bit and those you need to protect.
    And to do so is really part of the game for me.

    But as discusse, I will implement this:

     
  17. historix69

    historix69 Emperor

    Joined:
    Sep 30, 2008
    Messages:
    1,311
    Does "Previous Profession" really solve our problem?

    My idea was to save the LbD-effort in case of a disruption.

    Imagine you have an LbD-fisherman with 100 turns on the job. Now he is pushed out of water by a pirate and placed as farmer. Next turn a government building is finished and he is placed as a statesman (by the city governor). Will the farmer and statesman profession kill the 100 turns on fisherman? I would simply store the profession with the most turns to save the past effort on LbD.
     
  18. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    It will solve what I intend to solve: "Fisher instantly losing progress when pushed to other spot." :)
    Nothing more nothing less. :dunno:

    That is exactly what my concept does. :confused:

    Because you can then set back the "Fisher" to the Ocean Plot and all his turns worked as "Fisher" will still be restored.
    A normal disruption by e.g. a Privateer or a Wild Animal will not reset the counter anymore. (Because it will be stored and reset by switching back.)

    Only if you mess around with the "Fisher" by having him do lots of other professions your progress will be lost.
    But then you have been completely uncareful and simply never noticed that your Colonist once worked as a "Fisher".

    The design I offered above is not supposed to support "careless gameplay". (It would be against everything I believe considering game design.)
    It is just supposed to give the player a chance to react to something that may happen and may be hard to prevent in some game styles ...
     
    Last edited: Jun 10, 2021
  19. historix69

    historix69 Emperor

    Joined:
    Sep 30, 2008
    Messages:
    1,311
    I did not want to support careless gameplay.
    If a colonists worked 100 turns as fisherman, he just should not forget about this within 2 turns when temporarely pushed into 2 other professions.
     
  20. raystuttgart

    raystuttgart Civ4Col Modder

    Joined:
    Jan 24, 2011
    Messages:
    6,906
    Gender:
    Male
    Location:
    Stuttgart, Germany
    @historix69

    I already told you what I am willing to implement. :dunno:
    And I also have reasons why I suggest that specific solution design.
    (It is performant, it is little effort, it is easy to visualize, it removes the small annoyance but still requires decisions, it ...)

    All I now need to know if @Nightinggale or other team members are ok with it. :dunno:
    If yes, I will implement it. If not, I will not implement of course.

     
    Last edited: Jun 10, 2021

Share This Page