apellis Posted June 28, 2023 Share Posted June 28, 2023 I'm working on porting my trainer mod to SSE. I have well over 100 fragment script for all of the choices. 6 each on the each of 18 skills. The nod works fine and I'm ready to publish, but it seems a waste when the same fragment could be utilized 6 times for each skill. Every time I try to add a fragment new fragment to replace the previous fragment, the ck just generate a new fragment.It's no big deal if I can't, but It sure would cut down the receptiveness. Anyone? TIA! Link to comment Share on other sites More sharing options...
maxarturo Posted June 28, 2023 Share Posted June 28, 2023 The way the Creation Engine works, you can't. CK generates each time for each topic / dialogue fragment its own unique id and its own unique fragment id that bellongs only to that topic / dialogue line. Link to comment Share on other sites More sharing options...
scorrp10 Posted June 28, 2023 Share Posted June 28, 2023 Definitely can, but that requires some SSEEdit chicanery.Think about it. After adding a script fragment to a TI, you can go to advanced tab and rename the script to whatever you want. It is NOT tied to your TI fromid. And you absolutely should be renaming your fragment scripts to avoid conflicts. Say you added script fragments to your 6 alchemy topics and have 6 separate TIF pex and psc files. Each with a function Fragment_0.Create a script that extends TopicInfo and put all code from those 6 into it. For scripts 2-6, you rename functions Fragment_1..5. Consider looking at some QF_ scripts for example of how multifragment scripts look. If some fragments are exactly the same, you can get rid of duplicates. Compile in CK using script manager. Save/exit. Go into SSEEdit. In your plugin, go into your topic infos. You will see they have VMAD section indicating which script is attached, and which fragment is called. Here, you can change them to reference your combined script and to call a different fragment. You probably should avoid messing around those topic infos in CK after that. Link to comment Share on other sites More sharing options...
apellis Posted June 28, 2023 Author Share Posted June 28, 2023 Thanks guys.scorp10, I'll look at doing just that. Link to comment Share on other sites More sharing options...
maxarturo Posted June 28, 2023 Share Posted June 28, 2023 I haven't modded or touched the game for like a year and a half, or more..., I can't even remember... and I only used to use xEdit to clean mod an generate SEQ files. But yeah, you should definitely try what was proposed, and if you can, report back your results if its working, it could come in handy if I decide to make one last mod before quitting Skyrim for good this time. Link to comment Share on other sites More sharing options...
apellis Posted June 28, 2023 Author Share Posted June 28, 2023 I used the CK to change the name of one of the fragments.I verified all seven response fragments were end fragment_0I changed the other 6 in SSEEdit to match the "master" fragment.Only one of the responses played instead of a random one of the other 6 and the fragment script didn't execute. Probably did something wrong or it just won't work.Gonna leave it as is, but thanks for taking the time to answer. Link to comment Share on other sites More sharing options...
scorrp10 Posted June 29, 2023 Share Posted June 29, 2023 Proof of concept. What we got here: Added an extra branch of player dialogue to 'DialogueRiverwood_Revisited', with 4 random responses for Alvor and 3 for Sigrid.Each TopicInfo calls a script fragment, but you can see that only two scripts are included, illustrating two different cases. Alvor: All four responses call the same 'Fragment_0' function within same TIF_Multi_05005902 script, but each response loads the 'Ingot' property with a different item. Sigrid: All three responses use the same TIF_Multi2_0500AA06 script, which includes three fragments, and each response calls a different fragment. When you test it, remember - it is random, so it CAN be 'streaky'. Sigrid gave me the same response first 6 times before choosing a different one. Link to comment Share on other sites More sharing options...
Sphered Posted July 2, 2023 Share Posted July 2, 2023 Solid example from I what I used a ton back when. Needs XEdit for you to do modify the attached fragment labelings, and also to renumber IDs so it can identify itself. In this case I use a SKSE call to check the last digit, so naturally this means numbering the ids in a sequential manner like below. I liked this method quite a lot, was a huge headache saver ScriptName EZTopics Extends TopicInfo Hidden Function Fragment_0(ObjectReference akSpeakerRef) Int RequestID = StringUtil.SubString(Self,StringUtil.Find(Self," on") - 1,1) as Int) If RequestID == 1 (akSpeakerRef as Actor).SetPlayerTeammate() ElseIf RequestID == 2 (akSpeakerRef as Actor).SetActorValue("WaitingForPlayer",1.0) ElseIf RequestID == 3 (akSpeakerRef as Actor).SetActorValue("WaitingForPlayer",0.0) ElseIf RequestID == 4 (akSpeakerRef as Actor).OpenInventory() EndIf ; Etc EndFunction Link to comment Share on other sites More sharing options...
Recommended Posts