SWS game settings progress.

Discussion of initiative tool.

Moderators: dorpond, Azhrei

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

SWS game settings progress.

Post by drswoboda »

Well I decided to still try and get something working in the current build. What I have so far is the Defensive stats, some misc properties and a hacked display form which has the logic for adding the condition track to the defensive stats (later will affect the ability and skill rolls. I lost all the cool buttons Jay had, but am sure they can be added back in later. WHile working on this I have added to Jay's file, but have not deleted any of his D&D logic so there is lots of stuff in these files.

I have added new skills, but have done nothing with the calculation logic. The only logic so far is with Def stats and the Condition Track.

Jay, I do have a question on a JavaScript (I barely know what I am doing there). With Reflex DEF, I need to choose between one of two values. Either "heroicLevel" or "armorBonus". I have tried the following script, which doesn't work.

Code: Select all

          <property name="heroicOrArmorBonus" type="SCRIPT">
            <description>Not setup yet. If the character is not wearing armor, heroic level. If wearing armor, then use armor bonus. Current formula is just heroic Level.</description>                      
            <script>JavaScript::
            			var Java = new JavaImporter(net.rptools.chartool.model.db, net.rptools.chartool.model.property,
                                            java.lang, java.util, java.math, javax.swing);
            			with (Java){
            				var value = root.heroicLevel;
            				if(root.armorBonus != null) {
            					if (root.armorBonus > 0) {
            						value = root.armorBonus;
            					}
            				}
            			new BigDecimal(value);
            			}</script>
            
          </property>
I too noob to get this working. I'm pretty sure it has to do with how you have access the custom properties in the JavaScript. Can you look at my files here: http://gallery.rptools.net/v/contrib/drswoboda/ and explain how I would need to code this bit. The above code has not been added to the uploaded files.

Thanks,
-David

User avatar
mrobviousjosh
Dragon
Posts: 418
Joined: Sun Dec 16, 2007 12:14 am
Location: Fort Smith, Arkansas
Contact:

Post by mrobviousjosh »

Even though I haven't been posting, I am VERY interested in what you're doing. My friends and I are starting a SWRPG Saga game using MapTools soon and this info. looks very promising. I don't know anything about scripting though so I'm afraid I can't help with this. I did make tokens for the SWRPG though that you're more than welcome to use. You can find them here. Keep up the good work!

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

Post by jay »

Try this instead:

Code: Select all

<script>if(gt(root.armorBonus, 0), root.armorBonus, root.heroicLevel)</script>
It uses the extensions I have made to the RPSctipt parser. Using RPScript is always better than using JavaScript because it can be quite a bit faster.

The only problem I see with your code is how you are accessing the properties. You can't use the dot notation (root.armorBonuse) in JavaScript because that isn't valid. You would have to use root.get("armorBonus") instead. You can use the dot notation in the get function (i.e. root.get("armorBounus.total") is valid).

The variable named 'root' is available to JavaScript. Any properties defined at the same level in the property tree as the property containing the current script are available by name in JavaScript as well. But all other properties must be accessed from using prop.get("oProp.name").

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Post by drswoboda »

Thanks Jay, that works just fine. (The DEF stats now work!)

So if I understand the logic in your statement it is as follows:

If root.armorBonus is greater than 0, Then root.armorBonus Else root.heroicLevel

That will be handy to keep in mind as I continue.
-David

User avatar
mrobviousjosh
Dragon
Posts: 418
Joined: Sun Dec 16, 2007 12:14 am
Location: Fort Smith, Arkansas
Contact:

Post by mrobviousjosh »

drswoboda wrote:Thanks Jay, that works just fine. (The DEF stats now work!)

So if I understand the logic in your statement it is as follows:

If root.armorBonus is greater than 0, Then root.armorBonus Else root.heroicLevel

That will be handy to keep in mind as I continue.
-David
drswoboda, are you planning on creating a thread sharing your formulas when you're done with them. I'd really appreciate it. :wink:

P.S. I may need help implementing your formulas though (btw, will they change everything- i.e. future uses of the tools)

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Post by drswoboda »

Yes and yes.

Yes it will get outdated. I'm sure a lot of what I am doing will need reworking once Jay gets further in development. And yes, I will share my work.

However, I am going to be starting a new group very soon and want to use Init Tool. However, if all I can do with Init Tool and SW is have basic round tracker, then I am better off with my old flash card system for now.

That is why I am trying to put together enough SW stats to actually have a programmable character battle sheet that does a lot of the work that a program like DMGenie does for D&D.

Right now I have the basic abilities (from Jay's D&D settings), the 3 defenses, the conditions track (a drop down on sheet to choose, which globally changes sheet values), and Unarmed combat values.

I am going to setup some hard coded weapons areas on the sheet.

I still need to get the basic skills setup as they are a bit different than D&D. I need to get Initiative working (its a skill now). I would like to the HP and roll buttons to work like in Jay's sheet. I need to add some basic text boxes for feats and talents until a system for that can be worked on.

Basically, I want to have the character sheet calculate as much as I can for now and then wait for Jay to continue the scripting development. But I'm sure my game will be starting well before Jay gets to that point, so I am just hacking what ever I can get to work until then.

I have been more successful than I thought I would. The actual electronic sheet is based on Jay's D&D sheet, but it is going to be a LOT messier and cluttered, but hopefully will show the data I want for battles. Hopefully most of the values will be input directly in the electronic sheet, making it fairly easy to setup a battle.

In the process I am learning the new rules, which I like (but are not without issues). In fact, during this project I have realized that there are three different sizeModifiers in SW (which is confusing and why I want this computerized).

I have posted the latest screen shot of my hacked sheet here: http://gallery.rptools.net/v/contrib/drswoboda/

-David

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

Post by jay »

drswoboda wrote:So if I understand the logic in your statement it is as follows:

If root.armorBonus is greater than 0, Then root.armorBonus Else root.heroicLevel

That will be handy to keep in mind as I continue.
-David
Yes, that is how that statement works.

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Question about displaying weapons and armor

Post by drswoboda »

Hello Jay,

Would you please take a look at this screen capture of my hacked character sheet for v1.1b2 http://gallery.rptools.net/v/contrib/dr ... 2.jpg.html

I am adding space for weapons and armor information. At present all data is added manually. What I would like to do is to use the JComboBox entries to drive the stats for these items.

I am trying to figure out if it will be possible to do this in the current state of the program, and if so if you might be able to point me in the right direction on how to possibly approach this.

My thought is to add weapons and armor in a similar fashion as you have done with skills, but in my case the selection on the sheet will drive the data input. I have used a JComboBox to drive the Conditions Track, so I think (in my limited knowledge) that this might be possible in v1.1.

However, I am not entirely sure how to try this. I thought I would make a group called SWS_Weapons. In there I would create a template for the form data called weaponA (first weapon). Then have all the weapons stats listed for each weapon sort of like how skills are done.

Then from the JComboBox choose a weapon from list, compare it to the stats for weapons, find the right one, and copy the values into weaponA for display back on the sheet.

Can this be done in current build. I know that everything I do will be trash with your newer versions, but I want to use this in a game very soon and I doubt there will be a new version that soon (or will there ;)

So, if you can point me in the right direction with perhaps a few lines of code that might show me the way, I'd be a very appreciative fan of IT.

Thanks,
-David

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

Post by jay »

I've added some components that can have their functionality scripted w/in Abielle. These are the same sort of scripts that get put into the property mapping only they work on UI component events.

They are kind of tricky to use because you have to set up Abielle so that it recognizes the new components. To do this:
  • Download and unzip Init Tool 1.1 b2
  • Start Abeille
  • Select Tools->Java Bean Manager from the menu.
  • Click Add Jar
  • Select the jar chartool-0.1.b3.jar that was in the zip file and hit OK.
  • Repeat for the jide-common.1.9.4.09.jar, jide-grids.1.9.4.09.jar and parser-1.0.b7.jar. You may get some exceptions from Abeille but you can ignore them. They will go away when you run the form in Init Tool because it has a valid license for these jars. Note that the chartool and parser jars may change between releases of IT.
  • Click on the Add Bean button back on the Java Bean Manager Dialog
  • Add the following beans from here:
    • net.rptools.chartool.ui.charsheet.component.CharSheetButton
    • net.rptools.chartool.ui.charsheet.component.CharSheetComboBox
    • net.rptools.chartool.ui.charsheet.component.CharSheetJideButton
    • net.rptools.chartool.ui.charsheet.component.CharSheetTable
    • net.rptools.chartool.ui.charsheet.component.CharSheetLabel
    • net.rptools.chartool.ui.charsheet.component.CharSheetImage
    • net.rptools.chartool.ui.charsheet.component.CharSheetRadioButton
    • net.rptools.chartool.ui.charsheet.component.CharSheetTextField
You will then be able to add these components to your forms which can be scripted by setting properties Called xxxScript. There should be examples in the D&D stuff I did but I'm not positive they are in that version.

Edit: Add the newer components.
Last edited by jay on Sun Jun 15, 2008 3:13 pm, edited 3 times in total.

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Post by drswoboda »

Hi Jay, thanks for the instructions. I have found the aforementioned 'tricky' part however.

see this post for my error message: http://gallery.rptools.net/v/contrib/dr ... 4.jpg.html

The jars load fine. The CharSheetComboBox bean loads fine. The CharSheetButton, CharSheetJideButton and CharSheetTable all give the message posted above.

I am using abeille v2.0.0(build 123) 08-31-2005 with no other addons or hacks.

Thanks,
-David

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

Post by jay »

Add the library parser-1.0.b7.jar to the list of jars in the classpath. I'll edit the post above to reflect that it is needed also.

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Post by drswoboda »

jay wrote:Add the library parser-1.0.b7.jar to the list of jars in the classpath. I'll edit the post above to reflect that it is needed also.
Thanks Jay, it works now!
-David

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Skills list, column labels lost and other Q.

Post by drswoboda »

Evening Jay,

Could you please take a look at my current game settings files located here: http://gallery.rptools.net/v/contrib/drswoboda/. I have a few questions for you.

I have hacked around with the the special component you have for displaying the Skills list. In the process I have lost the column headings in the display. I can't figure out how those are set up with that special component.

I have changed the use of two of the columns. I replaced 'Base' with "isTrained", using one of the user editable columns to allow the entry of a value for training. I replaced "totalModifiers" with with a temporary display value called "miscSkillModifers", which will hopefully in the future be replaced with logic for adds from Talents, Feats and misc. Right now it is just showing the total of "ArmorCheckPenalty" and "conditions.state".

Once I get the columns back I am pretty much set on hacking in the SWS Skills for my DM use.

On a side note, I have no clue as to where the code is that makes those two columns (isTrained and userMod) selectable and editable. I see the double-click code for other columns but can't find how you did that little bit. . .

I can see a definite wanted feature with this custom CharSheetTable component. Having the ability to have Tool tips on each line would be real nice.

I have run into a pretty thick brick wall on how to get my Weapon and Armor displays working. I am clueless as to how to get the list of weapons/armor into an array of some sort and use it to fill the display sheet with the selected weapon/armor data. At present I have the JComboBox to select the item and fill that value, but how to get it grab other data is currently beyond my abilities. Any help you can provide is appreciated.

Thanks again,
-David

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

Re: Skills list, column labels lost and other Q.

Post by jay »

drswoboda wrote:Could you please take a look at my current game settings files located here: http://gallery.rptools.net/v/contrib/drswoboda/. I have a few questions for you.
I took a look, but they wouldn't load into IT 1.1 b2. I couldn't really test any of the theories I posted below so beware.
drswoboda wrote:I have hacked around with the the special component you have for displaying the Skills list. In the process I have lost the column headings in the display. I can't figure out how those are set up with that special component.
I think that the problem here is that the form doesn't have a scroll pane around it. Go to the Tools-> Java Bean Manager and make sure the Scrollable check box for the CharSheetTable row is checked. You may have to re-add the component. Abeille forms is a little screwy with when it decides to add/remove these automatic scroll bars so it can be a pain. Maybe somebody fixed it in the 2.1 release.
drswoboda wrote:On a side note, I have no clue as to where the code is that makes those two columns (isTrained and userMod) selectable and editable. I see the double-click code for other columns but can't find how you did that little bit. . .
The code makes all BOOLEAN, NUMBER and STRING type properties editable. You can't edit them if they are scripts or any of the other types.
drswoboda wrote:I can see a definite wanted feature with this custom CharSheetTable component. Having the ability to have Tool tips on each line would be real nice.
Sounds like a good idea. Where would I get the tool tip text?
drswoboda wrote:I have run into a pretty thick brick wall on how to get my Weapon and Armor displays working. I am clueless as to how to get the list of weapons/armor into an array of some sort and use it to fill the display sheet with the selected weapon/armor data. At present I have the JComboBox to select the item and fill that value, but how to get it grab other data is currently beyond my abilities. Any help you can provide is appreciated.
This is a tricky thing to do. To get a list of values you can create a property of type LIST. You can use this to save the list of weapons and armor for each character. Then you could use a script to read each of the items in the list and fill your combo box. When the GM selects a value another script would remove the old modifiers then add the new ones. I've written some scripts to do this. Search for 'applyCondition' and 'removeCondition' and the properties used to access them in the rpgame XML file. I need to look into making it easy tp set these list properties, but I've not got that far yet so it might be difficult to do right now. I have set up rpdat files that I use to contain modifier sets and was planning to use something like that for the base list of things like weapons and armor. Then you can add a reference to a record from the rpdat file for each weapon and piece of armor available. That is the plan anyway.

I appreciate you trying all of this stuff out. It is still early in development and working with things that are half finished can be very frustrating. Thank you for the feed back!

User avatar
drswoboda
Dragon
Posts: 313
Joined: Tue Apr 25, 2006 12:54 pm
Location: Milwaukee, WI

Post by drswoboda »

Hi Jay,

Thanks for the reply. Say that is strange that it would not load on your system as I am using v1.1b2 from the download pages. Is it the form that doesn't load, or the game settings that barfs? I am also using the standard download of Abeille along with the addons you posted. Strange.

Okay, you nailed it the column heads. That did the trick and I now have my column headings back. One more note about the custom CharSheetTable component. I can't find a way to adjust the font or size of the column headings, is there a way to do that at present. If not, that would be a good addition. Also, to allow a multi-line col heading would be great.

Re: The editable fields in CharSheetTable, thanks for the heads up on this issue. I had a thought when you mentioned the BOOLEAN property. I'm not sure I remember seeing you use that property in the D&D settings yet. Can I use that property along with a CheckBox on a form? I have a few properties that would be perfect for a check box on the sheet.

Re: The row Tool Tips idea. Will depending on your final data set design, I'd opt for having the ability to use either the DESCRIPTION or better yet, an ALT DESCRIPTION field for a Skill, Feat, Talent, Weapon or Armor. That way I can code a detailed comment or game mechanic into a tool tip for the selected item in the list.

Re: The pulling of weapon/armor data to sheet via a JComboBox selection. Thanks for the heads up here. This is where I'll probably have to wait due to my limited programming abilities and see what you come up with in the future builds. For now I will probably just do a manual entry for the data until the lookup idea can work. I think this is a big area of the design document. Having lists of data and being able to pull it easily for display on the sheet is a huge benifit.

I started hacking around with IT with the current version because I saw the beginnings of a user modifiable electronic initiative and character data sheet tool. I am pleasently surprised that I have almost got it in a rough form to track my Star Wars battle data. There is no other tool I have found that allows this type of flexibility to the end user. Kudos to you guys for writing this cool tool.

-David

Post Reply

Return to “InitiativeTool”