Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / new diceroll plugin

Author
Message
Duffer
14
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 15th Nov 2013 09:54 Edited at: 15th Nov 2013 18:25
I had a go at one of these plugins before:-

http://forum.thegamecreators.com/?m=forum_view&t=206615&b=18

Decided it could do with functions to give a probable lowest roll of the dice, highest roll of the dice and average.

So you could for instance figure out what the value of one roll of the 'iron sword' doing the [string] of 2D4+9 was, randomised, but you could also use functions to reach say a minimum value of 3 and a maximum value of 17. So describing the sword's damage you could either say it did 2D4+9 or 11 to 17, if you see what I mean.

[edit]

I've added another string return command...

Anyhows, here is the command list:-

+ Code Snippet

and I attach the .rar file with ini, help and dll files in the usual folders.

I think it is pretty darn fast.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Duffer
14
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 17th Nov 2013 13:51
anyone any comments? (that aren't too rude)

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Rudolpho
11
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 19th Nov 2013 23:57
So... 'd' is basically replaced with min + (rand() % (max - min))?
I suppose it has its uses, but usually you would write these things directly in your code, or possibly as a script, thus not really needing to parse a string.
That may be why there aren't so many replies yet


"Why do programmers get Halloween and Christmas mixed up?" + Code Snippet
Duffer
14
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 20th Nov 2013 07:47 Edited at: 20th Nov 2013 07:48
@ Rudolpho,

You're probably right (re people who might use it) - but it is pretty darn fast in comparison to basic dbpro hardcoding of it and, at it's core, it uses a regular expression ( "[-+]?([0-9]*[Dd][0-9]*|[0-9]+)" ).

I suspect my SQLITE plugin is of more general use to the community - but a couple of plugins kicking around like this one 'don't hurt'...

Thanks for trying it out, anyway.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Login to post a reply

Server time is: 2017-08-23 01:44:38
Your offset time is: 2017-08-23 01:44:38