EPDGaffney Posted June 20, 2018 Share Posted June 20, 2018 GetWeaponRefModFlags uses a common method of powers of 2, and it's actually really useful, cos you can look at a number and know exactly which flags are set. It's easier to see why they use the system when you look at something with a lot of flags that can be set as opposed to just three as we have here. I may try to LETify all scripts in this mod again. Hopefully this time I don't break any functionality.Go for it if you want, but I don't think it's a big problem to leave it as is for this script and just start using Let when you write new scripts. Declaring a variable at the start of the script just makes it more readable, so if you ask for help or even look at your own script weeks after writing it, it should be easier to read. At least, that's what I've always read and I agree with it. You can obviously declare it anywhere that works if you prefer not to declare it at the beginning. I just didn't know that you had a preference. Link to comment Share on other sites More sharing options...
JustChill Posted June 20, 2018 Author Share Posted June 20, 2018 Indeed, but you need to figure how it works, which numbers are given back.I couldn't read that anywhere, so I rather learned it by trial and "printc". ^^After I got the results it was easy to determine the queries. :D Ok. I've to get back to the massive amount of DLC and mod FormIDs anyways. XDThe older version by AltDunmer had some "Sorting Patches". I actually didn't even understood his instructions to get them working, but I am about to convert the FormIDs of any single item to decimal and building up a reference in a one-time script right on startup. :D I wish it would be a preference, but it's even worse. I simply don't care. XDThere are even other scripts with many local reference variables only used in their very own block.Actually, I was thinking to change that, but as of knowing that local variables do no harm as long as they are used correctly, I actually didn't bother. :) Link to comment Share on other sites More sharing options...
JustChill Posted June 25, 2018 Author Share Posted June 25, 2018 Ugh... This weekend was horrible.I've finished all startup Patch Scripts.First one has around 500 lines, second one around 800 (almost had max script size exceeded oO).I've also gone through any single entry by using 50 console prints (going through any of these entries one by one).I only had one <no name> (wrong reference built), which I corrected. All other records appear to build up the correct reference from DLCs and mods. Afterwards I enhanced the sorting scripts and changed the washmachine script once more.If you try to sort something, the sorter system automatically detects if you have sortable items equipped or added to a hotkey.These items get not sorted and the respective sorter will create a message regarding equipped or hotkey assigned items.All these stuff has to be done in the "OnActivate" block, so the actual sorting will be only performed if possible (no message box appears when there is no sorting possible). It was even worse with the washing machine.AltDunmer added the option to convert dirty pre war outfits into clean pre war outfits. So they are not repaired but simply replaced with their clean counterparts.Even though that's a nice feature, I wanted to give the player control over it.So there are now 2 message boxes.One for regular washing (if there are no transformable items in the players inventory) and one with 2 options.1.) Regular washing2.) Wash and cleanRegular washing simply repairs all respective items in the players inventory, while wash and clean transforms dirty pre war outfits to clean ones.In addition it also repairs cloths which are not added into the Replacement Array.So the script has now 4 array variables: vInventoryItems, vArrEntry, GSReplaceItems, GSWashableItemsWhen the second message box with both options appears and the player chooses regular wash, all items from "GSReplaceItems" are transfered into the "GSWashableItems" array and are simply repaired.Otherwise, if the second option is chosen, the items in GSReplaceItems are replaced by their clean counterparts, while the items in "GSWashableItems" are repaired.In addition to that, the washing machine now also checks if the player has a washable item equipped and / or assigned to a hotkey.In that case, the items aren't included into the washing process either. Works pretty well, even though the script looks horrible and chaotic now. XD Link to comment Share on other sites More sharing options...
EPDGaffney Posted June 27, 2018 Share Posted June 27, 2018 I can't help but think there must have been a more automated way to handle this, but I don't have a lot of time right now so I'm just going to say, if it works, it works, and I'm glad you got it done. Link to comment Share on other sites More sharing options...
JustChill Posted June 28, 2018 Author Share Posted June 28, 2018 If I really plan to also include Fallout 3 items for TTW, I'll definitely will use GetFormFromMod. ^^As there I just have to make sure the hex FormID is correct and it also makes it easier to verify which item I am pointing to. I once mixed up some numbers and had to convert the decimal values above the wrong number back to hex, to check which value the wrong decimal was for.Without the external lists I wrote I would have lost my mind with all those numbers and lines... I've posted the current patch scripts in a german Fallout forum, but I shouldn't speak big about as I am currently working only on the english version of the mod. ^^https://www.fallout-forum.com/index.php?thread/5927-fnv-was-besch%C3%A4ftigt-euch-gerade-beim-modding/&postID=108108#post108108 Link to comment Share on other sites More sharing options...
EPDGaffney Posted June 28, 2018 Share Posted June 28, 2018 Ooh, ich kann Deutsch, aber nicht lupenrein. Ich spreche etwas altmodisch und ungewollt gekünstelt, weil ich meistenteils von Müller und Goethe gelernt habe. Ich bin aus der Übung, so...wie finden Sie diesen Beitrag? Link to comment Share on other sites More sharing options...
JustChill Posted June 28, 2018 Author Share Posted June 28, 2018 Also nach etwas wie von Google Translate klingt es nicht.Liest sich eigentlich ganz passabel. :D Link to comment Share on other sites More sharing options...
EPDGaffney Posted June 28, 2018 Share Posted June 28, 2018 Ja, ich lese viel beßer, als ich spreche. Link to comment Share on other sites More sharing options...
JustChill Posted June 28, 2018 Author Share Posted June 28, 2018 Das kenn ich. ^^ Besser schreibt man inzwischen mit doppeltem S. Kann aber gut sein, dass man es früher mit "scharfem S" (ß) geschrieben hat. Link to comment Share on other sites More sharing options...
EPDGaffney Posted June 28, 2018 Share Posted June 28, 2018 Das kenn ich. ^^Meinen Sie „weiss(e)“ ? oder habe ich etwas übersehen? Ich weiß aus der S regeln, aber ich dachte, daß es vor der Reform von 1996 korrekt war. Nun denke ich, daß dies für „beßer“ ungültig ist. Ich meine, daß „daß“ korrekt ist (pre-1996), aber „beßer“ allemal selten war. Ups! Link to comment Share on other sites More sharing options...
Recommended Posts