Create account / Log in

Adding the content of a global property to a dice roll

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Adding the content of a global property to a dice roll

Postby Aradiel » November 30th, 2008, 3:35 pm

Is it possible to add the value of a global property to the result of a dieroll?

I'd like to had a die-roll modifier to a given dieroll button using the $property$ notation in the <i><b>Add to each die</b></i> or <i><b>Add to overall total</b></i> field but those fields would only accept numeric values, not global property names.

Does it sound like a good idea or not?
Since there is already a test to verify the field content is numeric, why not include in this test the needed code to replace a GP by its value and only then test the field content?

Yours,
David ROBERT

"We few, we happy few, we band of brothers"
User avatar
Aradiel
 
Posts: 55
Joined: January 29th, 2008, 7:20 pm
Location: Lille, France

Adding the content of a global property to a diceroll

Postby Tim M » November 30th, 2008, 4:12 pm

Well you cant do it the way you would think (as you describe) at the moment
but you can still do it by instead storing the value of the dice roll to a
GP which you can then increase using a trigger/dp sequence by the value of
another GP and report the result

Post generated using Mail2Forum (http://www.mail2forum.com)
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1817
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Postby Aradiel » November 30th, 2008, 5:14 pm

Great!

I thought I had already read something along those lines (most probably posted by you) but I was unable to lay my hands on this post using the Search function. Probably used the wrong keywords.

I'll give it a try.

Thanks.
David ROBERT

"We few, we happy few, we band of brothers"
User avatar
Aradiel
 
Posts: 55
Joined: January 29th, 2008, 7:20 pm
Location: Lille, France

Adding the content of a global property to adiceroll

Postby cparrott » December 1st, 2008, 3:27 pm

I was able to do it in a module I'm working on. Using the set global
property, have the a keystroke set the property to $xdy_result$ (where x and
y are your number of dice and faces respectively) then on the same keystroke
increment the global property by the value you want to add to the dice
result, which can be another property if you want. Use a trigger to fire off
a dice roll so the result is set then the keystrokes in the global property
and report the global property however you want.

Post generated using Mail2Forum (http://www.mail2forum.com)
cparrott
 
Posts: 64
Joined: July 19th, 2008, 9:09 pm

Postby Aradiel » December 2nd, 2008, 8:46 pm

Chuck,

Maybe I'm just a thickhead but I don't see how to do this the way you describe it without using a proxy piece that has the correct 'trigger' or 'set global property' traits.

Can I have a peek at your own module?
David ROBERT

"We few, we happy few, we band of brothers"
User avatar
Aradiel
 
Posts: 55
Joined: January 29th, 2008, 7:20 pm
Location: Lille, France

Adding the content of a global property to a dice roll

Postby tar » December 2nd, 2008, 11:20 pm

On Dec 2, 2008, at 12:46 PM, Aradiel wrote:

Chuck,

Maybe I'm just a thickhead but I don't see how to do this the way
you describe it without using a proxy piece that has the correct
'trigger' or 'set global property' traits.

Can I have a peek at your own module?

This would be a good candidate for adding to the how-to page in the
vassal on-line documentation: http://www.vassalengine.org/wiki/doku.p ... ow_to:main



_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Adding the content of a global property toa dice roll

Postby Tim M » December 2nd, 2008, 11:25 pm

One of my demo's in the forums shows how to pass the value of the roll to a
GP.
There is no way to do this without a 3rd piece acting as the mediator.
Usually an at start stack 1 x 1 pixel set at 0,0 works perfect here for all
your variable management if you need something permanent

Post generated using Mail2Forum (http://www.mail2forum.com)
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1817
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Postby Aradiel » December 3rd, 2008, 8:40 pm

I tried for 2 hours to set it up without any satisfying results.

I'll try again tomorrow but in a simple test module with the sole purpose of getting this to work (my tries today were within my existing module with many GP & GKC)

If you can point me to a module with such tricks, I'm interested.

Yours,
David ROBERT

"We few, we happy few, we band of brothers"
User avatar
Aradiel
 
Posts: 55
Joined: January 29th, 2008, 7:20 pm
Location: Lille, France


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 4 guests