-
April 23rd, 2007, 21:57 #1
- Join Date
- Dec 2004
- Location
- Chicago-ish
- Posts
- 2,234
Who is going to create the first usefull script?
So, who's it going to be and what will it do?
rv
-
April 23rd, 2007, 22:07 #2
I have one built into the source code hehe. Look at the chat_chat.lua file for this section:
Code:-- local dicetable = {}; -- dicetable = draginfo.getDieList(); -- local size = table.maxn(dicetable) -- for i= 1,size do -- if (dicetable[i].type == "d10" and dicetable[i].result == 10) then -- local explodetable = {}; -- table.insert(explodetable, "d10"); -- throwDice("dice", explodetable, 0, "Exploded"); -- end -- end
- Copy the d20 ruleset folder to a new directory and copy the following files: base.xml, desktop.xml, desktop_classes.xml, scripts/chat_chat.lua.
- In the chat_chat.lua file comment the above section out.
- In the base.xml file change the desktop.xml to your custom ruleset location.
- In the desktop.xml file change the desktop_classes.xml to your custom ruleset location.
- In the desktop_classes.xml section change the chat_chat.lua reference to your custom ruleset location.
Now roll a d10 or several d10 until you get a 10 and it should roll another one automatically. During the beta this would crash the program but the devs said they fixed it so someone test it out before I can.Last edited by joshuha; April 23rd, 2007 at 22:09.
-
April 23rd, 2007, 22:12 #3
- Join Date
- Dec 2004
- Location
- Chicago-ish
- Posts
- 2,234
Ok... the first one not built into the base code.
Cheater.
rv
-
April 24th, 2007, 00:57 #4
I'm not a programmer, but here's a script I'd really like to see.
Start with text files full of items.
I'd like to be able to select a text file and randomly generate an item from the chosen file.
That would be extremely handy for names, place, things, attributes to items, encounters, equipment, - I could go on and on.
If anyone knows if this is possible, I'd really like to see something on it.
-
April 24th, 2007, 09:35 #5
Well, it seems to be working now. No bugs and exploding D10s.
Hmmm... I keep poking at it a bit as well to add a stress-die with less than stellar results.
Basically what I need is this :
On a 1 : Reroll and Double the next roll, if that too is a 1 reroll again and double twice. IE x2 x4 x8 x16 x32 x64 x128 etc etc.
On a 0 : Reroll and substract, on a second zero, reroll and double and substract the final roll. IE x-1 x-2 x-4 x-8 x-16 x-32
-
April 24th, 2007, 14:08 #6Originally Posted by Oberoten
-
April 24th, 2007, 14:09 #7Originally Posted by nezzir
-
April 24th, 2007, 14:37 #8Originally Posted by joshuha
Edit: Available after the next update, of course...Tero Parvinen
Fantasy Grounds Guru
-
July 19th, 2007, 21:35 #9
- Join Date
- Jan 2007
- Posts
- 22
So is there any way to check the Crit field to see if the die >= the crit and roll an extra d20 if it is?
-
July 19th, 2007, 21:42 #10
Yes thats easily doable once you parse out whats in the field.
Just in the chat_chat.lua file look for the onDiceLanded event and you would process the results then and do a throwDice() command with the appropiate parameters.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks