Wasteland 2: now with improved modding capabilities!

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

Moderator: Ranger Team Alpha

Post Reply
Shadow Jack
Novice
Posts: 33
Joined: October 25th, 2017, 7:53 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Shadow Jack » January 20th, 2018, 6:15 am

Executor_ wrote:
January 20th, 2018, 1:06 am
I've going to begin work on 0.9.5 now. First steps:
  • Go to PC class. Select all. Cut. Paste into Mob class.
  • Go to PCStats class. Select all. Cut. Paste into MobStats class.
  • Go to PCTemplate class. Select all. Cut. Paste into MobTemplate class.
I'm finally going to do NPC stats (including perks), proper NPC inventories, and add a durability score to items, like I promised a long while ago. It'll include a lot of related stuff, like randomly generating appropriate stats and items + mods + ammo for NPCs, so don't expect another game update for quite a while.

Better NPCs should address the difficulty problem in the game, ie. on Supreme Jerk difficulty, NPCs do double damage while your squad does half damage. Once NPCs have a level and Attribute/Skills/Traits, they can simply be "levelled up" on higher difficulties rather than receiving such crude bonuses.

Item durability will hopefully help fix the in-game economy. You soon end up with way more scrap than you have things to spend it on. Once you need to repair your weapons and armor frequently, it'll drain a lot of that scrap out of the game. Dropped weapons from NPCs will mostly be in poor condition, and higher tier weapons will cost far more to repair.
Great news! How do you plan to implement durability penalties(boolean working/nonworking or some linear dicrease in weapon stats )? Will weaponsmith/mechanical repair have effect on durability? Will it be possible to repair gear by yourself(or receive a discount on reapair) if you invested in weaponsmith skill?

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 20th, 2018, 9:17 am

Durability will be a percentage, with some form of penalty to an item's stats. Though obviously stats like chanceToJam would actually be increasing quite significantly at low durability. I'll make sure there's some way to mod which stats get penalized, what the maximum penalty is, etc. Maybe a set of default penalties in the weapon Skills, and the possibility of overriding those defaults in ItemTemplates.

I've also thought about having discrete steps for the durability, ie. 0-25%, 25-50%, 50-70%, 70-85%, 85-100% (moddable). At around 70% condition, you'd have fairly minimal penalties, and it wouldn't be overly expensive to repair up to there. Trying to repair beyond that level would become increasingly expensive. It is the Wasteland, so having a weapon in pristine condition should be fairly prohibitive scrap-wise.

I intend to eventually include the ability to repair gear yourself using broken weapon parts, but that might not make it in 0.9.5 as that'll require even more UI changes, and those always take too much of my time.

bananaketchup
Initiate
Posts: 2
Joined: January 20th, 2018, 5:29 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by bananaketchup » January 20th, 2018, 5:44 pm

Edit: I've reverted to 0.9.4 for now.
Seems to be working.

-------------------------------------------

I am unable to get to the main menu after patching to 0.9.4c.
The game launches but just gets stuck at the loading screen.

Output log last entry says:
===============================

Starting Main Menu Load

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

NullReferenceException: Object reference not set to an instance of an object
at UnityObjectDatabase.Cull (Boolean startUp) [0x00000] in <filename unknown>:0

at LogoLauncher+<PlayLogos>d__6.MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
LogoLauncher:Update()

(Filename: Line: -1)

================================

I am able to run the game if I restore Assembly_CSharp.dll
Not sure if this helps, but I set up a Steam Library folder on a different drive because that one is SSD.
My regular Steam folder is in a different drive than my OS is also. So basically
C: is Windows 10 OS
D: Secondary Drive which contains programs (Steam and other things that are too big for my C drive)
G: SSD for games

I was able to run 0.9.4b a few days ago. I had made changes to weapons and that worked fine for my existing save file.
My initial problem is that I was unable to start a new game.
After verifying game cache and as well as deleting and reinstalling WL2DC, I cannot get the game to the load past the loading screen when I patch Assembly_CSharp.dll

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 21st, 2018, 2:26 am

0.9.4d now available here.

I broke character creation in 0.9.4b. Completely forgot about testing that.

I also made a slight change to the UnityObjectDatabase code. See if that fixes your crash on start bananaketchup.

bananaketchup
Initiate
Posts: 2
Joined: January 20th, 2018, 5:29 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by bananaketchup » January 21st, 2018, 10:49 am

0.9.4d has fixed it.
Thanks, Executor.
Keep up the good work!

hakinaro
Initiate
Posts: 2
Joined: October 17th, 2015, 1:09 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by hakinaro » January 21st, 2018, 11:23 am

hi so i installed the patch put the localization in the folder booted the game and loaded a save but i have no settings.ini file in the \mygames wasteland folder i am using a fresh install i just downloaded last night steam if it matters so it should be latest version

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » January 21st, 2018, 12:45 pm

Ah, my original post has lots of outdated information now. Sorry about. I'll try get it updated ASAP.

There's no more settings.ini file. In-game, go to the Options menu, then select the Modding tab. The settings are there now.

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 2nd, 2018, 10:36 am

0.9.4e now available here.

UPDATED GAME BUG FIXES
  • Fixed PCs not triggering NPC ambushes.

User avatar
Cipher
Acolyte
Posts: 55
Joined: October 4th, 2014, 1:45 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by Cipher » February 14th, 2018, 9:36 am

Just a quick problem I had. Once I install the delta and I use the file injector the mod MAX SPEED from this topic ( viewtopic.php?f=18&t=8727&start=80) won't work. The file injector says error. Any help or at least someone who is willing to send me the mson file for the movement speed increase?

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 14th, 2018, 10:33 am

First, find the location of the "Mods" folder. You can check in-game by going to the Options menu and selecting the "Modding" tab. Then go to the "Mod Folder Path" location with Windows Explorer or whatnot. Create a directory named "Mods" if there isn't one there already.

Go to the "\Mods\Import\BaseStat\DerivedStat" directory; creating the folders if necessary.

Make a text file named runSpeed.mson in the "DerivedStat" folder. Using Notepad/Notepad++, set the file's contents as:

Code: Select all

{
	initialValues : [
		{
			when : [ Situation.PC ]
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 6.0
		}
		{
			when : [ Situation.CNPC ]
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 6.0
		}
	]
}
6 is the default runSpeed, so change it to whatever you like.

Make a text file named walkSpeed.mson in the "DerivedStat" folder. Using Notepad/Notepad++, set the file's contents as:

Code: Select all

{
	initialValues : [
		{
			when : [ Situation.PC ]
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 3.0
		}
		{
			when : [ Situation.CNPC ]
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 3.0
		}
	]
}
3 is the default walkSpeed.

Make sure the filenames end with '.mson', not '.txt' or '.mson.txt'.

User avatar
Cipher
Acolyte
Posts: 55
Joined: October 4th, 2014, 1:45 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by Cipher » February 14th, 2018, 11:10 am

Thanks and bravo! One last question : Do I have to set it to 10.0 or just 10 ? Also what about critical failures ? I would like to set it to 0. I hate save scumming 24/7. Plus it would be nice if you put a sort of list with every single code file we had so far (Critical fails , run speed , levelmeterskills and stuff)

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 14th, 2018, 12:38 pm

10 or 10.0 will both work.

The game will write all moddable objects to the "Mods\Export\" folder. If you want to edit any, copy it into the equivalent folder in the "Mods\Import\" directory. Previous posts in this thread describe that in more detail.

To eliminate critical failures, go to the "Mods\Import\Table\" folder (create it if necessary). Make a file named SkillMetered.mson that contains the following:

Code: Select all

{
	TheOdds : [ // not additive, percentage at which it transitions to a different result; any leftover chance is a critical success
		{ critFailChance : 0.0, failChance : 0.0, succeedChance : 100.0 }
		{ critFailChance : 0.0, failChance : 10.0, succeedChance : 85.0 }
		{ critFailChance : 0.0, failChance : 25.0, succeedChance : 88.0 }
		{ critFailChance : 0.0, failChance : 40.0, succeedChance : 90.0 }
		{ critFailChance : 0.0, failChance : 75.0, succeedChance : 92.0 }
		{ critFailChance : 0.0, failChance : 90.0, succeedChance : 95.0 }
		{ critFailChance : 0.0, failChance : 100.0, succeedChance : 0.0 }
	]
	Duration : [ 3.5, 4.5, 5.0, 7.5, 7.5, 8.0, 0.0 ]
	ChallengeText : [ "<@>Simple", "<@>Easy", "<@>Easy", "<@>Medium", "<@>Hard", "<@>Hard", "<@>Impossible" ]
}

ss7877
Initiate
Posts: 21
Joined: February 26th, 2018, 1:13 am

Re: Wasteland 2: now with improved modding capabilities!

Post by ss7877 » February 26th, 2018, 3:08 am

Hi to all.
Before my first play in W2:DC, I want to make more effective Energy Weapon Perks:
Overcharge +10% -> 25% damage against non-conductive (light) armor.
Overload +20% -> 50% damage against non-conductive (light) armor.
Atomize +30% -> 75% damage against non-conductive (light) armor.

So tho questions:
1) Can I made it with XDELTA?
2) Is there a more simple method with direct editing of Assembly-CSharp.dll?

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 26th, 2018, 9:40 am

Modifying the Assembly-CSharp.dll yourself is unnecessary. After you apply the XDELTA patch, run the game, and on the main menu, go to Options --> Modding tab. It'll state the location of the "Mods" folder there (which can be edited if you wish). Go to that folder using Windows Explorer or whatnot.

Note: It can take ~10 seconds after you reach the main menu the first time for the game to finish exporting all global data (scene data is written out as you load the maps). If you quit the game before it has a chance to finish writing, it'll resume the next time you run the game.

In the "Mods" folder, you'll see a directory named "Export". This is where the game will write object data to. It never reads from "Export" though. If you want to edit an object, you need to make a corresponding file with the same path but in the "Import" folder (which should also already exist in the "Mods" directory).

Example: If you wanted to edit Blunt_Aces_Wrench.mson located in
"Mods\Export\ItemTemplate\ItemTemplate_Equipment\ItemTemplate_Weapon\ItemTemplate_WeaponMelee\Blunt_Aces_Wrench.mson"
you'd put the file to mod the game in
"Mods\Import\ItemTemplate\ItemTemplate_Equipment\ItemTemplate_Weapon\ItemTemplate_WeaponMelee\Blunt_Aces_Wrench.mson"

You only need to include the fields you want to edit in the "Import" MSON.

In your case, you want to edit 3 perks. The original objects can be found in the "Export\BaseStat\Trait" directory, in the Trait_Overcharge.mson, Trait_Overload.mson, Trait_Atomize.mson files. The statModifiers field holds the data you want to edit to increase the damage bonus of the perk.

Create the following files, with their contents in the code block:

Trait_Overcharge.mson in "Import\BaseStat\Trait"

Code: Select all

{
	description : "<@>You've been able to calibrate your Energy Weapons so that they are more effective against lightly armored targets.\n\n[b]Benefits:[/b]\n[00cc00]+25% damage using Energy Weapons against non-Conductive Armor[-]"
	itemTooltipString : "<@>+25% damage against non-Conductive Armor"

	statModifiers : [
		{
			when : [ Situation.Always ]
			statName : nonconductiveMultiplier
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 0.25
		}
	]
}

Trait_Overload.mson in "Import\BaseStat\Trait"

Code: Select all

{
	description : "<@>You've further improved your use of Energy Weapons when attacking lightly armored targets.\n\n[b]Benefits:[/b]\n[00cc00]+50% damage using Energy Weapons against non-Conductive Armor[-]"
	itemTooltipString : "<@>+50% damage against non-Conductive Armor"

	statModifiers : [
		{
			when : [ Situation.Always ]
			statName : nonconductiveMultiplier
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 0.5
		}
	]
}

Trait_Atomize.mson in "Import\BaseStat\Trait"

Code: Select all

{
	description : "<@>Your foes think they're safe from your energy attacks. They're wrong.\n\n[b]Benefits:[/b]\n[00cc00]+75% damage using Energy Weapons against non-Conductive Armor[-]"
	itemTooltipString : "<@>+75% damage against non-Conductive Armor"

	statModifiers : [
		{
			when : [ Situation.Always ]
			statName : nonconductiveMultiplier
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 0.75
		}
	]
}
Last edited by Executor_ on February 26th, 2018, 10:00 am, edited 2 times in total.

ss7877
Initiate
Posts: 21
Joined: February 26th, 2018, 1:13 am

Re: Wasteland 2: now with improved modding capabilities!

Post by ss7877 » February 26th, 2018, 9:57 am

Executor_ wrote:
February 26th, 2018, 9:40 am
Modifying the Assembly-CSharp.dll yourself is unnecessary. After you apply the XDELTA patch, run the game, and on the main menu, go to Options --> Modding tab. It'll state the location of the "Mods" folder there (which can be edited if you wish). Go to that folder using Windows Explorer or whatnot.

....
I sincerely thank you for a help. Already found all info and now try to do this mod.
I'll write about results, when my hero with Energy weapon will get this perk.

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 26th, 2018, 10:00 am

I forgot earlier to include edits to the description and itemTooltipString fields so that the tooltips will be updated in-game.

ss7877
Initiate
Posts: 21
Joined: February 26th, 2018, 1:13 am

Re: Wasteland 2: now with improved modding capabilities!

Post by ss7877 » February 26th, 2018, 10:14 am

Executor_ wrote:
February 26th, 2018, 10:00 am
I forgot earlier to include edits to the description and itemTooltipString fields so that the tooltips will be updated in-game.
Ok. Thanks again.

And the final question.
Does mod need patched Assembly-CSharp.dll for working or I can return original version?

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 26th, 2018, 10:20 am

Yes, the edited Assembly-CSharp.dll is required. The base game doesn't allow modding BaseStats such as Traits (perks and quirks).

ss7877
Initiate
Posts: 21
Joined: February 26th, 2018, 1:13 am

Re: Wasteland 2: now with improved modding capabilities!

Post by ss7877 » February 26th, 2018, 11:49 pm

Executor_ wrote:
February 26th, 2018, 10:20 am
Yes, the edited Assembly-CSharp.dll is required. The base game doesn't allow modding BaseStats such as Traits (perks and quirks).
And again thanks for help.
Mod is ready, but my party is still lvl1 characters - too few hours in a day :)

Now I am thinking about final damage formula against non-conductive armor for Energy Weapons.

Example with final perk - Atomize

Earlier I thought, that formula is
Final Damage = (Base Weapons Damage x nonconductiveMultiplier) x 1,3 [+30% from Perk Atomize]

But looking at original Atomize code

Code: Select all

	itemTooltipString : "<@>+30% damage against non-Conductive Armor"
	statModifiers : [	{	[b]statName : nonconductiveMultiplier
			operation : Operation.Add
			value : 0.30	[/b]	}]
... now I think
Final Damage = Base Weapons Damage x (nonconductiveMultiplier + 0,3 [+30% from Perk Atomize])

Executor_
Scholar
Posts: 168
Joined: August 11th, 2014, 5:38 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » February 27th, 2018, 12:14 am

Yeah, the latter
Final Damage = Base Weapons Damage x (nonconductiveMultiplier + 0,3 [+30% from Perk Atomize])
is how the base game implemented those perks, and I haven't changed that.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests