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

[HELP] Creature Gen API add XP line

I want my Creature gen to include xp as to work with my xp script. Any tips?
1472227114
The Aaron
Pro
API Scripter
Can you link the script?  Are you going to make the JS changes, or are you looking for someone to do it for you?
<a href="https://github.com/Roll20KenL/Roll20_API_Scripts/b" rel="nofollow">https://github.com/Roll20KenL/Roll20_API_Scripts/b</a>... Im very green to scripting but would love to learn more, if its a simple addition I would love to be shown where and how to change it.
1472228547
The Aaron
Pro
API Scripter
I've never actually used this script. &nbsp;Can you post a block that it would import, including the XP part you hope to add? &nbsp;Also, the command you would run to do the import (I'm assuming the block goes in the GM notes on a token?). &nbsp;I'll see if I can spot where you'd need to change it and give you some direction. &nbsp;You can give it a shot and if you run into issues, I'm sure we can help further! &nbsp;=D
The script works by pasting a block like this into the tokens note field; GOBLINCR 1/3 XP 135 Goblin warrior 1 NE Small humanoid (goblinoid) Init +6; Senses darkvision 60 ft.; Perception –1 DEFENSE AC 16, touch 13, flat-footed 14 (+2 armor, +2 Dex, +1 shield, +1 size) hp 6 (1d10+1) Fort +3, Ref +2, Will –1 OFFENSE Speed 30 ft. Melee short sword +2 (1d4/19–20) Ranged short bow +4 (1d4/×3) STATISTICS Str 11, Dex 15, Con 12, Int 10, Wis 9, Cha 6 Base Atk +1; CMB +0; CMD 12 Feats Improved Initiative Skills Ride +10, Stealth +10, Swim +4; Racial Modifiers +4 Ride , +4 Stealth Languages Goblin Then I execute the !CreatueGen and it creates a "character" It populates all these values but leaves out the XP value The XP generator im using can make a macro that pulls the info from the XP attribute on the character page and adds it to an xp pool.
1472234179
The Aaron
Pro
API Scripter
Give this a try...&nbsp;<a href="https://gist.github.com/shdwjk/f78cad17e9edfe973f5aa9c2ddd51df0" rel="nofollow">https://gist.github.com/shdwjk/f78cad17e9edfe973f5aa9c2ddd51df0</a>
nope; seems to halt the script: There was an error during token generation. Please see the log for details, and delete the erroneous journal entry.
"-----Please ensure that the statistics block is properly formatted.-----"
1472235992
The Aaron
Pro
API Scripter
Hmm... just noticed a typo I made.. I updated the above gist, grab it again and see if that works. &nbsp;
The new one populates the creature but the xp attribule still doesnt show
1472236778
The Aaron
Pro
API Scripter
hmm... &nbsp;hurray for typos! &nbsp;Updated the above gist. &nbsp;I had it setting the init attribute. =D &nbsp;I bet you init is 135 if you imported the above.
heres the new err... "ERROR: You must pass in a valid 'characterid' property when creating an attribute."
1472237447
The Aaron
Pro
API Scripter
Next bug fixed! &nbsp;Had wrong number of parameters on the addAttribute() call. =D
by god man you have done it! you are truly a scriptomancer!
1472237673
The Aaron
Pro
API Scripter
Hahahahaha! &nbsp;Great! &nbsp;Would have gone faster if I was actually running it instead of hacking blind, but I'm glad we got it! &nbsp;=D Happy Rolling!