Jump to content

Ardanis

Modders
  • Posts

    2,793
  • Joined

  • Last visited

Everything posted by Ardanis

  1. Tinkering with resistance values can only affect what comes after said tinkering. Header's damage is applied before any of the additional effects, so you can't modify it with the latter. You can move damage from header into EFF, but then you'll lose any STR/prof/etc. bonuses.
  2. Stats can be targeted with 326 https://gibberlings3.github.io/iesdp/opcodes/bgee.htm#op326 You need to add new entry to SPLPROT.2DA with required formula, and refer to its row number via 326's param. There're already some <=100% resistance checks in there, to use as reference.
  3. As long as damage is applied via effect and not header, what Graion said will work. Set resistance to 0 for duration 0.
  4. Yes, but not deep enough. It does. You can set a variable to nested value this way, but I can't say for sure if it also works when specifying which variable to set. Probably not an issue with REPLACE_TEXTUALLY, though. Also this is missing a %: ~%class%_sp_min_level%~
  5. I didn't notice at first, but is this an area script - KKNar1700.baf? If it is, using LOCALS to trigger dialog will fail, because they're only used by actors. IF CombatCounter(0) NumDead("KKBarbs",5) // this should be whatever you set in their WRITE_ASCII 0x280, can be ~NumDead("KKBarbs",4) Dead("KKAmana")~ too, if you want them to have different DVs Global("KKMissingWarriors","GLOBAL",7) Global("KKDeadWarriors","AR1700",0)THEN RESPONSE #100 SetGlobal("KKMissingWarriors","GLOBAL",8) // all enemies are dead SetGlobal("KKDeadWarriors","AR1700",1) // proceed to initiating dialogEND IF Global("KKMissingWarriors","GLOBAL",8) Global("KKDeadWarriors","AR1700",1)THEN RESPONSE #100 ActionOverride("KKNavar",StartDialogueNoSet(Player1)) // make sure dialog has state trigger ~Global("KKMissingWarriors","GLOBAL",8)~, and that it's updated to 9 or whatever immediately in the first set of transitionsEND
  6. Contrary to what Jarno implies, StartDialog() is what should be avoided like plague unless you know exactly what you're doing and why. In fact, it's the worst dialog action out of all to use, because it overwrites the dlg file of the actor. Either use Dialog() if you want the subject to walk up to the target, or StartDialogOverride() which starts specified dlg without permanently setting it, or StartDialogNoSet() which is the standard practice. As for why it doesn't work, make sure you dialog's triggers are matching the script's values. Also if you set KKMissingWarriors/KKDeadWarriors variable in the same block as the dialog action, you'll only get a single attempt at initiating it, which might fail due to various circumstances. Consider updating those vars in dialog itself, rather than in initiating script block.
  7. In that case, the next best bet is to try including separator string into expression outside of the match variable: SPRINT quote ~\("[^"]+"\)~ // anything encased within ""s that isn't a " itselfSPRINT tilda "\(~[^~]+~\)" // anything encased within ~~s that isn't a ~ itself SPRINT separator ~ , off , , hgj. ~ // without initial comma ~[%separator%]?[ ]*\(\(%quote%\|%tilda%\|[^,]\)+\)~
  8. My bad... In that case, this will probably return MATCH1 without initial spaces: ~[ ]*\(\(%quote%\|%tilda%\|[^,]\)+\)~ Same thing in slightly more human-readable form: SPRINT quote ~\("[^"]+"\)~ // anything encased within ""s that isn't a " itselfSPRINT tilda "\(~[^~]+~\)" // anything encased within ~~s that isn't a ~ itself SPRINT nonseparator ~[^,]~ And this for matching expression: ~[ ]*\([%quote%%tilda%%nonseparator%]+\)~ // MATCH1 is set to what's inside \(\), so the first space(s) will be omitted *Scratches head* Not sure if I understand correctly... Is it found somewhere between quote/tilda characters, i.e. after you've already run the initial match you now need to further process its results? Or is it what you actually use instead of comma separator in the above example? If the former, you can nest multiple REPLACE_EVALUATE and use outer's %MATCH1% as input string for the inner. If the latter... I believe WeiDU doesn't actually support negating a specific sequence of symbols You might try this SPRINT separator ~, , off , , hgj. ~ SPRINT nonseparator ~[^%separator%]~ But I'm not certain it's going to fool WeiDU. If it doesn't, then can you simply reduce it to a single comma and then proceed as before? REPLACE_TEXTUALLY ~, , off , , hgj. ~ ~,~
  9. SPRINT quote ~\("[^"]+"\)~ // anything encased within ""s that isn't a " itself SPRINT tilda "\(~[^~]+~\)" // anything encased within ~~s that isn't a ~ itself It's been years since I touched WeiDU, but theoretically this should match anything that is either quoted, tilda'ed or anything non-comma: \(%quote%\|%tilda%\|[^,]\)+
  10. You can TriggerOverride(Player2,Global("local_var","locals",1)) to check personal values from external point of view.
  11. Probably second... but unless you're going to have literally hundreds of thousands of those, I really wouldn't care about infinitesimal 0,0001% or something performance increase.
  12. Or just add SetPrivateProfileString('Script','QAMODE','1') line to baldur.lua, then select Player1, press B key and jump chapters as you wish You can also toggle the debug menu on by setting global via console, but I forgot its name.
  13. There is also something funky with trying to use read value when some keys were missing, as WeiDU would return arrayname_key0_key1_key3_etc gibberish instead. Or something like that I ended up just ignoring values altogether and instead putting all data into keys for SoD AI, like a table that it actually was in my case. CLEAR_ARRAY ability_list DEFINE_ASSOCIATIVE_ARRAY ability_list BEGIN // ability , type , local_trigger , probability_weight_to_skip , condition , local_action , ability_timer => 0 ~WIZARD_HORROR~ , spell , ~~ , 25 , arcane , ~~ , ~~ => 0 // use Horror spell with probability = 100 / (100 + 25) ~wand02~ , item , ~~ , 50 , arcane , ~~ , ~~ => 0 // use Wand of Fear item with probability = 100 / (100 + 50) ~WIZARD_HOLD_PERSON~ , spell , ~General(%target%,HUMANOID)~ , 75 , arcane , ~~ , ~~ => 0 // extra check for humanoids, but only when actually casting it END
  14. Not sure if I'll need it, but looks interesting. Wishlisted. The only really time consuming part is walling a lot of tiny objects - fences, leaves, etc. Then adding door graphics tiles. The rest is more doable.
  15. The action is probably not in INSTANT.IDS, hence why it gets queued until after dialog mode ends. BTW it might be possible to just use SoD's QA dialog menu (bddebug.dlg?) to change the stats... It's only triggered from PC's script, but you could have the summon AO() anyone else to start it for themselves.
  16. You can use ChangeStat() instead, btw. If it's technical feature, rather than a proper mod, then just run a cutscene script to read all the values and set tokens, yes.
  17. I very vaguely recall that you need RANDOM_SEED (?) put in somewhere to get RANDOM to be actually random.
  18. Bg2Fixpack has/had a lot of dialog fixes somewhat like that for vanilla BG2, but I don't quite remember the exact syntax.
  19. Walking has nothing to do with vision, it only cares about searchmap colors and doors' blocking regions. The problem with walls is that they attempt to emulate 3D environment, even though the game engine is one hundred percent 2D. I had a fair share of grievance with walls overlapping on otherwise passable terrain, so the only thing I can say for certain is that it's a cancer. Not impossible to work with, but something that must not be a thing.
  20. Before EE it would fail if the talker couldn't see the object. It would even fail if the talker was the object itself. Since EE it returns true if the object is in party and not dead, even if it is across the whole map and likely if stunned/silenced/etc.
  21. Not sure about InMyArea(), but it certainly doesn't care for range/see anymore.
  22. Haven't got a clue... but NoInterrupt usually stands for ignoring being talked to or AO'ed. Whereas NoLeaveArea switches off looking for exit.
  23. There used to be a lot of cases when actors were told to RunAwayFrom() and they'd pick an exit and disappear for good, instead of just milling around in the area.
  24. Btw "modding" in that picture can be safely replaced with "making"
×
×
  • Create New...