Wasteland 2: now with improved modding capabilities!

For community content (fan-art, fanfic, etcetera) for Wasteland 2.
Shadow Jack
Scholar
Posts: 100
Joined: October 25th, 2017, 7:53 am

apoc_now wrote: July 7th, 2021, 11:02 am I've replaced this mesh and for some reason, localRotation is not working not matter which value I set. The weapon is always be like this.
I'm not sure if it's not working or I messed something up. Here is the pic.
https://imgur.com/a/5Nb5sxh
Can you please tell, how did you managed to import model with texture?
apoc_now
Initiate
Posts: 5
Joined: April 21st, 2021, 2:43 am

I just follow exactly what Executor_ and you have been discussing, putting meshes and textures into their respective folders.
Everything else's working properly except rotation.
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

0.9.4.068 now available here

MODDING
  • objects that have had their meshes replaced will now use the provided localRotation and localPosition values
_____________________________________
apoc_now wrote: July 7th, 2021, 11:02 am I've replaced this mesh and for some reason, localRotation is not working not matter which value I set. The weapon is always be like this.
I'm not sure if it's not working or I messed something up. Here is the pic.
https://imgur.com/a/5Nb5sxh
The base game resets localRotation to zero for weapons, which is why changing that value was having no impact. NPC weapons were also ignoring localPosition.
Shadow Jack
Scholar
Posts: 100
Joined: October 25th, 2017, 7:53 am

apoc_now wrote: July 9th, 2021, 5:11 am I just follow exactly what Executor_ and you have been discussing, putting meshes and textures into their respective folders.
Everything else's working properly except rotation.
At the moment I've been able to insert only meshes, no luck with textures (haven't been able solve the problem with the number of vertices matching the number of normals). If you are able to import models into the game relatively easy I'd be grateful for your success story. Is weapon you have inserted asset from wasteland 3? Have you edited this model somehow before importing to wasteland 2?
apoc_now
Initiate
Posts: 5
Joined: April 21st, 2021, 2:43 am

@Shadow Jack
Yea, they're assets from Wasteland 3. Melee ones are literally plug-and-play, range weapons might need to be edited since gun and magazine are 2 different meshes.

@Executor_
Thanks for the fix, everything is working just fine now. Btw, is it possible to display the total ammo you currently have in the weapon info box, without hovering your mouse over?
I can edit the HUD to fit the extra information. Like this
Image
zenblack
Initiate
Posts: 4
Joined: August 29th, 2016, 10:09 pm
badge image for wl3badge.png

Thanks for your update Executor!

I had another (I believe) base game bug that maybe you can track down. NPCs will play their sound files for things that do not match what their in-game text is stating. This is most easily reproducable with Rose when travelling around. Her verbal lines for disappointment for revealing Jan will play when she's commenting on something else. I've also had it with Ralphy when doing the Prison. I'm not sure if there are other verbal lines that need to be played or simply a bad file link.
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

0.9.4.069 now available here
I switched to using a ZIP file containing the DLL. Just overwrite your old Assembly-CSharp.dll and run the game. Localization.zip has also been updated so make sure to download it again too and extract into your "/WL2_Data/StreamingAssets/Localization/" directory.

CHANGELOG
GENERAL
  • ammo display on main HUD now also includes the amount of ammo remaining in the inventory
MODDING
  • the small mods (SkillBookMod, TraitMod, UnarmedMod) that were previously available separately are now integrated into the DLL and can be turned on in the Modding Options screen
    • if they would cause conflicts with your own mod, they can be completely disabled via the allowSkillBookMod, allowTraitMod, allowUnarmedMod fields in Table/Game.mson
_____________________________________
apoc_now wrote: July 10th, 2021, 4:13 am Btw, is it possible to display the total ammo you currently have in the weapon info box, without hovering your mouse over?
I can edit the HUD to fit the extra information. Like this
Image
The center HUD background is one image, so can't resize just the rightmost part of it without modifying the WL2_HUD texture. As long as the numbers don't get too big, it should look fine, otherwise the text will get resized down to fit.

The number in brackets is only the amount of ammo of that caliber in the character's inventory. The tooltip, on the other hand, shows the total amount of ammo for the current weapon's caliber: weapon ammo + inventory ammo + alternate weapon's ammo if using same caliber.
apoc_now
Initiate
Posts: 5
Joined: April 21st, 2021, 2:43 am

Much appreciated. These QOL changes really make the game more enjoyable.

Also Infected Supafly's melee attack can be performed from afar, I've been testing this for hours.
This one might be how the engine works but your character doesn't play the dodging animation UNTIL the projectile hits the ground or some object, results in the projectile just goes thru you.

Btw, I know Wasteland 3 uses il2cpp, which makes modding is vastly harder but is there any chance you can make that happen?
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

0.9.4.070 now available here


CHANGELOG

GENERAL
  • loading times should be quicker now
  • adjusted the timing of dodge animations when attacked by ranged weapons


_____________________________________

This latest patch should shave about a third off the loading times. It's no 0.9.5, but it should be noticeable.
zenblack wrote: July 10th, 2021, 11:02 pm I had another (I believe) base game bug that maybe you can track down. NPCs will play their sound files for things that do not match what their in-game text is stating. This is most easily reproducable with Rose when travelling around. Her verbal lines for disappointment for revealing Jan will play when she's commenting on something else. I've also had it with Ralphy when doing the Prison. I'm not sure if there are other verbal lines that need to be played or simply a bad file link.
Each CNPC has hundreds of comments they can make. If you could provide the text that is displayed, that would make tracking them down a lot easier. A snippet of the text is fine, as long as I have something to search for.
apoc_now wrote: July 11th, 2021, 1:26 pm Also Infected Supafly's melee attack can be performed from afar, I've been testing this for hours.
Didn't see it happening in my admitted limited amount of testing. They tend to rush into melee very quickly. Which map were you fighting them on?
apoc_now wrote: July 11th, 2021, 1:26 pm This one might be how the engine works but your character doesn't play the dodging animation UNTIL the projectile hits the ground or some object, results in the projectile just goes thru you.
Not sure if it's an improvement or not. I only changed ranged weapon misses so far. Let me know what you think.
apoc_now wrote: July 11th, 2021, 1:26 pm Btw, I know Wasteland 3 uses il2cpp, which makes modding is vastly harder but is there any chance you can make that happen?
I'm not going to bother myself. Without the Assembly-CSharp.dll, the amount of modding that can be done is going to be quite limited. You could try convincing InXile to distribute the Assembly-CSharp.dll with WL3, as from what I recall reading, one is always generated prior to being fed into the IL2CPP.exe that creates the GameAssembly.dll.
apoc_now
Initiate
Posts: 5
Joined: April 21st, 2021, 2:43 am

Executor_ wrote: July 14th, 2021, 4:26 am Didn't see it happening in my admitted limited amount of testing. They tend to rush into melee very quickly. Which map were you fighting them on?
Infected Village
https://www.youtube.com/watch?v=bzNZncibebc
Executor_ wrote: July 14th, 2021, 4:26 am I'm not going to bother myself. Without the Assembly-CSharp.dll, the amount of modding that can be done is going to be quite limited. You could try convincing InXile to distribute the Assembly-CSharp.dll with WL3, as from what I recall reading, one is always generated prior to being fed into the IL2CPP.exe that creates the GameAssembly.dll.
I successfully dumped Assembly-CSharp.dll and all other dlls using Il2cppDumper. Also I've seen folks making mods with BepInEx and MelonLoader. Hope this helps!
Last edited by apoc_now on July 14th, 2021, 7:31 am, edited 2 times in total.
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

0.9.4.071 now available here


CHANGELOG

UPDATED GAME BUG FIXES
  • NPC stat calculations for SpecialAttacks (like the supafly's melee attack) were using the equipped weapon instead of the SpecialAttack's weapon


_____________________________________
apoc_now wrote: July 14th, 2021, 7:26 am I successfully dumped Assembly-CSharp.dll and all other dlls using Il2cppDumper. Also I've seen folks making mods with BepInEx and MelonLoader. Hope this helps!
il2cppDumper only outputs stubs, you won't actually know what the game is doing in each method. So that's a big increase in modding difficulty right there. If you're changing some values or adding completely new stuff to the WL3, that should be doable. But if you need to modify/disable some pre-existing code, that's probably going to be impossible.
apoc_now
Initiate
Posts: 5
Joined: April 21st, 2021, 2:43 am

Executor_ wrote: July 16th, 2021, 8:45 am il2cppDumper only outputs stubs, you won't actually know what the game is doing in each method. So that's a big increase in modding difficulty right there. If you're changing some values or adding completely new stuff to the WL3, that should be doable. But if you need to modify/disable some pre-existing code, that's probably going to be impossible.
Changing some values sounds like what I was expecting but better wait for a proper modding tool I think.

Anyway, I've been trying to make rocket launchers into proper weapon; which you can reload em, crit, can be jammed, etc., but I ran into some problems. No matter what I do, they are always destroyed after 1 use.
Is rocket hardcoded or I'm missing something? Here is my code.

Code: Select all

displayName : "<@>Sabot Rocket"
	grammaticalName : "<@>(a/[COUNT]) Sabot rocket(/s)"
	description : "<@>When just blowing their skull off simply isn't enough."
	
	prefab : W_AT4                                           // 3D model
	animType : WeaponAnimType.RPG
	shake : WeaponShake.None
	bloodyMessChance : 0.0
	
	soundCategory : RocketLauncher
	missSFX : MissSFXType.AUTO_TYPE
	
	atlas : WL2_Weapons                                      // sprite database
	spriteName : T_icon_W_AT4                                // name of the image to use from the sprite collection
	gridWidth : 3
	gridHeight : 1
	slot : EquipmentSlot.WeaponR
	inventoryWeaponType :InventoryWeaponType.ATWeapon
	maxStackSize : -1                                        // if -1, will use default value for this template type; if 0, then no limit on stack size
	isNotLootable : false
	partyNoDrop : false
	
	tags : [ weapon, gun ]                                   // ItemTags.Tags has list of keywords
	tier : 0
	upgradeTier : 0
	price : 300
	weight : 15.0
	rare : false
	junk : false
	isDestroyable : true
	
	skill : atWeapons
	requiredAttributeValues : { }
	
	weaponType : WeaponType.RPG
	caliber : Cal556  							<--(this is just placeholder)
	clipSize : 1
	actionPointCostToReload : 6
	canJam : true
	chanceToJam : 2.0
	actionPointCostToUnjam : 7
	
	minDamage : 150
	maxDamage : 150
	damageType : DamageType.Explosive
	canCritical : false
	criticalHitDamageMultiplier : 2.0
	criticalHitBonusChance : 0
	ignoresArmor : false
	armorPenetration : 7
	explosiveLevel : 2                                       // 1 to 5; the higher, the more likely to affect certain destroyable world objects
	
	firingModeInfos : [
		{
			displayName : ""                                   // if left blank, uses default text based on number of shots
			
			actionPointCost : 7
			shotsPerAttack : 1
			chanceToHitPenalty : 0
			
			statModifiers : [ ]
		}
	]
	
	noiseRadius : 40
	
	pointBlankRange : 6                                      // unused
	optimalRange : 25                                        // unused
	attackRange : 25
	aoeRadius : 5
	ignoreVisibility : false
	hitsTargetDirectly : false
	hitsSelf : true                                          // does the blast affect the weapon owner?
	killsSelf : false                                        // whether the blast instantly kills all targets hit
	
	hitChanceAtPointBlankRange : 10
	hitChanceBeyondOptimalRange : -20
	baseMissAngle : 10                                       // default miss cone angle size
	alwaysHits : false
	canPrecisionAttack : false
	
	statModifiers : [
		{
			when : [ Situation.Always ]
			statName : combatSpeed
			tooltipId : ""
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : -0.7
		}
	]
	
	percentToApplyStatusEffect : 0
	statusEffect : [ ]
	knockback : false
	knockbackDistance : 1.6
	knockDown : false
	
	modClass : null                                          // used if 'validModSlots' field is empty
	validModSlots : [ ]
	stripDropSet : FieldStripping_Generic                    // items received after field-stripping weapon
	
	wsUByteToIncrement : ""                                  // name of World State variable to increase when added to party inventory, decreased when removed
For some reason my posts aint visible until some moderator approve them, which usually take like 1-2 days, even though there are only 2-3 users active here.
Btw, is there any way to contact you personally, like Discord?
Last edited by apoc_now on July 18th, 2021, 10:12 am, edited 1 time in total.
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

apoc_now wrote: July 18th, 2021, 2:01 am Anyway, I've been trying to make rocket launchers into proper weapon; which you can reload em, crit, can be jammed, etc., but I ran into some problems. No matter what I do, they are always destroyed after 1 use.
Is rocket hardcoded or I'm missing something?
Yeah, there's a ton of hard-coding with respect to the various weapon types (ranged vs shotgun vs energy vs AoE vs melee). You're trying to implement it as an ItemTemplate_WeaponRanged? Then you're not going to have UI issues, like no red targeting sphere, since that's tied to ItemTemplate_WeaponAoe. You also won't get damage applied in a radius. You might not even get a projectile firing animation. Lots of code just assumes that AoE weapons are single-use. There likely won't even be a reload animation for them.
apoc_now wrote: July 18th, 2021, 2:01 am For some reason my posts aint visible until some moderator approve them, which usually take like 1-2 days, even though there are only 2-3 users active here.
Btw, is there any way to contact you personally, like Discord?
It's probably because your total post count is low. Once it hits 5 or 10, I assume you no longer need moderator approval.

I rarely use Discord so best way would be via email: executor115@hotmail.com
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

0.9.4.072 now available here
Localization.zip has been updated so please download it again too and extract into your "/WL2_Data/StreamingAssets/Localization/" directory.

CHANGELOG
GENERAL
  • non-hostile NPCs now have blue health bars
  • item tooltips reworked to be more readable
  • precision strike tooltips provide more information
  • original pre-Director's Cut conversation font now available on Gameplay Options screen as 'Consola'; game default is 'Arial'
GAMEPLAY
  • removed limit on the number of times Scotchmo will ask to join the Rangers
BASE GAME BUG FIXES
  • Sadler's dialogue was not being displayed correctly
  • some interactable objects in Rodia were not showing all applicable skills
UPDATED GAME BUG FIXES
  • fixed black background not stretching all the way on tooltips
  • fixed Discobot health bar placement
MODDING
  • new mod added to the Modding Options screen that permits all melee weapons to attack diagonally
_____________________________________

And a special thanks to apoc_now for all his advice on improving the UI and tooltips, pointing out some bugs, and suggesting the melee weapon mod.
lexo1000
Initiate
Posts: 15
Joined: April 3rd, 2020, 12:30 am

Hello Executor,
I found a bug that makes the camera stuck after a fight. You can only zoom-in/zoom-out a little bit with shadows that change accordingly. It seems that is a well-known bug so I wonder if it is fixable..
Thanks in advance
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

My working hypothesis is that it's an issue with the camera heightmap. The problem is replicating that bug. Its appearance seems to be quite random.
Trasd
Initiate
Posts: 3
Joined: August 26th, 2021, 7:05 am

Executor,

I've created a mod to disable Friendly Fire with the option to enable healing (maps and level up) based on your wonderful work.

As others have done, I included the latest copy of your DLL for the downloader's convenience. I've given plenty of links to this site and gave you credit in multiple places, as well as special thanks.

But, after posting my mod, I thought it would be wise to get your permission (sorry, I should have done this first).

Please let me know your wishes concerning this oversight on my part. If you want your file pulled and only the links left, I understand. If not, please let me know (for my "records").

Thanks...
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

Go right ahead, I don't mind. I've said in the past (buried somewhere in this massive thread) that people are free to re-upload the DLL.
Trasd
Initiate
Posts: 3
Joined: August 26th, 2021, 7:05 am

Executor_ wrote: August 27th, 2021, 2:21 am Go right ahead, I don't mind. I've said in the past (buried somewhere in this massive thread) that people are free to re-upload the DLL.
Thanks. Wonderful job, BTW. It makes Wasteland 2 playable!
Executor_
Explorer
Posts: 336
Joined: August 11th, 2014, 5:38 am

0.9.4.073 now available here

CHANGELOG
GAMEPLAY
  • Ruined Weapon effect from arm precision strike can now destroy melee weapons
BASE GAME BUG FIXES
  • Tom's quest in Canyon of Titan will be resolved if he dies, rather than remaining unfinished in the journal
  • some interactable objects in Angel Oracle were not showing all applicable skills
  • Paladino no longer yells about his watch once it has been recovered
  • Nurse Flinkman's 'Thief' dialogue option is removed once the quest is complete
  • resolved movement issue with crucifix in Angel Oracle
  • Takayuki displayed text now matches the "That ain't right." spoken audio
UPDATED GAME BUG FIXES
  • Faction changes cause the health bar color to be updated
Post Reply

Return to “Wasteland 2: Community Content”