Wasteland 2: now with improved modding capabilities!

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

Moderator: Ranger Team Alpha

Post Reply
karlito31
Initiate
Posts: 7
Joined: March 16th, 2019, 12:46 am

Re: Wasteland 2: now with improved modding capabilities!

Post by karlito31 » March 16th, 2019, 1:02 am

Hi Executor_. My first post here, congrats on excelent work, works like a charm. :) I have question though. Where exactly in assembly-csharp. dll are skills assigned? If Im going to add a new skill, where that would be? Thanks.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 16th, 2019, 6:30 am

In the base game, the Skill class is basically an empty shell; a container to hold some skill-specific data. That Skill data is loaded from the game files in PCStatsManager InitSkill.

The code to implement the Skills is scattered across literally dozens of classes. Off the top of my head, some to check out would be: Drama/SkillObject/SkillMetered, PC/PCTemplate, ItemTemplate/ItemInstance derived (for Weaponsmithing), WorldMapManager/WorldMapParty (for Outdoorsman). Its all over the place in the UI code too.

I've since moved quite a bit of the code into the Skill class plus derived ones I created so as to make it easier to keep track of.

If you just want to create a new weapon Skill, you can do that already in 0.9.4. Copy an existing MSON from the "Mods\Export\BaseStat\Skill\Skill_Weapon\" folder into "Mods\Import\BaseStat\Skill\Skill_Weapon\", then rename and edit it. Afterwards, you'd need to edit/create ItemTemplate_Weapons to refer to your new Skill.

Shadow Jack
Acolyte
Posts: 51
Joined: October 25th, 2017, 7:53 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Shadow Jack » March 16th, 2019, 6:58 am

Hi Executor, some users of my mod say that they experience combat issues on patch version that is later than patch_v0.9.4v(not sure if it is w or x version of a patch). Theis description of a problem is provided below. Any idea what it can be?
"Im having the same issue with the enemy raiders getting stuck before shooting. Its happening when i get attacked on the global map, each time its the Raider Gunslinger, and its happeningall the time"
"I'm having an issue in combat. When an enemy raider tries to shoot the animation stops at the point when he is aiming and about to fire. The game doesn't freeze but it is stopped on the enemy characters turn."

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 16th, 2019, 9:44 am

That sounds very similar to the no ammo bug that was freezing combat which I fixed in 0.9.4x. I've looked over the code again, and I don't see how it could occur since that patch, so most likely they're using an earlier version. Could you ask them to update to the latest version please?

karlito31
Initiate
Posts: 7
Joined: March 16th, 2019, 12:46 am

Re: Wasteland 2: now with improved modding capabilities!

Post by karlito31 » March 16th, 2019, 10:21 am

Thanks for answer. I allready did new skill via 0.9.4.x and that works as it should, but Im after something somewhat beefier in a way (introduce/reintroduce stealth to the game) so I was corious about exact mechanics. Ther is InitSkills in Pcstatmanager. Is that where you loding your skill data to dictionary? And if so, can (and how) I hook there for my needs? hope not to bothering you.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 16th, 2019, 10:40 am

In InitSkills, I'm loading the Skill data from Resources, just like in the base game. The base game only has a Skill class, but since I also created Skill_Weapon and Skill_Challenge classes, I need to copy the data over and delete the originals. atWeapons and heavyGun are one Skill in the base game, I separate them into two. Afterwards, I adjust some values and enter data into any fields I created.

So yes, that's where you'd start. But most of the work would be UI and AI changes. CheckAggro in the NPC class would be one method to check out.

karlito31
Initiate
Posts: 7
Joined: March 16th, 2019, 12:46 am

Re: Wasteland 2: now with improved modding capabilities!

Post by karlito31 » March 16th, 2019, 10:50 am

Yes, I allready located method of interest here, "isinperceptioncone" in Mob and by some simple changes I was able to make my party completely invisible for mobs, right in front of them. So now it is a metter of fine tuning two variables there,is num < num2, and for that I need to know is skill active and how many points are in it. That is basicaly all I need from skill. So in the end, It is likely that I will just create it with 0.9.4x :)

systemjack
Initiate
Posts: 2
Joined: March 16th, 2019, 11:01 am

Re: Wasteland 2: now with improved modding capabilities!

Post by systemjack » March 16th, 2019, 11:36 am

Thanks for the great work! I'm seeing an issue with portrait snapshots during character creation. I can take one snapshot for a given character and it appears darkened. After the initial snapshot, no further presses of the "Take Snapshot" button save any image. Looks like all the snapshots are saved darkened compared to in-game experience (using external viewer) including the ones from before DLL patch so the lighting must happen in the code. In fact if I restart the game the singular snapshot from the previous run will be available and look normal. I confirmed the behavior with no files in the Import folder and that the correct behavior returned when reverting to original DLL. Also reviewed the logs and did not see any errors. Thanks again.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » March 16th, 2019, 12:30 pm

0.9.4y now available here.

UPDATED GAME BUG FIXES
  • taking multiple snapshots during character creation works again
  • fixed saved snapshot appearing too dark in-game until the game was restarted

systemjack
Initiate
Posts: 2
Joined: March 16th, 2019, 11:01 am

Re: Wasteland 2: now with improved modding capabilities!

Post by systemjack » March 16th, 2019, 1:07 pm

Wow, nice response time ;-) Fix confirmed.

sqparadox
Initiate
Posts: 1
Joined: March 15th, 2012, 6:01 pm

Re: Wasteland 2: now with improved modding capabilities!

Post by sqparadox » April 6th, 2019, 10:12 am

Can't increase Attributes when using a controller (both Steam Controller and Xbox) with this installed.

Either have to change to mouse and keyboard or go back to the unmodded Assembly-CSharp.dll in order to spend attribute points. Not a huge deal but an annoyance nonetheless.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » April 8th, 2019, 12:34 am

Yeah, I haven't really tested it with a controller, so not surprising there are UI issues using one. I'll try to get around to fixing it eventually.

User avatar
crimsoncorporation
Novice
Posts: 41
Joined: January 26th, 2017, 3:50 pm
Contact:

Re: Wasteland 2: now with improved modding capabilities!

Post by crimsoncorporation » April 9th, 2019, 1:39 pm

I'm not even sure if this is a bug as such, more of a design flaw... In my recent playthrough I tried to recruit Pizepi, which I did have enough charisma for via the "radiant personality" perk. But of course the total actual charisma of the group was still below the Pizepi threshold, so she did not appear in the first place. Any other NPC the perk would have worked on, but for her to appear the charisma check does not consider the perk.

Sure enough, when I returned a little later with Dan Q, Pizepi was there, because he pushed the actual charisma value over the threshold.

Any way this can be fixed? Should it even be fixed?

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » April 10th, 2019, 10:21 am

Can it be fixed? Yes. But it would entail writing new dialogue as there's currently none for the party having insufficient Charisma.

User avatar
crimsoncorporation
Novice
Posts: 41
Joined: January 26th, 2017, 3:50 pm
Contact:

Re: Wasteland 2: now with improved modding capabilities!

Post by crimsoncorporation » April 11th, 2019, 5:03 am

Ah okay, hardly worth the effort then. I assumed it's theoretically possible to have the charisma check that makes Pizepi appear take "radiant personality" into account.

On a different note, do you think it is theoretically possible/feasable to improve the AI (in a future mod for instance) from what you've seen in the code? Its biggest fault seems to be that it always runs towards you until it gets in range, thus wasting valuable action points.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » April 11th, 2019, 8:08 am

crimsoncorporation wrote:
April 11th, 2019, 5:03 am
Ah okay, hardly worth the effort then. I assumed it's theoretically possible to have the charisma check that makes Pizepi appear take "radiant personality" into account.
Oh, sorry, misread your initial post the first time. The game IS taking Radiant Personality perk into consideration when calculating whether you have the required Charisma for her to join. Are you sure you had enough Charisma? The cnpcCharismaRequirement for her is 22, which you must at least equal. Radiant Personality only doubles the Charisma of the character with the perk, not the whole party.
crimsoncorporation wrote:
April 11th, 2019, 5:03 am
On a different note, do you think it is theoretically possible/feasable to improve the AI (in a future mod for instance) from what you've seen in the code? Its biggest fault seems to be that it always runs towards you until it gets in range, thus wasting valuable action points.
Yes, quite possible. Already had to make some adjustments to the AI in 0.9.5 due to all the NPC changes, but haven't had the time yet to actually try to make it smarter. But it's definitely a long-term goal.

User avatar
crimsoncorporation
Novice
Posts: 41
Joined: January 26th, 2017, 3:50 pm
Contact:

Re: Wasteland 2: now with improved modding capabilities!

Post by crimsoncorporation » April 11th, 2019, 12:21 pm

Executor_ wrote:
April 11th, 2019, 8:08 am
Are you sure you had enough Charisma? The cnpcCharismaRequirement for her is 22, which you must at least equal. Radiant Personality only doubles the Charisma of the character with the perk, not the whole party.
Yes, I had 4x 1 CHA on my main party, plus Ralphy (4), Takayuki (3) and Vulture's Cry (4), for a total of 15. I gave Vulture's Cry the radiant personality perk, so that gave me 19 total. My party had two spiked collars at that point, so I was very happy when an RSM cuddly puppy dropped another one, as that raised my total to 22 if worn, which my party did before they left the Darwin installation.

So I'm not sure what went wrong then, but I heard a mention that the required charisma for Pizepi can actually vary, some seem to have gotten it with less, and maybe sometimes more is needed? Not sure what version of the game this is though, and also not how reliable those reports are. At any rate Pizepi didn't appear with the mentioned constellation. She did later on, when I had replaced Ralphy with Dan Q (9).

Shadow Jack
Acolyte
Posts: 51
Joined: October 25th, 2017, 7:53 am

Re: Wasteland 2: now with improved modding capabilities!

Post by Shadow Jack » April 12th, 2019, 4:30 am

crimsoncorporation wrote:
April 11th, 2019, 12:21 pm
Executor_ wrote:
April 11th, 2019, 8:08 am
Are you sure you had enough Charisma? The cnpcCharismaRequirement for her is 22, which you must at least equal. Radiant Personality only doubles the Charisma of the character with the perk, not the whole party.
Yes, I had 4x 1 CHA on my main party, plus Ralphy (4), Takayuki (3) and Vulture's Cry (4), for a total of 15. I gave Vulture's Cry the radiant personality perk, so that gave me 19 total. My party had two spiked collars at that point, so I was very happy when an RSM cuddly puppy dropped another one, as that raised my total to 22 if worn, which my party did before they left the Darwin installation.

So I'm not sure what went wrong then, but I heard a mention that the required charisma for Pizepi can actually vary, some seem to have gotten it with less, and maybe sometimes more is needed? Not sure what version of the game this is though, and also not how reliable those reports are. At any rate Pizepi didn't appear with the mentioned constellation. She did later on, when I had replaced Ralphy with Dan Q (9).
Try savescumming, it worked for me.

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

Re: Wasteland 2: now with improved modding capabilities!

Post by Executor_ » April 12th, 2019, 6:12 am

Yeah, the game only checks whether to show or hide her when the map is loaded (also the way its handled for most NPCs), so if you only reach the required 22 whilst on the map, you'll need to save and reload like Shadow Jack said in order to force the game to check again.

AliceInChains
Initiate
Posts: 3
Joined: April 14th, 2019, 2:50 am

Re: Wasteland 2: now with improved modding capabilities!

Post by AliceInChains » April 14th, 2019, 9:28 am

Nikita-S-D wrote:
June 27th, 2018, 7:19 am
Here you can download update sprites that I use, feel free to use them whatever you want, maybe for ammo mod or grenades mod.
Your .zip file also contained some WL2 Atlas files (.png) and correct me if I'm wrong, but the WL2_Icons.png seemed to have some minor modifications. I tried adding my modified one (based on yours) to the Sprite folder and editing the corresponding .mson file in UIAtlas but that does not seem to work. Is it part of one of the assets or resources files perhaps (and thus should be reinserted)? If so, could you let me know which one?

Edit: I also tried to set Atlas and name directly to a .png file in the Sprite folder (without extension) but the icon still won't show up in Character skill tab (trying to add a new icon to a newly created skill: skill shows, but without icon)
Last edited by Drool on April 14th, 2019, 9:43 am, edited 1 time in total.
Reason: If you close tags, it won't look like you're just quoting without adding anything

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests