Feats

Discussion of and general support for d20 D&D, including 3.0E and 3.5E and derivatives.

Moderators: dorpond, Azhrei

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Feats

Post by jay »

That is all that is in there. I don't think I received any of this work.

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

Hullo,
CT n00b here, picking up the torch on adding feats to CT. Never used CT before this week, and little programming knowledge (beginner's c++, no java) but am one hell of a grind. Already got some added from the PHB I, all the way up to Combat Expertise, and all Item Creation and Metamagic feats from that book. Any pointers will be appreciated, gonna use already posted info as a reference. Will post as each book is completed.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

I have been tackling the feats in the order they appear in Table 5-1: Feats PHB I pg. 90, dealing with feat trees as they appear, and am currently on Endurance/Diehard.

I am having issue with the feat trees, however.
For example, for the armor profs, it shows a value of true for Armor Prof (light), but no value at all for medium or heavy, not even false. and when I add Armor prof light to my character it does not change. Same for other feat trees; the first in each tree shows available as true and each one after has no value at all, even when the first feat is added.

for Armor Prof Med I have:
<prerequisiteMet>inList(root.feats, "Armor Proficiency (Light)", "name")</prerequisiteMet>

and for Armor Prof Hvy I have:
<prerequisiteMet>and(inList(root.feats, "Armor Proficiency (Light)", "name"),inList(root.feats, "Armor Proficiency (Medium)", "name"))</prerequisiteMet>

And similar <prerequisiteMet></prerequisiteMet> for the other feat trees I have ran into.

On another note, how do you check for ability scores? for example, dodge needs Dex 13+.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Feats

Post by jay »

Thanks for the help! Anything that you send to me will be placed into the game settings file.

All of the feats' scripting is done in JavaScript for complicated ones or our own little scripting language for the simple ones. If you need any help just ask.

Jay

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Feats

Post by jay »

ntzrmtthihu777 wrote:<prerequisiteMet>inList(root.feats, "Armor Proficiency (Light)", "name")</prerequisiteMet>

and for Armor Prof Hvy I have:
<prerequisiteMet>and(inList(root.feats, "Armor Proficiency (Light)", "name"),inList(root.feats, "Armor Proficiency (Medium)", "name"))</prerequisiteMet>

And similar <prerequisiteMet></prerequisiteMet> for the other feat trees I have ran into.
That will work, but it won't pick up class armor proficiency.
ntzrmtthihu777 wrote:On another note, how do you check for ability scores? for example, dodge needs Dex 13+.

Code: Select all

ge(root.dex.current, 13)

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

jay wrote:
ntzrmtthihu777 wrote:<prerequisiteMet>inList(root.feats, "Armor Proficiency (Light)", "name")</prerequisiteMet>

and for Armor Prof Hvy I have:
<prerequisiteMet>and(inList(root.feats, "Armor Proficiency (Light)", "name"),inList(root.feats, "Armor Proficiency (Medium)", "name"))</prerequisiteMet>

And similar <prerequisiteMet></prerequisiteMet> for the other feat trees I have ran into.
That will work, but it won't pick up class armor proficiency.
ntzrmtthihu777 wrote:On another note, how do you check for ability scores? for example, dodge needs Dex 13+.

Code: Select all

ge(root.dex.current, 13)
But that's just it, it does not give a true/false value on availability. That slot is just blank.

Ah, so that is how you make it show as code and not just text. Thank you for that.
And thanks on the ability score checker.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Feats

Post by jay »

I may not understand the problem you're having. The code you posted looks fine if you have a feat named 'Armor Proficiency (Light)'. It will not work if you have a feat named 'Armor Proficiency' let the user type in 'Light'. In that case you should use this:

Code: Select all

eq(listGet(root.characterFeats, 'Armor Proficiency', 'name', 'optionValue', 'notFound'), 'Light')
Or am I misunderstanding your problem?

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

jay wrote:I may not understand the problem you're having. The code you posted looks fine if you have a feat named 'Armor Proficiency (Light)'. It will not work if you have a feat named 'Armor Proficiency' let the user type in 'Light'. In that case you should use this:

Code: Select all

eq(listGet(root.characterFeats, 'Armor Proficiency', 'name', 'optionValue', 'notFound'), 'Light')
Or am I misunderstanding your problem?
Here. I have attached the work I have done so far. Load it up and try adding feats from the trees on a 3.5 character sheet. the spot that should say true/false is just blank.
And yes, I have three individual feats for armor proficiency
Attachments
d20fantasy.zip
(473.98 KiB) Downloaded 238 times
Last edited by ntzrmtthihu777 on Tue Sep 25, 2012 11:02 am, edited 1 time in total.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Feats

Post by jay »

There is a bug in your code for the feats dependent on other feats. You are referencing the property root.feats when it should be root.characterFeats. Did you not get an exception from CT?

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

jay wrote:There is a bug in your code for the feats dependent on other feats. You are referencing the property root.feats when it should be root.characterFeats. Did you not get an exception from CT?
It gave no error message, and thank you. I just copy-pasted one of the earlier examples in the forum here:
jay wrote:Use this line instead:

Code: Select all

<prerequisiteMet>inList(root.feats, "Point Blank Shot", "name")</prerequisiteMet>
It will search through the list of feats for a feat named "Point Blank Shot".
In fact that was your code I copied, lol. Shoulda' paid attention when you posted:

Code: Select all

eq(listGet(root.characterFeats, 'Armor Proficiency', 'name', 'optionValue', 'notFound'), 'Light')
The difference should have tipped me off right then, lol.

Like I said I have little to no programming knowledge, and what little I do know is C++. Basically I am just doing it by rote, lol. All for the love of game, right? I will fix the error, thank you again.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Feats

Post by jay »

I called them feats in the 4e file, and characterFeats in the d20 file. I have no idea as to why :). If you look in the propertyDescriptorSet.xml file you can see the name of all the available properties for a character.

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

Haha, yeah, uniformity would be a good thing, right?
If you could set up the framework I could weapons and armor too.
Hell back in the day I downloaded an excel spreadsheet that could take any phb core class and race and level them up to 20th, only a single class though. I tore it apart and added all kinds of crap from other sourcebooks. Lost it over the years, but I guess its a good thing since I found CT instead. Hehe, I guess the 3.5 setup for CT can be my new pet project, lol.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

Hmm, strange. Once I added all PHB I feats (just need to write in their prerequisites) and reloaded the current game and went to add a feat (it displayed fine for a bit) it gave me this error message:

Code: Select all

java.lang.NullPointerException
	at net.rptools.parser.EvaluationTreeParser.evaluate(EvaluationTreeParser.java:51)
	at net.rptools.parser.Expression.evaluate(Expression.java:55)
	at net.rptools.chartool.model.property.RPScript.execute(RPScript.java:195)
	at net.rptools.chartool.model.property.DefaultScriptPropertyValue.execute(DefaultScriptPropertyValue.java:167)
	at net.rptools.chartool.model.db.PropertyTableModel.getValueAt(PropertyTableModel.java:192)
	at com.jidesoft.grid.TableModelWrapperImpl.getValueAt(Unknown Source)
	at com.jidesoft.grid.DefaultTableModelWrapper.getValueAt(Unknown Source)
	at com.jidesoft.grid.TableModelWrapperImpl.getValueAt(Unknown Source)
	at com.jidesoft.grid.DefaultTableModelWrapper.getValueAt(Unknown Source)
	at javax.swing.JTable.getValueAt(Unknown Source)
	at javax.swing.JTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.JideTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.CellSpanTable.prepareRenderer(Unknown Source)
	at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paintCell(Unknown Source)
	at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.a(Unknown Source)
	at com.jidesoft.plaf.basic.BasicJideTableUIDelegate.paint(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellSpanTableUIDelegate.paint(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
	at javax.swing.plaf.ComponentUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JViewport.paint(Unknown Source)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.chartool.ui.LoggingEventQueue.dispatchEvent(LoggingEventQueue.java:74)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.Dialog$1.run(Unknown Source)
	at java.awt.Dialog$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at net.rptools.chartool.ui.LoggingEventQueue.dispatchEvent(LoggingEventQueue.java:85)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.Dialog$1.run(Unknown Source)
	at java.awt.Dialog$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at net.rptools.chartool.ui.component.RPDialog.setVisible(RPDialog.java:222)
	at net.rptools.chartool.ui.charsheet.component.CharSheetUtils.showGameSettingsTableDialog(CharSheetUtils.java:208)
	at net.rptools.chartool.ui.charsheet.component.CharSheetUtils.addToListFromGameSettingsTable(CharSheetUtils.java:497)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.reflect.misc.Trampoline.invoke(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
	at sun.org.mozilla.javascript.internal.MemberBox.invoke(Unknown Source)
	at sun.org.mozilla.javascript.internal.NativeJavaMethod.call(Unknown Source)
	at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Unknown Source)
	at sun.org.mozilla.javascript.internal.Interpreter.interpret(Unknown Source)
	at sun.org.mozilla.javascript.internal.InterpretedFunction.call(Unknown Source)
	at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(Unknown Source)
	at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(Unknown Source)
	at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(Unknown Source)
	at com.sun.script.javascript.RhinoCompiledScript.eval(Unknown Source)
	at net.rptools.chartool.model.property.CompiledScript.execute(CompiledScript.java:100)
	at net.rptools.chartool.ui.charsheet.component.CharSheetComponentScript.executeEventScript(CharSheetComponentScript.java:199)
	at net.rptools.chartool.ui.charsheet.component.CharSheetJideButton$1.actionPerformed(CharSheetJideButton.java:92)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at com.jidesoft.plaf.basic.BasicJideButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.awt.EventQueue$2.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.chartool.ui.LoggingEventQueue.dispatchEvent(LoggingEventQueue.java:74)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Any idea what this is all about? Is it just random coincidence that this happened after I added all the feats, or do you think that's what caused the error?
I have attached the latest version of d20fantasy.rpgame for your inspection.
Attachments
d20fantasy.zip
(483.23 KiB) Downloaded 263 times
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

ntzrmtthihu777
Cave Troll
Posts: 31
Joined: Sun Sep 23, 2012 4:34 am

Re: Feats

Post by ntzrmtthihu777 »

Hmm, loaded your default d20fantasy.rpgame (kept a backup copy) and no issue. Reloaded my version and tried again. Turns out it only spits out that error when you click or scroll within the add feat pop-up window.
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.

Post Reply

Return to “Support: d20 D&D”