Changing Global property -> no effect in-game

Hi!

I have made globalproperties’ like “SeaPatrolRange” in different Zones (with different hex scales) to be used with certain units with Area of Effect -trait to show certain ranges on different zones. Problem is that when I am trying to change values of those properties, changes are not carried in game. Property values have changed (I can check that with edit), but for some reason units still show old ranges.

Can you list the traits involved in the way you’re trying to run this? Sounds like there may be something faulty in the logic.

Also, I’m assuming that the Radius on your Area of Effect is a Global Property variable? I’m wondering is a variable can be used here. I’ve never tried that myself.

A variable can be used in AOE Radius field

From: Dr_Nostromo messages@forums.vassalengine.org
To: messages@forums.vassalengine.org
Sent: Thu, June 3, 2010 9:37:52 AM
Subject: [Module Design]Re: Changing Global property → no effect in-game

Can you list the traits involved in the way you’re trying to run this? Sounds like there may be something faulty in the logic.

Also, I’m assuming that the Radius on your Area of Effect is a Global Property variable? I’m wondering is a variable can be used here. I’ve never tried that myself.


Dr_Nostromo

Creator - To Be King, Trivial Wars, WWIV

Dr Nostromo’s Place (drnostromo.com/)

Dr Nostromo’s Forum (tobeking.19.forumer.com/)

Need help with Vassal? Call me on Skype - dr_nostromo


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

Post generated using Mail2Forum (mail2forum.com)

Situation is following:

I have map with hex-grid with different zones (that by rules have different scale although hex size is same). For example on Pacific part of the map one hex is equivalent of 2 European hexes and one hex in America equals 4 European hexes.

I have divided the map to Zones which all have their own global properties named SearchRange with values 4 (in European Zone), 2 (in Pacific), 1 (in America). Then I have an aoe-trait on prototype of sea unit that tells to look for SearchRange for aoe-range. It worked like a charm before I tried changing those values (it appeared that I had rounded those numbers in contrary to rules). Values seem to be changed when I check the module with editing tool, but still in game the units show old search ranges.

After editing your module, are you closing the module and restarting it? Sometimes changes don’t take effect unless you restart it. So, if your tests are proving faulty, you may want to restart and test it again.

Restarting doesn’t have any effect on situation.

If somebody wants to check this from the module, it can be downloaded from users.jyu.fi/~juhamart .

Problem is mainly with aircraft carriers ranges. Anyone testing can see that their air component’s range should be 2 near USA (as specified by global properties), but it still is only 1 (previous entry prior trying to correct things).

I looked at the Area of Effect traits in your Sea Prototype. Since you’re using a variable for the Radius Marker, I believe you need to add the $ signs to identify them as variables:

Instead of

FRange2

it should be

$FRange2$

That’s the first thing I’ve noticed at this point. Which specific components should I be looking at?

Nice looking mod, btw.

Thank you, sir, this helped.

Never ever occurred to me that I would need thos $ markers. Never done anything related to programming before and just toying with my very first vassal module (which may have seen a couple of things done the hard way). Now those global properties (variables for different ranges) function perfectly.

Also thanks for kind words on the module.

Ok, now another problem occurred.

The changes I made didn’t carry to units in premade setup. Units that I create on map now have correct radius, but units that were already on map in pre-made setup (created before these changes were implemented) aircraft carriers (CV-prototype) give following error: Bad Data in Module: USA CV Wasp [Area Of Effect - Show Range (LR1)] - Numeric field contains a non-number radius[CVRange1]=null

It seems that they didn’t update with just editing the module. Is there any other way than just making that setup process again from the clear table?

Since you’re pre-defined setup is based on saved games and your saved games were made with an earlier version of the game, there will be problems.

I’ve never used it but when you open your Vassal Module Library (the window that displays your list of modules), under the Tools menu, you’ll find an option to Update Saved Games. You’ll see a help button when you select this option that will give you more info.

Someone who has had more experience with this should have more to say about it than I.

Thank you again. Save game updater works and solves this problem. Again my humblest thankins, you just saved quite a lot of handwork.

You’re welcome.

Good luck with the mod.