Senior Member
Join Date: Nov 2009
Posts: 891
|
What I did to change my Knowledge references, such as in the Scholar edge, was "skKnow" becomes "skKn?".
Code:
foreach pick in hero where "thingid.skKn?" Furthermore, there is a need to identify Scientific knowledge skills, which are explicitly referenced in two edges: Gadgeteer and Mr Fix It. As written Hero Lab cannot do this. But an easy fix was to make a slightly different wildcard, which uses the same ID naming convention. as shown here: Two Scientific Knowledge skills at d6 required. Code:
~go through all knowledge skills and check for d6 ~Note: We cannot tell if a skill is scientific or not - that's up to the player. The prebuilt knowledges know however var total as number foreach pick in hero where "thingid.skKnSc?" if (eachpick.field[trtFinal].value >= 3) then total += 1 endif nexteach ~if we have at least two, we're valid validif (total >= 2) if (@ispick <> 0) then altpick.linkvalid = 0 endif You might want to have a predefined Knowledge skill. The only thing that you might need to modify is the Scholar edge and anything that references that Programming knowledge. That said, it is likely that would only be in the same data set anyway so it could just reference the "new" specific Knowledge: Programming skill. Copy the Scholar edge. For the new version, here are some things to change: I don't think that I had changed the Eval Scripts, but if I did they are as follows Eval 1 (it uses Traits) Code:
~apply the +2 modifier to each selected skill if (field[usrChosen1].ischosen <> 0) then perform field[usrChosen1].chosen.field[trtRoll].modify[+,2,"Scholar"] endif if (field[usrChosen2].ischosen <> 0) then perform field[usrChosen2].chosen.field[trtRoll].modify[+,2,"Scholar"] endif Code:
~determine the text to append to the name var choices as string if (field[usrChosen1].ischosen <> 0) then if (field[usrChosen1].chosen.field[domDomain].text <> 0) then choices = field[usrChosen1].chosen.field[domDomain].text else choices = field[usrChosen1].chosen.field[shortname].text endif else choices = "-Choose-" endif if (field[usrChosen2].ischosen <> 0) then if (field[usrChosen2].chosen.field[domDomain].text <> 0) then choices &= ", " & field[usrChosen2].chosen.field[domDomain].text else choices &= ", " & field[usrChosen2].chosen.field[shortname].text endif else choices = "-Choose-" endif ~add the selection to both the livename and shortname (if present) fields field[livename].text = field[thingname].text & ": " & choices if (tagis[component.shortname] <> 0) then field[shortname].text &= " (" & choices & ")" endif The Pre-Reqs coding is changed to this Code:
var total as number ~if this is a thing, make sure at least two skills exist with a d8 rating if (@ispick = 0) then ~go through all Knowledge skills and tally those with a d8+ rating foreach pick in hero where "thingid.skKn?" if (eachpick.field[trtFinal].value >= 4) then total += 1 endif nexteach ~this is a pick, so make sure our chosen skills have a d8+ rating else if (altpick.field[usrChosen1].ischosen <> 0) then if (altpick.field[usrChosen1].chosen.field[trtFinal].value >= 4) then total += 1 endif endif if (altpick.field[usrChosen2].ischosen <> 0) then if (altpick.field[usrChosen2].chosen.field[trtFinal].value >= 4) then total += 1 endif endif endif ~if we have at least two valid skills, we're valid validif (total >= 2) ~if we got here, we're invalid if (@ispick <> 0) then altpick.linkvalid = 0 endif Code:
thingid.skKn? & fieldval:trtFinal >= 4 Code:
thingid.skKn? & fieldval:trtFinal >= 4 Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#21 |
Junior Member
Join Date: Apr 2007
Posts: 23
|
Distinct skills is how I was going to do it originally, but that means having to do what I described before: calculate how many iterations of a skill there are (how many "Shooting" skills are there? how many "Athletic" skills are there?) and knocking the cost of everything after the first down to a flat 1. Unless I'm mis-reading Skill Specializations? The way I read it, you get one specialization free with the skill purchase. Anything after that costs 1 point during creation. When doing advances, you can get two specializations for one advance or a specialization and a new skill. However, a specialization always has the same skill die (so if you bought Shooting: Pistols d8 during build, buying two more specializations--Rifles and SMGs--would cost an advance and be at d8). It's on page 95 of SWD or page 16 of IZ, if that helps.
Thanks so much! |
#22 |
Junior Member
Join Date: Apr 2007
Posts: 23
|
I'm not sure how to embed code as you're doing, so I apologize for this post. My thinking on this is the brute-force solution is something along these lines?
This would need to be done for each individual skill. Anyway, how insanely far off is this concept? in traits.str: <!-- Each skill increment that is allocated by the user costs 1 or 2 skill points --> <eval index="2" phase="Traits" priority="10000"> <before name="Calc resLeft"/> <after name="Bound trtUser"/><![CDATA[ ~any skills on the lead are "important" picks, as without them the lead ~wouldn't be able to be loaded properly. We assume skills on minions are ~less important and aren't worth flagging if they won't load properly. if (hero.isminion = 0) then perform assign[thing.important] endif ~if this skill is not added directly to the hero (i.e. an advance), skip it entirely doneif (origin.ishero = 0) ~the base value for skills is two, so we need to adjust by one to get the proper cost var points as number points = field[trtUser].value - 1 ~get the level of our linked attribute and factor in bonuses due to races and such var attrib as number attrib = linkage[attribute].field[trtUser].value attrib += linkage[attribute].field[trtCreate].value if (hero.tagis[Hero.InPlaySkil] <> 0) then attrib += linkage[attribute].field[trtInPlay].value endif ~for specialization, loop through all non-Knowledge skills and count only the first one as full cost ~default is one specialization free, so free_num_skill = 1 var tot_num_this_skill as number var free_num_skill as number var num_skill_over as number free_num_skill = 1 foreach pick in where “thingid.skIZAthlet” tot_num_this_skill += 1 nexteach ~if multiple uses of the skill if (tot_num_this_skill > free_num_skill) then num_skill_over = tot_num_this_skill - free_num_skill perform #resspent[resSkill,+, ~add an extra point for every level we exceed our linked attribute unless linked to attrSup ~RDS Altered to match SWD rule clarification ~Super Power Skills are always considered lower for the purposes of raising Skills if (linkage[attribute].tagis[thingid.attrSup] = 0) then ~If you have multiple specializations (more than one use of the skill), then you need to cost each extra as a flat 1 point ~and that requires removing the full cost of each extra first if (field[trtUser].value > attrib) then points += field[trtUser].value - attrib points -= field[trtUser].value * num_skill_over points += num_skill_over endif endif ~else normal ops else ~add an extra point for every level we exceed our linked attribute unless linked to attrSup ~RDS Altered to match SWD rule clarification ~Super Power Skills are always considered lower for the purposes of raising Skills if (linkage[attribute].tagis[thingid.attrSup] = 0) then if (field[trtUser].value > attrib) then points += field[trtUser].value - attrib endif endif endif ~accrue the total points spent on this skill perform #resspent[resSkill,+,points,field[name].text] ]]></eval> |
#23 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
OK, I read the Interface Zero rules, and they are using the same Specialization rules from Savage Worlds Deluxe. I honestly do not know why you are wanting to count the number of skills. Maybe there is something that I did not see, and if so perhaps you can direct me to a page number? I have Interface Zero 2 (I was a Kickstarter backer).
The way that it works in Savage Worlds Deluxe is that if you do not have a given specialization, when you use it you do so at a -2. So a dude with Shooting Bows can shoot a bow at full Shooting, but other Shooting weapons, such as a Pistol or Rifle, are all at -2. All that a Specialization does is remove the -2. It could also be called "Proficiency". How I would handle it is by making each Specialization an edge. You can make up an edge category called Specializations. You could even make a category per skill, like "Shooting Specialization". You can make the edge require that skill at d4 or whatever so that the character has to at least have the skill at d4 (or higher for perhaps a more advanced specialty). There is a space in the editor for each edge that says "Advancement Slots". Put 0.5 in that space so that each one will cost 1, meaning half an edge. You can buy two of them for the cost of an edge during character creation or later on through advancement. There are a few places where you will need to change things a bit, like so that a character that has a pistol will get a -2 to Shooting if there is no Pistol specializtion. I would place this in a mechanic like I mentioned earlier in this thread. Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#24 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
In the mechanic I would do something like this, to look for pistols
Code:
if (hero.tagis[Edge.edgPistol] = 0) then foreach pick in hero from WeapRange if (eachpick.tagis[WeaponType.ModPistol] <> 0) then eachpick.field[wpBonus].value -= 2 endif nexteach endif Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#25 |
Junior Member
Join Date: Apr 2007
Posts: 23
|
I hadn't thought of the Edge idea. That might be a heckuva lot easier to implement. Thanks!
The reason for counting how many times a specific skill was purchased in my solution was to know how much to subtract from the points tally. Example: Shooting (Pistol) d8 Shooting (Rifle) d8 Shooting (SMG) d8 Assuming AGI d8, the software currently would charge 9 points for that. Using specializations as-written, it should charge 5. So, count how many times the skill is purchased (3), [assuming you stick to the default 1 free specialization] subtract 1 from that (leaving you with 2), multiply your skill # (3) by that remaining number (2) and subtract that from your tally of 9 (9-6 =3, so we're down to 1 purchase of the skill, as we should be). Then add back in the number of extra skill purchases because each extra skill purchase is actually a specialization (3+2=5). That's just the solution as I saw it, not realizing Edges might be the way to go. Does that make sense now? |
#26 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
Ah ok. You wanted a skill for each, but only to charge it once. Yeah, edges as I mentioned is likely a better way. I would do it that way, then have a mechanic as I suggested to apply weapon proficiency penalties. Other skill uses are situstional and not part of the equations. Or at least I cannot think of any. In my example it is for a ranged weapon, hou would need to change for melee weapons. Maybe others, too. I do not know how special weapons might be classified in the editor. I could look tomorrow.
Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#27 |
Junior Member
Join Date: Apr 2007
Posts: 23
|
I think I'm good for now. I'll try to test this Edges idea before the weekend. Thx again!
|
#28 |
Junior Member
Join Date: Apr 2007
Posts: 23
|
So, I'm missing something. I built out a test Edge. Shooting Specialization, UniqID edgIZShoSp. This is the code in the Eval Scripts:
if (hero.tagis[Edge.edgIZShoSp] = 0) then foreach pick in hero from WeapRange if (eachpick.tagis[WeaponType.ModPistol] <> 0) then eachpick.field[wpBonus].value -= 2 endif nexteach endif The skill shows up as the default (that's fine). When I buy a modern pistol, it applies a -2. A flintlock doesn't. If I change the code to: if (eachpick.tagis[WeaponType.ModPistol] = 0) then eachpick.field[wpBonus].value -= 2 endif It works fine. That seems backwards. 0 is the "true" logic. What am I missing? |
#29 |
Senior Member
Join Date: Nov 2009
Posts: 891
|
Flintlock is probably either Medieval Ranged or Black Powder. There are several different types. These are specified in a Ranged Weapon entry for a field called "Weapon Type". There are many different categories, which makes something like this kind of annoying. To be totally accurate, the Pistol Specialty would need to have multiple
Code:
foreach pick in hero from WeapRange if (eachpick.tagis[WeaponType.XXXX] <> 0) then Code:
if (hero.tagis[Edge.edgIZShoSp] = 0) then 0 is False, 1 is True. The intent is for it to have the effect if that edge is NOT on the character. =1 or <> 0 is for if it is on the character, but in the case of specialties we want it to apply when it is NOT on the character. The <> 0 means "not 0", so true, so it is the same as = 1, but in some cases it might be higher than 1, such as if things are stacking (adding to the same total). In those cases = 1 would be true for 1, but no longer be true at 2 or above, hence the <> 0 as it is a catchall for true. Did I explain that well enough? My head is a bit fuzzy today. Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
#30 |
|
|