Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

my (Stolen) code for automated

I have modified the Starwars Saga Character Sheet Generator to generate an automatic blank slate sheet for dungeons and dragons 3.5. credit to Alicia G for the basis of what I've done here so far. I am not a coder however, and though I understand how to follow and modify others scripts, I am lacking in any real skill with this system. I have several open parts where I am planning on getting API commands to work with the numbers provided, so If it looks like a lot of useless information it probably is. at least for now. Using the Sheet (A Guide for Everyone) Stats : when recording your Strength, Dexterity, Constitution, Intelligence, Wisdom and Charisma, you must reverse the usual way they are lain out. you put your actual stat in the right slot&nbsp; (&nbsp;&nbsp;&nbsp; / X )&nbsp; and the modifier number in the left&nbsp; ( X /&nbsp;&nbsp;&nbsp; ) .&nbsp;&nbsp; This is because Macros that refer to your stats pull the number they want to add to the roll from the left slot, not the right.&nbsp; if done correctly, it should look similar to this:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Strength&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; 2&nbsp; /&nbsp; 14&nbsp; ) where the 14 is your strength score and the 2 is the +2 strength modifier this grants you. when you reference Strength in your Macros, it will send the (&nbsp; 2&nbsp; ) as its value Skills : these are a little different. First of all, you record your rank in a skill in the _max column (&nbsp;&nbsp;&nbsp; /&nbsp; X&nbsp; )&nbsp; and then you add up all your other modifiers that apply to the roll in question, including your rank, but excluding your stat bonus, and put that figure in the _value column (&nbsp; X&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp; ) .&nbsp;&nbsp; This is because the macros that roll your skill checks pull your stat modifiers directly from your stat's _value. this allows for increases and decreases to be applied when your stats change, such as when under the influence of a spell or effect. for example, out strength 14 fighter has to climb a cliff. He needs to figure out his modifiers. Well, lets say he has 5 ranks in climb. Thats easy, right? it would look like this: Climb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; 5&nbsp; /&nbsp; 5&nbsp; ) but what if he also had skill focus jump?&nbsp;&nbsp; then he would need to apply the +3 bonus from that feat to his climb_value, so he would record it like this: Climb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; 8&nbsp; /&nbsp; 5&nbsp; ) if Climb had any other modifiers (racial, synergy, or anything else really) it would also stack up in the first column. Why? Because when you roll a climb check, it takes your Climb_value and add your Strength_value and adds them to your d20 roll. Don't worry, its not as bad as it sounds. and the reason I list the ranks in the _max slot is because it lets you see easily where your ranked skills are. (and in the future when I have a working API skill roller, it will automatically apply synergy bonuses where they apply.) AC-&lt;type&gt; : these are all there for now as easy to see ways of calculating a characters armor class. they have no current function, though in the future I plan on having the API call these values and calculate them for various combat functions (touch attacks, flatfooted, etc) Weapons and Combat : here is where you record your currently equipped weapon. MeleeWeapon = display name of attack MeleeAttack = specific bonuses that apply to your currently selected weapon. (this could include but is not limited to magical modifiers, weapon focuses, masterwork bonuses, or that little +1 modifier you are hiding from the DM cause it doesn't really exist) MeleeDamage = this is the complete run of damage from your attack. for an attack that causes 1d8 damage with a +2 weapon spec bonus and adds its magical +1 bonus along with 1d6 fire damage from its flaming property, you could put its value as: "1d8 + 3 + 1d6" I realise these could be set up as separate macros for each attack, but I want an API command that sets each of these values via a simple if long chat command. this would allow players to set weapon sets for their characters via macros and it would calculate each set using the same macro for attack. (an example: !equip melee Boron longsword +3, 1d8+3+1d6&nbsp;&nbsp;&nbsp; would change Borons MeleeWeapon to longsword, his MeleeAttack to 3, and his MeleeDamage to 1d8 + 3 + 1d6.) there is also the same thing following offhand weapons using the prefix MeleeOff and one for ranged that uses Ranged. it works exactly the same way, just put in your stats as you desire. Misc :&nbsp; these are here for macro reference and easy character modifying.&nbsp; Power_Attack: the number in this slot is the level of power attack that applies to a characters attack. duh, I know, but you can assign it to one of the characters balloon bubbles so they can manage it themselves. i use the red one. (bar3) Combat_Expertise: same as above. If a character has it, they can modify it themselves from one of the icon bubbles. Rapidshot is there as a holder. can currently be used for any ranged modifier such as rapidshot, like multishot or manyshot. &lt;script src="<a href="https://gist.github.com/Fantell/5794217.js&quot;&gt;&lt;/script" rel="nofollow">https://gist.github.com/Fantell/5794217.js"&gt;&lt;/script</a>&gt;
sigh. why did I post it before I'd finished titling the post?
first of all, is anyone using the script? and third, did I miss anything&nbsp; that could be useful? (Actually, I am aware of sneak attacks not calculating, working on that with testing right now, and favored enemy bonuses or bane weapons aren't currently supported but their has to be something else I missede). I am attempting to make as comprehensive as possible character sheet that the API can hook into so I can make (or someone else can) scripts that call the values and automate a lot of the math for various 3.5 things.
1371642283
Alex L.
Pro
Sheet Author
Michael H. said: first of all, is anyone using the script? and third, did I miss anything&nbsp; that could be useful? (Actually, I am aware of sneak attacks not calculating, working on that with testing right now, and favored enemy bonuses or bane weapons aren't currently supported but their has to be something else I missede). I am attempting to make as comprehensive as possible character sheet that the API can hook into so I can make (or someone else can) scripts that call the values and automate a lot of the math for various 3.5 things. you should really set this up as some arrays of names and values with a few loops to enter them into Roll20 your current way of doing it is going to be almost impossible to maintain by comparison.
I really should, but as I mentioned, I'm not a coder, and at the moment, this works. I am looking into how exactly to set it up as an array, but have three kids and a job, so its slow. ( I understand Arrays are not that difficult, I just haven't clicked with them yet - I'm about half way to understanding how to set it up that way - self taught and only been doing this for a few weekends) In the mean time, I'm actually working on a script to change the various values, so this has taken a slight backseat, at least till I have my !equip command set out right. thats the biggest thing that effects my players at the moment, and its what I want to get going. of course, having trouble with it, learning as I go, but oh well. I'm learning more about javascript with each script I modify, even if its only cut and paste stuff at the moment