Junior Member
Join Date: Mar 2015
Posts: 20
|
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] Code:
if (tagcount[uedfCharac.benDixon] < 2) then @valid = 1 endif What am I doing wrong? |
#1 |
Junior Member
Join Date: Feb 2015
Posts: 14
|
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 ! |
#2 |
Junior Member
Join Date: Mar 2015
Posts: 20
|
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.
|
#3 |
Junior Member
Join Date: Feb 2015
Posts: 14
|
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...)
|
#4 |
Senior Member
Join Date: May 2012
Posts: 206
|
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 |
#5 |
Junior Member
Join Date: Mar 2015
Posts: 20
|
Quote:
Quote:
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. |
||
#6 |
Junior Member
Join Date: Mar 2015
Posts: 20
|
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. |
#7 |
Junior Member
Join Date: Mar 2015
Posts: 20
|
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! |
#8 |
|
|