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
brentil
Junior Member
 
Join Date: Mar 2015
Posts: 20

Old March 12th, 2015, 09:41 PM
Game Rule = You can choose a special character to pilot a vehicle but you can only ever pick that special character once. There are multiple special characters to choose from too. The first image below shows the squadron with their units and I've clicked the special character Ben Dixon twice.

I followed the instructions from the How To Guide on "Designing a Rule" as it covers making a General you can only have one of in an army. I've made the ability to add a special character an option and in their eval script I assign the unique tag to that special character.

Code:
var result as number
result = unit.assign[uedfCharac.benDixon]
I then set a rule following the guide to tagcount that tag. The rule is unique and has a Message set.

Code:
if (tagcount[uedfCharac.benDixon] < 2) then
    @valid = 1
endif
Well it didn't work. Loading the Debug Tags I could see each unit with the Ben Dixon name also now had the tag for him. So I added debug scripts to both locations and I'm not seeing the ones in the Rule fire off ever. So I set the rule to @valid = 0 so it should have triggered but it never did then either.

What am I doing wrong?
Attached Images
File Type: png Capture2.PNG (81.3 KB, 7 views)
brentil is offline   #1 Reply With Quote
etthui
Junior Member
 
Join Date: Feb 2015
Posts: 14

Old March 13th, 2015, 03:30 AM
Hi, try to check if your tag is global or an accrued tag;

Also try to see if the rule is "ignored", it's basic, yes, but it happened to me so... Also, try to see if your rule is in the ruleset & context that is currently in use. Could be one of the reasons that the rule isn't triggered.
You may also want to check the scope of your rule, and that it's set on the correct scope ( As I understood, for the roster- as there is only one character per roster).
Hope it helps !
etthui is offline   #2 Reply With Quote
brentil
Junior Member
 
Join Date: Mar 2015
Posts: 20

Old March 13th, 2015, 12:53 PM
I just looked, the rule is set to Roster level and the Ignore value is not checked.

The issue with Global tags is according to the logic I can't assign them from an Option as when I try to do that it tells me I can't. Since this is my first rule I was doing it like the how to guided me to. So if I'm supposed to use them I'm not sure as the documentation doesn't talk about doing so.

Images attached.
  1. Image of the rule I created. It shows 3 different debug entries of methods I tried before realizing the rule wasn't working. None of them fire off.
  2. Image shows my Eval script on my option, the debug item there shows in the debug window when it's enabled.
  3. This image shows AB loaded with the tags of the specific unit showing that my Ben Dixon tag is being assigned to the unit when enabled. However you can see the debug window is empty and it doesn't show in accrued. Maybe my understanding of how this works based off the How To guide is off?
Attached Images
File Type: jpg 01_Rule.JPG (63.3 KB, 4 views)
File Type: jpg 02_Option_Eval.JPG (22.8 KB, 3 views)
File Type: jpg 03_Debug.JPG (146.2 KB, 3 views)
brentil is offline   #3 Reply With Quote
etthui
Junior Member
 
Join Date: Feb 2015
Posts: 14

Old March 13th, 2015, 01:44 PM
I would try to set the tag as global, but do not try to assign the tag bu an eval script, but rather by adding an auto tag, in the option. (Rememeber to refresh your .dat file after modifying the .def file , you won't see your modifications otherwise - I had some hard times with this too...)
etthui is offline   #4 Reply With Quote
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old March 14th, 2015, 09:50 AM
This may be a solution:

I had a set of rules that worked fine then I made a change to the def file and they all stopped, all the rules were for the same situation as yourself, i.e. limiting an option to one per roster.

The change made was removing the default ruleset from the def file so there were no actual rulesets chosen by the user

I've gone in and added a base ruleset to the def file and after that all the rules worked (I use accrued tags rather than global tags)

Have you got any rulesets enabled? (The rule does not need ot be linked to the ruleset it seems you need at least one ruleset operating)

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

http://www.facebook.com/ABDataFileWarlordGames
Harkan_again is offline   #5 Reply With Quote
brentil
Junior Member
 
Join Date: Mar 2015
Posts: 20

Old March 16th, 2015, 06:35 AM
Quote:
Originally Posted by etthui View Post
I would try to set the tag as global, but do not try to assign the tag bu an eval script, but rather by adding an auto tag, in the option. (Rememeber to refresh your .dat file after modifying the .def file , you won't see your modifications otherwise - I had some hard times with this too...)
I'd like to try to get it workign this way as it's supposed to be possible but if not then I'll try the one you mention.

Quote:
Originally Posted by Harkan_again View Post
This may be a solution:

I had a set of rules that worked fine then I made a change to the def file and they all stopped, all the rules were for the same situation as yourself, i.e. limiting an option to one per roster.

The change made was removing the default ruleset from the def file so there were no actual rulesets chosen by the user

I've gone in and added a base ruleset to the def file and after that all the rules worked (I use accrued tags rather than global tags)

Have you got any rulesets enabled? (The rule does not need ot be linked to the ruleset it seems you need at least one ruleset operating)
I just looked and the default ruleset was still there. Just in case I made another ruleset and saved it but that didn't work. I also tried assigning my rule to the ruleset and that didn't work.

I even made another rule that was blank except for setting @valid = 0 and nothing from it. I must be missing some fundamental thing not in the documentation on how to actually activate or get rules to fire off.
brentil is offline   #6 Reply With Quote
brentil
Junior Member
 
Join Date: Mar 2015
Posts: 20

Old March 16th, 2015, 06:36 AM
So I've been using the WH40K rules as a learning tool. I opened their Warlord rule and it looks very much like my rule. So I put in a debug statement in their rule and when I reload the files it actually triggers the debug info.

Why oh why will my rule not trigger.
brentil is offline   #7 Reply With Quote
brentil
Junior Member
 
Join Date: Mar 2015
Posts: 20

Old March 16th, 2015, 07:28 AM
I finally figured it out thanks to your comment about rulesets Harkan_again.

I was re-reading the rulesets How To guide and was reading the section that describes Type = base,core,user. From you mentioning that without a ruleset rules would not trigger I made a guess that if a ruleset for the scope type didn't exist no rules of that scope would ever fire. I looked and the default ruleset and my ruleset were "user" scope rulesets. So I changed my ruleset to be a "core" rule and as soon as I did that and saved it my debug values started being populated in the debug window.

Thanks for the help etthui & Harkan_again!
brentil is offline   #8 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 01:19 AM.


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