Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 4th Sep 2022 at 9:15 PM Last edited by spherefish : 7th Sep 2022 at 2:35 PM.
Default (Solved!) Custom skill journal with Secondary Tabs?
Hey everyone!

I'm working on a custom skill and am currently trying to create the skill journal for it. While I managed to add tracked stats and lifetime opportunities to it just fine, I also want the journal to include a list of objects associated with that skill (basically like the list of caught fish you see in the Fishing skill journal). However, this turned out to be a major struggle, since I just can't seem to figure out how to make it work.

So I'm guessing (and I could be totally wrong here) that these lists are defined by the SecondaryTabs variable inside the skill class. I'm trying to make a dummy list that will just have a bunch of text columns saying “test”, yet each time I load it into the game, it just breaks my skill journal. (I had the same issue with my tracked lifetime opportunities before that was caused by a null reference, so maybe there is a reference missing somewhere that I'm just not aware of?)

Here is my SecondaryTabs method:
Code:
public override List<ObjectPicker.TabInfo> SecondaryTabs
{
	get
	{
		List<ObjectPicker.TabInfo> list = new List<ObjectPicker.TabInfo>();
		List<ObjectPicker.RowInfo> list2 = new List<ObjectPicker.RowInfo>();
			
		for (int i = 0; i<3; i++)
		{
			List<ObjectPicker.ColumnInfo> list3 = new List<ObjectPicker.ColumnInfo>();
			
			list3.Add(new ObjectPicker.ImageAndTextColumn("",  "test"));
			list3.Add(new ObjectPicker.TextColumn( "test"));
			list3.Add(new ObjectPicker.TextColumn( "test"));
			list2.Add(new ObjectPicker.RowInfo(null, list3));
		}

		if (list2.Count > 0)
		{
			list.Add(new ObjectPicker.TabInfo("coupon",  "test", list2));
		}
		return list;	
	}
}

I know that that the Nraas Kamasimtra and Assassination skills have secondary tabs inside their skill journals, so my hope is that it's doable in theory and that there's just something very obvious that I'm missing here.

EDIT:
After giving it another try I actually figured out the issue, apparently the problem was that my skill didn't have a HeaderInfo() method (which is responsible for creating the little header above the secondary tabs). After quickly writing one for testing, it all works fine now!

For anyone curious, these are my final SecondaryTabs and HeaderInfo methods:


And here's what it looks like in the game:



Anyway, I'm leaving this thread up in case anyone else experienced issues with secondary tabs while creating a custom skill journal.
Advertisement
Field Researcher
#2 Old 7th Sep 2022 at 8:26 PM
Thanks for sharing, this might come in useful in the future.
Back to top