-- reworked the ShowRecruits salary variability parameter so it operates as a percentage increase or decrease instead of behaving as a flat addition/subtraction.
-- used the new ShowRecruits parameters to add random variability to recruit salaries in the campaign; they can vary by as much as 25% in either direction from the game's baseline calculation of how much the unit is "worth."
-- base cost and % cost variability parameters have now been added onto the GenerateUnit and GenerateUnique script actions, with identical effects upon the salaries of their generated units.
-- base cost and % cost variability parameters have now been added onto Generate: and Unique: unit tags in battle maps, allowing units generated in this fashion to also access the corresponding salary calculation parameters.
-- Shops now support the use of -VAL:- characters when defining their basic parameters (costMultiplier, baseSalePrice, itemQuality, qualityVariance, and foodCost)! This allows you to change a shop's parameters dynamically throughout the game by reference to other variables you might be tracking.
E.g.
<Shop costMultiplier="-VAL:ItemPriceLvl-" baseSalePrice="0.5" itemQuality="-VAL:ItemQuality-" qualityVariance="2" foodCost="-VAL:FoodPriceLvl-">Agarwal's
Item quality and quality variance are integers, so the game just plugs in the integer value for whatever -VAL:- variable you pick. However, the other shop parameters take float values with decimals, so they're a little trickier to set with -VAL:-. To get the integer from -VAL:- into a useful float format, the game divides the value by 100 (thus, effectively treating it like a percentage). So for example: suppose you have a shop with costMultiplier that references -VAL:CostMult-. If you wanted to increase the cost multiplier by 0.1 during the game (say, because the player did something to piss off the shop owner), you'd use SetVal to add 10 to CostMult.
-- finally implemented costMultiplier and baseSalePrice as a factor in setting item values in-engine.
-- used the new -VAL:- character support in Shops to perform preliminary work allowing changes in item price and quality over the course of the game.
-- added a difficulty selection to the start of the game, with two modes: "Relaxed" or "Challenging." As of right now, the choice impacts base prices for recruits, items, and food. Eventually, my intention is that it will impact the likelihood of bad events occurring during the game as well as how smart the AI is during fights.
-- fixed an obscure and insidious bug wherein the game would sometimes change the order of the actions in a script that had been called by another script action. (This would result in disastrous situations like scripts that ended with NextScene instead running NextScene first, thereby ensuring that the remainder of the script never executed at all.)
-- fixed an exceedingly dumb bug in which the game would not properly parse special characters which placed hyphens right next to one another; the issue was, it would go through and replace the -- with an em-dash beforehand, and therefore wouldn't recognize the special characters of which each hyphen was a part. (Among other things, this made it impossible to use -NL- to start a new line beginning with -NAME- or any sort of variable value.)