Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,263

Old March 7th, 2009, 06:25 AM
Is there a way of scripting the Easy if Race box to become active if certain conditions are met?

For example If a character was an Elf and had a feat that allowed all named racial (Elven) exotic weapons to be classed as martial then this would be a valid condition and taking a racial weapon wouldn't show up as non proficient, but if the character was a dwarf theh it would be invalid and apply the relevant penalties.

I've tried a Perform Hero.assign[wEasyRace.Elf] on an Eval script of the actual Weapon after checking for a valid Race but it doesn't work!

I noticed the Easy if Race box whilst trying to get the Improved Weapon Familiarity Feat from Complete Warrior to work, see my other posts for the current script that partially works.

If the Easy if Race tick box on the Weapons tag of the editor is ticked then all racial weapons become one proficiency better.
bodrin is online now   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,558

Old March 7th, 2009, 07:36 AM
What part of the assignment didn't work?

In the list of tags for the weapon, does it show the tag you're trying to assign? If that's the case, and you're not actually seeing the effects of the tag, you've probably got your script running too late. If the tag doesn't show up, take another look at your code, and look for errors in the way you're approaching things, the way your if statements are constructed, etc. Offhand, I think "perform assign..." is case sensitive, so make sure you're not using title case in your script, too.
Mathias is online now   #2 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,263

Old March 8th, 2009, 06:54 AM
The assignment just didn't work but I managed to get this script to work eventually on the Orc Axe Double by replacing it with a new weapon.

Code:
~ If you're an Half-Orc and you have Improved Weapon Familiarity then you're proficient with all Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.HalfOrc] + #hasfeat[fImpWepFam] <> 0) then
    perform hero.assign[wEasyRace.HalfOrc]
    perform hero.assign[WepProf.wAxeOrcDbl]
    perform hero.assign[WepProf.wCoWaAxDbl]
    endif
However it still isn't implemented correctly, removing the Improved Weapon Feat doesn't make the weapon non proficient again when the race isn't different. I changed the timing to first 10000 to get the script to work in the first instance!

Last edited by bodrin; March 8th, 2009 at 07:11 AM.
bodrin is online now   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,558

Old March 8th, 2009, 08:19 AM
Are you sure the wEasyRace.HalfOrc belongs on the hero, and not on the weapon?
Mathias is online now   #4 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,263

Old March 8th, 2009, 09:32 AM
Quote:
Originally Posted by mgehl View Post
Are you sure the wEasyRace.HalfOrc belongs on the hero, and not on the weapon?
No i'm not sure but after trying for 3 days to get the feat to work correctly i'm trying a different approach.

The above code is on an eval script assigned to the new Axe Orc Double weapon i've made just to try and implement something!

Any suggestions greatly welcomed!
bodrin is online now   #5 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,263

Old March 24th, 2009, 03:27 PM
I still can't get this feat to work correctly after a lot of tinkering with the code, I think i'll have to give in!

Heres my final effort for evaluation!

Code:
~ If you're an elf you're proficient with Elven weapons.
var hasfeat as number

if (hero.tagis[Race.Elf] <> 0) then
  if (#hasfeat[fWepElf] + #hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[wEasyRace.Elf]
    perform hero.assign[WepProf.wElvLigBla]
    perform hero.assign[WepProf.wElvThiBla]
   endif
endif

~ If you're an Half-Elf you're proficient with Elven weapons.
var hasfeat as number

if (hero.tagis[Race.HalfElf] <> 0) then
  if (#hasfeat[fWepElf] + #hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[wEasyRace.HalfElf]
    perform hero.assign[WepProf.wElvLigBla]
    perform hero.assign[WepProf.wElvThiBla]
   endif
endif

~ If you're an Dwarf you're proficient with Dwarven weapons.
var hasfeat as number

if (hero.tagis[Race.Dwarf] <> 0) then
  if (#hasfeat[fSimple] + #hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[wEasyRace.Dwarf]
    perform hero.assign[WepProf.wWaraxeDw]
    perform hero.assign[WepProf.wUrgroshDw]
   endif
endif

~ If you're an Gnome you're proficient with Gnomish weapons.
var hasfeat as number

if (hero.tagis[Race.Gnome] <> 0) then
  if (#hasfeat[fSimple] + #hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[wEasyRace.Gnome]
    perform hero.assign[WepProf.wHammerGnm]
    endif
endif

~ If you're a Half-Orc you're proficient with Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.HalfOrc] <> 0) then
  if (#hasfeat[fSimple] + #hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[wEasyRace.HalfOrc]

    perform hero.assign[WepProf.wCoWaAxDbl] 
    ~The above line is to assign a special Complete Warrior version of the Orc Double axe
       Just in case the original axe thing doesn't work

    perform hero.assign[WepProf.wAxeOrcDbl]
    endif
endif
bodrin is online now   #6 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,263

Old August 4th, 2009, 07:45 AM
Okay i'm back to adding the Axe Orc Double as a race weapon for the Improved Weapon Famliarity feat (Complete Warrior page 101).

I've replaced the Standard wAxeOrcDbl thing with my modified wCoWaAxDbl thing and put in this code:-

Code:
~ If you're an Half-Orc and you have Improved Weapon Familiarity then you're proficient with all Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.HalfOrc] + #hasfeat[fImpWepFam] <> 0 ) then
    perform hero.assign[wEasyRace.HalfOrc]
    perform hero.assign[WepProf.wAxeOrcDbl]
    perform hero.assign[WepProf.wCoWaAxDbl]
    endif

~ If you're an Orc and you have Improved Weapon Familiarity then you're proficient with all Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.Orc] + #hasfeat[fImpWepFam] <> 0 ) then
    perform hero.assign[wEasyRace.Orc]
    perform hero.assign[WepProf.wAxeOrcDbl]
    perform hero.assign[WepProf.wCoWaAxDbl]
    endif
When I add a fighter level and the Feat my New version of the Axe Orc Double is shown as selectable for a Half Orc and an Orc, but when I add the weapon which isn't greyed out I get the Non-Proficient blue circle with a line through it.

I've looked at the tags on my hero in the info windows.

The Race.Orc and Race.HalfOrc tags and the Improved Weapon Familiarity tags are assigned okay.

And the wEasyRace.Orc and wEasyRace.HalfOrc tags are also in place assigned by the wCoWaAxeDbl version of the Axe Orc Double.

Although when I tick the Easy if race boxes on the weapon panel in the editor, and reload the files, the weapon works as it should if i select an orc or half orc.

How do I get rid of the Non proficiency penalty imposed by the rules when I have this Complete warrior feat?

I'm wondering if as the Orc, HalfOrc races don't have the weapon familiarity as standard in their SRD description, like gnomes or dwarves, if this is a cause of the anomaly?
bodrin is online now   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,558

Old August 4th, 2009, 03:09 PM
I apologize, but I'm not going to have time to research this until after I'm back from Gen Con. Please bump this thread if I don't get back to it.
Mathias is online now   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,558

Old August 19th, 2009, 09:54 AM
What needs to happen for this feat to work is for the weapon to add wEasyRace.XXX to itself if the feat is present.

Place the following script on the weapon at Pre-Level, 6000 (the timing is critical, you have a narrow window between when HasFeat.fImpWepFam is set up at PreLevel/5000 and when wEasyRace is checked, at PreLevel/10000).

Code:
 
if (#hasfeat[fImpWepFam] <> 0) then
  perform assign[wEasyRace.Orc]
  endif
Note that the Half-Orc race includes support for wEasyRace.Orc, so you don't need to add wEasyRace.HalfOrc, too.

So, for each weapon you want the feat to apply to, replace the existing version with one that includes that script (changing the Race each time, of course).

It also doesn't matter if you check for the hero's race, either. The script that processes wEasyRace.Orc checks that for you, so an Orc Double Axe won't show up as a Martial weapon for a dwarf.

Another note about how this functions; the weapon will NOT show up as proficient in the weapon selector, because the script will not run before the weapon is added to the character. Assigning the tag from the script won't work either, because you can't add a tag to the weapon before it's added to the hero. The weapon will be proficient once added to the character, so you'll want to add a note to the description of the feat that reminds the user of this known bug.
Mathias is online now   #9 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,263

Old August 25th, 2009, 04:22 PM
I've finally sorted this feat out to work properly. The non proficient blue circle disappears when half orc or orc is selected and it isn't greyed out once the feat is added!

Thank you mgehl for your assistance!

Heres the final working code for reference!

Eval Script
Validation phase Priority 10000 Index 1

Code:
~ If you're an elf you're proficient with Elven weapons.
var hasfeat as number

if (hero.tagis[Race.Elf] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wElvLigBla]
    perform hero.assign[WepProf.wElvThiBla]
   endif
endif

~ If you're an Dwarf you're proficient with Dwarven weapons.
var hasfeat as number

if (hero.tagis[Race.Dwarf] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wWaraxeDw]
    perform hero.assign[WepProf.wUrgroshDw]
   endif
endif

~ If you're an Gnome you're proficient with Gnomish weapons.
var hasfeat as number

if (hero.tagis[Race.Gnome] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wHammerGnm]
    endif
endif

~ If you're a Half-Orc you're proficient with Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.HalfOrc] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wAxeOrcDbl]
    perform hero.assign[WepProf.wCoWaAxDbl]
    endif
endif

~ If you're a Orc you're proficient with Orcish weapons.
var hasfeat as number

if (hero.tagis[Race.Orc] <> 0) then
  if (#hasfeat[fWepMart] + #hasfeat[fMartial] <> 0) then
    perform hero.assign[WepProf.wCoWaAxDbl]
    perform hero.assign[WepProf.wAxeOrcDbl]
    endif
endif
Complete Warrior Axe orc Double

Eval Script
Pre-Levels Priority 6000 index 1

Code:
~ If you're an Half-Orc or an Orc and you have Improved Weapon Familiarity then you're proficient with all Orcish weapons.
var hasfeat as number

if (#hasfeat[fImpWepFam] <> 0) then
  perform assign[wEasyRace.HalfOrc]
 endif

if (#hasfeat[fImpWepFam] <> 0) then
  perform assign[wEasyRace.Orc]
endif
bodrin is online now   #10 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 02:17 PM.


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