Wasteland 2: now with improved modding capabilities!

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

Moderator: Ranger Team Alpha

natty_dread78
Initiate
Posts: 16
Joined: January 3rd, 2017, 2:30 am

Re: Wasteland 2: now with improved modding capabilities!

Post by natty_dread78 » January 28th, 2017, 8:07 am

Hi,
Here is a little testing report:
* I've been playing with v0 several hours with no crashes
* I tried to mod the battering fire and applied force perks with no success: I don't see any changes in game (I changed the chances to apply)
* v4 and v3 do not work for me. When the game loads, I have the title screen then the cursor and a black screen. I waited for a few minutes with no success.
Thanks!

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 28th, 2017, 8:53 am

natty, could you go to your settings.ini file (probably in your "Documents\My Games\Wasteland2DC" folder) and set both PlayLogo and DebugMode to true. Then go back to v0.8.4. Does it successfully reach the main menu now? If not, what does it say at the end of the output_log.txt in the "Wasteland 2 Director's Cut\Build\WL2_Data" directory? Are any exceptions listed?

For the perks not working, go to your "Mods" folder (by default, in "Wasteland 2 Director's Cut\Build\WL2_Data\"). Check the debug_import.txt file and see it if mentions any errors.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 28th, 2017, 10:36 am

I tried using the following under 0.8.4, with the default chanceToInflictStatusEffect value tripled:

Trait_DevastatingFire.mson

Code: Select all

{
	displayName : "<@>Devastating Fire"
	description : "<@>Enemies are devastated by your incoming hail of lead.\n\n[b]Benefits:[/b]\r\n[00cc00]+15% chance of inflicting Precision Strike effects per-bullet when using normal Heavy Weapon attacks[-]"
	effectsDescription : ""
	attributeTooltipString : ""
	skillTooltipString : ""
	itemTooltipString : "<@>+15% Precision Strike effect chance"
	
	atlas : null                                             // UI object category
	spriteName : ""                                          // icon
	
	characterCreationOnly : false                            // if true, then this is a quirk, otherwise a perk
	subTraits : [ ]                                     // any traits that this trait is an immediate prerequisite for
	requiredTraits : [ Trait_OverwhelmingFire ]
	requiredStatValues : {
		atWeapons : 9                                         // uses Heavy Weapons skill
	}
	
	stats : { }
	statsPercent : { }
	
	chanceToInflictStatusEffect : 0.15
}
Screenshot

Make sure the file is placed in the "Mods/Import/BaseStat/Trait/Trait_BatteringFire/" directory. Best way to figure out where to place stuff is to set FullExport to true in settings.ini, and then look in your "Mods/Export/" folder after loading up some maps in-game. Mimic the same directory structure in the "Mods/Import/" folder.

I used the full file for testing purposes, but Trait_DevastatingFire.mson need only contain

Code: Select all

{
	description : "<@>Enemies are devastated by your incoming hail of lead.\n\n[b]Benefits:[/b]\r\n[00cc00]+15% chance of inflicting Precision Strike effects per-bullet when using normal Heavy Weapon attacks[-]"
	itemTooltipString : "<@>+15% Precision Strike effect chance"
	chanceToInflictStatusEffect : 0.15
}
since those are the fields you're actually changing.

natty_dread78
Initiate
Posts: 16
Joined: January 3rd, 2017, 2:30 am

Re: Wasteland 2: now with improved modding capabilities!

Post by natty_dread78 » January 28th, 2017, 2:57 pm

The 'BaseStat' directory was missing in my path. I used as a reference the export pack that you uploaded in the other thread. In the pack, the 'Trait' directory is placed directly in the 'Export' dir.
So I tried again with the updated path, but still with no success. Here is the content of my debug_import file:

Code: Select all

WARNING: Attempting to find GameObject 'PFX_StatusEffect_Stun' in empty object database
WARNING: Attempting to find UIAtlas 'WL2_HUD' in empty object database

C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/StatusEffect/concussion.mson
	Error   [Line 10 at 'PFX_Stat..._Stun']   Could not find an object of type GameObject named 'PFX_StatusEffect_Stun'.
	Error   [Line 15 at 'WL2_HUD']            Could not find an object of type UIAtlas named 'WL2_HUD'.

Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/StatusEffect/concussion.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_1_2.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_2_1.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_3_1.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_2_2.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_1_1.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/MachineGun_Tier_3_1_Bowling.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_3_1_Bowling.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/MachineGun_Tier_1_1.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/MachineGun_Tier_2_1.mson
Override was a success: C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/ItemTemplate/ItemTemplate_Equipment/ItemTemplate_Weapon/ItemTemplate_WeaponRanged/ItemTemplate_WeaponShotgun/Shotgun_Tier_3_2.mson
WARNING: Cannot import/export, invalid chars in object name: '<@>The Fox{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>Snake{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>Chris{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>Raph{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>The Fox{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>Snake{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>Chris{M}' [PCTemplate]
WARNING: Cannot import/export, invalid chars in object name: '<@>Raph{M}' [PCTemplate]
Maybe the warnings at the end have something to do with it ?
The funny thing is that the files exist in the export folder in
C:\FILES\GAMES\Steam\SteamApps\common\Wasteland 2 Director's Cut\Build\WL2_Data\Mods\Export\BaseStat\Trait\Trait_BatteringFire
but they do not contain my modification (effect chance set to 5, 7 and 10%)

As for 8.3 and 8.4, I tried again with debugMode and playLogo to true, no change. No exceptions or errors in output_log.txt, just the following lines at the end:

Code: Select all

Unloading 17 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 9.166225 ms

Unloading 329 unused Assets to reduce memory usage. Loaded Objects now: 40271.
Total: 44.121471 ms (FindLiveObjects: 1.883705 ms CreateObjectMapping: 5.971838 ms MarkObjects: 36.030304 ms  DeleteObjects: 0.233057 ms)

Starting inxile Movie
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

GameStartMainMenu
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

Thanks for your support!

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 28th, 2017, 3:22 pm

natty_dread78 wrote:The 'BaseStat' directory was missing in my path. I used as a reference the export pack that you uploaded in the other thread. In the pack, the 'Trait' directory is placed directly in the 'Export' dir.
Yeah, the "Massive data dump" thread is a month old now, and I guess that was another mistake in there.
natty_dread78 wrote:Maybe the warnings at the end have something to do with it ?
The funny thing is that the files exist in the export folder in
C:\FILES\GAMES\Steam\SteamApps\common\Wasteland 2 Director's Cut\Build\WL2_Data\Mods\Export\BaseStat\Trait\Trait_BatteringFire
but they do not contain my modification (effect chance set to 5, 7 and 10%)
The errors about not being able to import/export certain PCTemplates is perfectly fine and can be safely ignored.

The "Export" folder contains data from objects prior to any MSON overrides being applied. If you have ExportAfterMSONOverride set to true in settings.ini, you'll get the data from the objects AFTER they've been overridden written to the "ExportImport" folder. That's the best way to check if your changes are actually being applied correctly. Note that in 0.8.0, it'll only write files once to the "ExportImport" folder unless you delete them.

The debug_import.txt makes no mention of your Traits, so for some reason it's still not seeing them. Can you confirm the perk MSON full paths you're using are the same as these:

Code: Select all

C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/BaseStat/Trait/Trait_BatteringFire/Trait_BatteringFire.mson

C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/BaseStat/Trait/Trait_BatteringFire/Trait_DevastatingFire.mson

C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/BaseStat/Trait/Trait_BatteringFire/Trait_OverwhelmingFire.mson


C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/BaseStat/Trait/Trait_AppliedForce/Trait_AppliedForce.mson

C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/BaseStat/Trait/Trait_AppliedForce/Trait_StaggeringForce.mson

C:/FILES/GAMES/Steam/steamapps/common/Wasteland 2 Director's Cut/Build/WL2_Data/Mods/Import/BaseStat/Trait/Trait_AppliedForce/Trait_StunningForce.mson
natty_dread78 wrote:As for 8.3 and 8.4, I tried again with debugMode and playLogo to true, no change. No exceptions or errors in output_log.txt, just the following lines at the end:
Could you try moving your entire "Import" folder out of the "Mods" directory to somewhere else on your drive temporarily, then try 0.8.4 again? Does the game reach the main menu now? If not, could you post the contents of the debug.txt file from the "Mods" folder?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 28th, 2017, 4:57 pm

OK, I carefully reviewed my code and there's a way to create an infinite loop in 0.8.3 and 0.8.4 when it searches for MSON files for potential new objects. I was already in the process of rewriting that chunk of code since it had other issues, and so this problem will be fixed it in the next version.

For now, the "Import" folder is quite sensitive about subfolder names. Unless there's an equivalent directory in the "Export" folder (assuming you have FullExport turned on), don't store it in the "Import" folder.

natty_dread78
Initiate
Posts: 16
Joined: January 3rd, 2017, 2:30 am

Re: Wasteland 2: now with improved modding capabilities!

Post by natty_dread78 » January 28th, 2017, 5:27 pm

The cause of both my issues was the files contents. It was just:

Code: Select all

chanceToInflictStatusEffect : 0.05
but when I added the 'description' and 'itemTooltipString' attributes, as in your post a bit earlier, it worked.
I don't know if the figures need to be the same, I haven't tested it. But at least the attributes need to be there or it won't work.

Then I tried 8.4 and it worked all right. So I guess the issue was also the file contents.

Thanks for your help!

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 2nd, 2017, 2:31 pm

0.8.5 now available here

CHANGELOG
  • new ItemTemplates, DropSets, and AIWeightTemplates can now be added to the game
  • will now export all ItemTemplates since the game only situationally overrides ItemTemplates
  • correctly checks that MSON files are in the right directory before creating placeholder objects for them
    • should fix any crashes caused by an infinite loop from having MSON overrides located in the wrong "Mods/Import" directory
  • Table_PC now exported to "Mods/Export/Table" folder, contains onRecoveryEffects fields which the game randomly chooses a StatusEffect from when a player character is at 0 or less health
  • some changes to which enums are exported, so please delete any existing enums.txt in the "Mods/Export" folder
  • fixed extended character set (Unicode) escape sequence (eg. "\u20AC" to get "€") in quoted strings
  • previously the game was set to load certain StatusEffects from the game's resource files, bypassing any overrides; list of methods corrected:
    • Mob --> AddStatusEffect(string, Mob, bool)
    • AZ_Repair_Vax, AZ6_Jaime --> ComputerPostJoin
    • CA23_GPS --> Event_ASI_mechanicalRepair
    • Drama_Cow --> Event_ASI_bruteForce
    • InteractableObject --> AlarmDisarm_CriticalFail, Forced_CriticalFail, MechanicalRepair_CriticalFail
    • AZ2_NamelessGrave, AZ2_PileRocksGrave, AZ2_RichardGrave --> DugUp
  • fairly common exception from the base game will no longer appear in the output_log.txt file
    • only occurred when exiting the game, so didn't have any actual impact
    • minor adjustment to the AIBehaviour_NPCBattle.Shutdown method to fix

      Code: Select all

      if (this.mob != null && this.mob.animManager != null)
      CHANGED TO
      if (this.mob != null && this.mob.animManager != null && this.mob.animManager.animation != null)
    • error message:

      Code: Select all

      NullReferenceException
        at (wrapper managed-to-native) UnityEngine.Animation:GetState (string)
        at UnityEngine.Animation.GetClip (System.String name) [0x00000] in <filename unknown>:0 
        at MobAnimManager2.GetAnimationClip (System.String name) [0x00000] in <filename unknown>:0 
        at MobAnimManager2.PlayAnimation (System.String name, Boolean queue, Boolean isTransition) [0x00000] in <filename unknown>:0 
        at MobAnimManager2.SetAnimState (System.String newStateName, Boolean playTransitionOut, Boolean playTransitionIn, System.String customTransitionOut, System.String customTransitionIn, Boolean forceTransition) [0x00000] in <filename unknown>:0 
        at AIBehaviour_NPCBattle.Shutdown () [0x00000] in <filename unknown>:0 
        at AICompoundAction.Clear () [0x00000] in <filename unknown>:0 
        at AICompoundAction.Shutdown () [0x00000] in <filename unknown>:0 
        at Mob.OnDestroy () [0x00000] in <filename unknown>:0 
        at NPC.OnDestroy () [0x00000] in <filename unknown>:0 
  • settings.ini simplified, a couple redundant options removed
    • some options changed to default to true like FullExport and ExportAfterMSONOverride

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 3rd, 2017, 4:01 pm

0.8.6 now available here

Fairly small change. Added a new option to the settings.ini called LazyWrite which defaults to true. If turned on, the game will use a low-priority thread to write the exported object data to disk, so now there'll only be a tiny increase in map loading times when FullExport is active.

There's still a minor issue where even though the thread is set to "IsBackground = true", and even though that's supposed to mean the thread will be halted unfinished if the application is quitting, that doesn't seem to be the case. So right now the game won't actually quit till every file has been written to disk. Shouldn't really be a problem unless you delete your "Export" folder often, like to exit the game immediately after loading a map, and are very impatient, but I'll try fixing this for the next version.

spectrefps
Initiate
Posts: 3
Joined: January 22nd, 2017, 2:51 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by spectrefps » February 3rd, 2017, 6:04 pm

Just checked back in and there has already been at least 2 major updates! Amazing work!

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 5th, 2017, 5:16 am

OMG! I may have just achieved the holy grail!

I still need to do a boatload of testing to confirm everything works properly, but if it does, inserting changes into the game would go MUCH, MUCH faster.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 9th, 2017, 3:28 am

0.9.0 now available here

This release is a fairly radical departure from my previous technique for editing the DLL. I've spent the past several days extensively testing it and haven't seen any discrepancies or errors compared to the previous version.

Let me know if you have any problems running the game with 0.9.0, otherwise all future versions will be based off this. In particular, I'd like to know if anyone on MacOS/Linux has tried the modified Assembly-CSharp.dll, and if so, if 0.8.6 version worked for you, does 0.9.0 still do?

Not much in the way of actual game changes since I mostly focused on testing.
CHANGELOG
  • LazyWrite option in settings.ini will now properly abort file writing if quitting game while files are still queued up
  • Table_PC.mson and Table_PCStats.mson now called PC.mson and PCStats.mson; still in "Table" folder, just standardized naming to match in-game classes
  • even better spot found for disabling inXile logo movie
  • classes.txt, enums.txt, etc. now use LazyWrite if enabled

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 14th, 2017, 1:52 pm

Next version is coming along nicely. Took me several days, but the object database is now updating after each scene (map) is loaded. Still need to do some edge-case testing on it though. I'm also working on finishing some other useful features, like being able to edit the derived stat formulas (ie. CON per level, skill points per level, max weight, etc.). Release is tentatively scheduled for this weekend.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 17th, 2017, 4:09 am

Ugh. Had to spend most of yesterday ordering a new computer. My current one is knocking on death's door. It randomly hanged and Windows wouldn't even finish booting till I downclocked my CPU significantly.

My i5-750 has lasted me 7 years, 2 months without a problem. 3.6 GHz overclock @ stock voltage, ie. the "stock overclock" on the i5-750, compared to the 2.67 GHz base clock. Ahh, they don't make 'em like they used to.

Still has to last me a couple more weeks till my next system arrives, though. An i7-7700K should be a noticeable performance bump, even with Intel slacking off for the past several years.

Anyway, this will probably mean a delay on the release of the next version of the modded game. Not helping is the fact that a cursory glance at the UI code shows that a lot of the derived stat calculations are replicated there. :shock: :roll:

Jobesky
Initiate
Posts: 16
Joined: September 27th, 2014, 11:22 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Jobesky » February 19th, 2017, 12:21 pm

Couple questions.

Is this for regular or DC?

Will it be possible for a Hardcore mod to be made? I've been waiting years for one.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 19th, 2017, 5:00 pm

Jobesky wrote:Is this for regular or DC?
It's for the Director's Cut edition, whatever the latest version of it is.
Jobesky wrote:Will it be possible for a Hardcore mod to be made? I've been waiting years for one.
Depends on what exact changes you'd want to see in a 'Hardcore' mod. I eventually want to mod the world map encounters to be harder on the higher difficulties, with more random elements. I'd also like to implement the same system for NPCs that PCs get (ie. attributes/skills/perks/weapon mods), but that's months away at least.

I'm currently focusing on increasing the game's moddability rather than making gameplay changes though.

Jobesky
Initiate
Posts: 16
Joined: September 27th, 2014, 11:22 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Jobesky » February 19th, 2017, 7:30 pm

Things like reduced XP, less resources (ammo, healing items, weapons, etc.), more dangerous enemies tougher economy. Things of that nature. That'll be possible at some point, do you think?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 20th, 2017, 12:49 am

You can already increase the amount of XP needed for each level (Table_Leveling), and the prices of ammo and healing items can be easily raised. Adjusting drop rates for items from enemies would require altering a lot of DropSets but can also be done.

One of the other changes I'm hoping to make eventually is giving weapons a durability system. As their condition deteriorates, they'll miss and jam more. Repairing them will mean going to certain vendors, which will cost quite a bit of money depending on weapon quality, and will thus drain money from the party. Right now, it's definitely too easy to get rich early if you do some world map encounters, but a weapon durability system should counteract most of that. Dropped weapons would also often start at poor quality, which would impact their sell price.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 20th, 2017, 5:34 pm

0.9.1 now available here

Delete your "Export" folder so the game can write everything again.

CHANGELOG
  • scene-specific objects now go into scene-specific folders
  • object database updated properly after every scene loaded; scene-specific MSON override files can now reference other scene-specific objects
  • InteractableObject objects overrideable
  • all BaseStat (+Attribute/DerivedStat) objects overrideable
    • DerivedStat calculations can be adjusted by editing the initialValue, attributeModifiers, and skillModifiers fields
    • if modded, the tooltips when adding attribute/skill points will be incorrect as the UI code hasn't been rewritten yet; game will use the proper values behind the scenes
    • to ensure maximum flexibility, just an array of values for each attribute/skill which are summed up and then rounded down
    • values in the table field in attributeModifiers and skillModifiers correspond to attribute and skill levels
    • if useBaseValue is true, game will calculate using the unmodified stat value, ie. without any bonuses/penalties from items/StatusEffects/etc.
    • attributeModifiers/skillModifiers can be added/removed at will; game doesn't care how many there are
    • example:
      base actionRechargeRate.mson (combat initiative)

      Code: Select all

      	initialValue : 5
      	attributeModifiers : [
      		{
      			statName : awareness
      			useBaseValue : false
      			table : [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0 ]
      		}
      		{
      			statName : speed
      			useBaseValue : false
      			table : [ 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0 ]
      		}
      	]
      	skillModifiers : [ ]
  • Table changes:
    • levelsPerAttributePoint, levelsPerTraitPoint added to PC.mson
    • PCStats.mson removed as that data now found in the DerivedStats: leadershipRadius, leadershipToHitBonus, cnpcRogueReductionChance, nonCombatXPBonus
    • Table_ChanceToEvade.mson no longer used so not exported anymore
  • game no longer writes empty mod-created objects to the "Export" folder (still outputted to "ExportImport" after override)
  • Table overrides were being applied too early
  • UnityEngine.Debug.LogError messages which the game previously did not output are now sent to output_log.txt with prefix "LogError: "

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 22nd, 2017, 2:18 am

A few additional notes:
  • DerivedStats:
    • quite a few of them don't do anything as they were never implemented, eg. energyWpnDmgModifier, reloadCostModifier, jammingRateModifier, stealthSpeed, etc.
    • a number of modifiers like "chanceToJam", "actionPointCostToUnjam", "actionPointReload", etc. used by weapon mods aren't currently treated by the game as full-fledged DerivedStats; I'll probably change that in the future
    • the hit and crit chances for weapon skills are still in Table_ChanceToHit; I'll move them into the DerivedStats eventually
    • tiny bug in how initialValue, along with some other floats, are exported; it should be outputted with a ".0" at the end if a whole number
    • a lot of the dictionaries in-game are still case-sensitive, and since the statName fields use them, they're also case-sensitive
      • right now, game will assume statName is in the dictionary, and will crash if not found, so if modding, make sure to spell them correctly
      • this'll be fixed in the next version, possibly including the dictionaries being made case-insensitive, although that's a tricky change as it would involve making changes to the game's SerializableDictionary class which is widely used
      • you can find the right name for a stat in the "BaseStat/Attribute" and "BaseStat/Skill" folders (in "Mods/Export/"); use the filename without extension, ie. no ".mson"
  • the game will check the universal folder if a scene-specific MSON override file cannot be found for the object; the object will still be treated as scene-specific though
    • universal folders are those at the base of the "Export" or "Import" directories: eg. "Mods/Export/DropSet", "Mods/Import/StatusEffect"
    • scene-specific folders are those in the "Arizona" or "LosAngeles" directories: eg. "Mods/Import/Arizona/AZ00_Ranger_Citadel/Spawner", "Mods/Export/Arizona/AZ02_Highpool/MobTemplate/NPCTemplate"
    • some DropSets are only loaded alongside scenes yet are fairly common across lots of maps, and seem to be duplicates of each other; you can thus override them all with a single MSON file in the "Import/DropSet" folder
  • if you ever see the exceptions.txt and/or critical_info.txt files appear in the "Mods" folder, could you please post the contents
  • don't expect too many updates over the next while, Battle Brothers (an awesome turn-based game if you haven't checked it out) final beta will be released any day now and that'll consume quite a bit of my free time

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests