Dice Roll Modifier table

Non-bug comments, suggestions, and feature requests for BRPG and/or BGE
Post Reply
User avatar
KeithS
Soldier
Posts: 18
Joined: Tue Oct 14, 2014 10:22 am
Location: York, UK

Dice Roll Modifier table

Post by KeithS » Wed Oct 29, 2014 4:44 pm

In setting up a game (Lost Battles) for BGE I find that in order to resolve combat between 2 tokens, I need to roll 2 dice and then apply a number of modifiers to the total rolled in order to resolve the combat. In all there are about 20 possible modifiers to be applied according to a set of criteria (e.g. terrain type, unit type, orientation of defending unit etc.), although for any particular combat only a few would apply. As far as I can see in order to do this it is necessary that I go away and work out the modifier total and enter that into one of the post-roll modifier boxes and this seems to work fine. However it occurs to me that the process could be Improved slightly if rather than simply entering the number there was an option to call up a pre-defined table which would calculate the modifier for me and apply this to the dice roll.

The way I see this working is that I (the user) set up an initial table containing the criteria (e.g. attacking uphill, heavy infantry attacking light, etc.) and their associated modifier values (e.g. -1, +1, +2, etc.). On selecting the table prior to a dice roll there would be a pop-up box where I could select the applicable criteria and the program would accumulate these and calculate a final modifier value which could be applied to the dice roll. The overall result could then be processed through an output result table as is normal.

Does this seem a feasible future enhancement? If anything similar is currently possible I would be happy to hear about it but I can't see anything from reading the documentation.

Cheers,

Keith

User avatar
heruca
Developer
Posts: 9381
Joined: Sun Nov 20, 2005 11:58 pm
Location: Buenos Aires, Argentina
Contact:

Re: Dice Roll Modifier table

Post by heruca » Wed Oct 29, 2014 11:43 pm

I have something along these lines planned for a v2 release of BRPG and BGE. Until then, there's not much that can be done beyond applying the modifiers yourself as you would at a live game session. But this feature would really be handy for games like Car Wars, were there are dozens and dozens of potential modifiers to cover every possible situation.

The way I envisioned the feature working is pretty much as you describe: a user-defined table which would generate a screen with text and checkboxes that allow you to select which modifiers need to be applied to the roll about to be made. Perhaps you could define some values as checkboxes and others as radio buttons (by grouping several options, from which you can only choose one).
:arrow: Please help spread the word about BRPG and BGE, and never hesitate to tell me how I can make them better suit your gaming needs.

User avatar
KeithS
Soldier
Posts: 18
Joined: Tue Oct 14, 2014 10:22 am
Location: York, UK

Re: Dice Roll Modifier table

Post by KeithS » Thu Oct 30, 2014 8:22 am

Thanks for the reply, I suspected that what I wanted wasn't achievable in the current version but your plans sound interesting. I like the idea of using checkboxes and radio buttons to represent cumulative and non-cumulative modifiers, the need for doing that had occurred to me but I couldn't thing of an elegant means of implementing it so I didn't include it in my suggestion. The use of a complex modifier system is also a characteristic of many wargames rule sets, which is of interest to me as one project I have in mind for BGE is to create a generic wargames board which could be used with different sets of miniatures rules.

Since you mention it, would you be willing to expand on your plans foe BGE v2? Is it something for the near or distant future? Obviously I'm not asking you to commit to anything, but it would be nice to have some idea of a road map for the future product. Although I am very much a beginner with BGE, I am quite excited about the prospect of using it for my gaming needs in the future and while it is possible to achieve a good deal with the current implementation I think there is a great deal of potential for development. If there is any way in which I can help in such developments please let me know.

User avatar
heruca
Developer
Posts: 9381
Joined: Sun Nov 20, 2005 11:58 pm
Location: Buenos Aires, Argentina
Contact:

Re: Dice Roll Modifier table

Post by heruca » Thu Oct 30, 2014 2:35 pm

There's a possibility that if/when I develop BRPG v2, that BGE would be merged into that project, so that I can have a single codebase to maintain moving forward. If this happens, users would choose to run BRPG or BGE by launching the appropriate EXE file.

Feel free to post feature requests for BGE and/or BRPG, so that I can start planning for such features from the outset. Super-simple requests might make it into v1.x of these programs, but expect most requests to get slated for v2.x.
:arrow: Please help spread the word about BRPG and BGE, and never hesitate to tell me how I can make them better suit your gaming needs.

User avatar
KeithS
Soldier
Posts: 18
Joined: Tue Oct 14, 2014 10:22 am
Location: York, UK

Re: Dice Roll Modifier table

Post by KeithS » Thu Oct 30, 2014 11:11 pm

I've just been looking at the BGE manual and it says that it is possible to write things in Flash which can be incorporated into BGE, would this be a possible candidate for that? I have a copy of Flash Professional CS 5 and while I haven't written anything in Flash previously I am an experienced programmer. I have had a look at a couple of YouTube videos for Flash development and it seems broadly similar to Visual Basic with which I am very familiar and I should be able to pick it up fairly quickly. I assume that the program would be game specific rather than generic but that shouldn't be a problem. Can you let me know how to go about integrating a Flash program into BGE, even if there is no API available to integrate results into BGE at least I could produce a stand alone modifier calculator which could be distributed to players. If there isn't a close integration between Flash and BGE as yet I could even create a stand alone one in VB which could be run in a separate window.

User avatar
Omnidon
Site Admin
Posts: 2186
Joined: Mon Feb 06, 2006 7:46 pm
Location: NY State, USA
Contact:

Re: Dice Roll Modifier table

Post by Omnidon » Fri Oct 31, 2014 8:00 am

Heh, yeah when you brought up this feature I immediately thought of mentioning Flash extensions like I usually do. :P

You could certainly create your own flash-based dice roller (with modifier feature) for use in BG, but as you guessed it would not be able to integrate with any BG features aside from appearing on the map until the API is added. That wouldn't really be a problem except that it wouldn't be able to save variables and would thus need to be reconfigured for every session. If you know all of your modifiers ahead of time, I suppose you could hard-code them into the flash object to get around that issue.

If you decide to create an external app to run along side BRPG, I highly recommend Adobe AIR. It uses the same language as Flash (actionscript) and can communicate directly with flash objects within BG (meaning that you could use AIR as a backend to save the variables that BG flash objects can't otherwise save). AIR is easy to work with and the (free) Flex SDK makes it very easy to create fancy interfaces. AIR also has easy built-in networking so that you could use it to get around some of BG's networking limitations.
Obviously, that solution still wouldn't be ideal since you'd have to load both the BG version of the encounter and the AIR application's encounter variables each time, but it's still worth considering.

I'd be happy to help you with Flash / AIR related stuff if you have questions.

If we had a Flash integration API in BG then I certainly would've made extensions (and probably an AIR application) for it by now, but unfortunately it has been a long time since heruca has found the time to work on the API.

User avatar
KeithS
Soldier
Posts: 18
Joined: Tue Oct 14, 2014 10:22 am
Location: York, UK

Re: Dice Roll Modifier table

Post by KeithS » Sat Nov 01, 2014 8:50 am

Hi thanks for the reply and information. If I write something specific to the game I am setting up, rather than something more generic, saving variables wouldn't be a problem. The game uses two dice to determine an initial combat value which then has two sets of modifiers applied, firstly a major one purely determined by the attacking and defending units, which I could determine from a simple look-up table (I assume in actionscript this would be a 2D array), then second is a more nuanced set of modifiers. The latter set being determined by a variety of factors such as unit facing, terrain, unit type, etc. (e.g. Heavy infantry, attacking uphill to the flank of a defending unit); while there are about 15 or so of these, some with sub-clauses, they are fixed and so could be hard coded. I also want to progressively simplify choices as the user enters information, so if the user enters attacking unit type the number of applicable modifiers narrows down significantly, I would hope to do this by turning off check boxes depending on previous entries. The modifiers are then combined with the dice roll and a combat outcome determined by the resulting value.

My plan is to initially code something that would return a modifier value that I could enter into the BGE dice macro tool by hand. If that goes OK I would then consider incorporating a dice simulator to eliminate the need for the BGE dice roller, at the same time maybe making it standalone (i.e. independent of BGE) which has some appeal as I could then offer it to the wider community of Lost Battles players.

I have spent some time trying to get my head around the Adobe ecosystem of Flash, Flex, Air, MXML, Actionscript (2/3), Flex/Flash builder etc., and now think I have a grasp of things. I initially would probably code things in Flash, largely because I already have Flash Pro 5. If I decide to move to Flex things are a little more tricky due to the eye watering cost of Flex Builder, I would probably need to go with a free IDE but they seem to be a bit light on a visual design interface, and debugging tools, both of which I am used to having to hand in Visual Studio. TBH since the graphics I need are limited and without an API for BGE, if I want to create something purely stand alone I don't see any major advantages in using Flex over one of the Visual Studio tools for this particular project, however I will maintain an open mind on that.

One question I do have is how do I go about integrating a Flash swx program into BGE and initiating it from within a BGE session? I found a post that suggested that for BGRP it should be placed in an object directory but this directory doesn't seem to be present in the BGE distribution. Any advice on this subject would be much appreciated.

User avatar
Omnidon
Site Admin
Posts: 2186
Joined: Mon Feb 06, 2006 7:46 pm
Location: NY State, USA
Contact:

Re: Dice Roll Modifier table

Post by Omnidon » Sat Nov 01, 2014 9:20 pm

KeithS wrote:I have spent some time trying to get my head around the Adobe ecosystem of Flash, Flex, Air, MXML, Actionscript (2/3), Flex/Flash builder etc., and now think I have a grasp of things. I initially would probably code things in Flash, largely because I already have Flash Pro 5. If I decide to move to Flex things are a little more tricky due to the eye watering cost of Flex Builder, I would probably need to go with a free IDE but they seem to be a bit light on a visual design interface, and debugging tools, both of which I am used to having to hand in Visual Studio. TBH since the graphics I need are limited and without an API for BGE, if I want to create something purely stand alone I don't see any major advantages in using Flex over one of the Visual Studio tools for this particular project, however I will maintain an open mind on that.
Flash Builder is fantastic and, in my opinion, far superior for code-oriented developers than Flash Pro. They used to offer a free Flash Builder license to non-professionals and unemployed developers (on the condition that you didn't use it to create any commercial products). I'm not sure if that offer still exists though.

That being said, you don't need Flash Builder to use Flex. The compiler and SDK for Flex and AIR is completely free, so you can use any IDE to code for it. You can even add the Flex SDK to Flash Pro (though Eclipse or some other IDE would probably be more practical).

Of course, the only reason to use AIR or an external flash app instead of a language you're more familiar with would be the ability to communicate with Flash objects in BG. If you don't need that feature, then obviously you shouldn't bother with it.
KeithS wrote:One question I do have is how do I go about integrating a Flash swx program into BGE and initiating it from within a BGE session? I found a post that suggested that for BGRP it should be placed in an object directory but this directory doesn't seem to be present in the BGE distribution.
Components\Flash Objects, Experimental
is the folder that currently supports Flash components in BGE I believe. Just drop your .swf file in there and it should be available ingame.

User avatar
heruca
Developer
Posts: 9381
Joined: Sun Nov 20, 2005 11:58 pm
Location: Buenos Aires, Argentina
Contact:

Re: Dice Roll Modifier table

Post by heruca » Sun Nov 02, 2014 12:00 am

Omnidon wrote:Components\Flash Objects, Experimental
is the folder that currently supports Flash components in BGE I believe. Just drop your .swf file in there and it should be available ingame.
BGE does not have that folder. For now, and Flash-based tinkering should be done in BRPG.
:arrow: Please help spread the word about BRPG and BGE, and never hesitate to tell me how I can make them better suit your gaming needs.

User avatar
Omnidon
Site Admin
Posts: 2186
Joined: Mon Feb 06, 2006 7:46 pm
Location: NY State, USA
Contact:

Re: Dice Roll Modifier table

Post by Omnidon » Sun Nov 02, 2014 4:37 am

heruca wrote:BGE does not have that folder. For now, and Flash-based tinkering should be done in BRPG.
Ah, well I haven't tested the latest version but that folder worked fine when I tested it back in BGE 1.3 :P

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests