Page 30 of 31

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 5th, 2021, 4:28 am
by Executor_
0.9.4.057 now available here

UPDATED GAME BUG FIXES
  • resolved issue with a state variable related to the Prison not always being set when rescuing both AG Center and Highpool, preventing main quest progression

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 5th, 2021, 5:36 am
by icarium_jag
Hi,

Would you recommended this patch to someone starting their first first blind playthrough of Wasteland 2: DC?
If yes, which version would be considered most stable and polished?

Kind regards,
J

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 5th, 2021, 12:41 pm
by Shadow Jack
Executor_ wrote: April 5th, 2021, 4:28 am 0.9.4.057 now available here

UPDATED GAME BUG FIXES
  • resolved issue with a state variable related to the Prison not always being set when rescuing both AG Center and Highpool, preventing main quest progression
It works, thanks a lot!

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 6th, 2021, 4:39 pm
by Executor_
icarium_jag wrote: April 5th, 2021, 5:36 am Hi,

Would you recommended this patch to someone starting their first first blind playthrough of Wasteland 2: DC?
If yes, which version would be considered most stable and polished?

Kind regards,
J
Latest version is best. There's a ton of bugfixes and improvements over the base game, like more and better tooltips. First post in this thread has a link to all the patch notes. If you do experience any issues, you can just switch over to the base game, as they're completely savegame compatible.

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 7th, 2021, 7:44 am
by Executor_
0.9.4.058 now available here

To ensure moddable files are re-exported, please delete the "Arizona/ArizonaWorldMap" and "LosAngeles/LosAngelesWorldMap" folders in your "Mods/Export" directory, as well as the classes.txt file in your "Mods" folder.

MODDING
  • WorldMapRandomEncounterZones can be created, and all zones now properly exported and available for editing
    • All zones on each map are the same size, but doesn't have to be the case
    • Zones can overlap, though again, the base game never uses this
    • Zones were renamed so they start with coordinates in square brackets
      • On the Arizona map, [0,0] is at the bottom left
      • On the Los Angeles map, [0,0] is at the top right
    • Zone location can be changed via the position property
    • When playing the game, any zones that the squad enters or leaves will be recorded in the inXile_log.txt file stored in the "Mods" directory
  • worldMap.mson in the "Arizona/ArizonaWorldMap" and "LosAngeles/LosAngelesWorldMap" folders controls which WorldMapRandomEncounterZones are actually utilized by the game
    • Zones that are disabled or not present in the list will be ignored
    • If creating a new zone, make sure to add it to the list

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 7th, 2021, 2:27 pm
by Shadow Jack
Executor_ wrote: April 7th, 2021, 7:44 am 0.9.4.058 now available here

To ensure moddable files are re-exported, please delete the "Arizona/ArizonaWorldMap" and "LosAngeles/LosAngelesWorldMap" folders in your "Mods/Export" directory, as well as the classes.txt file in your "Mods" folder.

MODDING
  • WorldMapRandomEncounterZones can be created, and all zones now properly exported and available for editing
    • All zones on each map are the same size, but doesn't have to be the case
    • Zones can overlap, though again, the base game never uses this
    • Zones were renamed so they start with coordinates in square brackets
      • On the Arizona map, [0,0] is at the bottom left
      • On the Los Angeles map, [0,0] is at the top right
    • Zone location can be changed via the position property
    • When playing the game, any zones that the squad enters or leaves will be recorded in the inXile_log.txt file stored in the "Mods" directory
  • worldMap.mson in the "Arizona/ArizonaWorldMap" and "LosAngeles/LosAngelesWorldMap" folders controls which WorldMapRandomEncounterZones are actually utilized by the game
    • Zones that are disabled or not present in the list will be ignored
    • If creating a new zone, make sure to add it to the list
That is awesome thanks! I have some questions if you don't mind:
Can I see/edit scenes(e.g. scenes : [ AZ_RandomMap_08 ])?
Is it still impossible to edit/increase max amount of spawned actors?
Do you know what scenes have highest actors capacity?
What is weighting?

{
position : { x : 75.0, y : 1200.0 }
size : { x : 150.0, y : 160.0 }

scenes : [ AZ_RandomMap_08 ]
collection : {
percentChance : 14

encounters : [
{ encounter : RE_Desert_Human_Hard, weighting : 80 }
{ encounter : RE_Desert_Animal_Hard, weighting : 15 }
{ encounter : RE_Highland_Vendor, weighting : 25 }
{ encounter : RE_Desert_RangerDeathSquad_01, weighting : 200 }
{ encounter : RE_Desert_RangerDeathSquad_02, weighting : 200 }
{ encounter : RE_Desert_RangerDeathSquad_03, weighting : 200 }
]
}
}

//**************************
If I want laser sight to provide bonus only at point blank and optimal range how should I do it?
statModifiers : [
{
when : [ Situation.Target_PointBlankRange ]
statName : chanceToHit
tooltipId : ""

subset : [ Situation.Target_PointBlankRange ]
operation : Operation.ReduceNegative
value : 15.0
}
{
when : [ Situation.Target_OptimalRange]
statName : chanceToHit
tooltipId : ""

subset : [ Situation.Target_OptimalRange]
operation : Operation.ReduceNegative
value : 5.0
}
]

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 8th, 2021, 4:07 am
by Executor_
Shadow Jack wrote: April 7th, 2021, 2:27 pm Can I see/edit scenes(e.g. scenes : [ AZ_RandomMap_08 ])?
The scene will be exported the first time it is loaded up, so just wander around and trigger the random encounters. Check your "Arizona" folder, there's likely a few already exported.
Shadow Jack wrote: April 7th, 2021, 2:27 pm Is it still impossible to edit/increase max amount of spawned actors?
Do you know what scenes have highest actors capacity?
All the scenes I looked at had the same number of total spawns: 7 'ranged' and 6 'melee' Spawners. You could edit the RandomEncounterSpawnerSets to increase the number of spawns available for an encounter. Each spawner set only seems to use half of the available 'ranged' and 'melee' Spawners. I don't think it matters if you use 'ranged' Spawners for melee NPCs or vice-versa, I believe they're just named based on whether they'd be closer or farther from the party.

Also, if you're modifying any RandomEncounterSpawnerSets, make sure to delete the levelBounds, closePlayerStart, middlePlayerStart, and farPlayerStart fields from the MSON, as there's multiple objects with the same name so editing those fields isn't wise.
Shadow Jack wrote: April 7th, 2021, 2:27 pm What is weighting?
Add up all the weightings. Chance for any particular WorldMapRandomEncounter to be picked is weighting / (sum of all weightings). The RE_Desert_RangerDeathSquad_## encounters will normally be excluded from consideration because they have a requiresWSBoolTrue requirement that won't be met.
Shadow Jack wrote: April 7th, 2021, 2:27 pm If I want laser sight to provide bonus only at point blank and optimal range how should I do it?
statModifiers : [
{
when : [ Situation.Target_PointBlankRange ]
statName : chanceToHit
tooltipId : ""

subset : [ Situation.Target_PointBlankRange ]
operation : Operation.ReduceNegative
value : 15.0
}
{
when : [ Situation.Target_OptimalRange]
statName : chanceToHit
tooltipId : ""

subset : [ Situation.Target_OptimalRange]
operation : Operation.ReduceNegative
value : 5.0
}
]
You definitely don't want to be using the target's weapon to be determining the bonuses for the user's weapon.

Secondly, use ReduceNegative if you only want to help negate a penalty. If there's a bonus or no modifier at all, ReduceNegative does nothing. I don't think any weapon would have a hit penalty in optimal range, so ReduceNegative would be pointless for that. While most weapons do have a penalty at point blank range, I think shotguns and handguns get a bonus.

So I'd probably go with something like:

Code: Select all

statModifiers : [
		{
			when : [ Situation.PointBlankRange ]
			statName : chanceToHit
			tooltipId : ""
			
			subset : [ Situation.PointBlankRange ]
			operation : Operation.Add
			value : 15.0
		}
                {
			when : [ Situation.OptimalRange]
			statName : chanceToHit
			tooltipId : ""
			
			subset : [ Situation.OptimalRange]
			operation : Operation.Add
			value : 5.0
		}
	]

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 8th, 2021, 1:38 pm
by Shadow Jack
Thanks for the explanations!

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 11th, 2021, 11:32 am
by Shadow Jack
Hi, I did some testing:
0. It works I was able to spawn 12 actors on some maps! Thanks a lot!
1. Game does not load world map if you you import existing WorldMapRandomEncounterZone(even without any changes), if you create new one it works.
2. AZ_RandomMap_02 if you use all available spawner areas (that is much more than standard 6 melee 7 ranged) some actors are spawned underground(or outside of rechable area) and cannot be killed. I will continue research maybe will use only standard spawner areas. BTW is it ok that different maps use same spawner areas?
3. Is there a way to get coordinates(that later can be used to create new encounter zone) of team's location on the world map?
4. I there a way to increase a frequency of random encounters?
5. What parameter "percentChance" actually does? I've seen some zones with percentChance : 0

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 12th, 2021, 9:41 am
by Shadow Jack
It is still impossible to create new random encounters right?

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 12th, 2021, 1:12 pm
by Executor_
0.9.4.059 now available here

MODDING
  • WorldMapRandomEncounters can now be created
  • override MSONs for WorldMapRandomEncounterZone were causing a crash because the game was thinking the MSON was a new WorldMapRandomEncounterZone instead of just an override due to the renaming of WorldMapRandomEncounterZones happening too late
  • a bug was preventing objects that had an override MSON in the "Import" folder from being exported

__________________________________________

Shadow Jack wrote: April 11th, 2021, 11:32 am 1. Game does not load world map if you you import existing WorldMapRandomEncounterZone(even without any changes), if you create new one it works.
Should be resolved now.
Shadow Jack wrote: April 11th, 2021, 11:32 am 2. AZ_RandomMap_02 if you use all available spawner areas (that is much more than standard 6 melee 7 ranged) some actors are spawned underground(or outside of rechable area) and cannot be killed. I will continue research maybe will use only standard spawner areas. BTW is it ok that different maps use same spawner areas?
Probably best to only use Spawners that are already utilized by one of the RandomEncounterSpawnerSet on the map to avoid that issue. I think the level designers did a lot of copying and pasting when creating the random encounters, hence why so many Spawners seem to share guids.
Shadow Jack wrote: April 11th, 2021, 11:32 am 3. Is there a way to get coordinates(that later can be used to create new encounter zone) of team's location on the world map?
Not at the moment but it's something I can implement. I won't be able to work on the game or respond to any forum posts for the next few days though, as I'm going to be assembling my new computer and then having to reinstall everything.
Shadow Jack wrote: April 11th, 2021, 11:32 am 4. I there a way to increase a frequency of random encounters?
5. What parameter "percentChance" actually does? I've seen some zones with percentChance : 0
The game periodically checks for a random encounter. percentChance controls whether one will be found. At 0, that WorldMapRandomEncounterZone will never have any random encounters. At 100, it will always do so.
Shadow Jack wrote: April 12th, 2021, 9:41 am It is still impossible to create new random encounters right?
Completely forgot about them in the previous patch. You should now be able to create them.

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 12th, 2021, 1:22 pm
by Shadow Jack
Thanks a lot and good luck with assembling new rig! Managed to get new GPU?)))

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 14th, 2021, 11:34 am
by Shadow Jack
I've created new encounter and added it to zones. However it always occurs on one map and it is always empty(no actors).

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 17th, 2021, 9:25 am
by Executor_
0.9.4.060 now available here

To ensure moddable files are re-exported, please delete any "Spawner" folders in your "Mods/Export/Arizona/..." and "Mods/Export/LosAngeles/..." directories.

MODDING
  • fixed issue with MSON-created WorldMapRandomEncounters not being properly indexed
  • Spawners can be created
    • name requires an underscore '_' folllowed by a guid, just like the base game's Spawners
  • Spawner position and rotation can now be changed
  • lead character/world map position can be shown by enabling the setting on the Options-->Modding screen

________________________________________

Shadow Jack wrote: April 14th, 2021, 11:34 am I've created new encounter and added it to zones. However it always occurs on one map and it is always empty(no actors).
Should function now.

Shadow Jack wrote: April 12th, 2021, 1:22 pm Thanks a lot and good luck with assembling new rig! Managed to get new GPU?)))
Nah, was just aiming for a better CPU as I was on a 7700K. Already have a 2080 Ti and I'll wait until the 4080/Ti/90 are available next year to upgrade. Hopefully by then the mining craze will be over.

new hardware:
AMD Ryzen 7 5800X
MSI B550 Unify-X (ATX with 2 DIMM slots!)
2x16GB G.Skill DDR4-3200 14-14-14
1000W Seasonic Prime Ultra Titanium
Arctic Liquid Freezer II 360
Lian Li O11 Dynamic XL-White
filled to the gills with Noctua NF-A12x25s

old hardware:
Gigabyte Windforce OC 2080 Ti (with 2 NF-A12x25s zip-tied to heatsink)
1TB Samsung 970 Evo Plus
bunch of hard drives

Took me ages to get all the cable management done. So many PWM splitter and extension cables for all the fans.

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 18th, 2021, 1:09 am
by Shadow Jack
Thanks for the new patch!
Good for you I am still using i7-6700K, MSI 1060 GTX. I've updated to 1TB Samsung 970 Evo Plus recently. And since Cyberpunk 2077 is still in development I can wait for a while with upgrade too)
For Wasteland 2, War Thunder and ATOM RPG(I hope you have already tried it because it is like very very good rethinking of fallout 2 and it is moddable) my rig is more than enough.

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 20th, 2021, 1:08 am
by Shadow Jack
Hi I got a question:
Is it possible in theory to add new gun models from Unity asset store(https://assetstore.unity.com/3d/props/g ... =1&rows=96) to Wasteland 2? If yes how hard it is? Is it plug and play process or it would require some extensive additional 3d modeling and programming to integrate asset into the game mechanics?

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 20th, 2021, 4:27 pm
by Executor_
Assuredly not plug and play. You'd likely have to load up the model and make some adjustments. Model has to be saved as an OBJ file with the number of vertices matching the number of normals. Also have to make sure the model is properly sized and rotated, which you find out via trial and error.

Non-explosive/non-energy weapons aren't overly complicated though there'd still be the issue of correctly positioning the bullet, casing, muzzle flash, and mod mounts. Melee weapons would be the easiest.

Code: Select all

[87.95912] Party.CurrentPC.weaponTemplate.prefab.DEBUG_GetGameObjects()
[87.95917] "GAMEOBJECT: 'W_G3' (W_G3) [activeSelf: True, layer: 0 'Default']
   -->Transform [localPosition: (0, 0, 0), localEulerAngles: (0, 0, 0), localScale: (0.72, 0.72, 0.72)]
   -->MeshFilter [mesh.vertexCount: 4696]
   -->MeshRenderer [enabled: True, materials: 1, material: M_G3 (Instance), material.color: RGBA(1, 1, 1, 1)]
   -->FireFX [enabled: True]
   child gameObjects (5):
      GameObject 'CasingEffectPosition' [activeSelf: True, layer: 0 'Default']
         -->Transform [localPosition: (-0.2653, 0, 0.1978), localEulerAngles: (0, 0, 0), localScale: (0.0237, 0.0237, 0.0237)]
      GameObject 'FireEffectPosition' [activeSelf: True, layer: 0 'Default']
         -->Transform [localPosition: (-1.1738, 0, 0.1357), localEulerAngles: (0, 270, 0), localScale: (0.0237, 0.0237, 0.0237)]
      GameObject 'Mod_Mount_Barrel' [activeSelf: True, layer: 0 'Default']
         -->Transform [localPosition: (-1.2058, 0, 0.1359), localEulerAngles: (0, 270, 0), localScale: (0.8889, 0.8889, 0.8889)]
      GameObject 'Mod_Mount_Scope' [activeSelf: True, layer: 0 'Default']
         -->Transform [localPosition: (-0.235, 0, 0.2389), localEulerAngles: (0, 270, 270), localScale: (1, 1, 1)]
      GameObject 'Mod_Mount_UnderBarrel' [activeSelf: True, layer: 0 'Default']
         -->Transform [localPosition: (-0.8167, 0, 0.0703), localEulerAngles: (0, 270, 0), localScale: (0.8889, 0.8889, 0.8889)]
"
[206.40045] Party.CurrentPC.weaponTemplate.prefab.GetComponent<FireFX>().DEBUG_GetSerializedFields()
[206.40049] "Outputting all fields for FireFX 'W_G3' [W_G3]
FireFX - 11 total fields/properties
   public field Bullet 'bulletPrefab' = Bullet 'Bullet'
   public field GameObject 'fireEffect' = GameObject 'AK47_MF_PFX'
   public field GameObject 'smokeEffect' = GameObject 'AK47_MF_Smoke'
   public field GameObject 'fireEffectLight' = GameObject 'AK47_MF_Light'
   public field GameObject 'bulletCasingEffect' = GameObject 'AK47_Casing 1'
   public field String 'currentWeaponName' = "G3"
   public property Boolean 'useGUILayout' = true
   public property Boolean 'enabled' = true
   public property String 'tag' = "Untagged"
   public property String 'name' = "W_G3"
   public property HideFlags 'hideFlags' = None
"
[278.38387] Party.CurrentPC.weaponTemplate.prefab.GetComponent<MeshFilter>().DEBUG_GetSerializedFields()
[278.38391] "Outputting all fields for MeshFilter 'W_G3' [W_G3]
MeshFilter - 5 total fields/properties
   public property Mesh 'mesh' = Mesh 'W_G3 Instance'
   public property Mesh 'sharedMesh' = Mesh 'W_G3 Instance'
   public property String 'tag' = "Untagged"
   public property String 'name' = "W_G3"
   public property HideFlags 'hideFlags' = None
"
[286.75344] Party.CurrentPC.weaponTemplate.prefab.GetComponent<MeshRenderer>().DEBUG_GetSerializedFields()
[286.75350] "Outputting all fields for MeshRenderer 'W_G3' [W_G3]
MeshRenderer - 22 total fields/properties
   public property Mesh 'additionalVertexStreams' = null
   public property Boolean 'enabled' = true
   public property ShadowCastingMode 'shadowCastingMode' = On
   public property Boolean 'castShadows' = true
   public property Boolean 'receiveShadows' = true
   public property Material 'material' = Material 'M_G3 (Instance)'
   public property Material 'sharedMaterial' = Material 'M_G3 (Instance)'
   public property Material[] 'materials' = Count = 1
   [0] M_G3 (Instance) (UnityEngine.Material)
   public property Material[] 'sharedMaterials' = Count = 1
   [0] M_G3 (Instance) (UnityEngine.Material)
   public property Int32 'lightmapIndex' = -1
   public property Int32 'realtimeLightmapIndex' = -1
   public property Vector4 'lightmapScaleOffset' = (1.0, 1.0, 0.0, 0.0)
   public property Vector4 'realtimeLightmapScaleOffset' = (1.0, 1.0, 0.0, 0.0)
   public property Boolean 'useLightProbes' = false
   public property Transform 'probeAnchor' = null
   public property ReflectionProbeUsage 'reflectionProbeUsage' = BlendProbes
   public property String 'sortingLayerName' = "Default"
   public property Int32 'sortingLayerID' = 0
   public property Int32 'sortingOrder' = 0
   public property String 'tag' = "Untagged"
   public property String 'name' = "W_G3"
   public property HideFlags 'hideFlags' = None
"
[328.66089] Party.CurrentPC.weaponTemplate.prefab.GetComponent<MeshRenderer>().sharedMaterial.DEBUG_GetSerializedFields()
[328.66099] "Outputting all fields for Material 'M_G3 (Instance)' [M_G3 (Instance)]
Material - 10 total fields/properties
   public property Shader 'shader' = Shader 'Standard'
   public property Color 'color' = RGBA(1.000, 1.000, 1.000, 1.000)
   public property Texture 'mainTexture' = Texture2D 'T_G3_D'
   public property Vector2 'mainTextureOffset' = (0, 0)
   public property Vector2 'mainTextureScale' = (1, 1)
   public property Int32 'renderQueue' = 2000
   public property String[] 'shaderKeywords' = Count = 2
   [0] "_LIGHTMAPPING_REALTIME"
   [1] "_NORMALMAP"
   public property MaterialGlobalIlluminationFlags 'globalIlluminationFlags' = RealtimeEmissive, EmissiveIsBlack
   public property String 'name' = "M_G3 (Instance)"
   public property HideFlags 'hideFlags' = None
"

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 21st, 2021, 12:17 am
by Shadow Jack
Ok that does not sound too intimidating)
Sorry to bother you again but can you please do some manual or video tutorial how to do it(or provide me with the link to the tutorial that helped you to understand the process) with one rifle and I will import some of the packs into the game. And if I do that will it be compatible with your framework, or I'll have to repeat process after each patch? And if it is not compatible is there a way to incorporate those models into your framework? Also will game handle HD models or should I stick to Low Poly models?

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 22nd, 2021, 3:52 am
by Executor_
0.9.4.061 now available here

MODDING
  • a few minor improvements to loading of OBJ files

________________________________________

Shadow Jack wrote: April 21st, 2021, 12:17 am Ok that does not sound too intimidating)
Sorry to bother you again but can you please do some manual or video tutorial how to do it(or provide me with the link to the tutorial that helped you to understand the process) with one rifle and I will import some of the packs into the game. And if I do that will it be compatible with your framework, or I'll have to repeat process after each patch? And if it is not compatible is there a way to incorporate those models into your framework? Also will game handle HD models or should I stick to Low Poly models?
My knowledge of 3D modeling and graphics work is extremely minimal. Lots of Googling is what I rely on. Blender is a free and popular program for working with object models.

I'd like to stress that the stuff from the Unity Asset Store is intended for use with the Unity Editor. The runtime build of the game lacks most of the functionality of the editor. Furthermore, the version of Unity the game uses, 5.2, is 5+ years old at this point and so quite outdated.

The game's engine only supports up to 65k triangles per mesh. For more than that, I believe you need to create additional meshes, which you then place in child GameObjects. Personally, I'd just avoid anything really high-poly.

About the framework changing, well I'm always adding new features, but the basic method of loading meshes/textures will probably remain unchanged.

As for the process, I'd first start by trying to edit an existing weapon. Pick one from the "ItemTemplate_WeaponRanged" directory and open its MSON file. Near the top you'll see the prefab field. Go to the "Export/Mesh/Weapon/" folder and find the corresponding file. Copy it to the "Import/Mesh/Weapon/" directory. Move the OBJ model file containing the mesh into that folder too, then edit the MSON and set overrideMesh to true and change meshFilename to match the OBJ's (but excluding the file extension).

Repeat those steps with the MSON file from "Export/Texture/Weapon/". The texture files need to be in PNG/BMP/JPG format.

Afterwards, run the game, check the debug_import.txt file for any issues, and equip the weapon on a character to see if it worked.

Re: Wasteland 2: now with improved modding capabilities!

Posted: April 23rd, 2021, 12:48 am
by Shadow Jack
Thanks for advice! I've played with it yesterday and was able to take fbx from unity asset store pack. I scaled, rotated it in Blender and converted to .obj using online converter and imported it to game. It is a bit misplaced but I think that can be adjusted in Blender by altering its coordinates. Do you know how to extract texture from fbx? I've tried to extract it using Unity Personal but all I got was just .png with several multicolor squares. Also any idea in what tool and how you handle the issue of correctly positioning the bullet, casing, magazine, muzzle flash, and mod mounts?
Sorry to bother you on this but you are the best expert on modding Wasteland 2 on this planet)