• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Need some expert assistance on a complex situation (long pos

  • Thread starter Thread starter Randel.Clawson at CTBTO.o
  • Start date Start date
R

Randel.Clawson at CTBTO.o

Guest
OK gang, I'm working on some data files for BFG (yes, I know about the files already available but I have reasons for creating my own) and I've come across a snag in my glorious plan for modelling escort ship squadrons.

Here's a visual example of what I've got so far:

++Example 1++
## Hts Spd Trn Shd Arm Trt Ldr
Escort Squadron 1 - - - - - -
+Iconoclasts+ 2 1 30cm 90° 1 4+ 1 -
+Infidels+ 2 1 30cm 90° 1 5+ 1 -
+Idolators+ 2 1 30cm 90° 1 5+ 2 -
Weapons battery 30cm - 3 - Left/Front/Right
Weapons battery 30cm - 2 - Left/Front/Right
Torpedos 30cm - 2 - Front
Lance battery 30cm - 1 - Front
Weapons battery 45cm - 2 - Left/Front/Right

Now a bit of explanation:

The 'Escort Squadron' is the unit that actually appears in the list of 'Available Units'. I've modelled the above because it's the most elegant solution when you 1) want to assign a name to the squadron and 2) you want to allow the Escort Squadron to serve as a 'header' for all escorts purchased for the squadron. Please note that the Ldr stat is intentionally blank (that stat is rolled just before the game).

The Iconoclasts, Infidels and Idolators are specific types of escort that are added to the squadron as children via 3 separate options and the 'unit' attribute for each option. An Escort Squadron must consist of a minimum of 2 and a maximum of 6 escorts in any combination of the these 3 types (2 Iconoclasts ~or~ 3 Iconoclasts and 3 Infidels, etc.).

The various weapons are added through 'Incl' options, with the options themselves having 'apnd' and 'invs:nodisplay' (I have a reason for this last one) as attributes.

Now I'll get to the problems I'm having. To help, here's a visual example of what I'm actually aiming for:

++Example 2++
## Hts Spd Trn Shd Arm Trt Ldr
Escort Squadron 1 - - - - - -
+Iconoclasts+ 2 1 30cm 90° 1 4+ 1 -
Weapons battery 30cm - 3 - Left/Front/Right
+Infidels+ 2 1 30cm 90° 1 5+ 1 -
Weapons battery 30cm - 2 - Left/Front/Right
Torpedos 30cm - 2 - Front
+Infidels+ 2 1 30cm 90° 1 5+ 1 -
Lance battery 30cm - 1 - Front
Weapons battery 45cm - 2 - Left/Front/Right

Problem #1. How to get the weapons for each type of escort to appear under the escort entry that has been added as a child unit? Please note that in Example 1 the weapons appear in the correct order for each escort (they're all sorted by option category, so that lances come before weapons and longer ranges appear before shorter, etc.), they've all just been lumped together at the end.

Problem #2. Ship limits. I want to allow any combination of the 3 ships that doesn't exceed 6 ships in total but I can't seem to find the right combination of attributes to use for this when the ships are added as options.

Any assistance would be greatly appreciated!

Cheers,
Randel
------------------
Randel's BFG Stuff
http://www.madtexan.com/BFG/index.html

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/IMSolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, email

armybuilder-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
 
At 11:36 AM 8/18/2003 +0200, you wrote:

> ## Hts Spd Trn Shd Arm Trt Ldr
>Escort Squadron 1 - - - - - -
> +Iconoclasts+ 2 1 30cm 90° 1 4+ 1 -
> Weapons battery 30cm - 3 - Left/Front/Right
> +Infidels+ 2 1 30cm 90° 1 5+ 1 -
> Weapons battery 30cm - 2 - Left/Front/Right
> Torpedos 30cm - 2 - Front
> +Infidels+ 2 1 30cm 90° 1 5+ 1 -
> Lance battery 30cm - 1 - Front
> Weapons battery 45cm - 2 - Left/Front/Right
>
>Problem #1. How to get the weapons for each type of escort to appear under
>the escort entry that has been added as a child unit? Please note that in
>Example 1 the weapons appear in the correct order for each escort (they're
>all sorted by option category, so that lances come before weapons and
>longer ranges appear before shorter, etc.), they've all just been lumped
>together at the end.

I'm afraid that, as far as I know, this is impossible using options. :(

The 'apnd' attribute always appends options to the end of the unit. This
was originally done so that if I have 4 different child units with bolters,
the Bolter option only appears once at the end.

If you want the weapons to appear under every ship, you'll have to use
items to model them.

>Problem #2. Ship limits. I want to allow any combination of the 3 ships
>that doesn't exceed 6 ships in total but I can't seem to find the right
>combination of attributes to use for this when the ships are added as options.

The only way I can think of to do this is to define a hidden statistic, for
the sake of argument called 'MaxSize'. Set the "Escort Squadron" unit to
have a MaxSize of 6, and define a stat comparison using lcmp (unit external
attribute) that makes sure that MaxSize is always >= 0. Then, have each of
the child units (Iconoclasts, Infidels, etc etc) decrease the MaxSize of
their parent (prnt option attribute, I think) by 1. Thus, if you ever have
a negative MaxSize, there will be 7 or more models in the unit, making it
illegal, and an appropriate validation message can be displayed.


--
Colen McAlister (colen@wolflair.com)
Lone Wolf Development www.wolflair.com



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/IMSolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, email

armybuilder-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
 
Back
Top