Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder
Register FAQ Community Today's Posts Search

Notices

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

Old April 28th, 2014, 02:52 PM
I'm a first time data author, so my apologies if this is obvious.

I have a number of different item types that certain units can select, so I put in place list selection (which adds new linked children) for each category of item. In most cases, you can only select 1 of the given item type (I use exclusion lists tied to a private stat for each item category that gives the maximum items of that type that can be taken).

Certain units though, can take 2 of certain categories. Now the lists work and whatnot, that's not the issue. The issue is that while the list selection grays out when you max out your selection of that item category I would rather have an info text above each list selector that tells you have many more you can select so that it is obvious for those units that can take 2+ from a category.

Now I can get the info only text to display in the upgrade pane (I used the example shown in the ab kit documentation), but I couldn't get the number that it displays to update as I select items. I had been using another private stat to track the current number of items from that category selected and had any item selected increment that count. I would then use that stat and the max allowed stat to show an amount remaining.

What do I need to do to get the above solution to work right?

Is there a way to do this without needing a private stat tracking the current number of items selected from the category?

Any help is appreciated.

Thanks!

My code doesn't have bugs; it has undocumented features!
AntaresCD is offline   #1 Reply With Quote
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old April 30th, 2014, 12:42 PM
Hi Antares

you will need a private stat to track these and link this to an exclusion then some script in an option to change colour on the header to show the limit has been exceeded.

You can see examples of this in the 40k file, WFB file and also in the Judge Dredd file.

I'm not sure where the options are to link things in the other files but to have a look in the JDMG file to assist:

JudgeDredd.def:
Unit stat > usCredits
Exclusions > excl_cr

generalJDMG.dat:
Options > gnHdrCost (see Cost script)
Linkset > lsArmour (all options have cost of option set against excl_cr using $ special character and has gnHdrCost in it, display priority needs to be low i.e. 0 so it shows at top of list but actual Priority needs to be last in all options so it is activated after everything else)

citizens.dat:
cdCitiDS (Citi-def soldier) - has private stat set to 50 and has link sets associated

The combination of the above means that the cdCitiDS has private stat set to 50, the link set links the options to this. When the user selects an option the special character $ puts the cost of the option against the exclusion. The exclusion then restricts all the options that exceed the cost of the option if the private stat is lower. The Cost script checks the amount in the private stat against the usage of the exclusion, if one is lower than the other then the text is changed to red to alert the user

Hope that helps!! (I always found that having examples to look at helped more than trying to explain it!)

My own Warlord Games gallery and the home of the Warlord Games datafiles:

http://www.facebook.com/ABDataFileWarlordGames
Harkan_again is offline   #2 Reply With Quote
AntaresCD
Senior Member
Volunteer Data File Author
 
Join Date: Oct 2011
Posts: 121

Old April 30th, 2014, 12:58 PM
I already have an exclusion working. All the items go into specific item slots and the key worry for me is that a few units have multiple of some of the item slots.

The issue I was having was when I tried to have an info option (like say the one in Warhammer Fantasy 8 that shows item points allowable for magic items). I couldn't get the info line to work (I use the resource pool example in the ab kit guide as my example) as it always displayed the max slots, not what I had left.

I'll look through the data files you mentioned though, thanks.

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


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 02:34 PM.


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