Wasteland 2: now with improved modding capabilities!

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

Moderator: Ranger Team Alpha

User avatar
Grave
Scholar
Posts: 138
Joined: June 14th, 2012, 7:52 pm
Location: At Scott's Bar, waiting for this radiation cloud to blow past...

Re: Wasteland 2: now with improved modding capabilities!

Post by Grave » March 4th, 2017, 4:34 am

Hi,

I've been playing around with this, mainly modifying weapons (and dropsets) to give them the correct caliber ammunition.

Is there a way to change the inventory sprite of an item? By that, I mean import brand new sprites and not reassign an existing one. I don't like the sprites for certain weapons, and wanted to change them something I like better.
"One thing about the desert: anything goes. It's just one big lawless sandbox. Do anything you want, but just don't get yourself killed. That tends to shorten your life span incredibly. Good luck, and may your Uzi never jam."

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 4th, 2017, 2:40 pm

Yeah, it should be doable. Looking at the code, it shouldn't be much different from how additional portraits are imported. I'll see about including it in the next version.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 6th, 2017, 3:28 am

ISSUES
Don't use CNPCTemplate MSONs for the time being, as right now the modded game is overriding CNPCTemplates unnecessarily often. The data from a CNPCTemplate MSON will overwrite the character's data when transitioning to a new map, eg. if you have a MSON file for Angela with the traits field, Angela's traits will be reset to those from the MSON when you load a new map.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 12th, 2017, 12:04 pm

Haven't had the chance to to work on this much the past several days, but the next version is now nearing completion. Should be out within a week; mostly still need to polish a few features and do a lot of testing.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Jobesky » March 13th, 2017, 7:02 pm

Correct me if I'm wrong, but you made a tool that allows extensive modding of the game? I'm amazed, how is that possible? Why didn't the devs do this?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 13th, 2017, 11:39 pm

Not so much a tool, as the ones I used in the past (I don't really need them anymore) to access the game code were written by others. Unless you're referring to the modded game's MSON import/export abilities, in which case, yeah, I wrote/rewrote that almost entirely from scratch.

I'm directly editing the game, hence pretty much anything's possible. 8-) (There's some code in the WL2.exe that would be quite difficult to modify, but the WL2.exe only handles the really basic stuff like the graphics engine and scene-loading.)

As for why the devs didn't bother: probably because of the time investment involved. Plus they've already moved on to other projects, like Wasteland 3.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 15th, 2017, 11:03 am

0.9.2 now available here

CHANGELOG
  • the tooltips shown when mousing over Attributes or Skills will now display all the DerivedStats that are modified by it
  • certain tooltips have been adjusted
    • some of the base game's tooltips did not accurately reflect how the game does its calculations
      • for example, using the original Assembly-CSharp.dll: 1) start with even Luck and Awareness scores, 2) add 1 point to each, 3) Evasion value shown in lower-left of the screen remains unchanged, even though supposedly each point was adding +0.5%
      • same with the vision range displayed for Awareness, value should be rounded off rather than showing decimals
    • Perception Skill now also shows its effect on vision range and perception radius
    • when mousing over the current Attribute value, will show affected DerivedStats rather than remaining blank
    • fixed minor display bug from the base game; when hovering over the current Attribute value, would sometimes erroneously show a point cost of 12
    Image
  • in DerivedStats, the attributeModifiers and skillModifiers table fields now have 11 elements, ie. an extra one was added for the value 0 to handle certain scenarios with Skills
  • DerivedStats now have additional fields relating to tooltip display
  • the previous barterPriceAdjustment DerivedStat is now divided up into two DerivedStats: barterSellPriceIncrease and barterBuyPriceDecrease
  • Ethnicity, Religion, Smokes now overrideable, can also create new ones
  • can create new UIAtlas, the game's sprite databases
    • place picture files in a "Sprite" directory in "Import", valid extensions: PNG, JPG, JPEG
    • modded game will create a new UIAtlas from the image, with the UIAtlas having one item in the spriteList with the same name
    • refer to the picture as the filename without extension
    • eg. if you have testShotgun.png in your "Mods\Import\Sprite\" folder

      Code: Select all

      {
      	atlas : testShotgun
      	spriteName : testShotgun
      }
    • game probably resizes images automatically
    • don't forget about transparencies when creating pictures so that they look OK against the background
    Image
  • existing UIAtlas are now also editable, exported mostly for reference purposes though
  • can now adjust mod slots for an entire weapon type without having to change each one separately; ItemTemplate_Weapon.mson file in "Table" folder
  • added new constant to WeaponModClass enum: MachineGun
  • heavy machine gun items now have the modClass field set to WeaponModClass.MachineGun rather than WeaponModClass.None; WeaponModClass.MachineGun defaults to zero mod slots
  • NPC weapons with the non-enumerated modClass value of 10 are now set to WeaponModClass.None, functionally equivalent
  • can change the weapon types listed in the tooltip when mousing over a weapon mod: ItemTemplate_Mod.mson file in "Table" folder
  • the success/failure chances when using Skills are now moddable; SkillMetered.mson file in "Table" folder
    • the Weaponsmithing fieldstripping and Outdoorsman avoid encounter % chances aren't yet moddable since they're handled elsewhere
    • Weaponsmithing probably doesn't ever use TheOdds from SkillMetered, even though the tooltip for it lists the numbers from TheOdds
  • TrackShrinesIndividually setting added; Game.mson file in "Table" folder
    • defaults to false
    • if true, will monitor whether each squad member has used a shrine or skill statue, so if you recruit new NPCs, they will be able to use the shrine/skill statue too
    • won't retroactively know which characters have used which shrine if activated mid-game, so best used with a fresh game
  • CNPCTemplate editing issues should be resolved, including one related to the SerializableDictionary Clone method which would cause problems when modding the attributes, skillXps, traits properties
  • no longer crashes if invalid entry for statName in a DerivedStat
  • modding the chanceToHit DerivedStat now actually has an effect
  • OverwritePreviousExports in settings.ini, when set to true, was being ignored
  • an issue with the game failing to distinguish between similarly named Traits should no longer occur
Like always after a new release, it's best to delete your "Export" folder. If you've been modding DerivedStats, don't forget to add an extra value at the start of each table.

User avatar
Grave
Scholar
Posts: 138
Joined: June 14th, 2012, 7:52 pm
Location: At Scott's Bar, waiting for this radiation cloud to blow past...

Re: Wasteland 2: now with improved modding capabilities!

Post by Grave » March 15th, 2017, 6:10 pm

Executor_ wrote:[*]can create new UIAtlas, the game's sprite databases
  • place picture files in a "Sprite" directory in "Import", valid extensions: PNG, JPG, JPEG
  • modded game will create a new UIAtlas from the image, with the UIAtlas having one item in the spriteList with the same name
  • refer to the picture as the filename without extension
  • eg. if you have testShotgun.png in your "Mods\Import\Sprite\" folder

    Code: Select all

    {
    	atlas : testShotgun
    	spriteName : testShotgun
    }
  • game probably resizes images automatically
  • don't forget about transparencies when creating pictures so that they look OK against the background
Image
[*]existing UIAtlas are now also editable, exported mostly for reference purposes though
You are awesome. Thank you!
"One thing about the desert: anything goes. It's just one big lawless sandbox. Do anything you want, but just don't get yourself killed. That tends to shorten your life span incredibly. Good luck, and may your Uzi never jam."

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Jobesky » March 17th, 2017, 3:51 pm

Is this compatible with Wasteland 2: Director's Cut?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 18th, 2017, 1:23 am

It only works with the latest version of the Director's Cut. I can only test it on the Windows Steam version though, so if it won't work, could you post which operating system/game download service you're using?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Jobesky » March 18th, 2017, 6:10 am

Oh, I haven't tried it yet. I, too, have the Windows Steam version, so...

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » April 12th, 2017, 11:07 am

Status update: never fear, I'm still working on this. Progress has been slower than I had hoped, as I might've been a touch overly ambitious. I'm making some fairly drastic alterations to how Skills, Traits, and particularly DerivedStats are implemented behind the scenes, to allow them to be more mod-friendly. This has knock-on effects throughout the game though. But I'll get it done. Eventually.

I've also been playing a lot of Battle Brothers. That game's addictiveness is highly counter-productive.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » April 29th, 2017, 12:29 pm

ISSUES
Adding entirely new StatusEffects to the game is somewhat bugged in 0.9.2. Modding existing StatusEffects doesn't cause any problems. New StatusEffects will work fine if they're only ever applied to NPCs, but the game won't be able to locate the StatusEffect if it has been applied to a party member (PCs/CNPCs) and is still active when loading a savegame. New StatusEffects shouldn't cause issues if they're only applied by unique weapons, as NPCs wouldn't have access to them.

This issue will be resolved in the next release.

sjblack2014
Initiate
Posts: 11
Joined: October 18th, 2014, 7:14 am

Re: Wasteland 2: now with improved modding capabilities!

Post by sjblack2014 » May 18th, 2017, 11:52 pm

Is there a way to change the cover evasion bonus of 50?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » May 19th, 2017, 8:43 am

Not yet, though you'll be able to in the next version (assuming I can ever get it finished). There's dozens of hard-coded constants in the game and I'm hoping to have pretty much all of them easily moddable in the next release.

sjblack2014
Initiate
Posts: 11
Joined: October 18th, 2014, 7:14 am

Re: Wasteland 2: now with improved modding capabilities!

Post by sjblack2014 » May 19th, 2017, 11:48 am

Executor_ wrote:
May 19th, 2017, 8:43 am
Not yet, though you'll be able to in the next version (assuming I can ever get it finished). There's dozens of hard-coded constants in the game and I'm hoping to have pretty much all of them easily moddable in the next release.
Am I able to give NPCs traits/perks then? I'm thinking of making new perks like Turtle and giving them to NPCs,

Or have "additionalCoverBonus" be a derived stat somehow based on level.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » May 19th, 2017, 5:52 pm

Right now, NPCs (aside from recruitable ones) have no perks or attributes or skills, nor can they have any. I intend to change that eventually, but not in the next version. I've been making certain changes specifically to facilitate that later on, but it's an immense amount of work as I need to make hundreds of small adjustments throughout the game. Not to mention all the testing required. :(

With regards to situational modifiers like cover, crouching, elevation, etc., those will adjustable based on perks, skill levels, or items.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Jobesky » May 21st, 2017, 11:23 am

You're amazing for making something like this.

How easily would someone like me who's only dabbled in certain modding tools be able to make difficulty adjustments to the game?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » May 23rd, 2017, 12:17 am

Really hard question to answer. It depends on what type of adjustments you want to make. Modding the NPCs to have higher health or better aim is possible already. Until I can implement NPCs having full character stats, including perks, the options will be limited though.

sjblack2014
Initiate
Posts: 11
Joined: October 18th, 2014, 7:14 am

Re: Wasteland 2: now with improved modding capabilities!

Post by sjblack2014 » May 24th, 2017, 2:29 am

Executor_ wrote:
May 19th, 2017, 8:43 am
Not yet, though you'll be able to in the next version (assuming I can ever get it finished). There's dozens of hard-coded constants in the game and I'm hoping to have pretty much all of them easily moddable in the next release.
Can't wait for the next release then :P

Literally I can't wait. I remember before inexile made it easier for us, I used hex editing to change the weapon stats. Is the cover evasion bonus a constant that can be directly accessed with a hex editor?

Post Reply

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest