Full notes
Full Gothic Virtual Tabletop update
Read the full published notes in a cleaner layout. The original post stays linked below.
What changed
- Gameplay
- Balance
Added macro function 'is_valid_variable(var_name)'
Added script comments * (Comments begin with the pound sign '#', and MUST END WITH A SEMICOLON, just like any other line.) Any line beginning with a '#' will not be executed as a part of the macro.
documentation updated
Fixed bug where multiple tokens in a stack would scale up as if they were all picked up. Only the top token (fully visible token) in a stack will be picked up.
is_valid_variable(var_name)
This function will return true if var_name is a variable with an assigned value in the current macro script, otherwise it will return false.
I'm using this in a macro to test and see if the macro was provided any runtime arguments (arg0), which changes what the macro should do.
Here's a snippet of a macro that checks if a variable (in this case a macro's runtime argument arg0) is valid in order to change the macro's behavior:
if is_valid_variable(arg0) { target = pick_token(); target_value = self.get_value("skills/Small Guns/value") - target.get_value("armour/locations/head") - self.RAD_PENALTY; show(self.get_value("bio/name") + " fires their " + arg1); } else { target_value = self.get_value("skills/Small Guns/value") - self.RAD_PENALTY; } ... ... ...if is_valid_variable(arg0) {
All of my weapon macros pass the weapon's damage and name to the macro of the appropriate skill for the weapon used. So If I am shooting a Beretta M9, I run the "Small Guns" macro with "2d6" and "Beretta M9" as runtime arguments. So, if arg0 is a valid variable (if arg0 has a value assigned to it) then I know I am attacking attacking someone. In that case, we want to adjust our target number by the enemy's armour value.
} else {
If we are just running the 'Small Guns' macro on its own (like in a circus' shooting gallery), then arg0 will NOT be a valid variable (it will have no value assigned to it), and the target number will just be the value of our "Small Guns" skill, and there is no need to choose a target.
}
Source
Changelog.gg summarizes and formats this update. How we read updates.
