Recommended Posts

So I just did a test uninstall/reinstall and SLM took over 25 minutes...because of the companion dialogs.

SO...

I really am just going back to hard replaces on those since I really don't think it's necessary to write all the saber building sections of the companion dialogs with the patcher.

Who agrees? 

Share this post


Link to post
Share on other sites

I've decided to make Learn Schematic into a feat rather than a Force Power, because that's the way I think I intended it to be in the first place.

So I think the main script that Fair Strides originally wrote is going away and I will have to devise a new script to just  check if you have the feat and the schematic you are trying to build.  Saber schematics will just be datapads again like in the original mod. No more equippable forearm shields. Just datapads. 13 of those in inventory isn't a huge deal. But you'll have to keep them on you if you want to build that particular lightsaber.

I'll just have to re edit the workbench dialog and my append.tlk files once I get a working script.

Question:

Isn't there a vanilla script function that checks whether you have a feat or not? Haven't been able to scour KT for such a thing yet.

Thanks

KJ

 

Share this post


Link to post
Share on other sites

Thanks DP.

I don't think I'm going to be able to do that this time around. I am running out of time.

 

Share this post


Link to post
Share on other sites

What might cause this? Anyone?

20221108021445_1.jpg.4b4383ca428df168542d1608b37cdc86.jpg

the Claivoyant video effect or something else?

It's always worked fine until now. 

All files were inserted into the modules on this install.

 

EDIT: Never mind. I'm a schmuck. I installed the waypoint files but not the .git file for the area.

Derp.

 

 

 

Share this post


Link to post
Share on other sites

Note that you typically don't need to create UTW files. You can just add the entry to the GIT using the global TemplateResRef (sw_waypoint001) and change the tag, etc. in the GIT struct. Most vanilla waypoint entries do this.

  • Thanks 1

Share this post


Link to post
Share on other sites
On 11/5/2022 at 5:53 AM, Kaidon Jorn said:

Thanks DP.

I don't think I'm going to be able to do that this time around. I am running out of time.

 

What do you mean "running out of time"?

Share this post


Link to post
Share on other sites

I have to sell the house and move. 
I could just wait to release next summer or something. Probably will…

My brother died from a stroke a few weeks ago and it’s now imperative that i get out from under it (the house)

i may be able to get it done before xmas

  • Like 2
  • Sad 2

Share this post


Link to post
Share on other sites

Sounds like you have a lot going on tbh. I'm sorry to hear about your brother though, KJ. Condolences to you and your family during this difficult time.

  • Thanks 1

Share this post


Link to post
Share on other sites

I'm so sorry for your loss, prayers and condolences to you and your family during this most difficult time...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Welp.

I just screwed up my whole mod last night. Don't know if I can fix it. 

Yeah....maybe next year.

  • Sad 1

Share this post


Link to post
Share on other sites

Unless you deleted most of it, I feel confident you can recover. That said, it isn't always obvious how you screwed up. Hopefully it wasn't something where you saved over a file accidentally, or messed up a cut & paste/find & replace and saved it before realizing. I have definitely hosed myself scripting with messed up cut/paste and not saving enough revisions of code.

As DP asked, please explain how you screwed up and maybe (shot in the dark maybe is better than nothing) we can help.

Share this post


Link to post
Share on other sites

Well it was my changes.ini and yeah i recovered. Everything got shifted down because I added  a section, so i had to rebuild half of the modules section. That was a b****.  I didn’t have a backup changes.ini but i do now
 

Share this post


Link to post
Share on other sites

You might want to consider some sort of version control-based backup system (e.g. Git, SVN, etc.). You could do it locally, or via somewhere like Github using a private (i.e. non-public) repo.

Share this post


Link to post
Share on other sites

Right yeah

Thing was, my dumba** forgot to go back and manually re-number the existing (install to modules) section after I added a new part, so it all got installed to the wrong modules. 

smh

Share this post


Link to post
Share on other sites

OK! Progress!

Could someone help me out with writing this check script? 

I need to basically check to see if you have the particular scheme item tag, as well has checking to see if you have the feat.

So I took the script "c_have_any_co_cr", changed the item tags and am trying to add the check for feat to it. I know this is definitely not the way to go about it, but if I had some pro at the helm I would be doing good. 

Here's what I have. Would this work like this?

int StartingConditional() {
    int int1 = 0;
    int int2 = 245;
    object oPC = GetFirstPC();
    if ((GetIsObjectValid(GetItemPossessedBy(oPC, "hero_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))) {
        int1 = 1;
    }
    else {
        if ((GetIsObjectValid(GetItemPossessedBy(oPC, "raid_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))) {
            int1 = 1;
        }
        else {
            if ((GetIsObjectValid(GetItemPossessedBy(oPC, "enfo_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))) {
                int1 = 1;
            }
            else {
                if ((GetIsObjectValid(GetItemPossessedBy(oPC, "cbat_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))) {
                    int1 = 1;
                }
                else {
                    if ((GetIsObjectValid(GetItemPossessedBy(oPC, "dres_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))){
                        int1 = 1;
                    }
                    else {
                        if ((GetIsObjectValid(GetItemPossessedBy(oPC, "egrd_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))){
                            int1 = 1;
                        }
                        else {
                            if ((GetIsObjectValid(GetItemPossessedBy(oPC, "ckni_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))){
                                int1 = 1;
                            }
                            else {
                                if ((GetIsObjectValid(GetItemPossessedBy(oPC, "reva_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))){
                                    int1 = 1;
                                }
                                else {
                                    if ((GetIsObjectValid(GetItemPossessedBy(oPC, "sinq_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))){
                                        int1 = 1;
                                    }
                                    else {
                                        if (GetIsObjectValid(GetItemPossessedBy(oPC, "sage_scheme"))) && (GetHasFeat(int2, OBJECT_SELF))) {
                                            int1 = 1;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return int1;
}

And I do have 3 more schematic tags to add down there at the bottom. Which are... dvet_scheme, shdw_scheme, and stal_scheme. 

How do we condense this all down and make it all concise and pretty?

Many many thanks in advance. 

Share this post


Link to post
Share on other sites

Try this:

int StartingConditional() {
    
    object oPC = GetFirstPC();
    object oItem;
    string sTag;
    string sEnd;
    
    if (GetHasFeat(245, OBJECT_SELF))
        {
            oItem = GetFirstItemInInventory(oPC);
            
            while (GetIsObjectValid(oItem))
                {
                    sTag = GetTag(oItem);
                    sEnd = GetStringRight(sTag, 7);
                    
                    if (GetStringLength(sTag) > 8 && sEnd == "_scheme")
                        {
                            return TRUE;
                        }
                    
                    oItem = GetNextItemInInventory(oPC);
                }
        }
    
    return FALSE;
}

Since it is using OBJECT_SELF, I assume the GetHasFeat is checking a companion?

Share this post


Link to post
Share on other sites

It could be. I made the feat pickable for jedi classes ( and now I realized the problem with that, cause I dont want the PC to be able to pick it until it's granted) But for the PC it's granted on saber quest completion just like before. (via script not .2da)

So what I wished I had was the basic "c_have_item.ncs" but it also checks for the feat. So that I could put the tag of the scheme in the string parameter of the dialog, then maybe the feat row number in the first little box(P1)? Sorry I'm braindead. 

wishful thinking?

 

Honestly the feat is completely arbitrary, but I had to be able to gate this s*** somehow.

 

 

 

Share this post


Link to post
Share on other sites

Well the feat check is not going to work for the PC in the current script (either yours or mine) since OBJECT_SELF will be the DLG owner.

For TSL, yes, you can use GetScriptStringParameter to grab a string and GetScriptParameter to grab up to five ints. You could try this:

int StartingConditional() {
    
    object oPC = GetFirstPC();
    object oItem;
    string sTag;
    string sEnd;
    string sDLGTag = GetScriptStringParameter();
    int nDLGInt1 = GetScriptParameter(1);
    int nDLGInt2 = GetScriptParameter(2);
    int nDLGInt3 = GetScriptParameter(3);
    int nDLGInt4 = GetScriptParameter(4);
    int nDLGInt5 = GetScriptParameter(5);
    
    if (GetHasFeat(nDLGInt1, oPC))
        {
            oItem = GetFirstItemInInventory(oPC);
            
            while (GetIsObjectValid(oItem))
                {
                    sTag = GetTag(oItem);
                    sEnd = GetStringRight(sTag, nDLGInt2);
                    
                    if (GetStringLength(sTag) > nDLGInt3 && sEnd == sDLGTag)
                        {
                            return TRUE;
                        }
                    
                    oItem = GetNextItemInInventory(oPC);
                }
        }
    
    return FALSE;
}

That would let you specify the tag string fragment, the feat ID, the minimum tag length, and the tag fragment length all in the DLG. Like this:

TSL_DLG_Script_Params.png.1742131365e1dc414f0a94585eb921e2.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.