*label begin_year *temp logfix false *if first_year *set logfix true *if first_year = false *gosub_scene subs advance_time *set laborDays ((serf_households * 120) / 2) *if first_year = false *gosub_scene calamities *comment div 2 because traditionally a "serf-day" was between six and eight hours; a rise-to-dusk work day was counted as two. *if age > 46 Unfortunately, you took cold during the winter and never quite shook it off. Just as the spring dawns on the manor, the illness finally claims you. *set log & " You took cold during the winter, and died with the arrival of spring." *page_break ${log} *ending *if (knight or knight_hired) and (squire = "") *gosub_scene squire appoint_squire *temp clear 0 *rand clear 1 3 *label annual_choice How do you want to direct your efforts for the year? *if tone_down_living_expenses You need to lower your living expenses. *set log & " You realized that you were living above your means, and were forced to trim your household expenses;" *goto tone_down *fake_choice *if (forest_acreage > 0) #Clear more acreage from the forest. *set laborDays -(clear * 30) *set clear + woodcraft *if clear > forest_acreage *set clear forest_acreage *set unassigned_acreage +clear *set forest_acreage -clear *set timber +(clear * 100) *set log & " @{logfix You then|You} cleared ${clear} acre@{(clear > 1) s|} from the forest." *if (forest_acreage >= (((sows + 70) * 12.05) +50)) *goto population_accounting *elseif (forest_acreage < (((sows + 70) * 12.05) +50)) and (forest_acreage >= ((sows + 70) * 12.05)) You should be careful with how much land you are clearing. In order to fatten the swine during the fall, they are released into the forest to forage for acorns. They need at least two acres per pig—adult and juvenile. And you have to account not only for your swine, but the swine of the peasants as well. You are nearing that threshold. *goto population_accounting *else Assuming normal fertility among the sows this year, you will not have enough forest acreage to feed all of your swine. *goto population_accounting *if ((landless_pop > servant_pop) and (totAdults > (houses * 3.5))) #Build a house for one of the landless. *temp newHouses 0 *label how_many_new_houses How many new houses? You can build up to three. *input_number newHouses 1 3 *if newHouses > landless_pop Unfortunately, that's more houses than you have landless serfs. *goto how_many_new_houses *set timber -(10 * newHouses) *set landless_pop -(1 * newHouses) *set cottar_pop +(1 * newHouses) *set log & " You @{logfix then|} built ${newHouses} new house@{(newHouses > 1) s|} for the landless serfs of your manor." *if (landless_pop = 0) and (outlaw_resident and (outlaw_resident_promoted_to_cottar = false)) *set outlaw_resident_promoted_to_cottar true One of the landless moving into a new house is ${outlaw_name} ${outlaw_patronym}! *set log & " One of those landless was ${outlaw_name} ${outlaw_patronym}." *if landless_pop < 0 *bug negative landless pop *set pending_cottar_births +(1 * newHouses) *set cottar_households +(1 * newHouses) *set households +(1 * newHouses) *set houses +(1 * newHouses) *set manor_morale %+ (5 * newHouses) *set unusable_acreage +(0.5 * newHouses) *set fen_acreage -(0.5 * newHouses) *set laborDays -(50 * newHouses) *goto population_accounting *if (cottarAdults > (3.25 * cottar_households)) #Build a house for a cottar family. *temp newHouses 0 How many new houses? You can build up to three. *input_number newHouses 1 3 *set log & " You @{logfix then|} built ${newHouses} new house@{(newHouses > 1) s|} for the cottars of your manor." *set timber -(10 * newHouses) *set pending_cottar_births +(1 * newHouses) *set cottar_households +(1 * newHouses) *set households +(1 * newHouses) *set houses +(1 * newHouses) *set manor_morale %+ (5 * newHouses) *set unusable_acreage +(0.5 * newHouses) *set fen_acreage -(0.5 * newHouses) *set laborDays -(50 * newHouses) *goto population_accounting *if (engineering = 0) #I want to spend my spare time studying the mill: how it works and the principles of engineering. *set engineering +1 *set log & " You @{logfix then|} spent your time studying the mill and its inner workings." You spend your spare time for the year poking around the mill, learning from the miller how to keep it in good repair. *goto population_accounting *if (engineering > 0) *if (docks_damaged) *selectable_if (timber > 50) #Repair the docks. *set log & " You @{logfix then|} spent your time rebuilding the docks of the hamlet." *set laborDays -100 *set timber -50 *set incomeWheat -50 *set docks_damaged false *set manor_efficiency +0.05 *set trade_efficiency +0.05 Repairing the docks on the Osterdarn is an arduous task. It takes the combined knowledge and skill of you and the peasants to create a new foundation and structure. When the task is complete, you take a moment to breathe and contemplate. This will make it easier for the fishers to unload their goods as well as offering merchants the option to load and offload goods by water rather than cart. The whole community will run more smoothly due to your efforts. *goto population_accounting *if (improveRoadToUlm < 2) #Smooth and widen the road to Ulmheit. *set log & " You @{logfix then|} organized the smoothing and widening of the road to Ulmheit." *set trade_efficiency +0.05 *set improveRoadToUlm +1 *set laborDays -200 You use the labor-days of your tenants to straighten, smooth, and level the road to Ulmheit. It is long, exhausting work, but you know that ${thurnet} will benefit from it. *goto population_accounting *if (improveManorRoads < 2) #Smooth and widen the roads of the manor. *set log & " You @{logfix then|} organized the smoothing and widening of the roads of the manor." *set improveManorRoads +1 *set manor_efficiency +0.05 *set laborDays -200 You use the labor-days of your tenants to smooth and level the roads and paths around the manor. In particular, this allows the oxen going to and from the fields to arrive more promptly. It is long, exhausting work, but you know that ${thurnet} will benefit from it. *goto population_accounting *if (engineering > 1) *if (fen_acreage > 0) #Convert some acres of fen to meadow. *set laborDays -(clear * 45) *if clear > fen_acreage *set clear fen_acreage *set meadow_acreage +clear *set fen_acreage -clear *set log & " You @{logfix then|} cleared ${clear} acre@{(clear > 1) s|} of fen, converting them to meadow." It take some some doing to engineer the right amount of flooding—or lack thereof—to make useful meadow. But with the help of your tenants, you manage to convert ${clear} acres. This should allow you to increase the size of your herds. *goto population_accounting #Build a watchtower for the manor. #Expand your great hall. *set enlarged_hall true *if (mordain_alive and (combat < 2)) #I want to ask Mordain to continue my training at swordplay. *set combat +1 *set log & " You @{logfix then|} spent your spare time training with Mordain." Your father did not want you training with Mordain, because Mordain's tactics were those of a footsoldier, instead of a knight. But your father is dead and there is no one else to cross swords with in the thurnet. One evening, Mordain lowers his sword and addresses you. "Why are you doing this? Why learn the ways of war? It brought no fortune to your father." *fake_choice #"I intend to avenge him, Mordain. Now raise your sword!" *set hubris %+10 Mordain obeys. The lessons continue without further interruption. #"I need to be prepared to defend my honor and the honor of my family." *set chivalry %+10 Mordain nods. "I hope these lessons bring you good fortune." #"I need to learn to defend myself. I have enemies on all sides." *set chivalry %-10 "I hope you don't mean here, thornet." "Even here, Mordain." *page_break Your lessons with Mordain are not without blood and bruises, but by the end of the summer, your skills with sword, spear, and shield have increased notably. *if combat = 2 *set log & " You also realized that there was nothing more for you to learn from him." As fall sets in, you realize that Mordain has nothing more to teach you. *goto population_accounting #I pay special attention to the herds and flocks of the manor. *if husbandry > 0 *set annual_focus "livestock" *set sowLitterSize +(husbandry / 3) *set log & " You @{logfix then|} attended to the herds and flocks of the manor." *goto population_accounting *else *set husbandry +1 *set hubris %-10 *set log & " You @{logfix then|} attended to the herds and flocks of the manor and learned much of animal husbandry in the process." You spend the year learning as much as you can about how to tend for the herds and the flocks of the manor. You rise early and go to bed late covered in the fluids of life and death. It is, however, rewarding to know in your bones the source of the food that sustains you and your family. You gain an appreciation for the sacrifice that these animals make on your behalf. *goto population_accounting #@{(domestics > 0) I pay attention to the household, making sure that it operates efficiently.|I spend my time learning about the secrets of food preparation and preservation.} *set log & " You @{logfix then|} attended to the household—its kitchen, stores, budget, clothing, and repairs." *if domestics > 0 *set annual_focus "domestics" *goto population_accounting *else *set domestics +1 *set hubris %-10 *set log & " You learned much about these domestic arts in the process." You spend the year with your mother, learning as much as you can about the workings of the household: the preparation and preseravation of food, the repurposing of scraps, and the basics of sewing and spinning. It is rewarding seeing how your efforts contribute to making the house run more smoothly—as long as you keep a sharp eye out. In your experience, the moment you turn your attentions elsewhere, matters quickly slip out of your control. *goto population_accounting *if (medicine > 0) #I'm going to use my time to care for the sick and look out for the newborns. *set annual_focus "health" *set piety %-5 *set annual_manor_morale %+5 *set log & " You @{logfix then|} attended to the sick and infirm of the manor." TODO the population clearly appreciates your attentions. *goto population_accounting *if (weapons_held) and (weapons_rejected = false) *selectable_if (manor_liquid > 2000) #I travel to the thurne of Yardwen to ransom my father's sword and armor. *set log & " You @{logfix then|} set out to reclaim your father's sword and armor from the thorne of Yardwen." *if page = false *gosub_scene subs randname "fem" "1" *set page_name (femname_1 & " ") & fempatronym_1 *set page_inf femname_1 *set page_he "she" *set page_him "her" *set page_his "her" @{mother_alive Your mother's face goes very still|${eorwald_inf} cocks ${eorwald_his} head} when you announce your intention to travel to Yardwen. "Are you prepared to do that? It will be a long journey. You do not know what the road may hold along the way." "It @{(chivalry > 50) is my duty to|reflects poorly on me the longer I do not} recover my father's sword." "Very well," @{mother_alive she|${eorwald_he}} replies. *if page = false In the corner, the eyes of your current page, ${page_name}, eyes have gone wide. As a peasant—even the daughter of a freeholder—she has never left the manor, much less the thurne. To go see not just Ulmheit, but the town of Sturmreich and the city of Amerlich as well, will be an unparalled few weeks in her life. @{(compassion > 50) It will be good for her to see something of the world and it will supply her family with stories for years| You hope that she will not distract you from your objective}. *page_break The next day, you give some instructions to ${eorwald_inf} to follow in your absence. You mount your horse and take one last look around your home. You have never been further than Ulmheit; not even to Sturmreich. Over the next few weeks, you will travel three or even four times that distance. *if knight_hired ${knight_inf} settles uncomfortably in his saddle. "Are you ready, thornet?" "As ready as I'll ever be," you reply. "It's no great matter. Two weeks there, three weeks back. If we hurry, we might even return in time for the summer feast." "It is good to be made aware yet again of your priorities, ${knight_inf}." You snap the reins and your horse lurches forward. ${knight_inf}, ${knight_his} squire, and your page follow behind. *if knight_hired = false With ${squire_inf} and ${page_inf} in tow, you set out from the yard. By your estimates, it may take two weeks to reach Yardwen, and likely longer to return. "Will we return in time for the summer feast, thornet?" ${page_inf} inquires. "If we hurry, we just might, ${page_name}." *page_break You Snap The Reins *gosub_scene yardwen *goto population_accounting *if ((swore_fealty = false) and ((choice_randomtest = false) or (manor_liquid >= manor_acreage))) #Travel to Ulmheit and swear my fealty to the thorne. *if manor_liquid >= manor_acreage *set log & " You @{logfix then|} resolved to travel to Ulmheit and swear fealty to the thorne Ulrich." *gosub_scene ulmheit swear_fealty *goto population_accounting *else You do not have enough liquid capital to pay the thorne for the right to your inheritance. You will have to borrow the funds in order to make the payment. *choice #I intend to borrow the funds. *set log & " You @{logfix then|} resolved to travel to Ulmheit and swear fealty to the thorne Ulrich." *gosub_scene ulmheit swear_fealty *goto population_accounting #I will do something else with my year. *goto annual_choice *if (swore_fealty and (knight or knight_hired)) *if (dovecote_license = false) and (manor_liquid > 2000) *hide_reuse #Negotiate the right to a dovecote with @{ulrich_majority the Thorne Ulrich|the Lady Ulrich}. *set log & " You @{logfix then|} set out for Ulmheit to negotiate a license for a dovecote." *gosub_scene ulmheit dovecote *if dovecote_license Returning home with your license, you are faced with the prospect of actually building the dovecote. *choice *selectable_if ((engineering > 0) and (husbandry > 0)) #I think I can devise a plan for one. *set log & " Returning home with your license, you built the dovecote yourself." *label build_dovecote_self *set dovecote true *set dovecote_level 1 *set manor_liquid -100 *set rep_gentry %+5 When you are finished, you look *if (engineering + husbandry) = 2 upon the ugly shack that is your work. It will accomplish its purpose, but it will win you no admirers. *if (engineering + husbandry) = 3 *set rep_gentry %+5 on with a certain amount of pride at your creation. It is not dazzling, but it is competent work. You expect that others will find it so, too. *if (engineering + husbandry) >= 3 *set rep_gentry %+10 *set manor_morale %+5 on it with pride. It is a clever bit of work, if you do say so yourself. *goto build_dovecote *selectable_if (manor_liquid > 500) #I will send for an engineer. *set log & " Returning home with your license, you sent for an engineer to build one for you." *label hire_engineer_build_dovecote *set dovecote true *set dovecote_level 1 *set manor_liquid -300 *set rep_gentry %+15 *set manor_morale %+5 The cost of the engineer is notable. But when she is finished, you have a solid, handsome dovecote. *goto build_dovecote #I will hold on to my license, and put it to use later. *set log & " Returning home with your license, you decided to wait to build it." Of course, this also means that your free time for the year is still available to you. How would you like to spend it? *goto annual_choice *label build_dovecote Besides the dovecote itself, however, you have to think of what to do with all the pigeons you're going to have. Sure, you'll eat some of them, and you're customarily obligated to give one each week to the caris. But that will still leave you with a few hundred extra each year; you'll need to make cages to carry the surplus to market. *set wheat -(75 * cagePrice) *goto population_accounting *else On the journey home from Ulmheit, you consider how else you might spend your time this year. *goto annual_choice *if dovecote_license and (dovecote = false) *selectable_if ((engineering > 0) and (husbandry > 0)) #I devise a plan for a dovecote. *set log & " You @{logfix then|} designed and built a dovecote." *goto build_dovecote_self *selectable_if (manor_liquid > 500) #I will send for an engineer to build a dovecote. *set log & " You @{logfix then|} sent for a skilled carpenter to build your dovecote." *goto hire_engineer_build_dovecote *if (swore_fealty) #Go on a pilgrimage. *gosub_scene subs check_pilgrimages There are many pilgrimages within the realm of the Quinn, and there are even some into foreign lands. Some are short, others frugal, still others distant and lavish. *choice *if (can_pil_hisbroke) #I will travel to Hisbroke and see the birthplace of Odo Cluranh. *set log & " You @{logfix then|} set out on the pilgrimage to Hisbroke." *set piety %+10 *set manor_morale %+5 *set annual_manor_morale %+10 *gosub_scene pilgrimages hisbroke *selectable_if (false) #I will travel to Amerlich and visit the site of the first miracle of Odo Donel. *set log & " You @{logfix then|} set out on the pilgrimage to the temple of Odo Donel in Amerlich." *set piety %+10 *set rep_senan %+10 *set annual_manor_morale %+5 *gosub_scene pilgrimages donel_amerlich *selectable_if (false) #I will travel to XXX. #No, I don't want to go on a pilgrimage this year. *goto annual_choice *if ((pledge_employ_knight) and (knight_hired = false)) #I seek a knight to serve as my proxy. *set log & " You @{logfix then|} sought and found a knight to serve as your proxy." *set years_since_pledge_knight 0 *set knight_hired true *set knight_support 200 *set warhorse +1 *set knight_name "Aodhan Krodzwinich" *set knight_inf "Aodhan" TODO meet Aodhan Krodzwinich *line_break TODO multiple options for knights? *goto population_accounting *if (knight_hired and ((combat < 3) and (knight_name = "Aodhan Krodzwinich"))) #I ask Ser Aodhan to practice swordplay with me. *set log & " You @{logfix then|} practiced swordplay with ${knight_name}." *set combat +1 Ser Aodhan is reluctant to indulge you, but as long as he eats at your table, there is only so long he can put off a reasonable request. The two of you begin praticing with staves before moving to swords and lances. He's clearly out-of-practice himself, but as the weeks pass he becomes more comfortable. *if combat > 2 *set log & " As the summer drew to a close, you realized you had nothing more to learn from him." As the summer draws to an end, you realize that you have nothing more to learn from Aodhan Krodzwinich. *goto population_accounting *if ((bell = false) and (manor_liquid > 2000)) #I want to commission a bell for the shrine. *set log & " You @{logfix then|} commissioned a bell for the manor's shrine." *set manor_liquid -1500 *set shrine "church" *set bell true *set rep_gentry %+5 *set rep_senan %+20 *set manor_morale %+10 *set fame +5 The cost of a bronze bell is enormous, almost the entire revenue for the manor for a year. However, you can now say that your shrine is a church. When the bell arrives, Eamon Oslich—the ardiom—comes from Ulmheit to bless it. Conveniently, you schedule the blessing to coincide with the summer feast, so you do not have to supply an extra one. The whole manor raises a horn of cider to you and your family. Of course, commissioning of the bell is not necessarily a matter of piety; the bell will serve the community in the case of emergencies. There is no better way to communicate quickly to everyone on the manor. *goto population_accounting *if (false) #Seek a knighthood. *comment (knight = false) and (swore_fealty = true) *selectable_if (false) #Train with your weapons. *if ((outlaws_betrayed = false) and ((outlaws > 0) and (manor_morale > 60))) #I try to entice the outlaws to lay down their arms and return to the fields. *set log & " You @{logfix then|} spread word that the outlaws of your manor should return without threat of consequence." *temp returning_outlaws 0 *set returning_outlaws +(fame/5) *set returning_outlaws +(round((manor_morale - 50) / 5)) *if returning_outlaws > outlaws *set returning_outlaws outlaws During the summer feast, you let it be known that all are welcome—even those who have abandoned ${thurnet}. As much as you might wish otherwise, the manor is not sealed; you know that some maintain connections with the outlaws that have harassed you. You grow anxious as the day approaches. Finally, the day of the summer feast, you note ${returning_outlaws} new faces in the crowd. *choice #We welcome them back with open arms, despite the laws and scripture that say otherwise. *set compassion %+15 *set piety %-10 *set hubris %-10 *set chivalry %+10 *set rep_senan %-10 *set manor_morale -(returning_outlaws * 3) *set landless_pop +returning_outlaws *set outlaws -returning_outlaws *set outlaw_camp_progress +1 *set log & " ${returning_outlaws} returned from their exile and were welcomed back to the manor as landless." The ${returning_outlaws} outlaws are grateful for your mercy. They praise your name when you accept them back into the Quinn fold. Speaking with them privately, they can barely contain their elation. They even go so far as to let slip a few hints about the location of the outlaw camp, which you store away for future use. Unfortunately, the rest of your subjects seem less enthused about your generosity. They remember Pippa and the others who have died at the hands of these outlaws, and will not be so quick to forgive. *goto population_accounting #I welcome them back, but chastise them publically for breaking the laws of Sénan. *set piety %+10 *set rep_senan %+10 *set landless_pop +returning_outlaws *set outlaws -returning_outlaws *set log & " ${returning_outlaws} returned from their exile as landless serfs on your manor, but you chastised them publicly." The new serfs hang their heads at your tongue-lashing, but accept it as their lot. Life was not easy in the wilderness; having decided to return to Quinn society, what more could they have expected? Once their humiliation has passed, the merriment begins. While the newcomers are not exactly welcomed, neither are they shunned. You suspect that, in time, they will find their place among your people. *goto population_accounting #I order them arrested and hanged. *set compassion %-15 *set justice %-20 *set piety %+10 *set chivalry %-10 *set rep_ulrich %+5 *set rep_gentry %+10 *set rep_freeholders %+5 *set fame +(returning_outlaws) *set outlaws -returning_outlaws *set outlaws_betrayed true *set log & " ${returning_outlaws} returned from their exile, but you ordered them arrested and hanged." The newcomers are accosted. You had already prepared the ropes for this. There is a brief intermission to the feast while the ${returning_outlaws} outlaws are strung up, but soon enough the feasting resumes while their bodies swing in the wind. *goto population_accounting *if (fresh_drill > 0) #I spring the trap and have them nabbed and murdered outside of view before they can take communion. *set compassion %-20 *set justice %-10 *set piety %-5 *set hubris %+15 *set chivalry %-10 *set rep_ulrich %+10 *set rep_gentry %+10 *set outlaws -returning_outlaws *set outlaws_betrayed true *set outlaw_camp_progress +1 *set log & " ${returning_outlaws} sought to return to the manor, but your well-disciplined serfs captured them and murdered them before they could join the communion." Several of your better-trained militia accost the newcomers. They are subdued before they can cry out. They are taken away and fed to the pigs, leaving the rest of your subjects free to enjoy the feast uninterrupted. You are later informed that one of the outlaws attempted to save himself by giving directions to the outlaw camp. Unfortunately, he was so terrified that he wasn't speaking clearly, and one of your militia shut him up permanently before anything coherent could be ascertained. However, the few tidbits that are relayed to you might prove useful later. *goto population_accounting *selectable_if (tactics > 0) #Train the peasants in group tactics. *set unit_skill +1 *set fresh_drill 5 *set annual_manor_morale %+5 *set log & " You @{logfix then|} trained the peasants in group tactics." Frequently, the obligated days of military training are bit less than organized. You, however, have decided to press the training home. You make full use of the days you are allotted by law. *if unit_skill = 1 *set log & " Their formation was no longer an embarrassment." By the end of the summer period, the spear-and-shield formation of your tenants is no longer an embarrassment. *if unit_skill > 1 *set log & " Their formation bordered on competent." By the end of the summer period, the spear-and-shield formation is looking almost respectable. *goto population_accounting *if ((woodcraft > 0) and (outlaws > 0)) #I spend time trying to confront the outlaws that are in the woods. What do you want to do to the outlaws, and how do you want to do it? *choice *if (outlaws_betrayed = false) #I want to find them and convince them to lay down their weapons and return to the fields. TODO *goto population_accounting *selectable_if (woodcraft > 1) #I want to lay traps in the hopes of killing a few. *set log & " You @{logfix then|} lay traps and managed to kill ${woodcraft} outlaws." *set outlaws -woodcraft *set justice %-5 *set compassion %-20 *set chivalry %-10 You set traps designed to kill humans. It's hard to design a trap that will ensare a human while not being appealing to a bear or a boar, but you manage it. You check back periodically, and are pleased to discover ${woodcraft} corpses over the course of the summer. After that, the outlaws get wise to your ways. *goto population_accounting #I want to try and track down the location of their camp. *set outlaw_camp_progress +1 *if woodcraft > 3 *set outlaw_camp_progress +1 *set chivalry %-10 Sleeping in trees and sniffing animal tracks is not exactly the stuff of song, but its work that has to be done if you're going to locate the outlaw camp. Over the course of the spring and summer, you slip away into the woods as frequently as you can, trying to track and triangulate. *if outlaw_camp_progress >= 3 *set log & " You @{logfix then|} sought—and found—the outlaw camp." Just as you're about to give up for the winter, you realize that it's right there in front of you. Or above you, really. They were clever, no doubt about it, but your perseverance paid off when you noticed a knotted rope left dangling. You stayed for another night, barely daring to breathe, until you saw the outlaws make use of it to climb into the canopy. You slip back home. It's too late to organize something now, but you'll have the winter to contemplate. *goto population_accounting *else *set log & " You @{logfix then|} spent your time in the forest, seeking the outlaw camp." By the time winter rolls around, you can't say that you've found the camp, but you certainly feel like you've made significant progress. *goto population_accounting *if (knight = false) and (knight_hired = false) *selectable_if (false) #Enlist a knight as your proxy. *selectable_if (false) #Reinter your father in a tomb in a church in Ulmheit. *goto population_accounting *if ((first_year = false) and (just_changed_household_support = false)) #I want to change the household support level. *set log & " you chose to change your household budget;" *label tone_down Again, the minimum is 40 bushels per person per year. What do you want to set it to? *set just_changed_household_support true *goto set_household_support *if ((eorwald_inf = "Sirid") and (choice_randomtest = false)) #I want to ask ${eorwald} some questions about managing the manor. *gosub_scene manor_npcs sirid_convo_intro *goto annual_choice *label population_accounting *if year = 565 *gosub_scene family mom_initial_convo *set calamity_season +1 *if first_year = false *gosub_scene calamities *page_break ${eorwald_inf} appears before you, ready to discuss the harvest. $!{eorwald_he} presents you with the births and deaths of the manor. *gosub tempEffCalc *gosub_scene subs mortality_check_display *gosub_scene subs houses_check *gosub_scene subs confirmation_check_display *gosub_scene subs birth_check_display *gosub_scene subs multiply_flocks *temp harvestWool 0 *gosub harvest_wool *gosub harvest_wheels *temp harvestSquab 0 *if dovecote *gosub harvest_squab *temp displayWheels round(harvestWheels) *temp displayWool round(harvestWool) *gosub livestock_mortality *line_break *temp infinite_stop 0 *temp purchasedHay 0 *label tempHay *temp harvestLeather 0 *temp harvestLambskin 0 *temp harvestMutton 0 *temp harvestPork 0 *temp harvestBeef 0 *comment Cows: ${cows} *comment *line_break *comment Oxen: ${oxen} *comment *line_break *comment Sheep: ${sheep} *comment *line_break *if (choice_randomtest) and (infinite_stop > 5) *ending *temp tempHay 0 *set tempHay +(((meadow_acreage * hayYield) * weather_index) + purchasedHay) *comment *line_break *comment Hay after Harvest: ${tempHay} *set tempHay -((98 * hayYield) * weather_index) *comment meadow hay reserved for peasants *comment *comment *line_break *comment Hay after Peasants: ${tempHay} *set tempHay -(warhorse * warhorseConsump) *comment *line_break *comment Hay after Warhorses: ${tempHay} *set tempHay -(ridinghorse * ridinghorseConsump) *comment *line_break *comment Hay after Palfreys: ${tempHay} *set tempHay -(sheep * sheepConsump) *comment *line_break *comment Hay after Sheep: ${tempHay} *set tempHay -(bulls * bullConsump) *comment *line_break *comment Hay after Bulls: ${tempHay} *set tempHay -(cows * cowConsump) *comment *line_break *comment Hay after Cows: ${tempHay} *set tempHay -(oxen * oxenConsump) *comment *line_break *comment Hay after Oxen: ${tempHay} *line_break *temp displayHay round(tempHay) Your dairy cows produced ${displayWheels} wheels of cheese. *line_break The sheep that lived through the year produced ${displayWool} pounds of wool. *gosub livestock_mortality_display Hay after projected consumption: ${displayHay} bu *if (tempHay < 0) You don't anticipate having enough hay to maintain all your @{((tempHay + hay) < 0) livestock, even making use of your hay-stores.| livestock.} *if (choice_randomtest) and (hay > ((tempHay ^ 2) ^ 0.5)) You will use the hay in your stores to cover your current livestock and slaughter all the new animals. *temp tempYearlings yearlings *temp tempSlaughterYearlings tempYearlings *set tempYearlings 0 *temp yearling_hay_need 0 *temp tempYearlingBeef 0 *temp tempYearlingLeather 0 *temp newOxen 0 *temp newCows 0 *temp slaughterYearlings 0 *gosub temp_slaughter_yearlings_post *temp tempCalfBeef 0 *temp tempCalfLeather 0 *temp newYearlings 0 *temp tempCalves calves *temp tempSlaughterCalves tempCalves *set tempCalves 0 *temp calves_hay_needs 0 *temp slaughterCalves 0 *gosub temp_slaughter_calves *temp tempMutton 0 *temp tempWool 0 *temp tempLambskin 0 *temp tempLambs 0 *temp newSheep 0 *temp tempSlaughterLambs tempLambs *set tempLambs 0 *temp slaughterLambs 0 *temp lamb_hay_need 0 *gosub temp_slaughter_lambs *goto harvest_sows_randomtest *choice *selectable_if (sheep > (minSheep + 2)) #I will slaughter some sheep. *temp slaughterSheep 0 How many will you slaughter? *input_number slaughterSheep 1 (sheep - (minSheep + 2)) *set harvestWool +(slaughterSheep * sheepWoolYield) *set harvestMutton +(slaughterSheep * sheepMuttonYield) *set sheep -slaughterSheep *goto tempHay *selectable_if (round(demense_acreage / 15) < oxen) #I will slaughter some oxen. *temp slaughterOxen 0 How many will you slaughter? *input_number slaughterOxen 1 (oxen - round(demense_acreage / 15)) *set harvestBeef +(slaughterOxen * oxenBeefYield) *set harvestLeather +(slaughterOxen * oxenLeatherYield) *set oxen - slaughterOxen *goto tempHay *selectable_if (cows > 8) #I will slaughter some cows. *temp slaughterCows 0 How many will you slaughter? *input_number slaughterCows 1 (cows - 8) *set harvestBeef +(slaughterCows * cowBeefYield) *set harvestLeather +(slaughterCows * cowLeatherYield) *set cows - slaughterCows *goto tempHay *if ((choice_randomtest = false) and ((tempHay + hay) >= 0)) #I plan on using my hay-stores to get through the winter. You slaughter the yearlings, calves, and lambs, since you can't support them. *set harvestBeef +(yearlings * yearlingBeefYield) *set harvestLeather +(yearlings * yearlingLeatherYield) *set yearlings 0 *set harvestBeef +(calves * calfBeefYield) *set harvestLeather +(calves * calfLeatherYield) *set calves 0 *set harvestMutton +(lambs * lambMuttonYield) *set harvestWool +(lambs * lambWoolYield) *set harvestLambskin +(lambs * lambskinYield) *set lambs 0 *goto harvest_sows *if (manor_liquid > 0) #Though it will be wasteful, I will send ${eorwald_inf} to buy hay from the neighboring manors. *temp tempHayCost (((((tempHay / hayPrice) / trade_efficiency) / manor_efficiency) ^ 2) ^ 0.5) *if manor_liquid >= tempHayCost *set purchasedHay -tempHay *set manor_liquid -tempHayCost *goto tempHay *else *set purchasedHay +(((manor_liquid * hayPrice) * trade_efficiency) * manor_efficiency) *set manor_liquid 0 *goto tempHay *label yearling_check *temp slaughterYearlings 0 *temp tempSlaughterYearlings 0 *temp tempYearlings yearlings *temp yearling_hay_need 0 *temp newCows 0 *temp newOxen 0 *temp displayYearlings round(yearlings) *temp tempYearlingBeef 0 *temp tempYearlingLeather 0 *set yearling_hay_need (tempYearlings * yearlingConsump) *if yearlings = 0 *goto calf_check You currently have ${displayYearlings} yearlings. *temp display_yearling_hay_need round(yearling_hay_need) It would take ${display_yearling_hay_need} bushels of hay to keep them all through the winter. They could be slaughtered now for meat, or allowed to mature to become oxen or dairy cows. *line_break (Remember, oxen also require oats through the year. @{notEnoughOats You had to buy oats from Ulmheit in order to feed your herd last year. It is expensive to continue doing so; you should consider planting more acres of oats.| That is handled later.}) *set notEnoughOats false *if choice_randomtest You decide to keep enough to replace the ones that died. *goto keep_replace *choice *if (choice_randomtest = false) #I want to slaughter all of them. *set tempSlaughterYearlings tempYearlings *set tempYearlings 0 *set yearling_hay_need 0 *gosub temp_slaughter_yearlings *goto calf_check #I will keep enough to replace the ones that died. *label keep_replace *set newCows round(deadCows) *set newOxen round(deadOxen) *set slaughterYearlings ((tempYearlings - newCows) - newOxen) *set yearling_hay_need (newCows * yearlingConsump) *set yearling_hay_need +(newOxen * yearlingConsump) *gosub temp_slaughter_yearlings_post *goto calf_check *if (choice_randomtest = false) #I want to slaughter some of them. How many? *input_number tempSlaughterYearlings 1 (tempYearlings-1) *set tempYearlings -tempSlaughterYearlings *goto resolve_keep_yearlings *if (choice_randomtest = false) #I want to keep the dairy cows. *gosub even_out_yearlings *set tempSlaughterYearlings +(tempYearlings / 2) *set newCows (tempYearlings / 2) *set yearling_hay_need (newCows * yearlingConsump) *if tempHay >= yearling_hay_need *gosub temp_slaughter_yearlings_post *goto calf_check *else *goto not_enuf_hay *if (choice_randomtest = false) #I want to make oxen and slaughter the rest. *gosub even_out_yearlings *set tempSlaughterYearlings +(tempYearlings / 2) *set newOxen (tempYearlings / 2) *set yearling_hay_need (newOxen * yearlingConsump) *if tempHay >= yearling_hay_need *gosub temp_slaughter_yearlings *goto calf_check *else *label not_enuf_hay You don't have enough hay for that. *goto yearling_check #I want to keep all that I can. *label resolve_keep_yearlings *gosub even_out_yearlings *set yearling_hay_need (tempYearlings * yearlingConsump) *if tempHay > yearling_hay_need *gosub temp_slaughter_yearlings *goto calf_check *elseif tempHay < yearlingConsump You don't have enough hay to keep any of them. *set tempSlaughterYearlings tempYearlings *set tempYearlings 0 *set yearling_hay_need 0 *gosub temp_slaughter_yearlings *goto calf_check *else *set newOxen (tempYearlings / 2) *set newCows (tempYearlings / 2) *if choice_randomtest *set newOxen (deadOxen + 1) *set newCows (deadCows + 1) *if (cows > 12) and (newCows > 0) *set newCows -1 *if (oxen > 11) and (newOxen > 0) *set newOxen -1 *label recheck_yearling_consump *if ((newOxen * yearlingConsump) + (newCows * yearlingConsump)) > tempHay *set newOxen -1 *set newCows -1 *set tempSlaughterYearlings +2 *goto recheck_yearling_consump *set yearling_hay_need ((newOxen * yearlingConsump) + (newCows * yearlingConsump)) *gosub temp_slaughter_yearlings_post *goto calf_check *if (tempYearlings modulo 2) != 0 *set tempSlaughterYearlings +1 *set tempYearlings -1 *if choice_randomtest and (cows > 12) *temp slaughterCows 0 *set slaughterCows (cows - 12) *set harvestBeef (slaughterCows * cowBeefYield) *set harvestLeather (slaughterCows * cowLeatherYield) *set cows -slaughterCows *goto tempHay *if choice_randomtest and (oxen > 10) *temp slaughterOxen 0 *set slaughterOxen (oxen - 10) *set harvestBeef (slaughterOxen * oxenBeefYield) *set harvestLeather (slaughterOxen * oxenLeatherYield) *set oxen -slaughterOxen *goto tempHay *label calf_check *set tempHay - yearling_hay_need *temp displayHay round(tempHay) You are currently projected to have ${displayHay} bushels of hay left over. *temp slaughterCalves 0 *temp newYearlings 0 *temp tempSlaughterCalves 0 *temp tempCalves calves *temp displayCalves round(tempCalves) *temp calves_hay_needs (tempCalves * calfConsump) *temp tempCalfBeef 0 *temp tempCalfLeather 0 *if tempCalves = 0 *goto lamb_check *temp displayNeeded round(calves_hay_needs) You have ${displayCalves} calves. It would take ${displayNeeded} bushels of hay to keep them all through the winter. If you don't keep them, they will be culled for meat and leather. *choice *if (choice_randomtest = false) #I will keep none of them. *set tempSlaughterCalves tempCalves *set tempCalves 0 *set calves_hay_needs 0 *gosub temp_slaughter_calves *goto lamb_check *if (choice_randomtest = false) #I will slaughter some of them. How many will you slaughter? *input_number tempSlaughterCalves 1 (tempCalves -1) *set tempCalves - tempSlaughterCalves *set calves_hay_needs (tempCalves * calfConsump) *goto check_calf_consump #I will keep all that I can. *label check_calf_consump *if calves_hay_needs <= tempHay *gosub temp_slaughter_calves *goto lamb_check *elseif tempHay < yearlingConsump *set tempSlaughterCalves tempCalves *set calves_hay_needs 0 *gosub temp_slaughter_calves You don't have enough hay to keep any calves. *goto lamb_check *else *set newYearlings round(tempHay / calfConsump) *if (newYearlings * calfConsump) > (tempHay / calfConsump) *set newYearlings -1 *set tempSlaughterYearlings (tempCalves - newYearlings) *set tempCalves - tempSlaughterCalves *set calves_hay_needs (newYearlings * calfConsump) *goto lamb_check *label lamb_check *set tempHay -calves_hay_needs *set displayHay round(tempHay) You project that you will have ${displayHay} leftover bushels of hay. *temp slaughterLambs 0 *temp tempSlaughterLambs 0 *temp tempLambs lambs *temp newSheep 0 *temp lamb_hay_need 0 *temp tempWool 0 *temp tempMutton 0 *temp tempLambskin 0 *set lamb_hay_need (tempLambs * lambConsump) *temp displayLambs round(tempLambs) *temp displayNeeded round(lamb_hay_need) *if lambs = 0 *goto harvest_sows *gosub_scene subs min_sheep_count You have ${displayLambs} lambs. It would take ${displayNeeded} bushels of hay to keep them all through the winter. If you don't keep them, they will be slaughtered for meat, wool, and lambskin. *if minSheep > sheep You have ${sheep} sheep. You need the wool from ${minSheep} in order to satisfy the needs of the manor. *if choice_randomtest *goto keep_all_lambs *choice *if (choice_randomtest = false) #I will keep none of them. *set tempSlaughterLambs tempLambs *goto resolve_lamb_cull #I will keep enough to replace the ones that died. *set tempSlaughterLambs (tempLambs - deadSheep) *set tempLambs -tempSlaughterLambs *set lamb_hay_need (tempLambs * lambConsump) *if lamb_hay_need > tempHay You don't have enough hay for that many lambs. *goto max_sheep_for_hay *gosub temp_slaughter_lambs *goto resolve_lamb_cull *if (choice_randomtest = false) #I will cull some of them. How many with you cull? *input_number tempSlaughterLambs 1 (tempLambs -1) *label resolve_lamb_cull *set tempLambs -tempSlaughterLambs *set lamb_hay_need (tempLambs * lambConsump) *gosub temp_slaughter_lambs *goto harvest_sows *if ((tempLambs >= 50) and (choice_randomtest = false)) #I will cull 50 of them. *set tempSlaughterLambs 50 *goto resolve_lamb_cull *if ((tempLambs >= 100) and (choice_randomtest = false)) #I will cull 100 of them. *set tempSlaughterLambs 100 *goto resolve_lamb_cull *if ((tempLambs >= 150) and (choice_randomtest = false)) #I will cull 150 of them. *set tempSlaughterLambs 150 *goto resolve_lamb_cull #I will keep all that I can. *label keep_all_lambs *if tempHay >= lamb_hay_need *set newSheep lambs *goto harvest_sows *elseif tempHay < lambConsump *set tempSlaughterLambs tempLambs You don't have enough hay to keep any lambs. *goto resolve_lamb_cull *else *label max_sheep_for_hay *set newSheep round(tempHay / lambConsump) *if (newSheep * lambConsump) > (tempHay / lambConsump) *set newSheep -1 *set tempSlaughterLambs (tempLambs - newSheep) *set tempLambs - tempSlaughterLambs *set lamb_hay_need (newSheep * lambConsump) *gosub temp_slaughter_lambs *goto harvest_sows *label harvest_sows *set tempHay - lamb_hay_need *comment TempHay: ${tempHay} *label harvest_sows_randomtest *temp newSows 0 *temp slaughterPiglets 0 *temp tempPiglets piglets *temp tempPork 0 *temp tempPigLeather 0 *if piglets = 0 *goto confirm_livestock *temp newSowFood round(((tempPiglets / 2) * 1320) / 50) *temp existingSwineFood round(((sows + boars) * 1320) / 50) You have ${piglets} hogs. You do not need any hay for them, as they feed on vetches, refuse, and other vegetables during the winter, spring, and summer, and they forage in the woods during the fall for insects and acorns. However, they do eat a lot of vegetables; if you kept all the females, you would need about ${newSowFood} bushels of vegetables in addition to the ${existingSwineFood} bushels you'll need to maintain your current herd. *temp keepPiglets 0 *temp sirid_control false *if manor_liquid < 500 *set sirid_control true *set keepPiglets round(manor_liquid / 50) A new set of hogs can really eat you out of house and home. Because of this, ${eorwald_inf} *if keepPiglets <= 0 will not let you keep any new sows. *set slaughterPiglets tempPiglets *set tempPiglets 0 *gosub temp_slaughter_piglets *goto confirm_livestock will only let you keep ${keepPiglets} new sows. Once you have established yourself, she promises to relent. You don't need to keep any of the males, so those will be culled regardless. The hogs that you don't keep will be culled for meat and leather. *choice *if (choice_randomtest = false) #I will keep none of them. *set slaughterPiglets tempPiglets *goto cull_piglets #I will keep just enough to replace the ones that died. *set slaughterPiglets (tempPiglets - deadSwine) *goto cull_piglets *if (sirid_control = false) *if (choice_randomtest = false) #I will cull all of the males and some of the females. *temp femPigs round(tempPiglets / 2) How many of the ${femPigs} females will you cull? *input_number slaughterPiglets 1 femPigs *set slaughterPiglets +(tempPiglets - femPigs) *label cull_piglets *set tempPiglets -slaughterPiglets *gosub temp_slaughter_piglets *goto confirm_livestock *if (choice_randomtest = false) #I will just cull the males. *set slaughterPiglets round(tempPiglets / 2) *goto cull_piglets *else #I will keep some of them. How many of the ${keepPiglets} will you keep? *if keepPiglets = 1 *set keepPiglets 2 *input_number keepPiglets 1 (keepPiglets - 1) *set slaughterPiglets (tempPiglets - keepPiglets) *goto cull_piglets *if (keepPiglets > 0) #I will keep all ${keepPiglets}. *set slaughterPiglets (tempPiglets - keepPiglets) *goto cull_piglets *label confirm_livestock *set displayHay round(tempHay) *if newOxen > 0 You are going to keep ${newOxen} new ox@{(newOxen > 1) en|}. *if newCows > 0 You are going to keep ${newCows} new dairy cow@{(newCows > 1) s|}. *if tempSlaughterYearlings > 0 You are going to slaughter ${tempSlaughterYearlings} yearling@{(tempSlaughterYearlings > 1) s|}. This will produce ${tempYearlingBeef} pounds of beef and ${tempYearlingLeather} square feet of leather. *if newYearlings > 0 You are going to keep ${newYearlings} calves. *if tempSlaughterCalves > 0 You are going to slaughter ${tempSlaughterCalves} cal@{(tempSlaughterCalves > 1) ves|f}. This will produce ${tempCalfBeef} pounds of beef and ${tempCalfLeather} square feet of leather. *if tempSlaughterLambs > 0 You are going to slaughter ${tempSlaughterLambs} lamb@{(tempSlaughterLambs > 1) s|}. This will produce ${tempWool} pounds of wool, ${tempMutton} pounds of mutton, and ${tempLambskin} square feet of lambskin. *if newSheep > 0 You are going to keep ${newSheep} lamb@{(newSheep > 1) s|} to become sheep. *if slaughterPiglets > 0 You are going to cull ${slaughterPiglets} pig@{(slaughterPiglets > 1) s|}. This will produce ${tempPork} pounds of pork and ${tempPigLeather} square feet of leather. *if newSows > 0 You are going to keep ${newSows} pig@{(newSows > 1) s|} to become sows. You are projected to have ${displayHay} bushels of hay left over. *if (choice_randomtest) and (hay > ((tempHay ^ 2) ^ 0.5)) *gosub slaughter_yearlings *gosub slaughter_lambs *gosub slaughter_calves *gosub slaughter_piglets *set harvestLeather * tithe *set harvestLeather round(harvestLeather) *set hay +tempHay *if hay < 0 *bug *goto collect_taxes *choice *selectable_if (tempHay >= 0) #Yes, this is what I want to do. *label settle_hay *gosub slaughter_yearlings *gosub slaughter_lambs *gosub slaughter_calves *gosub slaughter_piglets *set harvestLeather * tithe *set harvestLeather round(harvestLeather) *temp hayEfficiency manor_efficiency *if hayEfficiency > 1 *set hayEfficiency 1 *if tempHay >= 0 *set tempHay * hayEfficiency *set hay +tempHay *goto collect_taxes *else *set hay +tempHay *goto collect_taxes *if ((choice_randomtest = false) and ((tempHay < 0) and ((tempHay + hay) >= 0))) #I will use my hay stores to cover the difference. *goto settle_hay *if ((choice_randomtest = false) or (tempHay < 0)) #No, let me try that again. *set infinite_stop +1 Year: ${year} *goto tempHay *label collect_taxes *set taxWheat 0 *set taxEggs 0 *set taxPigs 0 *set taxLambs 0 *set taxWheels 0 *set taxCheese 0 *set taxWool 0 *set taxFish 0 *set taxMutton 0 *set taxPork 0 *set taxBeef 0 *temp displayMutton 0 *temp displayCheese 0 *temp displayPork 0 *gosub tax_fishers *gosub tax_cottars *gosub tax_hvs *gosub tax_villeins *gosub tax_trades *gosub tax_yeomen *set taxCheese round(taxCheese) *set taxWheat round((taxWheat * weather_index) * rat_calamity_index) *if wheat_failure *set taxWheat * 0.05 *set taxWheat round(taxWheat) *if spring_wheat_failure or winter_wheat_failure *set taxWheat * 0.525 *set taxWheat round(taxWheat) *set taxLambs round(taxLambs * lambMortalityRate) *set taxPigs round(taxPigs * pigMortalityRate) *set displayWheels round(taxWheels) Income Wheat: ${incomeWheat} *line_break Tax Wheat: ${taxWheat} *line_break Harvest Wheat: ${harvestWheat} *line_break Weather Index: ${weather_index} *line_break Rat Index: ${rat_calamity_index} *page_break The peasants deliver their taxes for the year, which is paid in kind: Cheese: ${taxCheese} lbs *line_break Eggs: ${taxEggs} *line_break Fish: ${taxFish} pounds *line_break Lambs: ${taxLambs} *line_break Pigs: ${taxPigs} *line_break Wheat: ${taxWheat} bushels *line_break Wheels of Cheese: ${displayWheels} @ 10 lbs/ea *line_break Wool: ${taxWool} pounds All tax-livestock will be culled. *page_break Cull Livestock *gosub cull_tax_livestock *temp displayLambskin round(taxLambskin) *temp displayTaxMutton round(taxMutton) *temp displayTaxPork round(taxPork) *temp displayLeather round(taxLeather) *temp displayWool round(taxWool) Final tax receipts: Cheese: ${taxCheese} lbs *line_break Eggs: ${taxEggs} *line_break Fish: ${taxFish} pounds *line_break Lambskin: ${displayLambskin} square feet *line_break Leather: ${displayLeather} square feet *line_break Mutton: ${displayTaxMutton} pounds *line_break Pork: ${displayTaxPork} pounds *line_break Wheat: ${taxWheat} bushels *line_break Wheels of Cheese: ${displayWheels} @ 10lb/ea *line_break Wool: ${displayWool} pounds *page_break *gosub harvest_wheat *comment Harvest Wheat: ${harvestWheat} *gosub harvest_barley *gosub harvest_cider *gosub harvest_chestnuts *gosub harvest_vegetables *gosub harvest_cabbage *gosub harvest_winter_squash *gosub harvest_summer_squash *gosub harvest_vetches *gosub harvest_oats *gosub merge_accounts *gosub household_use *set displayMutton round(incomeMutton) *set displayPork round(incomePork) *set displayWool round(incomeWool) *set displayCheese round(taxCheese) *set displayLambskin round(incomeLambskin) *set displayLeather round(incomeLeather) *set displayWheels round(incomeWheels) *temp displayBeef round(incomeBeef) After paying the tithe to the Church of Sénan, merging the harvest and tax income accounts, and feeding your family and the servants: *line_break Ale: ${harvestAle} gallons *line_break Cider: ${harvestCider} gallons *line_break Chestnuts: ${harvestChestnuts} bushels *line_break Cabbage: ${harvestCabbage} bushels *line_break Summer Squash: ${harvestSummerSquash} bushels *line_break Oats: ${harvestOats} bushels *line_break Root Vegetables: ${harvestVegetables} bushels *line_break Vetches: ${harvestVetch} bushels *line_break Wheat: ${incomeWheat} bushels *line_break Winter Squash: ${harvestWinterSquash} bushels Beef: ${displayBeef} pounds *line_break Cheese: ${displayCheese} lbs *line_break Fish: ${taxFish} lbs *line_break Lambskin: ${displayLambskin} square feet *line_break Leather: ${displayLeather} square feet *line_break Mutton: ${displayMutton} pounds *line_break Pork: ${displayPork} pounds *line_break Wheels: ${displayWheels} @ 10lb/ea *line_break Wool: ${displayWool} pounds *if sows > 0 First, you have to feed the pigs. *gosub feed_pigs *line_break *temp incomeMeat ((incomeMutton + incomePork) + incomeBeef) *gosub saltNeed You need to buy salt to preserve the various foodstuffs, make bread, and tan hides. For that, you need ${saltNeed} bushels of salt, which will cost you *set saltNeed round((saltNeed / saltPrice) / trade_efficiency) ${saltNeed} bushels of wheat. *set incomeWheat -saltNeed *gosub barrelNeed *line_break You also need to replace some barrels. You need ${barrelNeed} more; that will cost you *set barrelNeed round(barrelNeed / barrelPrice) ${barrelNeed} bushels of wheat. *set incomeWheat -barrelNeed *if dovecote *line_break You need to feed the pigeons. *temp pigeonVetch 0 *if dovecote_level < 3 *set harvestVetch -(dovecote_level * 80) *set pigeonVetch (dovecote_level * 80) *if dovecote_level = 3 *set harvestVetch -(4 * 80) *set pigeonVetch (4 * 80) That requires ${pigeonVetch} bushels of vetches. *line_break *gosub cageNeed You also need to replace some cages for the pigeons. You need ${cageNeed} more; that will cost you *set cageNeed / cagePrice ${cageNeed} bushels of wheat *set incomeWheat -cageNeed *line_break You pay your servants their annual salaries of 30 bushels each. *set incomeWheat -(servant_pop * 30) *if karol_support = 30 *line_break Additionally, you have to pay Karol's tutor 60 bushels. *set incomeWheat -30 *if karol_support = 15 *line_break Additionally, you give Mordain a small consideration of 15 bushels for his instruction of Karol. *set incomeWheat -30 *if karol_support = 10 *line_break Additionally, you give ${eorwald} a small consideration of 10 bushels for ${eorwald_his} instruction of Karol. *set incomeWheat -10 *gosub_scene subs min_sheep *line_break You have to sell some wool to your tenants so they can clothe themselves. *line_break *gosub leather_consump *set incomeLeather -leatherConsump The household and land requires a significant amount of leather. *if harvestAle < 0 *line_break You have to send for barley in order to meet the ale-needs of the thurnet. *temp barleyNeed ((((harvestAle / 11) / 0.9) ^ 2) ^ 0.5) *set barleyNeed *(barleyPrice / trade_efficiency) *set incomeWheat -(barleyNeed / manor_efficiency) *set barleyNeed round(barleyNeed / manor_efficiency) This requires ${barleyNeed} bushels of wheat. *set harvestAle 0 *if incomeWheat < 0 *line_break Because the harvest was so poor, you have to *if wheat > 0 *temp wheatDiff (wheat + incomeWheat) *if wheatDiff >= 0 go into your stores to feed the thurnet. Thankfully, your stores are sufficiently equipped. *set wheat +incomeWheat *set incomeWheat 0 *if wheatDiff < 0 *set incomeWheat +wheat *set wheat 0 open your stores to feed the thurnet, but even that is not enough. You send to Ulmheit for the balance. *set manor_liquid +((incomeWheat / trade_efficiency) / manor_efficiency) *set incomeWheat 0 *if wheat <= 0 immediately send for grain to feed the thurnet. *set manor_liquid +((incomeWheat / trade_efficiency) / manor_efficiency) *set incomeWheat 0 *gosub check_labor *line_break In order to keep the forest from naturally encroaching upon the pasture and farmland, there is a certain amount of logging that must be done; you add the timber to your stores. *set laborDays -20 *set timber +10 *comment *if laborDays > 0 *comment *line_break *comment Labor Days: ${laborDays} *if maintenanceDebt > 0 *label erase_maintenance_debt *temp debt_erase 0 You can pay your tenants to catch up on the maintenance debt. *choice *if (choice_randomtest = false) #I will leave the debt unchanged. *goto feasts #I will hire some hands to do some of it. How many days of debt do you want to erase? *input_number debt_erase 1 maintenanceDebt *if debt_erase > (incomeWheat / unskilledDayRate) You don't have enough wheat for that. *if choice_randomtest You will leave it undone. *goto feasts *goto erase_maintenance_debt *else *label erase_debt You have caught up on ${debt_erase} days of maintenance. *set incomeWheat -(debt_erase * unskilledDayRate) *set maintenanceDebt - debt_erase *goto feasts #I want it all done. *if maintenanceDebt > (incomeWheat / unskilledDayRate) You don't have enough wheat for that. *goto erase_maintenance_debt *else *set incomeWheat -(maintenanceDebt * unskilledDayRate) *set maintenanceDebt 0 *goto feasts *label feasts It is customary to share the bounty of the land with the residents of the manor on certain holy days. It one of the few days of the year that some of the poorest tenants have the opportunity to eat meat, and it also helps with making sure that certain hard-to-preserve foods doing go to waste. *if choice_randomtest *gosub_scene subs feastPermissions *choice *if (canHaveThree) #I hold the standard three feasts. *set annual_manor_morale %+5 *set numSmallFeasts 3 *label process_feasts *gosub_scene subs feastConsumpCalc *set harvestSummerSquash 0 *set incomeWheat - (numSmallFeasts * smallFeastWheat) *set harvestChestnuts -(numSmallFeasts * smallFeastChestnut) *set harvestAle - (numSmallFeasts * smallFeastAle) *set harvestCider - (numSmallFeasts * smallFeastCider) *set harvestVegetables - (numSmallFeasts * smallFeastVegetables) *set harvestCabbage - (numSmallFeasts * smallFeastCabbage) *set harvestWinterSquash - (numSmallFeasts * smallFeastWinterSquash) *set taxCheese - round(numSmallFeasts * smallFeastCheese) *if dovecote *set harvestSquab -round(numSmallFeasts * smallFeastSquab) *if taxCheese < 0 *set taxCheese 0 *set taxCheese round(taxCheese) *temp vegDiff 0 *temp justConj 1 *if incomeWheat < 0 Because the harvest was so poor, *if wheat > 0 *temp wheatDiff (wheat + (incomeWheat / manor_efficiency)) *if wheatDiff >= 0 you have to go into your stores for wheat for the feasts. Thankfully, your stores are sufficiently equipped. *set wheat +(incomeWheat / manor_efficiency) *set incomeWheat 0 *if wheatDiff < 0 *set incomeWheat +(wheat * manor_efficiency) *set wheat 0 don't have enough for the feasts. You use all of your stores, but for the rest you have to send to Ulmheit. *goto getGrainFromUlmheitAndDisplay *if wheat <= 0 you have to send to Ulmheit for the grain for the feasts. *label getGrainFromUlmheitAndDisplay *set manor_liquid +((incomeWheat / trade_efficiency) / manor_efficiency) *set incomeWheat ((incomeWheat / trade_efficiency) / manor_efficiency) *set incomeWheat (incomeWheat ^ 2) *set incomeWheat (incomeWheat ^ 0.5) *set incomeWheat round(incomeWheat) This costs ${incomeWheat} bushels of credit. *set incomeWheat 0 *set justConj +1 *if harvestCabbage < 0 *set vegDiff (cabbage + (harvestCabbage / manor_efficiency)) @{justConj Unfortunately|Additionally}, you don't have enough cabbages to fully satisfy the requirements of the feasts. You probably have too many new sows. *if vegDiff >= 0 Fortunately, you have enough stores to compensate for the shortfall. *set cabbage +(harvestCabbage / manor_efficiency) *if vegDiff < 0 Unfortunately, you don't have enough cabbage in your stores to make up the difference. *set vegDiff ((vegDiff ^ 2) ^ 0.5 ) *set cabbage 0 *set incomeWheat -(((vegDiff / cabbagePrice) / trade_efficiency) / manor_efficiency) *set justConj +1 *set harvestCabbage 0 *if harvestVegetables < 0 *set vegDiff (vegetables + (harvestVegetables / manor_efficiency)) @{justConj Unfortunately|Additionally|What's more}, you don't have enough root vegetables. *if vegDiff >= 0 However, you have enough stores to compensate for the shortfall. *set vegetables +(harvestVegetables / manor_efficiency) *if vegDiff < 0 What's more, you don't have enough root vegetables in your stores to make up the difference. *set vegDiff ((vegDiff ^ 2) ^ 0.5 ) *set vegetables 0 *set incomeWheat -(((vegDiff / vegetablePrice) / trade_efficiency) / manor_efficiency) *set justConj +1 *set harvestVegetables 0 *if harvestWinterSquash < 0 *set vegDiff (winterSquash + (harvestWinterSquash / manor_efficiency)) @{justConj Unfortunately|Additionally|What's more|Further}, you don't have enough winter squash. *if vegDiff >= 0 However, you have enough stores to compensate for the shortfall. *set winterSquash +(harvestWinterSquash / manor_efficiency) *if vegDiff < 0 And you don't have enough winter squash in your stores to make up the difference. *set vegDiff ((vegDiff ^ 2) ^ 0.5 ) *set winterSquash 0 *set incomeWheat -(((vegDiff / winterSquashPrice) / trade_efficiency) / manor_efficiency) *set justConj +1 *set harvestWinterSquash 0 *if harvestAle < 0 *temp barleyNeed ((((harvestAle / 11) / 0.9) ^ 2) ^ 0.5) *if barley >= (barleyNeed / manor_efficiency) Though you did not grow enough barley to make enough ale to satisfy the needs of the feasts, you do have enough barley in your stores. *set barley -(barleyNeed / manor_efficiency) *if barley < barleyNeed You have to send for @{(barley > 0) some|} barley in order to meet the ale-needs of the feast. *if barley > 0 *set barleyNeed -barley *set barley 0 *set barleyNeed *((barleyPrice / trade_efficiency) / manor_efficiency) *set incomeWheat -barleyNeed *set harvestAle 0 *set incomeBeef - (numSmallFeasts * smallFeastBeef) *set incomePork - (numSmallFeasts * smallFeastPork) *set incomeMutton - (numSmallFeasts * smallFeastMutton) *if incomeBeef < 0 *set incomePork +(incomeBeef) *set incomeBeef 0 *if incomePork < 0 *set incomeMutton +(incomePork) *set incomePork 0 *if incomeMutton < 0 *set incomeBeef +(incomeMutton) *set incomeMutton 0 *if incomeBeef < 0 *set incomePork +(incomeBeef) *set incomeBeef 0 *if incomePork < 0 *set taxFish +(incomePork) *set incomePork 0 *if taxFish < 0 You don't have enough fresh meat and fish to satisfy the needs of the feast. *set taxFish ((taxFish ^ 2) ^ 0.5) *if meat < (taxFish / manor_efficiency) You have to send ${eorwald_inf} to buy some from the neighboring manors. *set incomeWheat -(((taxFish / meatPrice) / trade_efficiency) / manor_efficiency) *set taxFish 0 *if meat >= (taxFish / manor_efficiency) Thankfully, you have enough preserved meat to suit your needs. *set meat -(taxFish / manor_efficiency) *set taxFish 0 *set incomeWheels - (numSmallFeasts * smallFeastWheels) *if incomeWheels < 0 *set incomeWheels 0 *set taxEggs - (numSmallFeasts * smallFeastEggs) *if numSmallFeasts = 2 The residents of your manor are clearly disappointed that there are only two feasts being held this year. *if numSmallFeasts = 3 The residents of the manor accept the feasts as their due. *page_break *goto sell_surplus #I will only hold two of the feasts. *set numSmallFeasts 2 *set annual_manor_morale %-10 *goto process_feasts *label sell_surplus *set incomeMeat ((incomeMutton + incomePork) + incomeBeef) *set displayWool round(incomeWool) *set displayLeather round(incomeLeather) *set displayLambskin round(incomeLambskin) *set harvestWinterSquash round(harvestWinterSquash) *set harvestCabbage round(harvestCabbage) *set taxFish round(taxFish) *set harvestCider round(harvestCider) *if harvestSummerSquash > 0 Unfortunately, you can't really preserve summer squash, which is why it's consumed at the summer feast-day. *set harvestSummerSquash 0 *line_break *if harvestAle > 0 Ale doesn't keep for very long; it's made progressively throughout the year from barley. So, in fact, you won't make more ale than you need, as you're too far from Ulmheit to sell any. *set harvestBarley (((harvestAle / 0.9) / 11) * manor_efficiency) *set harvestAle 0 *line_break *if (harvestCider > 0) and (harvestCider <= 100) You set aside what remains of your cider for vinegar. *set harvestCider 0 *line_break *if harvestCider > 100 *set harvestCider -100 You set aside some cider to become vinegar. *line_break *if taxEggs > 0 *temp eggEfficiency manor_efficiency *if eggEfficiency > 1 *set eggEfficiency 1 *set taxEggs * eggEfficiency *set taxEggs round(taxEggs) You order the remaining eggs pickled; that will make them easier to preserve and transport. Now it is time to sell your surplus. Cabbage: ${harvestCabbage} bushels *line_break *temp displayChestnuts round(harvestChestnuts) Chestnuts: ${displayChestnuts} bushels *line_break Cider: ${harvestCider} gallons *line_break Winter Squash: ${harvestWinterSquash} bushels Cheese: ${taxCheese} lbs *line_break Fish: ${taxFish} lbs *line_break Lambskin: ${displayLambskin} square feet *line_break Leather: ${displayLeather} square feet *line_break Pickled Eggs: ${taxEggs} *line_break *set incomeMeat round(incomeMeat) Meat: ${incomeMeat} pounds *if dovecote and (harvestSquab > 0) *line_break Squab: ${harvestSquab} pigeons *line_break *set displayWheels round(incomeWheels) Wheels: ${displayWheels} @ 10 lbs/ea *line_break Wool: ${displayWool} pounds *if harvestCabbage > 0 You sell the cabbages. *set incomeWheat +((harvestCabbage / cabbagePrice) * trade_efficiency) *set harvestCabbage 0 *line_break *if taxCheese > 0 You sell the cheese. *set incomeWheat +((taxCheese / cheesePrice) * trade_efficiency) *set taxCheese 0 *line_break *if (harvestChestnuts > 0) and (harvestChestnuts < 5) You put the surpluse chestnuts into the stores. *set chestnuts +round(harvestChestnuts) *line_break *if harvestChestnuts >= 5 You sell most of the chestnuts. *set incomeWheat +(((harvestChestnuts / chestnutPrice) * 0.8) * trade_efficiency) *set harvestChestnuts * 0.2 *set chestnuts +round(harvestChestnuts) *line_break *if harvestCider > 0 You sell most of the cider, but retain a bit in case of visits by the clergy. *set incomeWheat +(((harvestCider * 0.9) / ciderPrice) * trade_efficiency) *set harvestCider * 0.1 *set cider +round(harvestCider) *line_break *if taxEggs > 0 You sell the pickled eggs. *set incomeWheat +((taxEggs / pickledEggPrice) * trade_efficiency) *set taxEggs 0 *line_break *if taxFish > 0 You sell the fish. *set incomeWheat +((taxFish / fishPrice) * trade_efficiency) *set taxFish 0 *line_break *if incomeLambskin > 0 You sell the lambskin. *set incomeWheat +((incomeLambskin / lambskinPrice) * trade_efficiency) *set incomeLambskin 0 *line_break *if incomeLeather > 0 You sell almost all of the leather. *set incomeWheat +(((incomeLeather * 0.9) / leatherPrice) * trade_efficiency) *set incomeLeather * 0.1 *set incomeLeather round(incomeLeather) *line_break *if incomeMeat > 0 You sell the meat. *set incomeWheat +((incomeMeat / meatPrice) * trade_efficiency) *set incomeMeat 0 *line_break *if dovecote and (harvestSquab > 0) You sell the squab. *set incomeWheat +((harvestSquab / squabPrice) * trade_efficiency) *set harvestSquab 0 *line_break *if (incomeWheels > 0) and (incomeWheels < 6) You sell all the wheels. *set incomeWheat +((incomeWheels / wheelsPrice) * trade_efficiency) *set incomeWheels 0 *line_break *if (incomeWheels >= 6) and (incomeWheels < 10) You keep a wheel or two and sell the rest. *set incomeWheat +((5 / wheelsPrice) * trade_efficiency) *set incomeWheels round(incomeWheels -5) *line_break *if incomeWheels >= 10 You sell the wheels of cheese, keeping a tenth for any surprise guests. *set incomeWheat +(((incomeWheels * 0.9) / wheelsPrice) * trade_efficiency) *set incomeWheels round(incomeWheels * 0.1) *line_break *if harvestWinterSquash > 0 You sell half of the winter squash, holding some in case of a long winter. *set incomeWheat +(((harvestWinterSquash / 2) / winterSquashPrice) * trade_efficiency) *set harvestWinterSquash / 2 *set harvestWinterSquash round(harvestWinterSquash) *line_break *if incomeWool > 0 You sell almost all of the wool. *set incomeWheat +(((incomeWool * 0.9) / woolPrice) * trade_efficiency) *set incomeWool * 0.1 *set incomeWool round(incomeWool) *line_break *if harvestOats < 0 You need more oats to feed your warhorses, palfreys, and oxen. *temp oatsNeeded 0 *set oatsNeeded -harvestOats *set incomeWheat -((oatsNeeded / oatPrice) / trade_efficiency) *set harvestOats +oatsNeeded *if harvestOats < 0 *bug still not enough oats *set notEnoughOats true *if incomeWheat < 0 Unfortunately, at the end of the annual accounting, you spent more than you earned. You have to spend from your credit in order to balance the accounts. *set manor_liquid +(incomeWheat / trade_efficiency) *set incomeWheat 0 *page_break *gosub_scene subs taxes_owed *if manor_debt > 0 *temp interest round(manor_debt * interest_rate) You have a debt to the Mercer's Guild of Fassmein. You are obligated to pay ${interest} bushels of wheat in interest. *if interest <= incomeWheat *set incomeWheat -interest *set interest 0 *if interest > incomeWheat *temp principalAdded 0 *set principalAdded (interest - incomeWheat) *set interest 0 *set incomeWheat 0 *if wheat > 0 *if principalAdded > wheat *set principalAdded -wheat *set wheat 0 You are forced to added the difference between what you are able to pay and what you owe to the principal of the loan. *if principalAdded <= wheat *set wheat -principalAdded *set principalAdded 0 You are forced to pay the difference between your income and your debt from your stores. *if (false) *set interest incomeWheat *line_break Income Wheat: ${incomeWheat} *line_break Wheat: ${wheat} *line_break Capital: ${manor_liquid} *page_break *bug Not enough wheat to pay interest! *set manor_debt +principalAdded *if salter_debt > 0 *temp interest round(salter_debt * salter_interest) You @{(manor_debt > 0) also|} have a debt to the salter, Barl Danasich. You are obligated to pay ${interest} bushels of wheat in interest. *if interest <= incomeWheat *set incomeWheat -interest *set interest 0 *if interest > incomeWheat *temp principalAdded 0 *set principalAdded (interest - incomeWheat) *set interest 0 *set incomeWheat 0 *if wheat > 0 *if principalAdded > wheat *set principalAdded -wheat *set wheat 0 You are forced to added the difference between what you are able to pay and what you owe to the principal of the loan. *if principalAdded <= wheat *set wheat -principalAdded *set principalAdded 0 You are forced to pay the difference between your income and your debt from your stores. *if (false) *set interest incomeWheat *line_break Income Wheat: ${incomeWheat} *line_break Wheat: ${wheat} *line_break Capital: ${manor_liquid} *page_break *bug Not enough wheat to pay interest! *set salter_debt +principalAdded *if first_year = false *gosub resolve_household_support *if first_year *gosub household_support *if incomeWheat < 0 Unfortunately, you have spent more than you have earned for the year. You have to borrow in order to meet your commitments. The ${incomeWheat} bushels will be added to your debt. *set manor_debt -incomeWheat *set incomeWheat 0 *if (incomeWheat > 0) and (incomeWheat <= 200) You don't have enough wheat to trade for credit, so you add it to your stores. *temp displayIncomeWheat round(incomeWheat * manor_efficiency) *set log & " At the end of the harvest, you added ${displayIncomeWheat} bushels of wheat to your stores." *set wheat +((incomeWheat) * manor_efficiency) *set incomeWheat 0 *if incomeWheat > 200 Finally, you trade the vast majority of your wheat for credit. *temp displayLiquid round((incomeWheat * 0.8) * trade_efficiency) *set log & " At the end of the year, you are able to trade ${displayLiquid} bushels to your credit account," *set manor_liquid +((incomeWheat * 0.8) * trade_efficiency) *set incomeWheat * 0.2 *temp displayIncomeWheat round(incomeWheat * manor_efficiency) *set log & " and ${displayIncomeWheat} bushels of wheat to your stores." *set wheat +((incomeWheat) * manor_efficiency) *set incomeWheat 0 *set wheat round(wheat) *set leather round(leather) Final Stores: *gosub move_to_stores *line_break *set chestnuts round(chestnuts) Chestnuts: ${chestnuts} bushels *line_break *set cider round(cider) Cider: ${cider} gallons *line_break *temp displayBarley round(barley) Barley: ${displayBarley} bushels *line_break Hay: ${hay} bushels *line_break *temp displayOats round(oats) Oats: ${displayOats} bushels *line_break *temp displayRye round(rye) Rye: ${displayRye} bushels *line_break *temp displayVegetables round(vegetables) Root Vegetables: ${displayVegetables} bushels *line_break Vetches: ${vetches} bushels *line_break Wheat: ${wheat} bushels *line_break Wheels of Cheese: ${wheels} @ 10lbs/ea *line_break *temp displayWinterSquash round(winterSquash) Winter Squash: ${displayWinterSquash} bushels Leather: ${leather} *line_break *set displayWool round(wool) Wool: ${displayWool} *line_break Timber: ${timber} *temp displayCredit round(manor_liquid) *set log & " Your final credit account was ${displayCredit}." Credit: ${displayCredit} bu *if first_year = false And so ends the harvest. *gosub_scene subs end_harvest *set calamity_season +1 *if first_year *gosub_scene family reflection_on_pcs_confirmation *gosub_scene calamities *comment now transition to winter *set calamity_season +1 *gosub_scene calamities *page_break *goto begin_year *label even_out_yearlings *set tempYearlings round(tempYearlings) *if (tempYearlings modulo 2) != 0 *set tempSlaughterYearlings +1 *set tempYearlings -1 *return *label temp_slaughter_yearlings *set newOxen +(tempYearlings / 2) *set newCows +(tempYearlings / 2) *label temp_slaughter_yearlings_post *set tempYearlings 0 *set tempYearlingBeef +(tempSlaughterYearlings * yearlingBeefYield) *set tempYearlingLeather +(tempSlaughterYearlings * yearlingLeatherYield) *return *label slaughter_yearlings *set slaughterYearlings tempSlaughterYearlings *set oxen + newOxen *set cows + newCows *set harvestBeef +(slaughterYearlings * yearlingBeefYield) *set harvestLeather +(slaughterYearlings * yearlingLeatherYield) *return *label temp_slaughter_lambs *set newSheep tempLambs *set tempWool +(tempSlaughterLambs * lambWoolYield) *set tempMutton +(tempSlaughterLambs * lambMuttonYield) *set tempLambskin +(tempSlaughterLambs * lambskinYield) *return *label slaughter_lambs *set slaughterLambs tempSlaughterLambs *set sheep +newSheep *set lamb_hay_need (newSheep * sheepConsump) *set harvestWool +(slaughterLambs * lambWoolYield) *set harvestMutton +(slaughterLambs * lambMuttonYield) *set harvestLambskin +(slaughterLambs * lambskinYield) *return *label temp_slaughter_calves *set newYearlings tempCalves *set tempCalves 0 *set tempCalfBeef (tempSlaughterCalves * calfBeefYield) *set tempCalfLeather (tempSlaughterCalves * calfLeatherYield) *return *label slaughter_calves *set slaughterCalves tempSlaughterCalves *set yearlings newYearlings *set calves_hay_needs (newYearlings * yearlingConsump) *set harvestBeef +(slaughterCalves * calfBeefYield) *set harvestLeather +(slaughterCalves * calfLeatherYield) *return *label temp_slaughter_piglets *set newSows tempPiglets *set tempPork (slaughterPiglets * pigPorkYield) *set tempPigLeather +(slaughterPiglets * pigLeatherYield) *return *label slaughter_piglets *if forest_acreage < ((sows + 70) * 12.05) Unfortunately, you don't have enough forest to provide for all the swine on the manor. While suckling pig is a tasty treat, it is not a terribly efficient use of a piglet. *temp sucklingPigs round(((sows + 70) * 12.05) - forest_acreage) *set slaughterPiglets -sucklingPigs *if slaughterPiglets < 0 *set sucklingPigs +slaughterPiglets *set newSows -sucklingPigs *set harvestPork +(sucklingPigs * 12) *page_break *set sows +newSows *set harvestPork +(slaughterPiglets * pigPorkYield) *set harvestPork * tithe *set harvestLeather +(slaughterPiglets * pigLeatherYield) *return *label tax_fishers *set taxFish (fisher_households * 750) *return *label tax_cottars *set taxEggs +((cottar_households * 5) * 25) *set taxWheat +(cottar_acreage * 1.5) *return *label tax_hvs *set taxEggs +((hv_households * 5) * 25) *set taxWheat +(hv_acreage * 1.5) *return *label tax_villeins *set taxEggs +((villein_households * 15) * 25) *set taxWheat +(villein_acreage * 1.5) *set taxPigs +(villein_households) *return *label tax_trades *set taxEggs + ((trade_households * 25) * 25) *set taxWheat + (trade_acreage * 1.5) *set taxPigs + (trade_households) *set taxWheels + (trade_households * (((((milkAnnualYield / 3) / 10) * cowBirthRate) * 0.2) * manor_efficiency)) *set taxCheese + (trade_households * ((((milkAnnualYield / 3) * cowBirthRate) * 0.2) * manor_efficiency)) *comment I guess the base tax rate is 20%? *set taxLambs + (trade_households * 0.8) *set taxWool + (((trade_households * 10) * 3.3) * 0.2) *return *label tax_yeomen *set taxEggs + ((yeoman_households * 25) * 25) *set taxWheat + (yeoman_acreage * 1.5) *set taxPigs + (yeoman_households) *set taxWheels + ((yeoman_households * 5) * (((((milkAnnualYield / 3) / 10) * cowBirthRate) * 0.2) * manor_efficiency)) *set taxCheese + ((yeoman_households * 5) * ((((milkAnnualYield / 3) * cowBirthRate) * 0.2) * manor_efficiency)) *set taxLambs + (((yeoman_households * 20) * 0.9) * 0.2) *set taxWool + (((yeoman_households * 10) * 3.3) * 0.2) *return *label cull_tax_livestock *temp taxEfficiency manor_efficiency *if taxEfficiency > 1 *set taxEfficiency 1 *set taxMutton ((taxLambs * lambMuttonYield) * taxEfficiency) *set taxPork ((taxPigs * pigPorkYield) * taxEfficiency) *set taxWool +((taxLambs * lambWoolYield) * taxEfficiency) *set taxLambskin ((taxLambs * lambskinYield) * taxEfficiency) *set taxLeather ((taxPigs * pigLeatherYield) * taxEfficiency) *return *label harvest_wheels *temp cheeseEfficiency ((tempHusbandEfficiency + tempDomEfficiency) / 2) *set harvestWheels (cows * (cowBirthRate * ((((milkAnnualYield / 3) * 2) / 10) * cheeseEfficiency))) *comment milkAnnualYield is 600, with 200 going towards wheels, 10 lbs ea. *comment however, for efficiency reasons, the demense isn't producing soft cheese, only hard. Therefore, 400 lbs / cow are going towards wheels. *set harvestWheels * tithe *set harvestWheels round(harvestWheels) *return *label harvest_wool *temp sheepEfficiency ((tempHusbandEfficiency + tempDomEfficiency) / 2) *set harvestWool +((sheep * 3.3) * sheepEfficiency) *set harvestWool * tithe *set harvestWool round(harvestWool) *return *label harvest_wheat *set harvestWheat ((((wheatAcres * wheatYield) * weather_index) * rat_calamity_index) * tempAgEfficiency) *if dovecote *temp dovecote_index 0 *if dovecote_level = 1 *set dovecote_index 1.02 *if dovecote_level = 2 *set dovecote_index 1.04 *if dovecote_level = 3 *set dovecote_index 1.08 *set harvestWheat * dovecote_index *if wheat_failure *set harvestWheat * 0.1 *if spring_wheat_failure or winter_wheat_failure *set harvestWheat * 0.55 *set harvestWheat * tithe *set harvestWheat - ((family_pop * 60) * tempDomEfficiency) *comment nobles consume 60 bushels wheat / year, or about a third of a serf family who gets half their calories from bread. This is separate from the family support index. REVISE? *set harvestWheat - ((servant_pop * 18) * tempDomEfficiency) *comment the servants consume maslin. 18 bu / servant is considering one servant as a little less than 1/5th of a serf family, and then the other half is made with rye. And this is about half of their calories. *set harvestWheat -((servant_pop * (18 / ryePrice)) * tempDomEfficiency) *comment this is the household trading with the peasants for rye for the servants' maslin. *return *label harvest_oats *set harvestOats (((oatAcres * oatYield) * weather_index) * tempAgEfficiency) *comment Initial Oat Harvest: ${harvestOats} *set harvestOats * tithe *comment *line_break *comment After Tithe: ${harvestOats} *set harvestOats - (warhorse * oatYield) *set harvestOats - (ridinghorse * (oatYield / 2)) *comment *line_break *comment After Warhorses: ${harvestOats} *set harvestOats - (oxen * oatYield) *comment *line_break *comment After Oxen: ${harvestOats} *comment oxen require a third of a bushel of oats a week throughout the working part of the year. Let's *set harvestOats round(harvestOats) *return *label harvest_barley *set harvestBarley (((barleyAcres * barleyYield) * weather_index) * tempAgEfficiency) *set harvestBarley * tithe *set harvestBarley -((warhorse * 4) * barleyYield) *set harvestBarley -((ridinghorse * 2) * barleyYield) *set harvestAle ((harvestBarley * 11) * 0.9) *set harvestBarley 0 *set harvestAle round(harvestAle) *return *label harvest_cabbage *set harvestCabbage (((cabbageAcres * cabbageYield) * weather_index) * tempAgEfficiency) *set harvestCabbage * tithe *set harvestCabbage round(harvestCabbage) *return *label harvest_squab *comment each mating pair will produce about 8 offspring a year (https://www.pigeoncontrolresourcecentre.org/html/dovecotes-pigeon-houses-columbaria.html) *comment *if dovecote_level = 1 *set harvestSquab (((200 * 8) * 0.9) * tempHusbandEfficiency) *comment the * 0.9 is to represent natural mortality replacement rate, also the monogamy of the birds *comment the 200 is number of mating pairs *set harvestSquab round(harvestSquab) *set harvestSquab -52 *comment weekly gift to the caris *if dovecote_level = 2 *set harvestSquab (((400 * 8) * 0.9) * tempHusbandEfficiency) *comment the * 0.9 is to represent natural mortality replacement rate *set harvestSquab round(harvestSquab) *set harvestSquab -52 *comment weekly gift to the caris *if dovecote_level = 3 *set harvestSquab (((400 * 8) * 0.9) * tempHusbandEfficiency) *comment the * 0.9 is to represent natural mortality replacement rate *set harvestSquab round(harvestSquab) *set harvestSquab -52 *comment weekly gift to the caris *return *label harvest_vegetables *set harvestVegetables (((vegetableAcres * vegetableYield) * weather_index) * tempAgEfficiency) *set harvestVegetables * tithe *temp pickleVegetables (harvestVegetables * 0.6) *set harvestVegetables - (family_pop * 4) *set harvestVegetables - (servant_pop * 2.5) *set harvestVegetables round(harvestVegetables) *return *label harvest_winter_squash *set harvestWinterSquash (((winterSquashAcres * winterSquashYield) * weather_index) * tempAgEfficiency) *set harvestWinterSquash * tithe *set harvestWinterSquash - (family_pop * 4) *set harvestWinterSquash - (servant_pop * 2.5) *set harvestWinterSquash round(harvestWinterSquash) *return *label harvest_summer_squash *set harvestSummerSquash (((summerSquashAcres * summerSquashYield) * weather_index) * tempAgEfficiency) *set harvestSummerSquash * tithe *set harvestSummerSquash - (family_pop * 4) *set harvestSummerSquash - (servant_pop * 2) *set harvestSummerSquash round(harvestSummerSquash) *return *label harvest_vetches *set harvestVetch (((vetchAcres * vetchYield) * weather_index) * tempAgEfficiency) *set harvestVetch * tithe *set harvestVetch round(harvestVetch) *return *label harvest_cider *set harvestCider ((((appleAcres * appleYield) * ciderYield) * weather_index) * tempAgEfficiency) *set harvestCider * tithe *set harvestCider - (family_pop * 25) *set harvestCider - (servant_pop * 5) *set harvestCider round(harvestCider) *return *label harvest_chestnuts *set harvestChestnuts (((chestnutAcres * chestnutYield) * weather_index) * tempAgEfficiency) *set harvestChestnuts * tithe *set harvestChestnuts - family_pop *set harvestChestnuts - (servant_pop * 0.25) *set harvestChestnuts round(harvestChestnuts) *return *label check_labor *comment *line_break *comment Labor Days original: ${laborDays} *set laborDays -(meadow_acreage * daysHay) *comment *line_break *comment Labor Days after mowing: ${laborDays} *set laborDays -(wheatAcres * daysGrain) *set laborDays -(oatAcres * daysGrain) *set laborDays -(barleyAcres * daysGrain) *comment *line_break *comment Labor Days after grains: ${laborDays} *set laborDays -(appleAcres * daysFruit) *set laborDays -(chestnutAcres * daysNut) *set laborDays -(vegetableAcres * daysVegetables) *set laborDays -(cabbageAcres * daysVegetables) *set laborDays -(winterSquashAcres * daysVegetables) *set laborDays -(summerSquashAcres * daysVegetables) *set laborDays -(vetchAcres * daysVetch) *comment *line_break *comment Labor Days after vegetables: ${laborDays} *set laborDays -(sheep * daysSheep) *set laborDays -((lambs + taxLambs) * daysLamb) *set laborDays -(oxen * daysOx) *set laborDays -(cows * daysCow) *set laborDays -(yearlings * daysYearling) *set laborDays -(sows * daysSow) *set laborDays -((piglets + taxPigs) * daysPig) *set laborDays -(harvestWheels * 2) *comment *line_break *comment Labor Days after animals: ${laborDays} *set laborDays -(taxEggs / 500) *set laborDays -(demense_acreage / 4) *comment the above is for fuel ie firewood *if dovecote *set laborDays -(dovecote_level * 5) *comment to clear out the guano and compost it *comment the pigeon-keeper would be separate *set maintenanceDays ((unusable_acreage + (pasture_acreage + (demense_acreage + meadow_acreage))) * 2) *set laborDays -maintenanceDays *if laborDays < 0 *set maintenanceDebt +(0 - laborDays) *set maintenanceDebt round(maintenanceDebt) *line_break You don't have enough work-days to do all the maintenance around the manor. There is a debt of ${maintenanceDebt} days. *return *label household_use *set taxEggs -(((family_pop * 5) * 369) * tempDomEfficiency) *set taxEggs -(((servant_pop * 1) * 369) * tempDomEfficiency) *set incomeBeef -((family_pop * 150) * tempDomEfficiency) *set incomeBeef -((servant_pop * 25) * tempDomEfficiency) *temp extraMutton 0 *if incomeBeef < 0 *set extraMutton -incomeBeef *set incomeBeef 0 *set incomeMutton -((family_pop * 100) * tempDomEfficiency) *set incomeMutton -extraMutton *temp extraPork 0 *if incomeMutton < 0 *set extraPork -incomeMutton *set incomeMutton 0 *set incomePork -((family_pop * 100) * tempDomEfficiency) *set incomePork -((servant_pop * 50) * tempDomEfficiency) *set incomePork -extraPork *temp extraFish 0 *if incomePork < 0 *set extraFish -incomePork *set incomePork 0 *set incomeWheels -(family_pop * 4) *set taxCheese -((family_pop * 0.15) * 369) *set taxCheese -((servant_pop * 0.03) * 369) *set incomeWool -(demense_sheep_needs * 3.3) *set taxFish -((family_pop * 1.5) * 369) *set taxFish -extraFish *if taxFish < 0 *bug not enough Fish! *if dovecote *set harvestSquab -((family_pop * 2) * 53) *return *label tempEffCalc *temp tempDomEfficiency (manor_efficiency + permDomEfficiency) *if annual_focus = "domestics" *set tempDomEfficiency +(domestics * 0.05) *temp tempHusbandEfficiency (manor_efficiency + permHusbandEfficiency) *if annual_focus = "livestock" *set tempHusbandEfficiency + (husbandry * 0.05) *temp tempAgEfficiency (manor_efficiency + permAgEfficiency) *if annual_focus = "agriculture" *set tempAgEfficiency + (agriculture * 0.05) *return *label saltNeed *temp saltNeed 0 *set saltNeed +((((wheatAcres * wheatYield) * tithe) * 0.7) * 0.02) *comment a rough approximation of the salt needed for bread. *set saltNeed +((taxEggs / 12) / 80) *comment one tsp salt per dozen eggs, 80 tsp to a pound of salt *set saltNeed +(pickleVegetables) *set saltNeed +harvestWheels *comment *set saltNeed butter *set saltNeed +(incomePork / 24) *set saltNeed +(incomeMutton / 24) *set saltNeed +(incomeBeef / 24) *set saltNeed +(taxFish / 24) *set saltNeed +(incomeLeather * 0.5) *set saltNeed +(incomeLambskin * 0.5) *set saltNeed / tempDomEfficiency *set saltNeed / 50 *set saltNeed round(saltNeed) *comment convert from lbs to bushels *return *label barrelNeed *temp barrelNeed 0 *set barrelNeed +(incomeMeat / 192) *comment 6 lbs to the gallon ; 32 gallons to the barrel *set barrelNeed +(taxFish / 192) *set barrelNeed +(taxEggs / 1152) *comment 36 eggs / gallon *set barrelNeed +(vetches / 256) *comment dry weight of 8 lbs / gallon *set barrelNeed +(cabbage / 120) *comment cabbage has lower weight-to-volume than meat *set barrelNeed +(pickleVegetables / 192) *comment similar to meat? *set barrelNeed +(cider / 32) *set barrelNeed +(harvestAle / 32) *set barrelNeed * 0.25 *comment useful life is four years? *set barrelNeed round((barrelNeed / manor_efficiency)) *return *label cageNeed *temp cageNeed 0 *set cageNeed (harvestSquab / 4) *set cageNeed * 0.2 *comment useful life is five years? *set cageNeed round((cageNeed / manor_efficiency)) *return *label merge_accounts *set incomeWheat round(taxWheat + harvestWheat) *comment *set oats +harvestOats *comment *set cider +harvestCider *comment *set chestnuts +harvestChestnuts *comment *set cabbage +harvestCabbage *comment *set winterSquash +harvestWinterSquash *comment *set winterSquash round(winterSquash) *comment *set vegetables +harvestVegetables *comment *set vetches +harvestVetch *set taxWheat 0 *set harvestWheat 0 *comment *set harvestOats 0 *comment *set harvestCider 0 *comment *set harvestChestnuts 0 *comment *set harvestCabbage 0 *comment *set harvestWinterSquash 0 *comment *set harvestVegetables 0 *temp incomeMutton ((deadMutton + taxMutton) + harvestMutton) *temp incomeBeef ((deadBeef + taxBeef) + harvestBeef) *temp incomePork ((deadPork + taxPork) + harvestPork) *set incomeWool ((deadSheepWool + taxWool) + harvestWool) *temp incomeLambskin (taxLambskin + harvestLambskin) *temp incomeLeather (taxLeather + harvestLeather) *temp incomeWheels (taxWheels + harvestWheels) *return *label livestock_mortality *temp deadSheep round(sheep * 0.15) *temp deadOxen round(oxen * 0.15) *if ox_slaughtered *set deadOxen -1 *temp deadCows round(cows * 0.1) *if cow_slaughtered *set deadCows -2 *temp deadSwine round(sows * 0.16) *set sheep -deadSheep *set oxen -deadOxen *set cows -deadCows *set sows -deadSwine *return *label livestock_mortality_display *if deadSheep > 0 ${deadSheep} sheep died this year. *line_break *if deadOxen > 0 ${deadOxen} ox@{(deadOxen > 1) en|} died this year. *if first_year and ox_slaughtered This is in addition to the ox you slaughtered at your father's funeral-feast. *if (first_year = false) and ox_slaughtered This is in addition to the ox you slaughtered for your unexpected guest. *line_break *if deadCows > 0 ${deadCows} dairy cow@{(deadCows > 1) s|} died this year. *if cow_slaughtered This is in addition to the cows you slaughtered for your unexpected guest. *line_break *if deadSwine > 0 ${deadSwine} sow@{(deadSwine > 1) s|} died this year. *temp deadMutton (deadSheep * sheepMuttonYield) *set deadMutton * tempHusbandEfficiency *temp deadBeef (deadCows * cowBeefYield) *set deadBeef +(deadOxen * oxenBeefYield) *set deadBeef * tempHusbandEfficiency *temp deadSheepWool (deadSheep * sheepWoolYield) *set deadSheepWool * tempHusbandEfficiency *temp deadBovineLeather (deadCows * cowLeatherYield) *set deadBovineLeather +(deadOxen * oxenLeatherYield) *temp deadPork (deadSwine * swinePorkYield) *set deadPork * tempHusbandEfficiency *temp deadSwineLeather (deadSwine * swineLeatherYield) *set deadLeather ((deadSwineLeather + deadBovineLeather) * tempHusbandEfficiency) *if ox_slaughtered *set deadLeather +oxenLeatherYield *if cow_slaughtered *set deadLeather +(cowLeatherYield * 2) *temp displayDeadLeather round(deadLeather) *comment TODO should there be a further discount on inadvertancy? Where the yield is simply unavailable? *temp displayDeadSheepWool round(deadSheepWool) *temp displayDeadMutton round(deadMutton) *temp displayDeadBeef round(deadBeef) *temp displayDeadPork round(deadPork) You harvested ${displayDeadSheepWool} pounds of wool, ${displayDeadMutton} pounds of mutton, ${displayDeadBeef} pounds of beef, ${displayDeadPork} pounds of pork, and ${displayDeadLeather} square feet of leather from these dead animals. *if ox_slaughtered *set ox_slaughtered false This includes the leather you collected from the ox you slaughtered for the feast. *if cow_slaughtered *set cow_slaughtered false This includes the leather you collected from the cows you slaughtered for the feast. *return Manor Acreage: ${manor_acreage} *line_break Farmland: ${farmland_acreage} *line_break Fen: ${fen_acreage} *line_break Forest: ${forest_acreage} *line_break Meadow: ${meadow_acreage} *line_break Pasture: ${pasture_acreage} *label leather_consump *temp leatherConsump 0 *set leatherConsump +oxen *set leatherConsump +(warhorse * 10) *set leatherConsump +(ridinghorse * 5) *set leatherConsump +(family_pop * household_support_index) *set leatherConsump +(servant_pop * 5) *set leatherConsump +demense_acreage *set leatherConsump / tempDomEfficiency *return *label move_to_stores *set cabbage +harvestCabbage *set harvestCabbage 0 *set cider +harvestCider *set harvestCider 0 *set leather +incomeLeather *set incomeLeather 0 *set barley +round(harvestBarley) *set oats +harvestOats *set harvestOats 0 *set vegetables +round(harvestVegetables) *set harvestVegetables 0 *set vetches +harvestVetch *set harvestVetch 0 *set wheels +incomeWheels *set harvestWheels 0 *set incomeWheels 0 *set taxWheels 0 *set wool +incomeWool *set wool round(wool) *set incomeWool 0 *set hay round(hay) *set winterSquash +harvestWinterSquash *set harvestWinterSquash 0 *set chestnuts +harvestChestnuts *set harvestChestnuts 0 *return *label feed_pigs *temp pigLbsNeeded ((sows + boars) * 1320) *comment Llbs Needed: ${pigLbsNeeded} *comment *line_break *label pigFeedCycle *if harvestVetch > 10 *temp vetchDiff (harvestVetch - 10) *set harvestVetch 10 *set pigLbsNeeded -(vetchDiff * 60) *if pigLbsNeeded <= 0 *return *if harvestCabbage > 20 *set harvestCabbage -10 *set pigLbsNeeded -(10 * 35) *if pigLbsNeeded <= 0 *return *if harvestVegetables > 40 *set harvestVegetables -20 *set pigLbsNeeded -(20 * 35) *if pigLbsNeeded <= 0 *return *if harvestWinterSquash > 40 *set harvestWinterSquash -20 *set pigLbsNeeded -(20 * 45) *if pigLbsNeeded <= 0 *return *if harvestSummerSquash > 60 *set harvestSummerSquash -20 *set pigLbsNeeded -(20 * 42) *if pigLbsNeeded <= 0 *return *if (harvestVetch <= 10) and ((harvestCabbage <= 20) and ((harvestVegetables <= 40) and ((harvestWinterSquash <= 40) and (harvestSummerSquash <= 60)))) Unfortunately, you've tried to keep too many new sows. *temp cullNewSows round(pigLbsNeeded / 1320) *if pigLbsNeeded > (cullNewSows * 1320) *set cullNewSows +1 You have to cull ${cullNewSows} more. *temp porkEfficiency manor_efficiency *if porkEfficiency > 1 *set porkEfficiency 1 *set incomePork +((cullNewSows * pigPorkYield) * porkEfficiency) *set incomeLeather +((cullNewSows * pigLeatherYield) * porkEfficiency) *set sows -cullNewSows You add their pork and leather to the harvest. *return *comment *line_break *comment Vetches: ${harvestVetch} *comment *line_break *comment Cabbage: ${harvestCabbage} *comment *line_break *comment Vegetables: ${harvestVegetables} *comment *line_break *comment Winter Squash: ${harvestWinterSquash} *comment *line_break *comment Summer Squash: ${harvestSummerSquash} *comment *line_break *comment pigLbsNeeded: ${pigLbsNeeded} *comment *page_break *comment *bug endless pig-feeding cycle *goto pigFeedCycle *label household_support *set logfix true *set log &"[n/]Next, you had to decide on the household budget: would you allow your family some small luxuries or not?" While you've fed your family and clothed the them in wool, there are many other costs related to being a thornet. You have to purchase fabrics for better clothes, replace furniture that breaks, better footwear than the thurnet's cobbler can make, the periodic visit from a scrivener, the odd delicacy and knick-knack…it adds up quickly. At minimum, this runs 40 bushels a person. However, such threadbare accomodations will lower your esteem in both the eyes of your tenants and in the eyes of any visitors you might have. *label set_household_support *gosub temp_can_adjust_support *choice #A threadbare lifestyle is acceptable to me. *if tone_down_living_expenses *set log & " you were forced to change to living a threadbare lifestyle." *if tone_down_living_expenses = false *set log & " @{logfix Y|y}ou elected to live a threadbare lifestyle." *set tone_down_living_expenses false *if household_support_index = 2 *set rep_gentry %-20 *set manor_morale %-5 *set household_support_index 1 *goto resolve_support *elseif household_support_index = 3 *set rep_gentry %-10 *set manor_morale %-10 *set household_support_index 1 *goto resolve_support *elseif household_support_index = 4 *set rep_gentry %-30 *set manor_morale %-15 *set household_support_index 1 *goto resolve_support *else *set rep_gentry %-40 *set manor_morale %-20 *set household_support_index 1 *goto resolve_support *label resolve_support *if just_changed_household_support *set logfix true *goto annual_choice *else *goto resolve_household_support *if (tone_down_living_expenses = false) *if (household_support_index != 2) #We can live modestly. *set log & " @{logfix Y|y}ou elected to live a modest lifestyle." *if household_support_index = 1 *set rep_gentry %+10 *set manor_morale %+5 *set household_support_index 2 *goto resolve_support *elseif household_support_index = 3 *set rep_gentry %-10 *set manor_morale %-5 *set household_support_index 2 *goto resolve_support *elseif household_support_index = 3 *set rep_gentry %-20 *set manor_morale %-15 *set household_support_index 2 *goto resolve_support *else *set rep_gentry %-30 *set manor_morale %-15 *set household_support_index 2 *goto resolve_support *if (household_support_index != 3) *selectable_if (can_adjust_support >= 3) #We don't have to live quite like our neighbors. *set log & " @{logfix Y|y}ou elected to live a modestly respectable lifestyle." *if household_support_index = 1 *set rep_gentry %+20 *set manor_morale %+10 *set household_support_index 3 *goto resolve_support *elseif household_support_index = 2 *set rep_gentry %+10 *set manor_morale %+5 *set household_support_index 3 *goto resolve_support *elseif household_support_index = 4 *set rep_gentry %-10 *set manor_morale %-5 *set household_support_index 3 *goto resolve_support *else *set rep_gentry %-20 *set manor_morale %-10 *set household_support_index 3 *goto resolve_support *if (household_support_index != 4) *selectable_if (can_adjust_support >= 4) #We can live like our neighbors. *set log & " @{logfix Y|y}ou elected to live a respectable lifestyle." *if household_support_index = 1 *set rep_gentry %+30 *set manor_morale %+15 *set household_support_index 4 *goto resolve_support *elseif household_support_index = 2 *set rep_gentry %+20 *set manor_morale %+20 *set household_support_index 4 *goto resolve_support *elseif household_support_index = 3 *set rep_gentry %+10 *set manor_morale %+5 *set household_support_index 4 *goto resolve_support *else *set rep_gentry %-10 *set manor_morale %-5 *set household_support_index 4 *goto resolve_support *if (choice_randomtest = false) and (tone_down_living_expenses = false) *if (household_support_index != 5) *selectable_if (can_adjust_support >= 5) #We can live better than our neighbors. *set log & " @{logfix Y|y}ou elected to live a very respectable lifestyle." *if household_support_index = 1 *set rep_gentry %+40 *set manor_morale %+20 *set household_support_index 5 *goto resolve_support *elseif household_support_index = 2 *set rep_gentry %+30 *set manor_morale %+15 *set household_support_index 5 *goto resolve_support *elseif household_support_index = 3 *set rep_gentry %+20 *set manor_morale %+10 *set household_support_index 5 *goto resolve_support *else *set rep_gentry %+10 *set manor_morale %+5 *set household_support_index 5 *goto resolve_support *label resolve_household_support *set just_changed_household_support false *set incomeWheat -((40 * household_support_index) * family_pop) *if knight_hired *set incomeWheat -knight_support *if karol_support = 20 *set incomeWheat -20 *if squire != "" *set incomeWheat -squire_support *return *label temp_can_adjust_support *temp can_adjust_support 0 *if ((incomeWheat > ((3 * family_pop) / trade_efficiency)) or (manor_liquid > 1500)) *set can_adjust_support 3 *if ((incomeWheat > ((4 * family_pop) / trade_efficiency)) or (manor_liquid > 2000)) *set can_adjust_support 4 *if ((incomeWheat > ((5 * family_pop) / trade_efficiency)) or (manor_liquid > 2500)) *set can_adjust_support 5 *return