Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old October 31st, 2017, 11:54 AM
I'll give that a try. I wish I were at home and could post my code for Weapon Focus so you could see it directly though -- it's pretty different from the stock Weapon Focus. Look for an update in a few hours!
wdmartin is offline   #21 Reply With Quote
Fuzzy
Senior Member
 
Join Date: Jul 2012
Posts: 416

Old October 31st, 2017, 12:11 PM
I'm not sure I understand why a custom Weapon Focus is even required here - why not just bootstrap in Martial Mastery from the main mechanic, since that is essentially what the feat tax rules describe anyway.

Last edited by Fuzzy; October 31st, 2017 at 12:15 PM.
Fuzzy is offline   #22 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old October 31st, 2017, 12:53 PM
I initially thought the same, but abandoned that approach. Basically, it came down to a user interface choice.

Martial Mastery functions by choosing a specific weapon, and then you get the benefits of Weapon Focus for all other weapons that share a group with that weapon. That requires the end user to understand that if they want Weapon Focus (Heavy Blades), they have to pick Weapon Focus (Greatsword) or another heavy blade, and the bonus will be silently applied to whatever heavy blade they happen to have in their possession even though it's listed on their character sheet as "Greatsword".

It also requires them to navigate the incredibly long list of every possible weapon in the game, which is hundreds long at this point. Particularly since Hero Lab implements all the weird little one-off weapons which have to appear in the feat because one monster in some splatbook has Weapon Focus (Tentacle Beard).

Compare to being given a list of 16 weapon groups and picking one. You don't have to guess which weapon is in which group, or understand that picking one weapon is technically the same as picking its whole group. You just pick your group and be done.

The coding was somewhat more difficult on the back end, but the end result is substantially easier to use.
wdmartin is offline   #23 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old October 31st, 2017, 06:25 PM
Okay, shopping is done, dinner is cooked and eaten, dishes have been dealt with, and now here's the code.

The Mechanic I currently have set up looks like this (after some compositing into a single screenshot):



In addition, it has a fairly simple eval script that runs at Final Phase 100:

Code:
doneif (hero.tagis[source.WiSRules] = 0)

~ We're an NPC, and subject to feat taxes, so we're done
doneif (hero.tagis[WiSRules.PayFeatTax] <> 0)

~ Check if we're a Kapenia Dancer, and bail out if not
doneif (hero.tagcount[ClassVary.arMagKapen] = 0)

perform hero.child[fwsWepFoc].assign[thing.skipprereq]
All that really does is tell it to ignore the pre-reqs.

Meanwhile, the eval script for Weapon Focus, running at Post-Levels 10000, is as follows:

Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~if we haven't chosen anything yet, just get out now
doneif (field[usrChosen1].ischosen + tagis[GTarget.?] = 0)

~get the wFtrGroup tag from our choice or GTarget tag
if (tagis[GTarget.?] <> 0) then
	perform this.pulltags[GTarget.?,wFtrGroup]
else
	perform field[usrChosen1].chosen.pulltags[wFtrGroup.?]
endif

~if we didn't find a wFtrGroup tag, there's nothing more we can do
doneif (tagis[wFtrGroup.?] = 0)

~ Get the list of weapons in the group.
var searchexp as string
searchexp = tagids[wFtrGroup.?,"|"]

~ Tag the hero has having weapon focus for each weapon
~ in order to satisfy pre-requisites for feats that
~ require weapon focus with a specific weapon.
foreach thing in BaseWep where searchexp
	if (eachthing.tagis[WepFocus.?] <> 0) then
		perform hero.assignstr[eachthing.tagids[WepFocus.?, ","]]
	endif
nexteach

~ Iterate through the weapons currently in the hero's possession
~ and apply the bonus to those that the hero is proficient with.
foreach pick in hero from BaseWep
	var proceed as number
	proceed = 0

	~ Must be part of this weapon group.
    if (eachpick.tagmatch[wFtrGroup,wFtrGroup,initial] <> 0) then
		proceed += 1
	endif

	~ Hero must be proficient with the weapon.
    if (eachpick.tagcount[Helper.Proficient] <> 0) then
		proceed += 1
	endif

	~ Yay, passed both tests.  Award them their shiny +1.
    if (proceed > 1) then
		perform eachpick.assign[Broadcast.WepFocus]
    endif
nexteach

~ Finally, tag the hero as having group weapon focus.
var boundary as number
var group as string
boundary = pos(searchexp, ".") + 1
group = mid(searchexp, boundary, length(searchexp))

perform hero.assignstr["WepGFoc." & group]
The end result on my test Kapenia Dancer looks like this:



The attack bonus appears to be correct. Under World is Square rules, all heros get Weapon Finesse automatically on light weapons, hence the dex mod in the attack bonus. And the weapon focus is applied to the scarf, but not the unarmed strike.

The only problem is that the Weapon Focus feat remains in an unselected state instead of selected. It should look like this:



Ideally, it would also be impossible to change the assignment away from Flails, since the PC is supposed to get this specific one, not their choice of any. That's all I really need to do -- set the state of usrChosen1 to the correct value and then turn it off.
Attached Images
File Type: png kapenia.png (458.8 KB, 133 views)
File Type: png kapenia2.png (338.1 KB, 134 views)
File Type: png kapenia3.png (6.9 KB, 134 views)
wdmartin is offline   #24 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old November 1st, 2017, 08:34 AM
The Target group can look as if it pre-selects something, because in the core files, we can control the display scripts, and make the display of that drop-down pretend to have chosen something. That is not something your made up tag group can get in on.

So, to repeat something Aaron said earlier, why create this new GTarget group? Why can't you use Target tags? If you need new picks to choose from just for this purpose, that's what the Selection Helper compset is for, but I'd look at borrowing the fighter weapon training abilities, first.
Mathias is offline   #25 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 1st, 2017, 11:15 AM
So, I feel like I have better context, but my recommendation hasn't changed.
Aaron is offline   #26 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old November 1st, 2017, 03:21 PM
Okay! I tore out the GTarget stuff, put in a dummy thing with tag definitions per Aaron's suggestion, and adjusted my eval scripts to match. It works fine now. Thank you both very much.

I could wish for a more obvious mechanism for setting the value of a drop-down menu. Numeric fields can be set with .value, and textual fields can be set with .text, but unless I've missed something there's no operation for specifying what a menu should be set to.

Ah well. Onward!
wdmartin is offline   #27 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old November 4th, 2017, 02:18 PM
All right! I think I have completed all of the requested changes, plus a few things.

[X] Monks, Unchained Monks, and Brawlers now get Unarmed Combatant for free
[X] Weapon Focus requires BAB of +1 or higher
[X] Weapon Focus works for animal companions
[X] Mythic Improved Critical works with World is Square rules
[X] Kapenia Dancer magus archetype gets Weapon Focus (Flails) for free
[X] Feral Child druid archetype gets Unarmed Combatant for free
[X] Corrected a bunch of typos in the feat descriptions
[X] Made it possible to selectively enable portions of the rule set.

If you have an existing character using WiS rules that has Mythic Improved Critical selected, you will need to delete that feat and re-add it after updating. The original Mythic Improved Critical feat has been suppressed with a Preclude, and replaced with one that uses Weapon Groups instead of individual weapons. The critical multiplier increase applies to all weapons in the selected group, except those for which the hero lacks proficiency.

The last item on the list is involved, and needs explanation. The list of World is Square options in the hero configurator (CTRL+K) now looks like this:



Enable all World is Square rules: Formerly named "Eliminate feat taxes". This turns on all of the World is Square house rules at once. If you have an existing character using this rule set, this will already be checked and the PC should continue to function as normal before.

Grant Default Combat Feats: when this is active, the PC will receive
Agile Maneuvers, Combat Expertise, Deadly Aim, Point Black Shot, Power Attack and Weapon Finesse for free, provided their BAB is high enough to qualify. Agile Maneuvers will only be applied if the hero's DEX mod is higher than their STR mod. Point Blank Shot is given to the hero so that they will qualify for subsequent feats, but its effects are suppressed. Weapon Finesse will not appear in the list of feats, but its effects are applied to light weapons when the PC's DEX mod is higher than their STR mod.

Group Weapon Feats: uses fighter weapon groups in the selectors for Weapon Focus, Greater Weapon Focus, Weapon Specialization, Greater Weapon Specialization, Improved Critical, and Mythic Improved Critical. Also enables Weapon Focus (ray), because rays are not present in any weapon group.

Combine Combat Maneuvers: replaces the usual combat maneuver feats with Unarmed Combatant (Improved Unarmed Strike, Improved Grapple), Deft Maneuvers (Improved Feint, Disarm, Dirty Trick, and Steal), and Powerful Maneuvers (Improved Bull Rush, Drag, Overrun, and Sunder).

Dodge and Two-Weapon Fighting: combines Dodge and Mobility into a single feat, and causes Improved Two-Weapon Fighting to scale with level.

NPCs pay normal feat taxes: functions as before.

I made adjustments to a couple archetypes, Kapenia Dancer (magus) and Feral Child (druid). These archetypes grant bonus feats that were replaced or altered by the World is Square house rules. PCs with these archetypes are now granted the equivalent World is Square feat at the appropriate level. If you would like a similar adjustment for some other archetype in the same position, please post a request here. There are an awful lot of other archetypes that could do with adjusting, but I think I'd rather adjust on a per-request basis than attempt a comprehensive reworking of the vast profusion of options out there.

At this point, I would like to ask for assistance with testing. If you are one of the people who requested a change, or just happen to be interested, please consider taking a moment to help with testing. To do so:
  • download the attached files and place them in your pathfinder game system folder
  • Rename world-is-square.txt to world-is-square.1st
  • Open Hero Lab, let it compile and load the data files
  • Load up a character and check to see if it's working.

Try enabling and disabling things. I would prefer to catch as many bugs as possible BEFORE pushing out an update through the update channel I established. Thanks.
Attached Images
File Type: png new-opts.png (57.7 KB, 118 views)
Attached Files
File Type: txt world-is-square.txt (5.8 KB, 1 views)
File Type: email world-is-square.user (47.9 KB, 2 views)

Last edited by wdmartin; November 5th, 2017 at 11:41 AM.
wdmartin is offline   #28 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old November 14th, 2017, 06:29 PM
Hearing no objections, I have pushed this into the update channel.
wdmartin is offline   #29 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old November 19th, 2017, 12:55 AM
Just pushed out 1.2, a quick bug fix. Warpriests are supposed to get Weapon Focus for free at level 1, and weren't because it was suppressed. I've corrected that.

I thought it worked correctly with the Sacred Weapon damage bonus, too, but on further investigation, not quite. The sacred weapon damage die increase is working for your deity's favored weapon, but it's supposed to work for any weapon in which you have weapon focus also. And it's not. So, for example, a devotee of Calistria with Weapon Focus (Flails) will get the increased damage dice on a whip, but not on a heavy flail even though they technically have weapon focus for both and should get the increased damage dice for both.

I'll have to poke at it some more.
wdmartin is offline   #30 Reply With Quote
Reply

Thread Tools
Display Modes

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 08:08 PM.


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