Jump to content

Advice...on dice!


RobertLuke
 Share

You are about to reply to a thread that has been inactive for 1450 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi, I wonder if anyone can suggest the right way around for some 'combat dice' scripting?

As part of a RP setting, I am trying to create a chance for combat, based on rp'ing the scene, with dice adding to the attacks. Currently, we can roll dice to see if *Bob* scores higher than *Kevin*, but there's no chance to evaluate if *Bob* is a grizzled warrior, and *Kevin* a boy fresh off the farm with a twig in his hand. Obviously Kevin needs a chance to defeat Bob by the alignment of the cosmos on a particulary fortuitous day, but idealy, Bob will win 9 out of ten times.

In an ideal world...they'd rezz an object, both touch it..and it would refer to a server which knows what Bob get's in addition to his base roll, and what Kevin gets. IE..in the server database, Bob might be registered as having a base score of 10, while Kevin is 1. 

They'd then rp a scene, where if one lashes out, they'd roll dice....the object would declare inworld the score, and the next part of the rp would incorporate that.

Once one or the other had hit a particular target....say 100..... it would declare a winner. In an even better world, it would then ADD an additional 1 to Bob's base dice rolls after for example 10 wins, and subtract 1 from Kevin after say 5 losses (just to keep people from thinking a fight is a better way out than diplomacy.)

As a novice, I'm trying to work out if the object can talk to the server on behalf of both....ie if they touch it, it will tell each their score, having referred to the server, and also keep tracl of the totals?

Thanks in advance for any suggestions.

 

Link to comment
Share on other sites

I don't know about the specifics of your game, but the general challenge is one that you can handle easily with KVP, if you have access to an Experience.  Simply create a key for each player, store current scores and other parameters in that key, and then refer to it for information and when you need to make any updates. See

and http://wiki.secondlife.com/wiki/Category:Experience_Tools

 

 

Link to comment
Share on other sites

To own an Experience, you need to be a Premium member, but if you are a member of a group that is listed in Experience's profile you can be designated as an Experience Contributor to the group even if you are not a Premium member yourself.  That might open up a possibility for you.

If you have absolutely no access to an Experience, the challenge becomes more difficult.  In that case, you'll have to maintain a database on a server somewhere and then be able to communicate with it in real time to search for (or update) any stored information.  The "server" could be a scripted prim somewhere -- preferably on the same region where you are running your game -- or it could be an off-world server like Amazon's.  An in-world server is the easier of the two options, as long as you don't plan on resetting its script (or have made a backup provision for what happens if it's reset accidentally).  Once you start dealing with an external server, you get into all the issues of communicating with it by HTTP and handling its own protocols and language.

All in all, KVP is dramatically simpler (and more reliable) than your other options, but if it's not available to you, you're stuck doing it a harder way.

Link to comment
Share on other sites

Yup...gonna be the hard way! LOL. I'm able to rezz a prim in the sim, so that's not an issue...I can use that as the information server, and if I'm right one prim can be touched and communicate with the server for each particpant in the 'duel'? If so, I'll use that as the starting point and start to research the best way to write it.

Thank you!

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1450 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...