Editing output string params and addind sorting operation

Greetings!
First of all I want to thank all Vassal developers. It’s a great deal!

And I have some troubles. Maybe you can help me.

In modules buildFile I have:

VASSAL.build.module.DiceButton hotkey="" icon="/images/die.gif" nDice="16" nSides="6" name="xd6" plus="0" prompt="true" reportFormat="** $name$ = $result$ *** <$playerName$>" reportTotal="false" text="XD6" tooltip="xd6"

Result of dicing looks like:

*** xd6 = 2,1,3,2,6,4,2,3,2,4,1,1,1,6,5,3 *** <Kabanus>

Dialog-box could be manipulated too easily for desired results.
To eliminate cheating I want to show result with params of dicing:

*** xd6 = 3,2,5,3,2,4,5,3,4,2,2,6,4,5,4,1 *** number=16 sides=6 add=0 *** <Kabanus>

Adding strings with inserted variables doesn’t help:

... ** $name$ = $result$ *** number=$nDice$ sides=$nSides$ add=$plus$ *** <$playerName$>" ... Engine simlply gives: number=nDice sides=nSides add=plus instead of digits.

So, what should I add to VASSAL.build.module.DiceButton java-class to realize that idea?

I want to add simple sorting function, which can sort last results of dicing.
For example, we have 23 attacks and should roll 2x10D6 + 3D6.
Then we have to find and count digits we need very carefully, because digits, separated by commas, are not obvious. This is rhe main difference between dices and digits.
Now result looks like:

*** xd6 = 4,4,6,5,3,4,4,6,5,2,2,5,3,2,4,3,2,1,3,6,2,1,2 ***  number=23 sides=6 add=0 *** <Kabanus>

And sorting will look like:

*** sorting = 1,1(2); 2,2,2,2,2,2(6); 3,3,3,3(4); 4,4,4,4,4(5); 5,5,5(3); 6,6,6(3) ***

How can I realize that?

But please, if you can help, write a step-by-step instruction, besause I don’t know Vassal’s architecture.

P.S. I’m really sorry for my english. I’m not english speaker.

This works fine for me. Could you post the module you’re working on somewhere?

There is no way to do this currently but it sounds like a very obvious feature.

  • Michael

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

This will be possible with the new dice server. Expect this for 3.3.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

vassal40k.com/

But the latest version is 3.0.
Or what means “dice server”? Could you explain?

Any module in particular? There’s a lot of things going on on that website.

  • M.

2009/1/11 Kabanus <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

Look, I’m really sorry that I have to ask many stupid questions.
But I’ll try to explain the situation.

I’m warhammer40k fan. The module Vassal40k is one of the greatest thing I ever seen on PC.
But some functions in module could be more useful.
I told my ideas Vassal40k project leader. But he is alone and he isn’t a coder. So he can’t realize unconventional functions.
I have some programming experience, but I don’t know Vassal’s architecture.

And I don’t know english even to put into words my thoughts completely.

In your original post, you said that when you entered

** $name$ = $result$ *** number=$nDice$ sides=$nSides$ add=$plus$ ***

you got

number=nDice

which is quite surprising and it suggests that you’re not doing something correctly. I’m wondering if you could send me the module that you are editing where you got that result.

I assumed that the module was on the Vassal40k website somewhere, but it took too much effort to find the relevant module. I was wondering if you could send me the module where you got the result above.

You’re doing fine. I think you had trouble understanding what I was asking.

  • M.

Post generated using Mail2Forum (mail2forum.com)

Sorry, I forgot, that there are many modules on Vassal40k site.
Requested link is: vassal40k.com/DL1.html

Some users have problems with installer, but it can be unpacked manually, using any archiver (7Zip, WinRar).
Module’s file calls V40k_V5-1.

I tried changing the report format to

*** $name$ = $result$ *** number=$nDice$ sides=$nSides$ add=$plus$ ***

and I got

*** d6 = 5 *** number=1 sides=6 add=0 ***

as expected.

It’s possible that you’re actually running the module on an older version of VASSAL in which case you’ll see something like:

*** d6 = 5 *** number=nDice sides=nSides add=plus

The G40K installer actually installs version 3.0 as far as I can tell, so you may be running that instead.

Make sure you’ve downloaded the latest version and just open the module itself.

  • M.

2009/1/12 Kabanus <messages@forums.vassalengine.org (messages@forums.vassalengine.org)>

Post generated using Mail2Forum (mail2forum.com)

Thank you very much!

Yes. But we’ll release 3.1 by the end of this month and have plans for releasing 3.2 by the end of spring. 3.3 will still be released during 2009.

I mean that I have a dice rolling server which is nearly ready for use with VASSAL. It has a roll specification language, in which you can do things like sort your results.