Luke
Modders-
Posts
879 -
Joined
Content Type
Forums
Events
Downloads
Gallery
Mods
News
Store
Everything posted by Luke
-
How to check distance between two observed creatures by script?
Luke replied to argent77's topic in Modding Q&A
It does sound similar to the problem of avoiding friendly fire when casting a non party-friendly spell. For instance, for a Fireball-like spell (from "BDDEFAI.BCS"): !TriggerOverride(SecondNearest([EVILCUTOFF.0.TROLL]),Range(NearestEnemyOf(Myself),20)) -
"savingthrow = THIS | BIT11 | BIT25" (you can find more details in this post, towards the end...). However, you cannot use it with ALTER_SPELL_EFFECT and the like, so you might want to cycle through the current effect(s) with something like GET_OFFSET_ARRAY / GET_OFFSET_ARRAY2, i.e.:
-
I apologize for the mess, but I was actually right that day. "ActionCondition()" does not (always) work with "Combine()" (see here). That's because the wrong array is processed in get_combine_top(). In case you are interested in a fix, here it is: # ... @temp=split('\|',$forcombine); @temp=split(';',$temp[0]); # NEW: ActionCondition() check!!! @actionargs=split(',',$temp[0]); # ...
-
@Galactygon Thanks for sharing! OK, this is not strictly related to v2.6, but still somewhat obscure (at least for me). Could you please provide additional details about opcodes #245 (0xF5) Check For Berserk and #246 (0xF6) Spell Effect: Berserking ? What do they do exactly aside from setting STATs CHECKFORBERSERK and BERSERKSTAGE1?
-
weidu Is it possible to list all files in a folder as well as subfolders?
Luke replied to Luke's topic in Modding Q&A
Nice, it's better now, thanks a lot for your help! -
weidu Is it possible to list all files in a folder as well as subfolders?
Luke replied to Luke's topic in Modding Q&A
Yes and no... I mean, your code still fails if "test" and "blah" contain subfolders (no file will be returned...) So basically the "ChildDirRegEx" variable is somewhat useless...? That is, you cannot recursively search into specific subdirectories if these subdirectories contain other directories... On the other hand, if "ChildDirRegEx" is set to the empty string "", then everything will be returned... So to sum up, you're somewhat forced to do something like -
weidu Is it possible to list all files in a folder as well as subfolders?
Luke replied to Luke's topic in Modding Q&A
Unfortunately, nothing changes... -
weidu Is it possible to list all files in a folder as well as subfolders?
Luke replied to Luke's topic in Modding Q&A
@Sam. That's exactly what I tried (the only difference is that I used "," in place of "%WNL%" to separate the various file paths), thanks for confirming it. It didn't work for me because I launched the main function with ~ChildDirRegex = "^.+$"~ instead of using its default value (that is, the empty string ""). However, it seems I cannot target a specific subfolder (or more than one subfolder)...? I mean, if I write something like LAF ps_recursive_search STR_VAR ParentDir = EVAL ~%MOD_FOLDER%~ ChildDirRegex = ~^\(test\|blah\)$~ RET FileList Count END PRINT ~Count of files & folders found: %Count%~ PRINT ~%FileList%~ and both folders "%MOD_FOLDER%/test" and "%MOD_FOLDER%/blah" do exist, then only %MOD_FOLDER% is checked (the other two get ignored / skipped somehow...) -
For posterity, I was wrong somehow... "ActionCondition()" should work fine when used with "Combine()"... Just keep in mind that only the "LastSeenBy(Myself)" BCS block will contain the condition(s) specified by "ActionCondition()". For instance, the following SSL script compiles as
-
weidu Is it possible to list all files in a folder as well as subfolders?
Luke replied to Luke's topic in Modding Q&A
@argent77 Your code takes into account only one level of subdirectory (since GET_DIRECTORY_ARRAY is called only once), whereas @Sam.'s function should work regardless of that (due to recursion). However, I'm failing to edit it in order to collect file paths into a unique string / array, i.e.: -
weidu Is it possible to list all files in a folder as well as subfolders?
Luke replied to Luke's topic in Modding Q&A
I'm talking about WeiDU... There's the inline mode for that... -
What about ChangeStat()?
-
Yeah, better (right now SPWI100 is indeed not available, as if it were in the 51–99 range...) You're probably referring to SPELLS.2DA... But see? The file has been externalized, so I guess that having more than 50 spells per level is already partially soft coded...? As of now, if you write something greater than 50, nothing happens... Unless it's been externalized only to reduce the number below 50 (but that's pretty useless...) Yeah, the UI would need to be updated accordingly... Hopefully, not that hard with a cap of 100 per level...?
-
Unless applied via op177...? In any case, it would be rather odd to equip a weapon that boosts, say, off-hand (p3=2) instead of the hand it is equipped on (p3=0)...
-
They are meant to set "LastSeenBy(Myself)" to the desired object. See here for further details.
-
How to check what game the mod is being installed on?
Luke replied to gamemaster76's topic in Modding Q&A
Alternatively, look at AUTO_EVAL_STRINGS... -
I agree. There is hope this issue will be addressed in later patches... In the meantime, you can use EFF files + op206/318/324 (see here for further details...)
-
@DavidW Just a FYI: your tweak Antimagic attacks penetrate improved invisibility will be official behavior on EE games when the 2.6 patch drops...
-
Let us consider "SPPR712" (Resurrection) as an example: Yes, it does not affect the living (Extended Header Target is '3|Dead actor'). Moreover, the first effect is op324 (filter: GENERAL != DEAD). It applies a subspell ("SPPR712A") via op326 (filter: GENERAL = DEAD) "SPPR712A" applies another subspell ("#RDREMOV") via op326 (no filter: EA >= ANYONE) And finally, "#RDREMOV" strips Sequencers and Spell Triggers away via op172. Why the need of two consecutive subspells??? Also, since you suggested checking for STATE = STATE_DEAD, are you saying there's a difference between STATE = STATE_DEAD and GENERAL = DEAD?
-
A Basic Modder's Guide to Git and Github
Luke replied to CamDawg's topic in Modding How-Tos and Tutorials
After clicking on "Rebase and Merge", my fork is now 4 commits ahead, 5 commits behind the original project... Guess there is still something wrong, right? -
A Basic Modder's Guide to Git and Github
Luke replied to CamDawg's topic in Modding How-Tos and Tutorials
@AL|EN I see, will use "changelog.md" then... Separately, I'm having some troubles syncing forks. My fork is 5 commits behind (and 0 commits ahead of) the original project, but git fetch upstream does nothing... If I execute "git remote -v", it returns origin https://github.com/MY_USERNAME/MY_FORK.git (fetch) origin https://github.com/MY_USERNAME/MY_FORK.git (push) upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch) upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push) so I don't know what I'm missing...