Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
veritechc
Junior Member
 
Join Date: Jul 2008
Posts: 10

Old February 1st, 2012, 12:25 PM
Carrier wing Validation

I need to make a validation of fighter wings, called Fleet Wings, on any ship that can carry those wings.

Rules:

Any ship that carries wings has a Fleet Wing rating (FW)

That ship can have that number of wings or none.

If it does take wings it must have all the same kind of wings.

As far as I can tell I need a validation rule that looks at the FW rating of the ship and allows no wings to be a valid condition.

It also has to look at the FW rating and have that number of wings as valid.

Lastly it has to check the winds added and make sure they are all of the same type.

It would be useful if when you added wings it automatically added wings that were equal to the FW rating.

Here is the link to a minimal set of rules that anyone can download to help me with this.
http://www.theblackocean.com/resourc...estormtest.zip

Thank you for your help!
veritechc is offline   #1 Reply With Quote
Garfunkel
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Grenoble, France
Posts: 167

Old February 2nd, 2012, 04:13 AM
Hello,

If I understand your need, the ship can have 0 or its Fleet Wing rating number of the same type of wings.


Did you try an option with Incr and size min/max settings ?

For this :
1. Create a group wingsNb with tags:1, 2, 3, 4, ...

2. Create an option with EVAL Script:
var val as number
var sel as string
sel = "wingsNb." & selection
val = unit.assignstr[sel]

SIZE Script:
@minimum = tagvalue[wingsNb.?]
@maximum = tagvalue[wingsNb.?]

with a CANDIDATE script filled with the wings type and * in child entity.


3. Link the option to every ship with both Incr and Max set to the Fleet Wing rating.

Quote:
Originally Posted by .def
<group id="wingsNb" width="5" name="Wings Number">
<value id="0"/>
<value id="1"/>
<value id="10"/>
<value id="2"/>
<value id="3"/>
<value id="4"/>
<value id="5"/>
<value id="6"/>
<value id="7"/>
<value id="8"/>
<value id="9"/>
</group>
Quote:
Originally Posted by .dat
<option id="AAShip" name="SHIPPPPPP" abbrev="" category="addships" priority="0" cost="0" unit="*">
<evaluate><![CDATA[var val as number
var sel as string
sel = "wingsNb." & selection
val = unit.assignstr[sel]]]></evaluate>
<sizelimit>@minimum = tagvalue[wingsNb.?]
@maximum = tagvalue[wingsNb.?]</sizelimit>
<candidate>validation.wings</candidate>
</option>
Link template for a Fleet Wing rating of 4:
Quote:
Originally Posted by .dat
<link option="AAShip" rangemax="4" rangeincr="4" index="0"></link>

The user can choose only one type of wings, and it is automaticaly set to the Fleet Wing rating number.

NOTE : If you can have 0, 1, 2, ..., Fleet Wing rating wings, just remove the Incr from the previous template.

Hope This helps,

Frédéric
Garfunkel is offline   #2 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 03:25 AM.


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