Wasteland 2: now with improved modding capabilities!

For community content (fan-art, fanfic, etcetera) for Wasteland 2.

Moderator: Ranger Team Alpha

Executor_
Acolyte
Posts: 93
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » August 29th, 2017, 12:39 am

Behind the scenes, there's 3 different types of attacks: Attack, ConeAttack, and AreaAttack. The reason why that's not working is because only shotguns use the 'coneAngle' stat. Only energy weapons use the 'conductiveMultiplier' and 'nonConductiveMultiplier' stats. Only ItemTemplate_WeaponAoe and ItemTemplate_WeaponBoobyTrap use 'aoeRadius'.

I haven't thought about weapons using non-standard attack types before, but implementing it might not be too difficult. You'd specify in the fireMode the attack type, eg. 'coneAttack' or 'energyAttack'. Most of the work would come from going through the code and stripping out references to specific types of ItemTemplate_Weapons for each attack. Doubt it'll make it into the 0.9.3 update though, but I can include it in 0.9.4. That update won't involve a massive number of changes like 0.9.3 so it should only take about a month.


Executor_
Acolyte
Posts: 93
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » August 29th, 2017, 9:36 am

Thank you. I'll try to get that implemented once 0.9.3 is done.

Executor_
Acolyte
Posts: 93
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » September 9th, 2017, 2:57 pm

0.9.3 alpha version updated, still HIGHLY EXPERIMENTAL and so not for playing the campaign with:
In the "Experimental" shared Dropbox folder: https://www.dropbox.com/sh/x36syu96ku75 ... g80ka?dl=0
Direct link: https://www.dropbox.com/sh/x36syu96ku75 ... delta?dl=0

As always with a new version, delete your "Export" folder.

I haven't been able to work much on the game this past week, so not as much progress as I would've liked. The main difference from the previous alpha version is UI support for multiple ItemTemplate_Ammo using the same Caliber. I also drastically rewrote the CHA_AttributeEditor and CHA_SkillEditor classes since inXile's implementation was a mess as well as being occasionally buggy, like with the Disparnumerophobia quirk. Finally, I've fixed up a lot of the bugs I created while working on 0.9.3. Traits are still only partly functional, though.

There's a test mod available at: https://www.dropbox.com/sh/x36syu96ku75 ... d.zip?dl=0
Extract it so it overwrites your "Mods" folder. It includes some example ammos and mods that you can play around with. If you load a save, the game will put a bunch of them in your first character's inventory if the MSON files have been correctly extracted (EDIT: must have at least 2 party members).

Trait mod has had some minor adjustments: https://www.dropbox.com/sh/x36syu96ku75 ... d.zip?dl=0
Brawling mod (unchanged): https://www.dropbox.com/sh/x36syu96ku75 ... ng_mod.zip

Executor_
Acolyte
Posts: 93
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » October 9th, 2017, 12:43 pm

Release of the 0.9.3 update should be fairly soon. I've finished testing all the Traits, fixing quite a few bugs I created. Now I just need to do a bunch of general gameplay testing, mostly playing the game for a ton of hours. Unless I find lots of serious and time-consuming to fix bugs, 0.9.3 should be available within a week.

Sebastian
Initiate
Posts: 11
Joined: July 19th, 2017, 3:57 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Sebastian » October 11th, 2017, 4:43 am

:D :!:

Executor_
Acolyte
Posts: 93
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » October 13th, 2017, 2:50 pm

0.9.3 now available here

CHANGELOG
BASE GAME BUG FIXES
  • loaded ammo is no longer weightless
  • weapon fieldstripping drop chances now match the values displayed in the popup message
    • actual drop chances in the base game are half the listed values
    • eg. if popup message says chances are 40% Sturdy Mag, 10% Underbarrel Flashlight, 50% Junk Weapon Parts, real odds are 20% Sturdy Mag, 5% Underbarrel Flashlight, 75% Junk Weapon Parts
  • "Ruined Weapon" precision strike effect was reported to cause crashes when used on certain NPCs like the Scorpitron; all NPC-only weapons can no longer be destroyed
  • if you had accrued enough XP to gain multiple levelups at once, the bonus hitpoints from Luck could be incorrectly calculated
  • the bonus hitpoints gained due to Luck by recruitable NPCs would be lost if they were dismissed then later rejoined
  • base game incorrectly uses Mob.HatesParty rather than Mob.IsEnemy when determining if there are any nearby enemy mobs to apply the under pressure penalty for assault/sniper rifles, leading to two adjacent hostile NPCs giving each other under pressure penalties while a PC will have no effect on a NPC
  • several fixes to the range gradient shown directly above your current weapon on the main HUD
    • would assume beyondOptimalChanceToHit was always negative, even though some sniper rifles don't have any
    • wouldn't show bonus falloff from pointBlankChanceToHit in optimalRange
    • some weapons, like the Bullpup Sniper Rifle, would cause the gradient to end up too wide
  • StatusEffect tooltips would not show their evasion & damage modifiers in some cases
  • small memory leak in EventManager.Publish
  • Disparnumerophobia quirk, if applying a debuff, wouldn't let you raise an Attribute by only 1 point
  • first weapon tooltip after you switched to a different character's inventory would occasionally not be set wide enough and text would end up getting unnecessarily wrapped
  • in rare circumstances, text wrapping was causing unnecessary line returns to be added
  • on the character screen, Skill bar ticks would often end up grayed out and would require mousing over to return them to their proper color (blue grey)
  • on the character screen, Skill bar ticks would occasionally not be clickable if the mouse had previously been hovering over the Skill name
  • when adding perks to a character that had none, the perks would sometimes show up halfway down the learned perks panel
  • Ascetic Trait no longer gives Attribute and Skill points again if starting a new game and importing a veteran character with the quirk
  • On the Mend perk was previously increasing the amount healed by the PC's medkits by 10%, including when applied to other squad members
  • Master Hunter perk tooltip was incorrectly stating a -75% Friendly Fire chance when it was actually -100%
  • the unlearned perks list was not correctly updating after adding a perk, eg. if you acquired Precise Hunter, you would need to leave the character screen entirely then come back to be allowed to select Master Hunter
  • if you equipped an item that boosted max carry weight, the label in the inventory screen wouldn't update until you left the inventory screen
  • after unjamming a weapon, the Reload button on the main HUD would still show the Unjam tooltip rather than switching to the Reload one
  • the rare legs precision effect is now permanent like all other precision strike StatusEffects
  • in a few places, the base unmodified (ie. no items) Skill level was being incorrectly utilized
  • Free For All perk was affecting Blunt weapons too
  • lots of other minor tooltip and UI fixes
GAMEPLAY CHANGES
  • some differences in how calculations are rounded
  • bonus hitpoints due to Luck added for CNPCs; previously, all had none, regardless of their Luck scores
  • added 3 Attribute points to Gary Wolfe and 2 Skill points to Brother Thomas as they did not have the appropriate amount given their levels
  • no longer allowed to spend more than 10 points in an Attribute (base game allowed it if score was being penalized by an item or StatusEffect)
  • Glancing/Opportune/Strategic Strike perks will now attack enemies passing near the PC; before it would only attack if they started their turn adjacent to the PC
  • required Attribute scores for certain weapons and armor now use adjusted Attribute values (ie. including modifiers from items and StatusEffects) rather than base Attribute scores
  • Hypochondriac and On the Mend Traits now also affect the amount healed when reviving an unconscious PC
  • base game gives melee attackers +40 hit vs targets crouching in the open, now targets crouching in low cover are also similarly penalized (moddable via the chanceToHit DerivedStat)
GENERAL CHANGES
  • tooltips more informative, some things not previously shown were nonetheless happening in background; notably impacted are the Strength, Perception and crouch/stand tooltips
  • when using the Field Medic skill, you can now click on a PC's model to heal them rather than only being able to click on their portrait
  • Mercaptain's vendor screen slightly improved
  • Careful/Precise/Master Hunter perks now directly affect chanceToHit, so will show up as a reduced chance to hit friendlies whenever hit chances are displayed
  • tooltip backgrounds made darker, the base game's are a little too transparent and so can occasionally be hard to read
  • when in combat, the rogue chance on the character screen will now be properly updated to reflect certain CNPC's hate for some enemies; tooltip also shows which NPCs are causing the extra rogue chance
  • if an item has multiple Attribute score requirements, the tooltip will now properly display which missing Attribute is causing which penalty
  • tooltips on vendor screen kept overlapping the panel on the right, defeating its purpose, so now tooltips on vendor screen appear to the left of the item
  • armor tooltip no longers combines the combat speed penalty with that from any Attribute requirements
  • Attribute and Skill bar ticks only ever show the base, permanent value, ie. points spent plus any bonuses/penalties from Traits
  • game should be more consistent in how it selects a PC for Skill usage when the "Highest Skill Character Used" gameplay option is enabled, always deferring to the currently selected PC in cases where another PC has the same Skill level
MODDING
  • BaseStats now far more moddable
  • new Skills (except Skill_Challenge) can be added
  • 'statModifiers' replace previous 'stats' fields; far more flexible and can situationally apply bonuses and penalties (see earlier discussion here)
  • new Calibers, ModClasses and ModSlots can be added
  • any ItemTemplate_Equipment can have ModSlot(s), not just weapons
  • UI now supports multiple ammo types for a Caliber
  • ItemTemplate_WeaponRanged 'chanceToJam' field now a float
  • health state boundaries and difficulty modifiers editable, in "Table" directory in the "PC.mson" and "Game.mson" files, respectively
  • 'requiredStatValues' field for quirks now functions
  • SerializableDictionaries now case-insensitive
  • fixed up buggy base game implementation of SerializableDictionary's generic object methods; base game doesn't really use them but was causing issues with UnityEngine.Object.Instantiate when a PCTemplate was overriden
  • "&:" now appends to the array/list if no index is provided, previously would override elements starting from 0 if no index provided
  • arrays/lists/dictionaries/strings/objects can now be set to null
AVAILABLE MODS
Two small mods can also be downloaded from here
Extract them so they overwrite your "Mods" folder, default location is "...\Steam\steamapps\common\Wasteland 2 Director's Cut\Build\WL2_Data\Mods\".
  • TraitMod: perks now cost multiple points, but you receive 2 perk points per level
  • BrawlingMod: Brawling no longer gets +1 damage per character level, instead the Brawling Skill now gives a damage bonus
Like always after a new release, delete your "Export" folder. If you've done any modding previously, you might need to quite a bit of updating to your MSON files in the "Import" folder.

Executor_
Acolyte
Posts: 93
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » October 14th, 2017, 4:16 am

Needless to say, I've rewritten a ton of stuff. 0.9.2 --> 0.9.3 entails more changes than all my previous updates combined. It still remains backward-compatible savegame-wise though. A lot of the alterations are to the game's backend, so won't be immediately visible. How all the various stats (combat speed, chance to hit, damage, etc.) are calculated has been completely reworked. Also redone is how the text for most tooltips is generated. In fact, probably two-thirds of the time I spent on 0.9.3 was fiddling around with tooltips.

If you experience any crashes, bugs, slower performance compared to the base game, or simply odd behaviour, please let me know. In case of a crash or serious bug, check the output_log.txt file in the "Wasteland 2 Director's Cut\Build\WL2_Data\" directory for anything marked "exception" and post it here.

Additional modding notes:

You can set the game to output calculations to the 'debug_statcalc.txt' file in the "Mods" folder. Example:

Game.mson in "Mods\Import\Table\"

Code: Select all

{
	debugStats : [
		{
			statName : damage
			mobName : ""
			combatOnly : true
			targetedOnly : true
		}
		{
			statName : chanceToHit
			mobName : ""
			combatOnly : true
			targetedOnly : true
		}
	]
}
Note that not all objects that applied a modifier to a stat will show up in the outputted log section. For instance, the damage done is adjusted by game difficulty and certain traits before being applied.

The defaults for the Skill_Challenge field 'theOdds' are in "Table\SkillMetered.mson". The defaults for the Skill field 'xpNextLevelCost' are in "Table\Table_SkillLeveling.mson". Perception, Outdoorsman, Weaponsmithing, Field Medic, and Surgeon Skills have lots of custom code not yet moddable.

Some modding examples:

chanceToHit.mson in "Mods\Import\BaseStat\DerivedStat\"

Code: Select all

{
	initialValues &: [
		{
			when : [ Situation.HealthBelow75Percent ]
			value : -5
		}
		{
			when : [ Situation.HealthBelow50Percent ]
			value : -5
		}
		{
			when : [ Situation.HealthBelow25Percent ]
			value : -5
		}
	]
}
would result in PC/NPCs receiving a penalty to chanceToHit of up to -15 as their health drops. A list of Situations can be found in "Mods\Export\enums.txt" after running the modded game for the first time.

strength.mson in "Mods\Import\BaseStat\Attribute\"

Code: Select all

{
	statModifiers &: [
		{
			when : [ Situation.ThrownWeapon ]
			statName : attackRange
			tooltipId : "thrown"
			
			table : [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ]
		}
	]
}
attackRange.mson in "Mods\Import\BaseStat\DerivedStat\"

Code: Select all

{
	tooltipStrings &: [
		{
			id : "thrown"
			text : "<@>Range<@> - <@>Thrown"
		}
	]
}
would result in PCs receiving an range bonus for throwing grenades equal to their Strength score.

If you wanted to reduce the impact of initiative/Awareness/Speed on combat, you could do something like

initiative.mson in "Mods\Import\BaseStat\DerivedStat\"

Code: Select all

{
	initialValues &: [
		{
			value : 10
		}
	]
}
which would result in PC/NPCs starting with a base score of 10 in initiative, before any other modifiers.

Note: you don't need to include default values for fields in the MSON file; 'when' and 'subset' field defaults to [ Situation.Always ], 'operation' field defaults to Operation.Add.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests