Bug #8369

4X Worker Yard not processing BDMT

Added by V453000 almost 3 years ago. Updated almost 3 years ago.

Status:NewStart date:2016-11-13
Priority:UrgentDue date:
Assignee:Sylf% Done:

0%

Category:-
Target version:-

Description

I don't know if it is doing something with it, but it does not consume it even when food is delivered. Some shit is borked.

Happens both on pro zone and on welcome server.

Please have a look into it. <3

Associated revisions

Revision 334:0a840c6821e8
Added by Sylf almost 3 years ago

Working on issue #8369

History

#1 Updated by V453000 almost 3 years ago

  • Description updated (diff)

#2 Updated by V453000 almost 3 years ago

from IRC

[10:17] <@V453000> http://dev.openttdcoop.org/projects/yeti/repository/entry/src/production_callbacks.pnml
[10:23] <Lejving> hmm hmm interesting
[10:52] <Lejving> line 185: STORE_TEMP( ( waiting_cargo_2 == 0 ) ? 0 : min((LOAD_TEMP(0x15) / POPULATION_BONUS_PERCENT * 256 / LOAD_TEMP(0x17) ), waiting_cargo_1 ), 0x13 ),
[10:53] <Lejving> 0x13 should be 0x11
[10:53] <Lejving> a wild guess....
[10:57] <@V453000> tell Sylf :)
[10:57] <@V453000> http://dev.openttdcoop.org/issues/8369
[10:57] <@V453000> or just write it there
[11:01] <Lejving> V453000, this game is based on town pop right?
[11:01] <Lejving> the worker yard
[11:02] <Lejving> not delivered pax, not delivered mail, not tired yeti, not super simple mode, right?
[11:02] <@V453000> the production of yetis should be
[11:02] <@V453000> bdmt consumption on building count
[11:02] <Lejving> ok then it might actually be that line
[11:03] <Lejving> because the line before it uses 0x12 wich is FOOD on //food consumed and 0x11 is BDMT but it uses 0x13 which is yetis
[11:03] <Lejving> thus not updating the BDTM consumed
[11:03] <Lejving> is my wild guess
[11:05] <Lejving> and on the "but it has worked before?!" question I say: my guess is yeti hasn't been used with this mode in a while
[11:05] <Lejving> and the other modes works fine
[11:05] <Lejving> but shrugs

#3 Updated by Lejving almost 3 years ago

LINE 185 in production_callbacks.pnml:
STORE_TEMP( ( waiting_cargo_2 0 ) ? 0 : min((LOAD_TEMP(0x15) / POPULATION_BONUS_PERCENT * 256 / LOAD_TEMP(0x17) ), waiting_cargo_1 ), 0x13 )

change to:
STORE_TEMP( ( waiting_cargo_2 0 ) ? 0 : min((LOAD_TEMP(0x15) / POPULATION_BONUS_PERCENT * 256 / LOAD_TEMP(0x17) ), waiting_cargo_1 ), 0x11 )

Based on:

  • TEMP Variables used:
  • 0x11 - amount of building materials consumed
  • 0x12 - amount of food consumed
  • 0x13 - number of YETI produced

Line 183:
STORE_TEMP( min( ( LOAD_TEMP(0x14) / POPULATION_BONUS_PERCENT * 256 / LOAD_TEMP(0x17) ), waiting_cargo_2 ), 0x12 ),

Last number is 0x12 in line 183, which is food consumed. Last number on line 183 is yeti produced, which I think should be 0x11 instead which should be building materials consumed.

This is a incredibly wild guess, but worth a try imo.

//Lejving

Also available in: Atom PDF