View Single Post
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old February 10th, 2016, 12:34 PM
This looks to be an unexpected consequence of how the "ChildCost" script works. As described in the documentation:

Quote:
The ChildCost script is only ever invoked when the entity is being added as a child.
Normally, the ChildCost script is only invoked once - right after the unit is added. That means when you're initially building the roster, you add the "advanced sensors" item, the ChildCost script runs once, finds the "be cheaper" tag is already on the unit, and reduces its cost appropriately.

However, when you load the saved roster, the ChildCost script is running during load, before the script on the "TIE/x1" item has run, and thus before it's added the "be cheaper" tag. So when the script runs, the tag isn't there, and the cost isn't reduced properly.

(There's actually another way to trigger the ChildCost script to run - hit the "Change Roster Settings" button, then hit "OK" without changing anything. This triggers a "global update" which re-runs the script, which can now see the tag and calculate things correctly. But obviously this isn't something you want to have to do every time you load the roster.)

I think I can fix this by forcing an additional "global update" after the roster loads, which seems like the most expedient way to fix this problem. I'll try to get a beta built sometime next week to fix this, so we can test this out before putting out the general release.

Thanks for the bug report!
Colen is offline   #4 Reply With Quote