Jump to content

Magus

Members
  • Posts

    292
  • Joined

1 Follower

About Magus

Recent Profile Visitors

4,230 profile views

Magus's Achievements

  1. LAF is short for LAUNCH_ACTION_FUNCTION, which is an action, but you're using it in patch context.
  2. Run weidu from terminal manually, you'll at least see the error. I used to have a macbook... after some time I just installed Ubuntu on it.
  3. Oh, I see you're a man of culture as well.
  4. Switch from what, notepad++? Or do you write BAF in some IDE that has no support for it at all? Yes, MLS has some support for BAF. It's very basic, but better than nothing. If and when there's some consensus about templating for weidu (which preferably shouldn't be limited to BAF), then extending MLS for supporting it might be considered.
  5. Well, it's probably a no-brainer for a c++ programmer, but as for me, I don't find the syntax too intuitive. My jinja2 example above seems much clearer for casual reader. Also not sure if I like the logic-less approach, could be too limiting for this case. Of course, there's no reason why diffferent engines can't be used. Or even combined. But highlighting and intellisense become a bitch in that case. In any case, I wouldn't go for hardcoding snippets. Rather, I'd publish a library to let anyone who want to use it include it.
  6. Run weidu with --noautoupdate. Also can try decompressing biffs.
  7. I did, but with zero feedback I just went for the easiest and most straighfoward option. Like I said, though, it's tech preview and just a starting point.
  8. BGforge MLS is updated to version 1.16.0. What’s new: Rudimentary preprocessing support for WeiDU. Data updates from RPU, sfall, IElib, IESDP. Custom icon theme for WeiDU projects: Changelog, forum.
  9. 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.
  10. I seen that, but what I mean to say that the fight is likely not supposed to go like that.
  11. 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.
  12. 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.
  13. 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).
  14. 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?
×
×
  • Create New...