You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a bug when units_always_have_upgrades is activated and the maxUpgrad option is used with either a locked items or starting units: the quantity of an upgrade that was reduced with maxUpgrad is ignored.
E.g.: Start unit Marauder. MaxUpgrade=3. Only one stim upgrade should have been kept but it is reintroduced in the "# Locking associated items for items that have already been placed when units_always_have_upgrades is on".
Another example is with Hellion locked and MaxUpgrade=3. With the seed 9490178312856908139 applied to the linked yaml, we have four upgrades:
Hellbat Aspect (Hellion) (Player 1)
Jump Jets (Hellion) (Player 1)
Progressive Stimpack (Hellion) (Player 1)
Progressive Stimpack (Hellion) (Player 1)
I think I found a solution. In short, keep in memory the quantity of upgrades before locking:
# Unit upgrades, lock all levels
# item_quantity = inventory.count(item)
# for _ in range(item_quantity):
for _ in range(inventory.count(item)):
inventory.remove(item)
if item not in locked_items:
# Lock all the associated items if not already locked
# for _ in range(item_quantity):
for _ in range(get_item_quantity(item)):
locked_items.append(copy_item(item))
What happened?
I have found a bug when units_always_have_upgrades is activated and the maxUpgrad option is used with either a locked items or starting units: the quantity of an upgrade that was reduced with maxUpgrad is ignored.
E.g.: Start unit Marauder. MaxUpgrade=3. Only one stim upgrade should have been kept but it is reintroduced in the "# Locking associated items for items that have already been placed when units_always_have_upgrades is on".
Another example is with Hellion locked and MaxUpgrade=3. With the seed 9490178312856908139 applied to the linked yaml, we have four upgrades:
Hellbat Aspect (Hellion) (Player 1)
Jump Jets (Hellion) (Player 1)
Progressive Stimpack (Hellion) (Player 1)
Progressive Stimpack (Hellion) (Player 1)
dsa_sc2.yaml.txt
With seed = 32955254312027006217 and removing "Hellbat Aspect (Hellion)" for the locked items, Marauder has 4 upgrades.
What were the expected results?
Only three ugrades per unit.
Software
Local generation
The text was updated successfully, but these errors were encountered: