jaam Posted July 6, 2014 Posted July 6, 2014 At that time, when the ref is searched for the baseform it doesn't have one listed, so no script and no variable. How the ref can exist without a baseform is an "interesting" issue. Â
Guest tomm434 Posted July 6, 2014 Posted July 6, 2014 This is indeed Interesting but I though that GECK just didn't find a variable in the reference(due to incorrect search pattern or something)
ArgusSCCT Posted July 7, 2014 Posted July 7, 2014 I have a small question regarding AddToLeveledList, should it always be avoided at all costs? I know that if you use it to add something and then want to remove a mod it leaves those things in the save. However, it is a very useful function if you ask me, especially if one looks to avoid compatibility issues. There isn't an NVSE version of it or something similar that doesn't have that downside is there? I'm not really using it but I can see how it could come in handy.  To be honest I'm of the opinion that if the mod is heavily scripted, then no one should be removing it mid game. The reason I don't  use that function is because I don't want to screw myself when testing and not being able to remove something without having to restart a game in order to test things.Â
Halstrom Posted July 7, 2014 Author Posted July 7, 2014 Maybe someone else can confirm this but I think the description of GetRace is wrong in a few places  set rRace to GetRace rPartner compliles fine but causes CTD on excecution  set rRace to rPartner.GetRace  works fine
Halstrom Posted July 7, 2014 Author Posted July 7, 2014 I have a small question regarding AddToLeveledList, should it always be avoided at all costs? I know that if you use it to add something and then want to remove a mod it leaves those things in the save. However, it is a very useful function if you ask me, especially if one looks to avoid compatibility issues. There isn't an NVSE version of it or something similar that doesn't have that downside is there? I'm not really using it but I can see how it could come in handy.  To be honest I'm of the opinion that if the mod is heavily scripted, then no one should be removing it mid game. The reason I don't  use that function is because I don't want to screw myself when testing and not being able to remove something without having to restart a game in order to test things. Probably depends on what you are adding if they are vanilla assets they are there forever but if they are assets from a non-vanilla mod then a clean save should fix it.
Guest Posted July 7, 2014 Posted July 7, 2014  To be honest I'm of the opinion that if the mod is heavily scripted, then no one should be removing it mid game. The reason I don't  use that function is because I don't want to screw myself when testing and not being able to remove something without having to restart a game in order to test things.  Agree with you, but then when I was playing NV I was doing it all the times  What about a simple uninstall script that does the contrary, to run before uninstalling the mod? I think it would be a win win. I saw that in some Skyrim mods and I did it in NV few times. When the player is ready he starts a procedure that does the contrary of the init script, then he saves, quits and untick, with a clean save everything should be clean.
jaam Posted July 7, 2014 Posted July 7, 2014 Maybe someone else can confirm this but I think the description of GetRace is wrong in a few places  set rRace to GetRace rPartner compliles fine but causes CTD on excecution  set rRace to rPartner.GetRace  works fine  GetRace rPartner expect rPartner to be an NPC, not an actor (reference). rPartner.GetRace expects rPartner to be a reference.  It definitively could be written better.
Halstrom Posted July 7, 2014 Author Posted July 7, 2014  Maybe someone else can confirm this but I think the description of GetRace is wrong in a few places  set rRace to GetRace rPartner compliles fine but causes CTD on excecution  set rRace to rPartner.GetRace  works fine  GetRace rPartner expect rPartner to be an NPC, not an actor (reference). rPartner.GetRace expects rPartner to be a reference.  It definitively could be written better.  Ah, thanks for clearing that up
jaam Posted July 7, 2014 Posted July 7, 2014 The issue with Let in OnEnd scripts came from the fact that the definition of a reference did not account for the differences between the Editor and the Engine (one more field in the Editor). It should be corrected in the next version of NVSE. Â Anywhere else Let is acting very weird ?
nyaalich Posted July 7, 2014 Posted July 7, 2014 FWIW, it was the End Result for a Package. Can't speak to End Result on dialogue, and I don't know if there are other forms with script windows (as opposed to manual scripts, if that makes sense). I'm sure that I don't have to tell you, but there are the Begin/Start Result and the other one for Packages. Just a consideration if the issues might need to be corrected for the other types.  If you want me to test the update, I can if you send me/link me the beta.
jaam Posted July 7, 2014 Posted July 7, 2014 It's not built yet , and where the syntax is called should not matter for that issue. It's more about finding all the "loopholes" in the ParseArgs function.
nyaalich Posted July 7, 2014 Posted July 7, 2014 Cool. Didn't know how worked. Just wanted to prevent future fixes.
jaam Posted July 7, 2014 Posted July 7, 2014 Â Â It's even worse now. The current version requires a NPC but only accept a reference as a parameter so the only way to make it work is: let aNPC := Veronica let aRace := GetRace aNPC Â Next version should be friendlier. Â
Guest tomm434 Posted July 7, 2014 Posted July 7, 2014 Anywhere else Let is acting very weird ? Of course! I keeo reputation points for my companion in her object script and "Let" doesn't work inside dialogues script.
jaam Posted July 7, 2014 Posted July 7, 2014 Â Anywhere else Let is acting very weird ? Of course! I keeo reputation points for my companion in her object script and "Let" doesn't work inside dialogues script. Â Â Exact syntax please ? Also try with NVSE 4.5 Beta 5 now.
Guest tomm434 Posted July 7, 2014 Posted July 7, 2014 Exact syntax please ? Also try with NVSE 4.5 Beta 5 now. yes! with beta5 "let" works!
Guest tomm434 Posted July 7, 2014 Posted July 7, 2014 jaam, if I declare a variable inside dialogue script, will it be destroyed after script is finished?
jaam Posted July 7, 2014 Posted July 7, 2014 You should not declare variable inside dialog script. It does not have the means to allocate the variable or it doesn't do it properly. So you are going to overwrite the first variable in your quest. Â Instead declare the variable in the quest script. Â
Guest tomm434 Posted July 7, 2014 Posted July 7, 2014 You should not declare variable inside dialog script. It does not have the means to allocate the variable or it doesn't do it properly. So you are going to overwrite the first variable in your quest. Â Instead declare the variable in the quest script. Â Is that really neccesary? SOmetimes I need to do things with quest references so I type ref mutant set mutant to aamutant.mutantRef mutant.disable How can I do it another way?
DoctaSax Posted July 7, 2014 Posted July 7, 2014  You should not declare variable inside dialog script. It does not have the means to allocate the variable or it doesn't do it properly. So you are going to overwrite the first variable in your quest.  Instead declare the variable in the quest script.  Is that really neccesary? SOmetimes I need to do things with quest references so I type ref mutant set mutant to aamutant.mutantRef mutant.disable How can I do it another way?    scn MyDisableUDF  ref somerefvar  Begin Function {somerefvar}  somerefvar.disable  End    call MyDisableUDF aamutant.mutantRef
Halstrom Posted July 7, 2014 Author Posted July 7, 2014    It's even worse now. The current version requires a NPC but only accept a reference as a parameter so the only way to make it work is: let aNPC := Veronica let aRace := GetRace aNPC  Next version should be friendlier.  Hmm I'm using Set instead of Let: Set rPartnerRace to rPartner.GetRace if (NX_IsInList CausasianRace rPartnerRace) <Do Caucasian Stuff> endif  and it seems to work fine.
Guest luthienanarion Posted July 8, 2014 Posted July 8, 2014 Here's a good one for you coding gurus: Â I'm trying to output the list of hairs available to a race to the log in an NVSE plugin function. I've walked tLists plenty of times before, but not tLists of pointers. TESRace* race = NULL; ExtractArgsEx(EXTRACT_ARGS_EX, &race); if(race) Â Â Â for(tList<TESHair*>::Iterator iter = race->hairs.Begin(); !iter.End(); ++iter) Â Â Â { Â Â Â Â Â Â TESHair* hair = *iter.Get(); Â Â Â Â Â Â _MESSAGE("%04.0f :: [%08X]", hair->hairFlags, hair->refID); Â Â Â } } What I end up with is garbage values being output to the log, as my 'hair' pointer is obviously not pointing to the right data. The 'iter.Get()' call returns a TESHair**, and I'm definitely not handling it right. Oh, pointers...
ArgusSCCT Posted July 8, 2014 Posted July 8, 2014   To be honest I'm of the opinion that if the mod is heavily scripted, then no one should be removing it mid game. The reason I don't  use that function is because I don't want to screw myself when testing and not being able to remove something without having to restart a game in order to test things.  Agree with you, but then when I was playing NV I was doing it all the times  What about a simple uninstall script that does the contrary, to run before uninstalling the mod? I think it would be a win win. I saw that in some Skyrim mods and I did it in NV few times. When the player is ready he starts a procedure that does the contrary of the init script, then he saves, quits and untick, with a clean save everything should be clean.   I've heard of that. I might look it into it with future mods. I expected more people telling me to not use AddToLeveledList to be honest, I've heard a lot of people say its bad to use it.Â
Halstrom Posted July 8, 2014 Author Posted July 8, 2014 I've heard of that. I might look it into it with future mods. I expected more people telling me to not use AddToLeveledList to be honest, I've heard a lot of people say its bad to use it.I've used it a lot, in the end it's the only way to do things sometimes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now