Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder

Notices

Reply
 
Thread Tools Display Modes
AntaresCD
Senior Member
Volunteer Data File Author
 
Join Date: Oct 2011
Posts: 121

Old January 15th, 2015, 08:39 PM
Here's the situation:
-I have a set of items that are options for a unit.
-Said options are collected into a set using the candidate tag expression.
-I have a separate option, that if selected makes all of the previously mentioned options cheaper by a set amount (but no cheaper than a cost of 0).

What I want:
-To have the updated costs shown in the unit options pane.
-To have the updated costs shown in the output.
-To have the updated costs show in the selection window.

I have managed to get the first two by using a pre-link on the special option to assign a tag to the parent that is then checked for in the pre-link script of all the options that can have their cost reduced. Unfortunately, when the cost is reduced to 0, it doesn't show 0, it has no cost displayed. Also the selection screen shows the original costs.

I have a feeling that nothing short of overrides will adjust what is displayed in the selection screen (and overrides will not work here since I need entity level tags, not global tags), but maybe someone can point out a way.

Ideally, I wanted to put this in once (as opposed to doing it for all affected items), but the cost script for the option that gathers up the items into a set didn't work out for me.

I can live with the solution I have if I could get it to actually display the cost of 0 in the unit options on the side (non-zero values display properly) since other than this one quibble it reflects correctly in the output and unit options (I can live without it showing the new cost in the selection pane if that can't be done).

Thanks,

~Antares

My code doesn't have bugs; it has undocumented features!
AntaresCD is offline   #1 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old January 16th, 2015, 03:34 PM
I think you can do what you want by defining a childcost script on the items that are affected ("Chldcst" button at the top-right-ish of the item tab)? You should be able to test tags on the parent from there, and adjust the cost appropriately, *plus* the text displayed for that cost.
Colen is offline   #2 Reply With Quote
AntaresCD
Senior Member
Volunteer Data File Author
 
Join Date: Oct 2011
Posts: 121

Old January 21st, 2015, 09:40 AM
Thanks, I'll give it a shot tonight. I didn't see that particular script discussed in the documentation. I'll give an update on whether or not it worked.

My code doesn't have bugs; it has undocumented features!
AntaresCD is offline   #3 Reply With Quote
AntaresCD
Senior Member
Volunteer Data File Author
 
Join Date: Oct 2011
Posts: 121

Old January 21st, 2015, 06:48 PM
So, update time:

Setting a Chldcst script for each affected item did work overall:
-The updated cost is shown in the selection screen.
-The updated cost is shown in the roster view/output.
-The updated cost shows correctly in the unit options if the cost is non-zero.

It looks like no matter which way you adjust the cost of an item (and I tried several), if the item's cost is adjusted to 0, it will show with a blank cost (instead of a 0). This is inconsistent with the functionality elsewhere so I would call it a (minor) bug.

Do you think that this will be fixed in the future?

Obviously for now this is workable, but it does stand out among a list of items that are showing their cost.

Colen, if you need concrete data to reproduce, PM me and I'll send/show you how to cause this behavior.

~Antares

My code doesn't have bugs; it has undocumented features!
AntaresCD is offline   #4 Reply With Quote
AntaresCD
Senior Member
Volunteer Data File Author
 
Join Date: Oct 2011
Posts: 121

Old January 21st, 2015, 10:09 PM
Hmm, I went back and looked at some of my pre-existing options since I had 1 or 2 that had a cost of 0. Looks like a natural cost of 0 causes a blank cost as well. Never noticed that before until this particular event made them stand out.

My code doesn't have bugs; it has undocumented features!
AntaresCD is offline   #5 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:02 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.