Wasteland 2: now with improved modding capabilities!

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

Moderator: Ranger Team Alpha

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 12th, 2018, 11:39 am

Shadow Jack wrote:
June 12th, 2018, 8:04 am
One more question: is it possible to quickly edit speed of skill usage animation, digging and items use without editing Assembly file?
Don't believe so, no. I'll look into adding another setting in the Options panel to control that, since right now there's only one for animation speeds during combat.

EDIT: You can modify the skill usage durations in Table\SkillMetered.

W2_player
Initiate
Posts: 7
Joined: June 6th, 2018, 6:13 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by W2_player » June 13th, 2018, 12:51 am

Hi.
Executor, have you tried to define how much effort is needed to make a true mod, including a new story, adding locations and new critters ?
Current workarounds for c# are done through changing existing content; overhauling weapons and stats is to be same category.
I.e. modify all NPCs involved in quests to perform not the hardcoded c# but external configuration file ? Apart of that more spare quest variables to be defined and it may be a some sort of "quest virtual machine" where each NPC statically take a list of say operators to setup conditions and dependencies ? This i conclude the first step to be done, in theory.
New locations and critters, or may be all locations and critters to be extracted to individual files.
This hardcode barrier does one thing for sure - the story keeps intact.
One script interpreter is better and flexible for debugging and update, why then devs themselves did not script it ?
Is there any cause to do so ?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 13th, 2018, 5:04 am

W2_player wrote:
June 13th, 2018, 12:51 am
Executor, have you tried to define how much effort is needed to make a true mod, including a new story, adding locations and new critters ?
Effort level: somewhere between very high and extreme. The system Unity uses for saving the needed data for each scene is quite complicated and decidedly mod-unfriendly. Creating a map would probably first require extracting any necessary files from the existing asset/resource files, then using UnityEditor to construct the new scene. Afterwards, you might need to manually edit WL2's mainData file, which stores the list of available scenes, and add your map to said list. A bit of new code to add a transition from an existing scene should then be enough.
W2_player wrote:
June 13th, 2018, 12:51 am
I.e. modify all NPCs involved in quests to perform not the hardcoded c# but external configuration file ?
That would require writing an enormous amount of new code, not to mention all the testing.

I have considered compiling a separate DLL from the quest/campaign C# code at run-time using System.CodeDom.Compiler and Assembly.Load. It would require redistributing all the quest/campaign code as loose .CS files, however, and since that entails releasing copyrighted material, one would need explicit permission from InXile.
W2_player wrote:
June 13th, 2018, 12:51 am
Apart of that more spare quest variables to be defined and it may be a some sort of "quest virtual machine" where each NPC statically take a list of say operators to setup conditions and dependencies ?
There's already a complex system that uses the Drama class. It utilizes Reflection heavily to check whether certain methods exist and then calls them. Dramas can issue a large variety of 'commands', like to start combat, remove an item, add a CNPC to the party, etc. There's already no limit on the number of quest variables (WorldStateVars), as long as you provide a unique string name.
W2_player wrote:
June 13th, 2018, 12:51 am
New locations and critters, or may be all locations and critters to be extracted to individual files.
Unity handles most of the map/model/object loading, and that's compiled C++ code. As far as I can tell, it expects them to be stored in .ASSETS and .RESOURCE files. I haven't searched exhaustively, though, for what can be loaded at run-time using C# code, so there may be additional options.
W2_player wrote:
June 13th, 2018, 12:51 am
One script interpreter is better and flexible for debugging and update, why then devs themselves did not script it ?
Another layer of complexity. Unity already has a built-in system wherein it expects map designers to add MonoBehaviours containing C# code to in-game objects. These can then be easily tested in the UnityEditor.

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » June 19th, 2018, 8:09 am

@Executor_ The thing I still can't understand, is why developers do not offer you a position in wasteland 3 development

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 19th, 2018, 12:14 pm

I'd wager a guess that InXile can find people that are way more qualified and with actual computer science degrees. I've learned everything ass-backwards and still have yet to actually use the UnityEditor.

When I started a year and a half ago, I didn't know anything about Unity and had never used C#. My programming experience was limited to some VB and a touch of Java in school over a decade ago. The concept of Reflection sounded cool and seemed like it would be challenging, hence I started modifying WL2 by writing a whole new MSON serializer/deserializer from scratch.

I figured out what GameObjects/Transforms/Components/MonoBehaviours/ScriptableObjects are for and how they interact basically thru osmosis, since reading the Unity documentation didn't appeal to me. It's amazing how much you can learn by staring at lots of complex, functioning code, along with some good old-fashioned trial-and-error.

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » June 20th, 2018, 4:37 am

Executor_ wrote:
June 19th, 2018, 12:14 pm
The concept of Reflection sounded cool and seemed like it would be challenging, hence I started modifying WL2 by writing a whole new MSON serializer/deserializer from scratch.

I figured out what GameObjects/Transforms/Components/MonoBehaviours/ScriptableObjects are for and how they interact basically thru osmosis, since reading the Unity documentation didn't appeal to me. It's amazing how much you can learn by staring at lots of complex, functioning code, along with some good old-fashioned trial-and-error.

That's true how many things you can learn by having a passion to create something you so much want.

Just FYI, not critical, but it looks like a bug to me:
I double checked my locale files, everything is goo, so I think the problem in appearing of "Description" instead there must be something like Poor > Good > Amazing and so on.
Image





As well I got a question, didn't figure out by myself, is there are any way to make all NPC with "mobType : MobType.Synth" for example, immune to some StatusEffects?

I think adding Flashbang Grenedes, will spice combat, but without Synth and some creatures immune to them, it's not so cool and might be too overpowered.

Image

And according to debug log "Error [Line 46 at 'conducti...plier'] No field or property named 'conductiveMultiplier' in class ItemTemplate_WeaponAoe." it looks like we can't use conductiveMultiplier, nonconductiveMultiplier, energyLevel for WeaponType.Thrown :(

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 20th, 2018, 4:26 pm

0.9.4s now available here.

BASE GAME BUG FIXES
  • Trait_GlancingStrike_Blunt line of perks did not always function properly as the perk was expecting WeaponType.Melee and some blunt weapons are set to WeaponType.Melee_2H
    • affected weapons: Blunt_Tier_3_1_TheOrder, Blunt_Tier_4_1, Blunt_Tier_5_1, Blunt_Tier_5_1_Truth, Blunt_Tier_5_2, Blunt_Tier_6_1, Blunt_Tier_6_2
UPDATED GAME BUG FIXES
  • Attribute value descriptions during character creations are shown again
MODDING
  • MobImmunities field is now moddable; located in "Table\Game"
Make sure to delete the ItemTemplate and Table directories in the "Export" folder to ensure they're written out again.


Nikita-S-D wrote:
June 20th, 2018, 4:37 am
Just FYI, not critical, but it looks like a bug to me:
I double checked my locale files, everything is goo, so I think the problem in appearing of "Description" instead there must be something like Poor > Good > Amazing and so on.
Good catch on the "Description" issue. The bug has existed since 0.9.3, but I never noticed it even though I've been to the character creation screen countless times.
Nikita-S-D wrote:
June 20th, 2018, 4:37 am
As well I got a question, didn't figure out by myself, is there are any way to make all NPC with "mobType : MobType.Synth" for example, immune to some StatusEffects?
I thought I had made the ModImmunities array available for modding ages ago, but it turns out I forgot about it. It's from the base game and controls how StatusEffects affect MobTypes.
Nikita-S-D wrote:
June 20th, 2018, 4:37 am
And according to debug log "Error [Line 46 at 'conducti...plier'] No field or property named 'conductiveMultiplier' in class ItemTemplate_WeaponAoe." it looks like we can't use conductiveMultiplier, nonconductiveMultiplier, energyLevel for WeaponType.Thrown :(
There's an additional field called EnergyDamageTypeAreEnergyWeapons in "Table\Game" now, which if set to true will cause weapons to have the Situation.EnergyWeapon flag set if they have DamageType.Energy.

I edited the statModifiers for all DamageType.Energy weapons that aren't ItemTemplate_WeaponEnergy or ItemTemplate_WeaponMeleeEnergy so their conductive/nonconductiveMultipliers are set to 1. This won't have any effect unless EnergyDamageTypeAreEnergyWeapons is true because the damage calculation only takes those multipliers into account if the attacker is using a Situation.EnergyWeapon item.

energyLevel only matters for ItemTemplate_WeaponEnergy or ItemTemplate_WeaponMeleeEnergy weapons, as other DamageType.Energy weapons have always automatically passed the related check.

Note that EnergyDamageTypeAreEnergyWeapons hasn't been fully tested, hence why for now it defaults to false.

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » June 21st, 2018, 5:09 pm

A few notes about ModImmunities, as soon as I add in to "Table\Game" new classImmunities, in my case "Blind" and "ElectromagneticShock", like so:

Code: Select all

	mobImmunities : [
		{
			myType : MobType.Synth
			classImmunities : [                                // types of StatusEffects that will be ignored
				EffectClass.Blind
			]
		}
		{
			myType : MobType.Human 
			classImmunities : [                                // types of StatusEffects that will be ignored
				EffectClass.ElectromagneticShock
			]
		}
		//and so on...
	]
I got this error: [Line XX at 'EffectClass.Blind'] Enumeration EffectClass does not have 'Blind' as a named constant.
Same for "ElectromagneticShock"

And I alert this EffectClass in new file \Import\StatusEffect\Blinded.mson like so:

Code: Select all

	// ~line 18
	effectClass : EffectClass.Blind                           // effect category, used by Field Medic items
And got this error: [Line 18 at 'EffectClass.Blind'] Enumeration EffectClass does not have 'Blind' as a named constant.

I thought that I could just open Import/enums.txt and add a few new constants in to StatusEffect.EffectClass like so:

Code: Select all

StatusEffect.EffectClass
*****************************
 0 = Unique
 1 = Venom
 2 = Disease
 3 = BrokenBone
 4 = Withdrawl
 5 = Bleeding
 6 = Burn
 7 = InternalInjury
 8 = Radiation
 9 = PrecisionHead
10 = PrecisionTorso
11 = PrecisionArm
12 = PrecisionLegs
13 = Blind
14 = ElectromagneticShock
But looks like enums.txt are not replaceable.

Is there are any chance to replace it, or maybe you could just hardcode this new Effects for me, and some more, like: "corrosion", "acidification" and "freeze". Will very appreciate it ;) Or maybe I should spend some time and investigate how to make my own mini-patches above yours))

Oh, by the by.
If a change EnergyDamageTypeAreEnergyWeapons to true
And then change Import\ItemTemplate\ItemTemplate_Equipment\ItemTemplate_Weapon\ItemTemplate_WeaponAoe for testing "Throwable_Grenade_Small.mson" from:

Code: Select all

	minDamage : 50
	maxDamage : 50
	damageType : DamageType.Explosive
to:

Code: Select all

	minDamage : 50
	maxDamage : 50
	damageType : DamageType.Energy
	conductiveMultiplier : 2.5
	nonconductiveMultiplier : 0.5
In item description(tooltip) it will add new "conductive info" but with zeros. And this grenade will deal exactly 1 damage. Looks like it's minimal damage possible in game.
Logs:
Error [Line 46 at 'conducti...plier'] No field or property named 'conductiveMultiplier' in class ItemTemplate_WeaponAoe.
Info [Line 48 at 'explosiveLevel'] Resuming parsing on line 48 at field 'explosiveLevel' after previous error.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 22nd, 2018, 5:08 am

Nikita-S-D wrote:
June 21st, 2018, 5:09 pm
I thought that I could just open Import/enums.txt and add a few new constants in to StatusEffect.EffectClass
Unless it's exported as an MSON file, it can't be edited. The text files in the "Export" root directory are just as an information resource, so you don't have to open up ILSpy just to get a list of valid enum values.

You don't need to use EffectClass to make a MobType immune to a certain effect. Assuming your new StatusEffects are called Blind and ElectromagneticShock, the following will work:

Code: Select all

	mobImmunities : [
		{
			myType : MobType.Synth
			mySEC : {
				changer : [
					{ inEffect : concussion, outEffect : null }
					{ inEffect : AZ5_Radiation_DirtyGrenade, outEffect : null }
					{ inEffect : AZ5_EnolaRadiationBucket, outEffect : null }
					{ inEffect : RaveBotScan, outEffect : RaveBotScan_Synth }

					{ inEffect : Blind, outEffect : null }
				]
			}
			classImmunities : [
				EffectClass.Venom
				EffectClass.Disease
				EffectClass.BrokenBone
				EffectClass.Withdrawl
				EffectClass.Bleeding
				EffectClass.Burn
				EffectClass.InternalInjury
			]
		}
		{
			myType : MobType.Human
			mySEC : {
				changer : [
					{ inEffect : ElectromagneticShock, outEffect : null }
				]
			}
		}
	]
Unless you're planning on making hundreds of new StatusEffects, using classImmunities isn't really necessary.

Note: don't make multiple entries in the mobImmunities array with the same MobType, as only the first one is currently checked. I'll change it in the next version, but the current implementation is from the base game.


Nikita-S-D wrote:
June 21st, 2018, 5:09 pm
In item description(tooltip) it will add new "conductive info" but with zeros. And this grenade will deal exactly 1 damage. Looks like it's minimal damage possible in game.
Logs:
Error [Line 46 at 'conducti...plier'] No field or property named 'conductiveMultiplier' in class ItemTemplate_WeaponAoe.
Info [Line 48 at 'explosiveLevel'] Resuming parsing on line 48 at field 'explosiveLevel' after previous error.
Only ItemTemplate_WeaponEnergy and ItemTemplate_WeaponMeleeEnergy have the conductive/nonconductiveMultiplier fields. However, that doesn't mean you can't modify those values in other weapon templates.

If it's an Attribute/Skill/DerivedStat (all of which you can find in the "BaseStat" folder), you can edit its value using statModifiers. Using fields like minDamage, optimalRange, clipSize, chanceToJam, etc. is just a shortcut. For example, AssaultRifle_Tier_3_2.mson has

Code: Select all

	minDamage : 45
	maxDamage : 59

	statModifiers : [ ]
which is equivalent to

Code: Select all

	minDamage : 0
	maxDamage : 0

	statModifiers : [
		{
			when : [ Situation.Always ]
			statName : minDamage
			tooltipId : null
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 45
		}
		{
			when : [ Situation.Always ]
			statName : maxDamage
			tooltipId : null
			
			subset : [ Situation.Always ]
			operation : Operation.Add
			value : 59
		}
	]
I forgot to mention it in my earlier post, but Blunt_Tier_6_2, Bladed_Tier_5_2_FluxReaver, and Bladed_Tier_6_2 are some of the weapons in the base game that use DamageType.Energy. You can look at their statModifiers fields for examples of changing conductive/nonconductiveMultiplier values.

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » June 25th, 2018, 12:33 pm

Thank you mate, very appreciate your help and support, your modifications made this game lot more playable and fun! I send my irl friends who love this game to download your mod, and they like it too, and enjoy modding game how they like.

We found definitely a bug with ammo types :( When you have multiple ammo types and press "Free Aim", and then in Aim mode, before atacking you press "Reload" button or "Reload" hotkey (in my case "R"), and you choose different ammo type, and then you shoot, your weapon will still hit as a previous ammo type (before reload), but it will consume new chosen (different) ammo.

I think It will be hard to fix. Just my thought (sorry if it's stupid): if you can hook functions, you can alter function that open ammo panel, and before this inject "Esc" press or something - so it will cancel "Free Aim" mode, and it will fix bug.


Im not sure if it's right, but I constantly see warnings like this:

Code: Select all

[ Drama ] WARNING: Unable to hide merchant icon because the overhead status manager does not exist!
[ HUD ] WARNING: Field medic tooltip still present!
One more bug that friend of mine found, is with radio. Radio block texture becomes bug like hell, if you hover it at same time with any objects. As well if after this you press button to move UI items, and you will move this radio block, it will freeze. (I made lots of test, and all of them uncosistent, I mean looks like memory problem or something, usually to trigger this problem I move around with camera zooming-in-out and talking to trader or npc). I made tests on fresh install with just your 0.9.4s.

Here 2 videos, first one - clean istall, second one - with patch 0.9.4s (after playing a few minutes to magically trigger this bug)
https://www.icloud.com/sharedalbum/#B0PJEsNWnGeOS1H

After this bug, my log file looks like this:

Code: Select all

[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting Input.
[ HUD ] INFO: Selecting Input.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Nuking selected object!
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting Input.
[ HUD ] INFO: Selecting Input.
[ HUD ] INFO: Deactivating goodbye button!
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting PauseMenu(Clone).
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ Analytics ] Mono garbage collection pass: memory usage reduced from 123.61MB to 105.59MB in 32ms. 289.18MB unused of 1455.55MB total reserved memory.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting 0_Close.
[ HUD ] INFO: Selecting PauseMenu(Clone).
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting ModalMessageMenu(Clone).
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting null.
[ HUD ] INFO: Selecting UI Container Panel.
[ HUD ] INFO: Selecting UI Container Panel.
...
Edit:
I spend more time testing this bug, a checked this dlls:

original .dll - no bug.
0.9.2d patched .dll - no bug.
0.9.3 patched .dll - bug exist.
0.9.3b patched .dll - bug exist.
0.9.4 patched .dll - bug exist.

Looks like some changes from 0.9.2d to 0.9.3 triggers this :( Hope this will help.

Link to 0.9.3 CHANGELOG viewtopic.php?f=18&t=17009&start=100#p190196

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 26th, 2018, 8:37 am

Nikita-S-D wrote:
June 25th, 2018, 12:33 pm
We found definitely a bug with ammo types :( When you have multiple ammo types and press "Free Aim", and then in Aim mode, before atacking you press "Reload" button or "Reload" hotkey (in my case "R"), and you choose different ammo type, and then you shoot, your weapon will still hit as a previous ammo type (before reload), but it will consume new chosen (different) ammo.

I think It will be hard to fix. Just my thought (sorry if it's stupid): if you can hook functions, you can alter function that open ammo panel, and before this inject "Esc" press or something - so it will cancel "Free Aim" mode, and it will fix bug.
Yeah, canceling the aim mode when reloading is selected will probably be the easiest fix.

Nikita-S-D wrote:
June 25th, 2018, 12:33 pm
Im not sure if it's right, but I constantly see warnings like this:

Code: Select all

[ Drama ] WARNING: Unable to hide merchant icon because the overhead status manager does not exist!
[ HUD ] WARNING: Field medic tooltip still present!
Usually not important. They're also present in the base game, just never written to a log file. I'll get around to pruning some of the unnecessary ones eventually.

Nikita-S-D wrote:
June 25th, 2018, 12:33 pm
One more bug that friend of mine found, is with radio. Radio block texture becomes bug like hell, if you hover it at same time with any objects. As well if after this you press button to move UI items, and you will move this radio block, it will freeze. (I made lots of test, and all of them uncosistent, I mean looks like memory problem or something, usually to trigger this problem I move around with camera zooming-in-out and talking to trader or npc). I made tests on fresh install with just your 0.9.4s.
...
Looks like some changes from 0.9.2d to 0.9.3 triggers this :( Hope this will help.
Thanks for narrowing it down. I have lots of extra interim versions stored for each release, so I can restrict it further to which possible change I made is causing the bug.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 27th, 2018, 3:52 am

Nikita-S-D wrote:
June 25th, 2018, 12:33 pm
One more bug that friend of mine found, is with radio. Radio block texture becomes bug like hell, if you hover it at same time with any objects.
This is actually a base game bug. I've seen the flickering several times while testing with the unedited Assembly-CSharp.dll.

Steps to replicate (make sure Show Tutorial is enabled in Options)
  1. Start WL2 --> skip intro movie --> New Game
  2. Create custom squad --> Custom character
  3. Enter a name, change portrait to Bear one (to the right of default one)
  4. Set Hard Ass skill to 2, Kiss Ass skill to 2, Smart Ass skill to 2
  5. Click Play! --> select Ranger difficulty --> Play!
  6. Skip movie
  7. Click Goodbye once, then go through all of Vargas conversation options, pick Smart Ass check
  8. Go up to door and adjust camera until radio is over Citadel door
  9. Move cursor between door and radio
Following the above steps I can usually get the flickering to start.

I have some ideas for where the bug is and how to isolate it (by watching for lots of changes per second between Cursors.Default and Cursors.Door), so I think I might be able to fix it.
Nikita-S-D wrote:
June 25th, 2018, 12:33 pm
As well if after this you press button to move UI items, and you will move this radio block, it will freeze. (I made lots of test, and all of them uncosistent, I mean looks like memory problem or something, usually to trigger this problem I move around with camera zooming-in-out and talking to trader or npc). I made tests on fresh install with just your 0.9.4s.
I still have to do more testing on the radio widget not being movable when the UI is unlocked. It might be a separate issue or related to the flickering bug.

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » June 27th, 2018, 7:19 am

Wow, you found a really consistent way to test it, I spend at least two hours testing all this and looks like I was testing it the wrong way.
Apologies, I was wrong, and confirm that this bug exists in vanilla game. Still it feels like it faster shows up on mod game, but maybe i'm wrong with this too.

Here you can download update sprites that I use, feel free to use them whatever you want, maybe for ammo mod or grenades mod.
Preview:
Image
I used my knowledge, Wikipedia, Youtube as a reference for color codes to cal. I could make more variants of bullets, but it will make game play too complicated, hard to balance and maybe even boring.

In fact you can make very different gameplay, by making all weapons damage to minimal (fix damage that depends on barrel length,), and all damage will depend on ammo. You can make bullet(projectile) material such as copper, lead, steel. Bullet weight in grains. Case material such as steel and brass. Case condition such as new, used, rusted (https://youtu.be/li7pcHZCAl0?t=11m52s).

Going further with hard coding (I think it will be super-duper hard to make) you can make some weapons use not raw ammo but "clip" or "cartridge belt" for heavy weapons. So first you need to find "clips", then manually put ammo in it. For example, reload clip costs 2 AP, but put 1 ammo in clip costs 1 AP. So if you only have 1 clip with 10 bullets, and you empty it, you'll spend 1-10 AP, to load 1-10 ammo and +2 to load it in to your weapon in combat. But if you have 2-3 clips, you can switch them with 2 AP.

I think this will require adding new ItemTemplateType - "Clip". DerivedStatEnum - ActionPointCost_LoadClip and tons of coding and bugfixing, and ui tweaks.

Not sure if you'll like this idea, cos it will completely change gameplay, maybe even make it worth, I don't know. I'm a person who don't like to play with balance alot, and I like to stick with vanilla.

But different gameplay can give this game a new life, I'm sure lot's of YouTube players will review your mod or even Playthroug game again with such a modifications. In case you'll need any help with UI assets, let me know, it's easy for me.

I made very simple Damage Per AP calculator, maybe it will be useful to balance things. Note that it's unfinished, feel free to edit it. https://docs.google.com/spreadsheets/d/ ... sp=sharing

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 28th, 2018, 1:48 am

Since I have to rebalance NPCs anyway now that they're getting proper stats in 0.9.5, I'm also hoping to do a balance pass on Attributes, weapon Skills, Traits, and weapons. That would include adding new ammo types for each caliber, and those sprites will come in very handy for that. Thank you.

I previously posted some of the balance adjustments I was considering in another thread: viewtopic.php?f=50&t=18775&start=20#p192190

My problem is usually a lack of time to implement everything I want, not all of which is easily noticeable. For instance, the past few days, I've been working on an issue I originally noticed while developing 0.9.4.

In combat, finding the blue tiles showing where you can move could take an inordinate amount of time (over half a second, and sometimes more than second) when a character had a combination of high combat speed and lots of action points. Since the code was running on the main thread, it was halting game execution during that time. In 0.9.5, I've rewritten it so it runs on a separate thread, and now there shouldn't be any long stutters. I also optimized it significantly with one tiny change. The InternalSearch method was using a List instead of a HashSet for the 'closed' set, and List.Contains gets really slow when there's hundreds of entries. That simple fix alone can reduce the processing time for the movement range search by two-thirds on long duration searches.

All while not understanding most of the algorithm. :mrgreen:

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » June 28th, 2018, 4:36 am

Executor_ wrote:
June 28th, 2018, 1:48 am
I previously posted some of the balance adjustments I was considering in another thread: viewtopic.php?f=50&t=18775&start=20#p192190
Great considerations! I like most of them.


scarcity ensures continued interest in game: player should always have more items they want to buy than they have the money for
I think this one simple, but very important, and my favorite.


multiple levels of ammo quality: poor, good, pristine
pristine is basically still shrink-wrapped from pre-war; poor has been exposed to the elements for a few decades
poor has large penalty to jam chance (+5%); good has minor penalty (+2%); pristine has none
good would be 3x the cost of poor, pristine 10x as much as poor; pristine not intended to be employed often
Be aware adding more bullet types, especially if you want to make bullets more rare. We will end up having too few bullets of each type, so our clip will always be half loaded. And first it might be fun, but later it will be boring to manage ammo all the time.
And pre-war can't be best, because according to what I saw in real life, powder it's getting old and not working as it should be. And some ammo cases are made of steel, and even that they are lubricated, they still will have corrosion.


total health fairly static throughout the game; characters start with large amount of health but gain very little per level
eg. base: 140 hp + 10 hp per Strength
thereafter, gain 1+(Str/10) hp per level...
This one I like too, but I personally more like little numbers, like 10-99. And it's about psychology too, if you start with 60 hp (two number) and in end game you'll have 100+ (tree number hp) it will be more satisfying.

You might say that lower numbers will be harder to fine-tune for balance - that's true, but to really benefit from bigger values to balance it, you have to write a tester on any programming language to tune balance and optimize stats, and we will not make it (too time consuming), so this
big numbers are not so useful, and fine-tuning by thoughts are hardly balancing anything.


a really valuable combat perk might cost 10 points, while a situational non-combat one would only be 3 points
Be careful, it might end up that everyone will save perks for only expensive ones. Or opposite. That's why I like linear progressions in games instead of min-maxing things.


one NPC per group possibly promoted to miniboss status, gains 1 or more bonuses:
good armor, weapon, mods
extra levels
Very good idea, if it will be as soft and rare as possible, other way it might be boring.


now would only impact vendor prices, the level range for NPCs (noted above), and the chance of minibosses appearing in NPC groups
This is my next favorite thing. I like this idea very much. Would add tougher broken weapon penalty.



All modifications is yours, and you can do whatever you want, but we will apreciate if you'll make as much things editable as possible, for example, I don't like few ideas like radical luck changes, stat points, and mix-max things for pc an npc.

btw, fun thing happens if I copy full Export folder and insert it in to Import folder. Then I started a new game with default squad. Looks like it affects female characters.
https://i.imgur.com/lS9GyuY.jpg
https://i.imgur.com/bbDNmde.jpg
https://i.imgur.com/uRXMH0q.jpg
Deleting Import/WearableInfo/* fixes this )))



One more thing, in CrouchTooltipCreator

Code: Select all

...
TextBuilder.dictSubs["ACTION"] = (flag ? Language.Localize("<@>Crouch", false, false, "") : Language.Localize("<@>Stand", false, false, ""));
...
		TextBuilder.Expand(Language.Localize("<@>[APCOST] AP to [ACTION]", false, false, ""), 1, false, false, ""),
...
Original code makes game to generate incorrect tooltips for my localization, it generates: <@>[APCOST] AP to [ACTION]. So [ACTION] is replaced with Crouch or Stand, like so: 2 AP to Crouch, but I can not translate full string, I can only translate "X AP to" and Crouch/Stand separately, and that is not how my language works, it's more complicated then just this simple replaces. So will appreciate if you'll change in in your future updates to:

Code: Select all

...
		TextBuilder.Expand(Language.Localize("<@>[APCOST] AP to Change Stance", false, false, ""), 1, false, false, ""),
...
I don't found a way how to change in by myself in Reflexil.

I read your answer here viewtopic.php?f=18&t=18947#p194656 looks like you are using VS project, any chance you can share source? Or maybe share what tools you use atm and share settings.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » June 29th, 2018, 2:10 am

0.9.4t now available here.

UPDATED GAME BUG FIXES
  • In modded games with multiple ammo types per caliber, reloading will now clear any active actions like aiming


I can't replicate the flickering consistently any more. Think it's actually set off by something I hover the mouse over while moving from Vargas to the Citadel door. I know where the bug is originating from code-wise, but I'm still not sure why it's occurring. I'm also wary of making changes considering how complex the UI code is, since there's a high risk of breaking something else.
Nikita-S-D wrote:
June 28th, 2018, 4:36 am
btw, fun thing happens if I copy full Export folder and insert it in to Import folder. Then I started a new game with default squad. Looks like it affects female characters.
https://i.imgur.com/lS9GyuY.jpg
https://i.imgur.com/bbDNmde.jpg
https://i.imgur.com/uRXMH0q.jpg
Deleting Import/WearableInfo/* fixes this )))
Yeah, I've known about that for a while. It's caused by not all GameObjects having unique names, but it's a difficult issue to correct. Hence why I always recommend trimming "Import" MSON files down to only the fields you actually want to change.
Nikita-S-D wrote:
June 28th, 2018, 4:36 am
Original code makes game to generate incorrect tooltips for my localization, it generates: <@>[APCOST] AP to [ACTION]. So [ACTION] is replaced with Crouch or Stand, like so: 2 AP to Crouch, but I can not translate full string, I can only translate "X AP to" and Crouch/Stand separately, and that is not how my language works, it's more complicated then just this simple replaces. So will appreciate if you'll change in in your future updates to:

Code: Select all

...
		TextBuilder.Expand(Language.Localize("<@>[APCOST] AP to Change Stance", false, false, ""), 1, false, false, ""),
...
"<@>[APCOST] AP to [ACTION]" is actually one of the base game's translations since it's in Main_ru.txt (in the "Wasteland 2 Director's Cut\Build\WL2_Data\StreamingAssets\" folder). I'm merely re-using it since I changed the tooltip somewhat. To correct the translation, just open up the Main_ru.txt file, search for the string, then edit the following line (starting with '='), such as by changing '[Action]' to the Russian for change stance.
Nikita-S-D wrote:
June 28th, 2018, 4:36 am
I read your answer here viewtopic.php?f=18&t=18947#p194656 looks like you are using VS project, any chance you can share source? Or maybe share what tools you use atm and share settings.
You can do whatever you want with the game files on your computer, but once you start redistributing them, you begin running into legal issues. And I prefer to stay 100% safe legally. Hence why I use the XDELTA approach, so that I only redistribute my changes to the Assembly-CSharp.dll rather than the whole file.

I occasionally use dnSpy if I want to insert a few lines of code into the original DLL for testing purposes, but otherwise, I use Visual Studio almost exclusively nowadays.

Nikita-S-D
Initiate
Posts: 18
Joined: August 16th, 2017, 1:32 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Nikita-S-D » July 1st, 2018, 3:51 pm

Executor_ wrote:
June 29th, 2018, 2:10 am
0.9.4t now available here.

UPDATED GAME BUG FIXES
  • In modded games with multiple ammo types per caliber, reloading will now clear any active actions like aiming


I can't replicate the flickering consistently any more. Think it's actually set off by something I hover the mouse over while moving from Vargas to the Citadel door. I know where the bug is originating from code-wise, but I'm still not sure why it's occurring. I'm also wary of making changes considering how complex the UI code is, since there's a high risk of breaking something else.

"<@>[APCOST] AP to [ACTION]" is actually one of the base game's translations since it's in Main_ru.txt (in the "Wasteland 2 Director's Cut\Build\WL2_Data\StreamingAssets\" folder). I'm merely re-using it since I changed the tooltip somewhat. To correct the translation, just open up the Main_ru.txt file, search for the string, then edit the following line (starting with '='), such as by changing '[Action]' to the Russian for change stance.

I occasionally use dnSpy if I want to insert a few lines of code into the original DLL for testing purposes, but otherwise, I use Visual Studio almost exclusively nowadays.
Thank you mate! Very appreciate your help and time you spend on reply explain things.

I updated my "damage per action point" calculator.
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Copy it and work with it as you like, I share, in case someone need to balance mods and tweak stats. It's not finished yet. But calculations pretty accurate.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » July 3rd, 2018, 2:42 pm

Nikita-S-D wrote:
July 1st, 2018, 3:51 pm
I updated my "damage per action point" calculator.
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Copy it and work with it as you like, I share, in case someone need to balance mods and tweak stats. It's not finished yet. But calculations pretty accurate.
Thanks. That'll come in handy in a couple months when I start rebalancing.

Sidenote: I'm having some problems with my internet service and it'll take my ISP a week to send a technician, so I'm not going to be checking this forum much for the next week or so.

katzsmile
Initiate
Posts: 3
Joined: March 15th, 2012, 7:55 am

Re: Wasteland 2: now with improved modding capabilities!

Post by katzsmile » July 16th, 2018, 10:03 am

There is good tutorial how to add/replace meshes for unity based game. Latest Battletech game as example.
http://btmodding.warriorsblood.com/inde ... y_new_mesh

fragelius
Initiate
Posts: 2
Joined: April 20th, 2014, 7:08 am

Re: Wasteland 2: now with improved modding capabilities!

Post by fragelius » July 21st, 2018, 5:21 am

is there a way to add new meshes into game? or export game meshes levels? to see how they are build to edit or add more stuff in them?


nvm i haz found da wei

Post Reply

Who is online

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