Member
Join Date: Aug 2008
Posts: 71
|
i'm trying to work out how add the order of the oneirophysics entitlement which has 3 ranks to it.
my problem is that each rank has a set of prerequisites and i can't work out how to enter each rank and their prerequisites separately my second problem is how to enter a prerequisite specialty bases on the skill I.E oneirophysics rank 2 has a prerequisite of medicine 3 + specialty. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Hmmm. This entitlement completely slipped past my radar as being "special". There is no way to setup different "levels" of an entitlement, and implementing support for it would entail a great deal of work. Unless there are lots of cases like this, doing all the special handling for one exception simply doesn't make sense. The best solution would be to enter each of the different ranks as separate entitlements, such as "Order of the Oneirophysics Rank 1", etc.
Since each rank has its own entry, rank 2 would need to inherit all the pre-requisites of rank 1, and rank 3 would inherit from rank 2. They would also inherit all the basic privileges of the lower rank. This is easily handled by creating rank 1 first and then creating rank 2 as a copy of it, simply adding the extra pre-requisites and the new privilege for the rank. |
#2 |
Member
Join Date: Aug 2008
Posts: 71
|
how do i handle a prerequisites where having a medicine specialty is required but it doesn't matter which one?
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
I was researching this and typing it up separately while you posted the question. Sorry for not giving you a heads-up. I wasn't expecting you to see my post instantly. :-)
If I understand the description properly, the requirement is simply that the character possess Medicine 3 and have at least one specialization in Medicine. Is that correct? If so, then this can be readily implemented. Each specialization has an assortment of tags on it. One is the skill to which the specialization is associated. In this case, the tag would be "Skill.sMedicine". You can determine this easily by adding a Medicine specialization to a character and then right-clicking on it. From the menu, select "Show Debug Tags for ???" (e.g. Surgery). This will show you all the tags on the specialization, which includes the skill tag. To verify that the character has at least one Medicine specialization, you need to go through the list of all specializations possessed by the characters and check them. This is accomplished using a "foreach" loop that processes all specializations. If any specialization is for medicine, you're valid. If not, then you're invalid. The code for the pre-requisite would look something like below. Code:
~go through all specializations; we're valid if any is for medicine foreach pick in hero from Specialize validif (eachpick.tagis[Skill.sMedicine] > 0) nexteach if (@ispick <> 0) then altpick.linkvalid = 0 endif |
#4 |
Member
Join Date: Aug 2008
Posts: 71
|
how would the custom specialty option affect above code IE choosing a medicine specialty through custom specialty option?
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Ah, good point. This can be quickly verified and handled with a little bit of testing.
Add a custom specialization to a character. Assign it to the Medicine skill. Now right-click on it within the character and select the "Show Debug Tags for ???" option. Scan through the list and you won't see the "Skill.sMedicine" tag. However, you *will* see a "CustomSpec.sMedicine" tag. So the tag check needs to determine if *either* tag is present. This is achieved by modifying the "validif" statement within the script above. It should look like below. Code:
validif (eachpick.tagis[Skill.sMedicine] + eachpick.tagis[CustomSpec.sMedicine] > 0) |
#6 |
Thread Tools | |
Display Modes | |
|
|