Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   PF2e-style Swappable Runes (http://forums.wolflair.com/showthread.php?t=67735)

Mediator9292 April 4th, 2023 08:16 PM

PF2e-style Swappable Runes
 
After playing around with 2e, I've decided to try and implement Runes (enchantments that can be transferred between items) in my 1e campaign. My plan is to have "Runestones" of different power levels/rarities possess a special ability (flaming, hosteling, bane, etc) that, when equipped to a weapon/armor, bestows that enchantment's special ability on the item (assuming it is the right type - weapon vs armor). This means that finding a +2 flaming greatsword means the party has actually found a +2 greatsword with a Flaming Runestone equipped to it, that can be removed and added to a different weapon (so players can better upgrade things like their family heirloom longsword or the chainmail their lost wife made them, for example).

My outline is something like this:
Amethyst Runestones come with a +1 equivalent special ability (like Bane or Keen).
Emerald Runestones come with a +2 equivalent special ability (like Animated or Phantasmal).
Ruby, Sapphire, and Diamond Runestones come with a +3/4/5 equivalent special ability, respectively.

I think I've figured out how to get the Runestone to select a magic weapon/armor on the character - under Item Selection -> Custom Expression, I use
component.BaseMagicI & (component.BaseArmor | component.BaseWep)
Please correct me if there's a better way to do this, since even custom names don't change the item's name in the resulting drop-down list.

The main challenge I'm currently running into is getting the wSpecMagic gizmo to appear and display the special abilities that I'm bootstrapping to it (ipAllying, iBane, etc) as options for selection. Am I missing something, like using the wrong gizmo, or some simple eval script?

Long term, I'd like to get them to code so that only 1 Runestone can be equipped to a +1 item, 2 Runestones can be equipped to a +2 item, and so on, but first I need to get the Runestones to work at all, so one step at a time!

ploturo May 26th, 2023 02:10 PM

The existing magic weapon abilities are specific things which have scripts that are hard-coded to apply their effects to the weapons they are added to, and they must be added as a pick to the gizmo on that weapon (which you can't do from a script or from a separate pick/thing).

I think you would need to basically duplicate each existing magic weapon/armor ability as a separate runestone and copy the original thing's scripts to apply the same changes to the target weapon/armor instead of its parent.


When you get around to limiting the runestones based on the enhancement bonus, that should be relatively simple. You can have each runestone add tags to the weapon/armor, and then have a later evalrule which makes the runestone not valid if there are too many tags on its targeted weapon/armor.

Mediator9292 August 24th, 2023 03:12 PM

Alright so I think I've got a general system set up for how to build this, but I'm running into some errors and I'm not sure how to fix it.
Below is my code and selections for the first test Runestone, which is supposed to grant the Flaming property:

Can be equipped (no slot)
Show in Activated Abilities list
Activation Name: Slotted
Custom Expression: component.BaseMagicI & (component.BaseArmor | component.BaseWep)
All picks on Hero

Runs at Pre-Levels 9000
Quote:

if (field[gIsEquip].value <> 0) then
if (field[abilActive].value <> 0) then
doneif (field[usrChosen1].ischosen = 0)
if (parent.tagis[component.BaseWep] <> 0) then
#extradamwithavg[parent," plus 1d6 fire",field[thingname].text,"3.5"]
else
foreach pick in hero from BaseWep where container.child[gCustMagic].field[gWeapExpr].text
#extradamwithavg[eachpick," plus 1d6 fire",field[thingname].text,"3.5"]
nexteach
endif
endif
endif
All seems to go well from 1. selecting the magic weapon, 2. equipping the runestone, and then when I Slot it in the In-Play tab, I get the following error:
Attempt to access non-existent parent pick for a top-level container from script
- - -
Attempt to access non-existent child pick 'gCustMagic' from script
- - -

Any advice or ideas on how to fix this?

Mathias August 24th, 2023 03:18 PM

What pick stores the gWeapExpr field? Are you certain it's in a pick of Id gCustMagic, which is in the same container as the rune (and it sounds like your runes are loose magic items, which means their container is the hero).


Also, you say you've got a selection of a weapon, but then your script uses a foreach, which means it's searching lots of weapons, so I'm not sure why that's there.

Mediator9292 August 24th, 2023 03:38 PM

I restricted the First List to All Things - should I change it to All Picks on Hero? Lines 1-3 I copied from that used by the Inheritor's Gauntlet, and the rest I pulled from the Flaming item power eval script, since they seemed to achieve the targeted functions, but I'm still struggling to understand the terminology.
Simply put, I'm trying to learn by trial and error, since the text guide hasn't helped anything 'click' for me, if that makes sense?

Mathias August 24th, 2023 03:49 PM

How does the rune function - do you want it to be applied to all longswords (if so, that's "all things"), or do you want it to select one of the two longswords your character owns (if so, that's "picks on hero").


Here's some things to copy from that are outside of a weapon, but are choosing a weapon and applying extra damage:

Class special: "Deed: Overload" (from people of the wastes)
Racial Custom Ability: "Bleed" (this is an eidolon thing from champions of corruption)
Racial Custom Ability: "Grab" (also an eidolon thing, this one from the APG)
Class Special: "Cut the Corruption" (order of the green archetype, from heroes of the wild/ultimate wilderness)


They'll give you better examples of how to apply this sort of thing in the specific context you want to apply it within.

Mediator9292 September 3rd, 2023 08:55 AM

OK, I think I've figured out a workaround inspired by ShadowChemosh's Magus: Arcane Pool ability adjustment, but the end result is displaying improperly - see below:
https://imgur.com/a/ejNcIs4

As a Wondrous -Equipment, this file is named the Diamond Runestone (Weapon), with the eventual goal of manifesting 2 drop-down lists (magical weapons on hero & +5 weapon enchantments) and a 'Slotted' Activation that triggers while equipped.

Potential issues in Wondrous -Equipment options:
Can be Equipped? Yes
Show in Activated Abilities? Yes

Eval Scripts:
First, 5000, 1
Code:

      ~ If we're not enabled, get out now
      doneif (field[abilActive].value = 0)
      ~ If nothing chosen get out now!
      doneif (field[usrChosen2].ischosen = 0)
      ~ If we don't have the Add Nothing choice
      doneif (field[usrChosen2].chosen.tagis[DescInfo.?] = 0)

      ~ Destroy our own description info tag
      perform delete[DescInfo.?]
      ~ Pull the selection helpers description tag and push
      ~ to the selected weapon.
      perform field[usrChosen2].chosen.pulltags[DescInfo.?]
      perform field[usrChosen1].chosen.pushtags[DescInfo.?]

Final Phase, 10000, 2
Code:

      ~ If we're not enabled, get out now
      doneif (field[abilActive].value = 0)
      ~ If no Weapon chosen get out now!
      doneif (field[usrChosen1].ischosen = 0)
      ~ If no Weapon Power chosen get out now!
      doneif (field[usrChosen2].ischosen = 0)
      ~ If we don't have the Add Nothing choice
      doneif (field[usrChosen2].chosen.tagis[DescInfo.?] = 0)

      var critdice as number

      ~ Set pointer to the selected weapon
      perform field[usrChosen1].chosen.setfocus

      ~ Flaming
      If (field[usrChosen2].chosen.tagis[DescInfo.iFlaming] = 1) Then
        #extradamwithavg[focus," plus 1d6 fire",field[thingname].text,"3.5"]

      ~ Flaming Burst
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iFlamBurst] = 1) Then
        critdice = focus.tagvalue[wCritMult.?] + focus.tagcount[Broadcast.CritMult] - 1
        #extradamwithavg[focus," plus 1d6 fire",field[thingname].text,"3.5"]
        #extracrit[focus,signed(critdice) & "d10 fire",field[livename].text]

      ~ Frost
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iFrost] = 1) Then
        #extradamwithavg[focus," plus 1d6 cold",field[thingname].text,"3.5"]

      ~ Icy Burst
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iIcyBurst] = 1) Then
        critdice = focus.tagvalue[wCritMult.?] + focus.tagcount[Broadcast.CritMult] - 1
        #extradamwithavg[focus," plus 1d6 cold",field[thingname].text,"3.5"]
        #extracrit[focus,signed(critdice) & "d10 cold",field[livename].text]

      ~ Keen
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iKeen] = 1) Then
        perform focus.assign[Helper.Keen]

      ~ Shock
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iShock] = 1) Then
        #extradamwithavg[focus," plus 1d6 electricity",field[thingname].text,"3.5"]

      ~ Shocking Burst
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iShockBrst] = 1) Then
        critdice = focus.tagvalue[wCritMult.?] + focus.tagcount[Broadcast.CritMult] - 1
        #extradamwithavg[focus," plus 1d6 electricity",field[thingname].text,"3.5"]
        #extracrit[focus,signed(critdice) & "d10 electricity",field[livename].text]

      ~ Bane
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iBane] = 1) Then
        #extradamwithavg[focus," plus 2d6 vs. bane",field[thingname].text,"7"]

      ~ Speed
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iSpeed] = 1) Then
        perform focus.assign[Helper.ExtraHigh]

      ~ Anarchic
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iAnarchic] = 1) Then
        #extradamwithavg[focus," plus 2d6 vs. lawful",field[thingname].text,"7"]

      ~ Axiomatic
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iAxiomatic] = 1) Then
        #extradamwithavg[focus," plus 2d6 vs. chaos",field[thingname].text,"7"]

      ~ Holy
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iHoly] = 1) Then
        #extradamwithavg[focus," plus 2d6 vs. evil",field[thingname].text,"7"]

      ~ Unholy
      ElseIf (field[usrChosen2].chosen.tagis[DescInfo.iUnholy] = 1) Then
        #extradamwithavg[focus," plus 2d6 vs. good",field[thingname].text,"7"]

      Endif

Validation Phase, 10001, 3
Code:

      field[usrCandid2].text = "component.SelectHelp & (" & tagids[PackSelect.?,"|"] & ")"
Render, 11000, 4
Code:

      ~ If no Weapon chosen get out now!
      doneif (field[usrChosen1].ischosen = 0)
      ~ If no Weapon Power chosen get out now!
      doneif (field[usrChosen2].ischosen = 0)
      ~ If we don't have the Add Nothing choice
      doneif (field[usrChosen2].chosen.tagis[DescInfo.?] = 0)

      ~ Set pointer to the selected weapon
      perform field[usrChosen1].chosen.setfocus

      ~ Append power name to weapon
      field[usrChosen1].chosen.field[livename].text &= " (" & field[usrChosen2].chosen.tagnames[DescInfo.?] & ")"

Can you help me identify where the display issue could be coming from?

Lord Magus September 3rd, 2023 11:12 AM

Do you have a picture of the improper display?

Mediator9292 September 6th, 2023 08:19 AM

Quote:

Originally Posted by Lord Magus (Post 302108)
Do you have a picture of the improper display?

Yes, I forgot to include the link!
https://imgur.com/a/ejNcIs4


All times are GMT -8. The time now is 12:31 AM.

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