Connecting gaming pieces ? - RFE:1611311

sorry for the delay, been working on a different module the last days.

you can download the testing mod from here:

www.fightingchaos.com/vassal/battle/warhammer.mod

the source for the rotation and grouping is here:

www.fightingchaos.com/vassal/battle/warhammer_src.zip

basically I use the setup window to setup my troops in rank and file format, group them and the drag the over to the battlefield, there you can move the whole group a fixed distance, rotate the whole pack, etc…

the rotation at the moment works with three clicks, first click is for the pivot point (a corner of your pieces for example) second click is for the length of the pivot,the third click starts rotation

I’d like a feedback if it is a clean setup or some portions should be changed.

Open:
is movement correct (I see move messages to offboard only)
is load/safe correct (at load safe the pieces should be saved individually)
angles depending on a units variable not degrees shown
correction of the angle displaying depending if you want rotate CW or CCW (can be calculated based on center of group)
check if group center is updated on move of group

it’s still not finished, but as the warhammer campaign module is finished I should have more time to finish this one

hmm forgot to package a rewrite of imageop for the rotation stuff, so it will not work, will provida a new package and the source of the file too tomorrow…
sorry for the inconvenience…

Have you added this? Will it work now?

I did not forget it :frowning: it just works only with the new 3.1, using beta1-3 will do it…

Updated open items:
open - is movement correct (I see move messages to offboard only)
in progress - is load/safe correct (at load safe the pieces should be saved individually)
fixed - angles depending on a units variable not degrees shown
fixed -correction of the angle displaying depending if you want rotate CW or CCW (can be calculated based on center of group)
fixed - check if group center is updated on move of group

at the moment save load nearly finished, not sure if movement is my fault, as I have seen this behavior on other maps with normal stacks too… (pieceXY moved to Offboard)

this is only perhaps tangentially related, but I would imagine something else you would really want to play miniatures on Vassal would also be to have the moves stop when they “bump” into another piece.

having tried to program this into a dot-net app I can assure you it is a pain. but the results would be worth it, and maybe one of the devs knows a better way, and under java, to make it work.

hi,

your class is nearly exactly what i need for the game I’m working on (Dungeon Twister). May I add a feature request?

Is it possible to include:

  • A method to release (ungroup) a group
  • A method to rotate the pieces for a fixed amount around their center (like the basic rotate function specifying the step size… ie 4 steps = 90° per step)

Hi lesse,

I’ll see what I can do, regard it as added to the features to be done, as I thought about them also ;-)

Updated open items:
open - is movement reporting correct (I see move messages to offboard only, rotations not reported at all (also in normal rotator code))
fixed - load/safe correct ?
fixed - angles depending on a units variable not degrees shown
fixed - correction of the angle displaying depending if you want rotate CW or CCW (can be calculated based on center of group)
fixed - check if group center is updated on move of group
open - ungroup command
open - rotate pieces in group (simulate trun left turn right and be consistent in angle) by X degree
open - refactor to own namespace, not VASSAL

Code on website is not updated so far. Will be on vacation from friday on, which should give me some time to handle one or two of the open points.

thanks :smiley:

I’m back, and have fixed all open items but one. movement reporting, which seems to be not mission critical. rotate pieces to let them turn was no task at all as this can be done via can pivot.

I’ll update the download packages in the next days. If somebody did base his mod work on then you must tweak the paths in your build file and replace the classes. If need of help on doing so, drop me a line, but I don’t think anybody did extend on a alpha release.

The code is now in pre gold. Meaning I will no longer add features but concentrate back on the warhammer battle mod. bugfixes will of course be considered ;-)

Updated open items:
open - is movement reporting correct (I see move messages to offboard only, rotations not reported at all (also in normal rotator code))
fixed - load/safe correct ?
fixed - angles depending on a units variable not degrees shown
fixed - correction of the angle displaying depending if you want rotate CW or CCW (can be calculated based on center of group)
fixed - check if group center is updated on move of group
fixed - ungroup command
fixed- rotate pieces in group (simulate trun left turn right and be consistent in angle) by X degree
fixed - refactor to own namespace, not VASSAL

once more: thank you :slight_smile:

OK, I’m finished.

The code can be taken freely from here
http://www.fightingchaos.com/vassal/battle/warhammer_src.zip
Compiled classes are in the draft mod
http://www.fightingchaos.com/vassal/battle/warhammer.mod

Happy modding!

If you want to start a new mod read the docs about how to add custom classes to a mod.

lesse has spotted an issue with decks, which use the standard stack metrics to draw the gamepieces, which is of course different from the grouping stack metrics

@rodney would it be possible to change the initialization from hardcoded stackmetrics to a call asking the map for the stackmetrics as a satck does in the deck code?

I’ll also be working on rotating groups around the center of the group, which could be used to rotate rooms with people in it, which seems an obvious feature for me.

lesse mentioned sporadic problems with pieces resisting to group/ungroup which I’s also investigate.

What’s the issue? It’s probably better to give the Deck its own StackMetrics instance, since using the Map’s could cause other problems.

rk

Post generated using Mail2Forum (mail2forum.com)

sorry, posted before having a closer look, a deck is a deck and should always behave as a deck :slight_smile:
just ignore the post.

I finished rotations around the group center, fixed an issue with decks on a grouping map. Code will follow soon.

The problem of not being able to group/ungroup items was not encountered so far on my side (good, or bad news…)

When will the new code be put up, as currently when you rotate it glitches the sprites up and they move off randomly leaving their black box outlines somewhere else. This is a problem for a Warhammer module. Also you need to click about 5 times in a spot to make them even rotate, and then its in a rnadom direction.

do you have a screenshot or log of the problem? the code works fine in beta 1-4, though it is up to date not documented how you perform the rotation, which could be your problem perhaps? do you have a module for testing? Do you have a grouping map, otherwise in the last edition strange things could happen indeed :slight_smile:

Interacitve rotation works like this:

  1. select a group and then the rotate command from the menu/or the key combi
  2. now click somewhere where the pivot point should be for your group (the top left edge for example)
  3. now click somewhere where the start of your rotation should begin (the top right edge for example)
  4. the rotation wheel will appear

the lack of documentation is one reason for the code not being released at the moment… I wanted to make the package this weekend.

Oh ok, I see now, was wondering why, now I understand, I’ll wait till the weekend and rebundle the test sprites and terrain etc for a working mod for people to use.

Are there now two fantasy modules in construction?

Yeah, as people were getting sick of waiting, and well, now we have a working module minus full out sprites. Which people like.