Mythbusters: Cows are not killed by the Cow Quest!

正在查看此主题的用户

Aeon221

Sergeant at Arms
Alright, so everyone knows that, over time, cows go extinct. But why?

Is it because of the cow quest?

插入代码块:
(else_try), ###COWQUEST
	          (eq, ":quest_no", "qst_deliver_cattle"),
	          (try_begin),
	            (is_between, ":giver_center_no", villages_begin, villages_end),
	            #The quest giver is the village elder
	            (party_get_slot, ":num_cattle", ":giver_center_no", slot_village_number_of_cattle),
	            (lt, ":num_cattle", 50),
	            (assign, ":quest_target_center", ":giver_center_no"),
	            (store_random_in_range, ":quest_target_amount", 5, 10),
	            (assign, ":quest_expiration_days", 30),
	            (assign, ":quest_dont_give_again_period", 20),
	            (assign, ":result", ":quest_no"),
	          (try_end),

Nope! The game checks "(lt, ":num_cattle", 50)," to see if there are lless than 50 cattle, but  checking to see if there are fewer than 50 cattle is not the same thing as saying "(assign, ":num_cattle", 0)", which would assign the variable ":num_cattle" to zero. So we can say for a fact that the cow quest does not delete cows.

Nor does delivering them!

插入代码块:
(try_begin),
          (party_slot_eq, ":party_no", slot_party_type, spt_village),
          (party_get_slot, ":village_cattle_amount", ":party_no", slot_village_number_of_cattle),
          (val_add, ":village_cattle_amount", ":num_added"),
          (party_set_slot, ":party_no", slot_village_number_of_cattle, ":village_cattle_amount"),
        (try_end),

Nor does buying them!

插入代码块:
 (party_get_slot, ":num_cattle", ":village_no", slot_village_number_of_cattle),
      (val_sub, ":num_cattle", ":amount"),
      (party_set_slot, ":village_no", slot_village_number_of_cattle, ":num_cattle"),
      (store_mul, ":cost", ":single_cost", ":amount"),
      (troop_remove_gold, "trp_player", ":cost"),

So where are they going?!

Perhaps they are being made into leather, meat, and other fine cattle byproducts?

插入代码块:
#Cattle products	###COWSTUFF
		(else_try),
			(eq, ":cur_good", "itm_cattle_meat"), #Demand = 5
			(party_get_slot, ":base_production", ":center_no", slot_center_head_cattle),
			(val_div, ":base_production", 9),
		(else_try),
			(eq, ":cur_good", "itm_dried_meat"), #Demand = 15
			(party_get_slot, ":base_production", ":center_no", slot_center_head_cattle),
			(val_div, ":base_production", 3),
		(else_try),
			(eq, ":cur_good", "itm_cheese"), 	 #Demand = 10
			(party_get_slot, ":base_production", ":center_no", slot_center_head_cattle),
			(val_div, ":base_production", 4),
		(else_try),
			(eq, ":cur_good", "itm_butter"), 	 #Demand = 2
			(party_get_slot, ":base_production", ":center_no", slot_center_head_cattle),
			(val_div, ":base_production", 20),
			
		(else_try),
			(eq, ":cur_good", "itm_raw_leather"), 	 #Demand = ??
			(party_get_slot, ":base_production", ":center_no", slot_center_head_cattle),
			(val_div, ":base_production", 6),
			(party_get_slot, ":sheep_addition", ":center_no", slot_center_head_sheep),
			(val_div, ":sheep_addition", 12),
			(val_add, ":base_production", ":sheep_addition"),
			
		(else_try),
			(eq, ":cur_good", "itm_leatherwork"), 	 #Demand = ??
			(party_get_slot, ":base_production", ":center_no", slot_center_tanneries),
			(val_mul, ":base_production", 20),

No. As you can clearly see, the number of cattle in the slot is checked, but not modified in any way.

So, cows are disappearing! And not because of mistakes in the code, or from their use as an industrial input!

Hey, where do cows come from, anyway?

插入代码块:
(store_random_in_range, ":random_cattle", 35, 65),
        (party_set_slot, ":village_no", slot_center_head_cattle, ":random_cattle"),

Oh. Is that the only place? Does that only run once? Looks like yes to both.


Now, I feel that this is some pretty conclusive proof. But there are tens of thousands of lines of code in there, and I only found the ones I did by searching. And I also didn't find the script that goes into detail about the process of raiding with respect to cows. So, I can't say with one hundred percent accuracy that cows aren't being destroyed by the cow quest, and are instead being wiped out by raiding, and that the fixed number of cows throughout the game is the other big problem.

Do I know for a fact that cows don't have another originating source? No, but I do know that I looked for all instances of the slot_center_head_cattle and slot_village_number_of_cattle, and I didn't find one. And since you need to modify those to modify the number of cattle in a village, it's unlikely that new cattle are being born.

So, that's what I found today!
 
Cows do get deleted by the cow quest. See nijis' answer here:

http://bugs.taleworlds.com/edit_bug.aspx?id=2830


If I got it right the code currently instead of adding the cattle you bring to the existing herd sets the new size of the herd to the amount of cattle you bring. So if the village had 100 cows and you bring 7 they won't have 107 as they should but only 7.

But yeah, there might be a problem with villages' ability to regenerate their herd after raids and such, too.
 
Except that there's the line

(val_add, ":village_cattle_amount", ":num_added"),

Which adds

":village_cattle_amount" to ":num_added"

where

":village_cattle_amount" is defined as the number of cattle in the slot_village_number_of_cattle of the village ":party_no"

and

":num_added" is defined as either the number of cattle you brought (if it's less than or equal to the current requirement) or the current requirement (if you brought more cattle than they need).

Which makes it very unlikely that the current cattle in the village is being set to the number of cattle you brought, unless the party_get_slot() call on the slot_village_number_of_cattle is itself faulty, and defaults to zero for whatever reason.

 
Well, I'm speaking from experience. I've done lots of cattle quests, some of those at one single village which I carefully monitor. That village's initial herd disappeared when I first accepted the quest and since then they ask me to bring cattle every few weeks which I always do. Then their herd defaults to the number of cattle I had to bring them during the latest quest. It doesn't add up at all. If they had 9 cattle from a former quest and I'm asked to bring 7 this time then their herd will go down to 7 from 9 not up to 16. I've brought them at least 50 cattle so far and they are at 9 currently which is as much as I brought them during the last quest.

This is in v1.113 though.
 
Huh, well the module system I'm staring at is from 1.126, and there's definitely nothing in there that indicates that questing is the problem.

Cows not regenerating, yes, but not questing.
 
I believe when the problem was first notice and talked about on the forum, most were still using 1.125?  I'm not sure if 1.126 had even been implemented?
In which case, what you're looking at may TW's response in fixing the problem.
But the problem with it was that the game wouldn't give you the quest if and only if there were less than 50 cows e.c.t.  They would give you the quest when there were 100 cows, and there would continue to be 100 cows, unless you accepted the quest, at which point there were no cows.  Like I said.  This is as far as 1.125.  I haven't done a cow quest in 1.126 yet myself.
Has anyone tried yet, to be able to verify?
 
The cow reset came in the dialog section which resolved the quest. Hence, by the time you get to the scripts, it's too late.

Cattle population growth is in simple_triggers.
 
Okay, I'm even more clueless now.

I patched up to v1.126 yesterday and started a new game. It's very early on in the game and yet again I've already bumped into a village having zero cattle.

I carefully avoided cattle quests, never accepted any. Still the village of Chaeza (near Jelkala) has zero cattle on frigging Day 25 in the game. I've kept a savegame from Day 13 and went back to check it. The village had 42 cattle that day. Only 12 days later they have zero. The village has never been looted so far either so I'm totally clueless as to what caused their herd to disappear over a few days. Is this normal behaviour?
 
Thorkel 说:
Okay, I'm even more clueless now.

I patched up to v1.126 yesterday and started a new game. It's very early on in the game and yet again I've already bumped into a village having zero cattle.

I carefully avoided cattle quests, never accepted any. Still the village of Chaeza (near Jelkala) has zero cattle on frigging Day 25 in the game. I've kept a savegame from Day 13 and went back to check it. The village had 42 cattle that day. Only 12 days later they have zero. The village has never been looted so far either so I'm totally clueless as to what caused their herd to disappear over a few days. Is this normal behaviour?
If you decide to fully loot a village, you'll steal their things and also their herds. The issue is that cattle is nigh-useless; the only real place to put fresh Beef en masse is in your wife-freezer or a garrison's storage chest; it's otherwise useless as you can't cure the meat and, of course, it spoils./
 
Let me quote myself:

"The village has never been looted so far..."


The herd just magically disappeared. No cattle quest, no looting, no nothing.
 
后退
顶部 底部