Jump to content


  • Posts

  • Joined

1 Follower

About Magus

Recent Profile Visitors

4,163 profile views

Magus's Achievements

  1. I'm entertaining an idea to add some preprocessing and/or templating capabilities to MLS/IElib. Looking to gather some feedback before endeavouring. Gcc was my first thought, but it's not great with loops, so maybe jinja2 instead (or in addition). Some example snippets to get the ball rolling: baf IF See(NearestEnemyOf(Myself)) Global("abi_dalzim","LOCALS",0) LevelGT(LastSeenBy(Myself),15) // Level 16+ !GlobalTimerNotExpired("delay","LOCALS") THEN RESPONSE #100 SetGlobalTimer("delay","LOCALS",6) IncrementGlobal("doomed","LOCALS",1) IncrementGlobal("abi_dalzim","LOCALS",1) ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING) END IF See(NearestEnemyOf(Myself)) Global("efreeti","LOCALS",0) LevelGT(LastSeenBy(Myself),15) // Level 16+ !GlobalTimerNotExpired("delay","LOCALS") THEN RESPONSE #100 SetGlobalTimer("delay","LOCALS",6) IncrementGlobal("doomed","LOCALS",1) IncrementGlobal("efreeti","LOCALS",1) ReallyForceSpell(Myself,WIZARD_SUMMON_EFREET) END IF See(NearestEnemyOf(Myself) Global("sunfire","LOCALS",0) LevelGT(LastSeenBy(Myself),15) // Level 16+ !GlobalTimerNotExpired("delay","LOCALS") THEN RESPONSE #100 SetGlobalTimer("delay","LOCALS",6) IncrementGlobal("doomed","LOCALS",1) IncrementGlobal("sunfire","LOCALS",1) ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_SUN_FIRE) END gcc equivalent #define HASH1 # // special character shenanigans #define HASH2(x) x #define cast_spell_level(SYMBOL, TARGET, SPELL_VAR, MIN_LEVEL) \ IF \ See(NearestEnemyOf(Myself)) \ Global(#SPELL_VAR,"LOCALS",0) \ LevelGT(LastSeenBy(Myself),MIN_LEVEL) \ !GlobalTimerNotExpired("delay","LOCALS") \ THEN \ RESPONSE HASH2(HASH1)100 \ SetGlobalTimer("delay","LOCALS",6) \ IncrementGlobal("doomed","LOCALS",1) \ IncrementGlobal(#SPELL_VAR,"LOCALS",1) \ ReallyForceSpell(SYMBOL, TARGET) \ END cast_spell_level(WIZARD_ABI_DALZIMS_HORRID_WILTING, NearestEnemyOf(Myself), abi_dalzim, 15) cast_spell_level(WIZARD_SUMMON_EFREET, Myself, efreeti, 15) cast_spell_level(WIZARD_SUN_FIRE, Myself, sunfire, 15) jinja2 {% for item in data.battle_spells %} // list defined elsewhere IF See(NearestEnemyOf(Myself)) Global("{{ item.var }}","LOCALS",0) LevelGT(LastSeenBy(Myself),{{ item.min_level }}) !GlobalTimerNotExpired("delay","LOCALS") THEN RESPONSE #100 SetGlobalTimer("delay","LOCALS",6) IncrementGlobal("doomed","LOCALS",1) IncrementGlobal("{{ item.var }}","LOCALS",1) ReallyForceSpell(NearestEnemyOf(Myself), {{ item.symbol }}) END {% endfor %} Of course, complex baf is already dominated by SSL, so this is mostly useful in less complex scripts. But on the other hand, the applications are not limited to baf. // never again confuse "GLOBAL" and "LOCALS" types #define LocalGT(x,y) GlobalGT(x, "LOCALS", y) IF LocalGT("my_var", value) ... // just because I'm tired of typing COPY_EXISING_REGEXP all the time #define copy_er COPY_EXISING_REGEXP copy_er GLOB ~*.itm~ ~override~ // or take it further #include header.h // header.h: #define POUND1 $ // more shenanigans #define POUND2(x,y) x ## y #define POUND3(x,y) POUND2(x,y) #define POUND_APPEND(x) POUND3(x,POUND1) #define copy_erg(FILE_EXT) COPY_EXISTING_REGEXP GLOB ~^.+\.POUND_APPEND(FILE_EXT)~ ~override~ // actual code copy_erg(dlg) DECOMPILE_AND_PATCH BEGIN x = 0 END BUT_ONLY // this is too long... IF ~~ study1 SAY @14 IF ~OR(2) Global("wm_book_spell","LOCALS",0) Global("wm_book_spell","LOCALS",1)~ REPLY @20 GOTO 00 // -> +6 = 6/7 IF ~OR(2) Global("wm_book_spell","LOCALS",0) Global("wm_book_spell","LOCALS",6)~ REPLY @22 GOTO 02 // -> +1 = 1/7 IF ~OR(2) Global("wm_book_spell","LOCALS",7) Global("wm_book_spell","LOCALS",8)~ REPLY @23 GOTO 03 // -> +2 = 9/10 IF ~OR(2) Global("wm_book_spell","LOCALS",7) Global("wm_book_spell","LOCALS",9)~ REPLY @24 GOTO 04 // -> +1 = 8/10 // how about this #define if_node(value1, value2, tra, goto) \ IF ~OR(2) Global("wm_book_spell","LOCALS",value1) Global("wm_book_spell","LOCALS",value2)~ REPLY tra GOTO goto IF ~~ study1 SAY @14 if_node(0,1,@20,00) if_node(0,6,@22,02) if_node(7,8,@23,03) if_node(7,9,@20,04) Technically, all this already can be done manually. But with some glue code in various places it could be automated similarly to how SSL works. Edit: no one, really? OK, I guess I'll just do my own thing, as always.
  2. I seen that, but what I mean to say that the fight is likely not supposed to go like that.
  3. I don't know of cases where it actually breaks things (as in broken game), but it can result in dupe items, multiple armor sets, etc. You should be alright without uninstalling. Or, if it really bugs you, just make a full backup of game directory and try uninstalling, see how it goes.
  4. This is from v30, but I guess it's the same in the latest. So in confrontation with Kaishas I made a foolish choice to focus the adds first. Turned out, reinforcements arrived faster than I could kill them. By the time I realized I really needed to kill Kaishas first, I was already pretty depleted, and stood no chance. Since I played Ironman, I resorted to Invisibility+retreat to previous area. The area was already crowded to the point it was hard to even walk to the exit. All party members died (except Imoen... in a cheap attempt to save her, I dismissed her from the party), but I managed to salvage some useful equipment. At this point, I've pretty much given up on this run, but show has to go on, right? In the previous area, I rested, prepared every area damage spell, and every scrupulously saved fire potion, wand, etc. And pre-buffed to the max. I knew I had only one shot, because supplies were limited and there was no way to take them all down with just spells. Upon entering the area, it was entirely covered in werewolves, I couldn't walk a single step. New ones continued spawning but they couldn't move too, stuck in the initial spot. I made a screenshot, but can't find it now. It looked extremely overwhelming. And I unleashed hell on them (well, to the extent a lvl 10 mage can). After a series of heavy, but carefully placed bombardments (Imoen was still there, and if I attacked her, she'd turn on me, and I'd have no chance to get her back into party) I was able to get to Kaishas and bring her down, then finish off the remaining enemies, while even still packing some firepower. While this was definitely interesting, and one of the moments that you play Ironman for, I'm reasonably sure that's not exactly intended behaviour. Gathered the rest of the items, invited Imoen back, ressed the rest of the party on the mainland. In the end, I got 2 levels from this fight alone.
  5. The corresponding component (overhauler or unborker, don't remember) is really described misleadingly and shouldn't be used in common installations. I thought it might be less autosaves, but you don't have it installed... so my money is on SCS. (I remember once seeing messages from Lamalha assassin group in Durlag's Tower. And another time actually meeting them in Copper Coronet).
  6. Pretty sure it's lolfixer, it does a lot of stuff like that. I think you can decompress biffs to the same effect. What's your current weidu.log?
  7. I think installation/uninstallation are fine in weidu. There's really no much leeway in how to do it, given how IE works and the need to support a plethora of mods. Translation is ok too. One way or another, it's going to be a bunch of files with numbered strings. We already have an API to edit any files programmatically, it's iesh. The problem is making it compatilbe with weidu mods. (And pretty sure there's no need to worry about GUI at the start.)
  8. For each Python snippet I will match and raise you a Weidu one. COPY_EXISTING_REGEXP GLOB ~*.itm~ ~override~ LPF GET_ITEM_TYPE RET type PATCH_IF type == ITM_TYPE_LONGSWORD LPF ALTER_ITEM_REQS INT_VAR min_str=10 You have to write the underlying code in both cases. So this argument is null and void. The real advantage of a general purpose language is that it's... general purpose. It has much larger community, better docs, more features, isn't dependent on 1-2 mantainers. And, it's actually a useful skill to have. While weidu is hardly applicable anywhere else. Not really. A C++ lib would only be developed by a chosen few. Learning curve is far too steep. Python, on the other hand, is widely regarded as one of the best choices for beginners, and since most modders are, and will be on that level, this makes it a very good choice if you want the ecosystem to grow naturally (modders developing their own functions and modules as needed). Oh, that one you can easily enough work around with a preprocessor. I entertained some thoughts on that, but nothing concrete yet. A "soundset installer" is useless. The only thing that can have a future is a weidu installation/uninstallation/rollback compatible generic installer. If I had to guess, I'd say a week or two should be enough to put together a PoC (assuming that you start with iesh). So, ball's in your court. I'll be watching this with interest.
  9. As @subtledoctor said, you'd need to make the tool backwards compatible with WeiDU. (Not necessarily re-implementing TP2, but at least installation/uninstallation routines). We briefly discussed this with @AL|EN a year or two ago. In general, I would say it's possible. However, if your only goal is to package soundsets, it's 100% not worth it. Just bite the bullet and learn WeiDU (and just look for ready functions, most any idea has already been implemented in one form or another). But if you're really serious about development, and have time to spare, the place to start with is iesh.
  10. How do you summon the bats? Maybe make it non-stackable, give each bat its own special and filter effects based on that?
  11. They are triggered by the engine, I believe. Just like BG1-style interactions. You can press the hotkey to advance game time (don't remember which one it is) and see them happen. I'm not sure how the system chooses between what to trigger, banter vs interaction. Maybe interactions start flowing after all banters are exhausted between the interacting characters. Maybe it's random.
  12. Imoen was originally intended to die in Spellhold. Interact.2da is not for banters, it's for BG1-style in-game interactions. Take a look here. They work in original BG1 and BGT too. Some mods extend them, though.
  13. It is mine, and it works on Classic (in fact, I only use Classic for testing). I didn't do anything about Otiluke + Fireball, because I didn't think of it. Not sure if something can be done, and doesn't worry me much, too. Although, if a way is found, and it's not too convoluted - everything is possible. Github issues are open for suggestions.
  14. In general, this is certainly a good idea. (Although I personally haven't encountered any issue with this just yet.)
  15. No stealing is in RR and TnT. Mislead and PI are also tackled in TnT. (Although not 100% bulletproof and not heavily tested.) No recharging is easy to do. Might be coming in UA. As for Protection for Undead, a better option would be to make it PnP.
  • Create New...