It’s hard to tell what exactly you’re doing or intending from this.
I suggest doing the following:
Describe exactly what you’re trying to accomplish.
Make a minimal test module where you try to do that.
Post that module somewhere that we can see it.
What you’re doing wrong is likely due to a misconception about how something works, but it’s hard to guess what from what you’ve said. If you show us the simplest example you can of what isn’t working, we might make some progress.
The example I posted (Rabbit Eats Vegetables) shows a list consisting of constants (i.e., strings).
Expressions can be chosen as simple constants/strings OR much more complex expressions, using multiple variables etc.
While learning, I would stick with lists of simple constants (as my example showed) and leave more complex expressions w/ properties as a future endeavor.
Learning any computer language (including Vassal scripting) requires a not insignificant investment of time & energy to get reasonable familiar.
Vassal is incredibly powerful and if you are reasonably passionate about games (particularly game creation or computer implementation of board games), it’s worth the investment (IMHO).
I have read that information many times. There are explanations of Beanshell with examples but where and how to use them remains a mystery to me.
I am trying to find out what the list is for and how to get it to work.
Post it where? I tried file sharing before and it didn’t work.
As previously mentioned, I am trying to find out what the list is for and how to make it work. Obviously, creating a list which does nothing if the user selects from it would be pointless (and annoying LOL!)
A list of vegetables or anything else will not do anything on it’s own and without something to make it work.
Yes but a choice to do what? An arbitrarily selected word won’t do anything without it being linked to something in the module. Or will it?? I dunno.
Guys, I have been looking through this thread and the trend is similar to previous posts. Even though the people here are great and willing to help with the best of intentions, the answers I receive lead to more confusion and more questions. It never ends. For this reason I will step away from this Forum and try to work it out myself. Trial and error seems to be the only way unfortunately and it is not the most desirable way to learn because the process takes a lot of time (mostly wasted) which I don’t have. I will stick it out for a few more weeks and if nothing begins to gel for me then - well it’s only games so who cares hey? Time to move on to something else. All the best to you and I am sorry for being such a pain.
Regards;
Darren
Post it anywhere that we can get it. There are numerous upload services you could use. (E.g., Google Drive, Dropbox, file.io.)
I don’t know how to say this gently: You are not going about this in a way that’s likely to succeed. Don’t act helpless.
A Dynamic Property is a named variable, essentially. The Property Name is the name of that variable. What you’re setting with the prompt is the value of that variable.
You are correct that if you’re not using the Dynamic Property anywhere, setting its value won’t have any effect on anything else in your module. You have to refer to a Dynamic Property in an expression somewhere in order to see anything happen because of its value.
E.g., if you had Foo as the name of your Dynamic Property and elsewhere you had Layers set to track the value of Foo, then setting Foo from a list would change the layer which is visible.
To mix game concepts, lets say you had a game that had 4 “states” for counters… We will name this property (i.e., variable): Combat_Readiness
You could create a dynamic property which presents the player a choice of the 4 states:
Fresh, Spent, Disrupt_1, Disrupt_2
In another part of the game (say at the end of day), the game might then do some automated processing which looks at the state of each counter and does something.
Example (in psuedo-code):
IF Combat_Readiness = “Fresh” THEN do nothing
IF Combat_Readiness = “Spent” THEN 1 in 6 chance set Combat_Readiness == “Disrupt_1”
IF Combat_Readiness = “Disrupt_1” THEN 1 in 6 chance delete unit (i.e., surrender) 1 in 6 chance set Combat_Readiness == “Disrupt_2”
etc. etc.
Of course there is no point to having a user pick a value from a list to set a variable that isn’t used for anything. The act of setting a Dynamic Property in this way doesn’t do by itself do anything, the benefit is all in how you leverage this property elsewhere.
Examples (not remotely close to an exhaustive list):
Set a Text Label to display the value of the Dynamic Property (so the user is changing the piece’s Text Label, basically)
User sets a Dynamic Property from a list of values you supply that match map locations, and then a separate Send to Location trait can move the piece to whatever map location was chosen by referring to the value of the property
It is a shame I am perceived this way. frustrated yes, helpless - no and it is not an act. I have never had to work as hard as this to learn something in my life and I am pushing 60yo. Many of the examples you have given here I have already been doing, and I have been using Expressions in Triggers and Property Matches etc. frequently. My difficulty is in trying to work out what the Expressions can do within the module, how to use them and how to use the many features available which are not given a proper explanation. There is a link (hopefully it works) to my module at the end of this reply. It is maybe 60% complete but there are many more advanced things I would like to try and will not be able to without finding some modules that have what I want and examining them which I think is a better idea than annoying people here with endless questions. The majority of this module was built by looking at other modules so that is what I will do. If successful great, if not, it is only a game and I will find something else to do. Thank you for your time and the information given which is appreciated. No more questions from me unless I have progressed much further with Vassal.
All that should be wrong with that version is what I would call significant lag when the game loads. It began after I added a Startup Global Key Command and was already discussed somewhere on this Forum. Apparently, the next version of Vassal may have a fix for it?
I provided the download to prove a point, much of what was explained to me (what dynamic properties can do) I have already utilised but you will notice there are no Calculated Properties or advanced expressions etc. in that module which I need to master to unlock the full potential of Vassal. That annoys the hell out of me, there is much I would still like to do with it but can’t. The Ammo Reserve for the YB-40 in that game…
…and I am quite proud of it. The Reserve is only visible when the YB-40 is in use and as you top up ammunition from the reserve, the total goes down. When the remaining reserve becomes less than the options available to take ammo, those options are disabled. Took me hours to get there though.
At the moment I am working on the German Fighters, trying to get them to snap to their position on the board and facing in the right direction rather than manually dragging and rotating them.
Thank you for your help (and the others too) I have found this forum to be friendly and responsive however it is not really helping with the more advanced features so I have gone back to sorting through other modules for answers. I will leave that link up for another day in case others may want to take a look then delete it.
Darren, I just have to say that learning to make ‘good’ Vassal modules is hard, especially if you have little or no experience with other forms of computer programming.
Even though making a module is not ‘programming’ as such, many of the concepts share strong similarities to programming techniques and trained programmers have a huge head start over novices.
I’m not sure why you expect to be able to ‘unlock the full potential of Vassal’ without delving in to a suitable level. If there was an easier way than implementing ‘Calculated Properties or advanced expressions’, we would do it, but there isn’t. Making an advanced module is intrinsically complicated. It is difficult to explain the advanced techniques to someone who is still struggling with the basic vocabulary. Trial and error and looking at other modules is how most people learn. As you become more familiar with the concepts, the answers to your questions will make more sense.
Don’t stop asking questions, that would be a mistake. Just don’t get frustrated if you don’t yet understand the answers
One issue is that {Invisibility} means “the property name that is whatever the value of Invisibility is”. That’s a very useful technique called indirection but not what you want here. What you have coded is “find any property with a blank (null) name that equals true”. I’m guessing by a quirk of vassal that finds every piece, so it works.
Here you want to enter the literal name Invisibility. To do that in Beanshell (i.e. between curly braces), you must enclose the name in double quotes, thus: {"Invisibility"} . Simpler still, you don’t need beanshell at all here, so this works too:
All that said, I find that a new game starts fairly sharpish with or without making that change. In Vassal terms, there aren’t that many pieces/traits to consider. Where I see a slight lag is when the first new game loads. If I close it but keep the module open, then open a new game again it seems instantaneous. I put that down to the initial loading of the boards, which are then cached in memory by Vassal. I am on a fairly modern machine as I test / type. Are you seeing a much more noticeable lag than I suggest?
Yes, similar for me, the first Load starts by showing the At-Start Stacks on the board, with the green background and another second or 1/1/2 seconds and the Boards appear. I regard it as significant because I was not expecting any performance issues with Vassal. I doubt my PC is as good as yours it is 4yo but can run the new games at least on high and often ultra with no problem.
Specs: Intel(R) Core™ i9-9900KF CPU @ 3.60GHz 3.60 GHz, 32Gb RAM, Nvidia 2070 Super GB Factory Overclocked
Ah! A poor choice of words from me then, I will change it. Invisibility == True points the SGKC to 2 pieces which have a Marker Trait called Invisibility with a Value of True. One is in the AT Start Stack Piece called “Ammo Stocker” and the other is in the Prototype Definitions called “Reserve Ammo”. I will change it to something else and if that doesn’t help then I will try your other suggestion. Much obliged
Nearly all the pieces are At Start Stacks so have to load at the beginning. I don’t know if that would be causing a problem. The Mission Chart is made up of numerous editable A-S-S also.
Hello Brent;
Thank you for the encouragement and an Aussie too !!
That is what I have been doing, most of the B-17 module I linked here was made using what I found in other modules. I will try it for a time - 3 weeks or so and if there is not much progress I will have to abandon this project. It is not…
acting helpless but reality, I have spent far more time on this than I thought was needed and unfortunately life gets in the way. I spent all last weekend on vassal with very little gain and nothing else got done, can’t keep doing that. Believe me, admitting defeat will be far more annoying than anything else I have complained about but we all have our limits I guess.
If trial and Error is the only way then I believe Newbies with no Tech background (like me) will have an uphill battle. Maybe if a Newbie starts when they are 20yo and they live at home with Mum and nothing else to do they might be proficient by 30yo
A suggestion; Would it be possible for one your gurus to make some simple sample modules that utilise the more complex expressions such “Expr?IfTrue:IfFalse”? The construction if this (and most other) Expressions is explained well enough but I have no idea what they can do in Vassal or how and where to use them. It might help other Newbies also. The module examples I have found so far are for this one too complicated.
The reason I don’t want to is because…
I must have more understanding of vassal before making enquiries so that…
And if it not, well the world won’t come to an end there are always PC games and my printed Board Games where I don’t have to think so much.