Feats
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
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.
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.
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
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+.
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.
Re: Feats
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
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
Re: Feats
That will work, but it won't pick up class armor proficiency.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.
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)
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
But that's just it, it does not give a true/false value on availability. That slot is just blank.jay wrote:That will work, but it won't pick up class armor proficiency.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.
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)
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.
Re: Feats
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:
Or am I misunderstanding your problem?
Code: Select all
eq(listGet(root.characterFeats, 'Armor Proficiency', 'name', 'optionValue', 'notFound'), 'Light')
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
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.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:Or am I misunderstanding your problem?Code: Select all
eq(listGet(root.characterFeats, 'Armor Proficiency', 'name', 'optionValue', 'notFound'), 'Light')
And yes, I have three individual feats for armor proficiency
- Attachments
-
- d20fantasy.zip
- (473.98 KiB) Downloaded 241 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.
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
It gave no error message, and thank you. I just copy-pasted one of the earlier examples in the forum here: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?
In fact that was your code I copied, lol. Shoulda' paid attention when you posted:jay wrote:Use this line instead:It will search through the list of feats for a feat named "Point Blank Shot".Code: Select all
<prerequisiteMet>inList(root.feats, "Point Blank Shot", "name")</prerequisiteMet>
Code: Select all
eq(listGet(root.characterFeats, 'Armor Proficiency', 'name', 'optionValue', 'notFound'), 'Light')
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.
Re: Feats
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.
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
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.
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.
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
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:
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.
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)
I have attached the latest version of d20fantasy.rpgame for your inspection.
- Attachments
-
- d20fantasy.zip
- (483.23 KiB) Downloaded 264 times
Dropbox Referral Link - Join with this, and both you and I get an extra .5 gigabytes of storage, 2.5 total for you.
-
- Cave Troll
- Posts: 31
- Joined: Sun Sep 23, 2012 4:34 am
Re: Feats
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.