Jump to content

Luke

Modders
  • Posts

    879
  • Joined

Everything posted by Luke

  1. In case someone is looking for a way to send "level" to ADD_MEMORIZED_SPELL as a variable (or "charges1/2/3" to ADD_CRE_ITEM and the like): This is in principle quite powerful if you edit ALTER_ITEM_HEADER and the like to allow for it: On the other hand, it's probably useful only in a 'functional programming' environment (yes, you're my master DavidW...)
  2. Once you learn SSL, you'll really like doing AI stuff! If you do not use SSL, it's very tedious (and somewhat annoying) to write combat scripts. On top of that, you can't (easily) take into account the various spell systems without SSL...
  3. @kjeron The same holds for "resist_dispel", right? That is: you should set "power" and "resist_dispel" of op146 to non-zero if "power" and "resist_dispel" of the effects of the referenced subspell are zero; otherwise, set "power" and "resist_dispel" of op146 to zero. In so doing, the various checks trigger only once.
  4. Well, in that case I guess you would use Primary Type and opcode #220 (in place of Secondary Type and opcode #221...) Well, it depends (the check on hit points triggers once per round). What if I need an aura that triggers once every two rounds? Or once per three seconds? If that's the case, then you're forced to use op#272 + op#146 in the EFF to cast the aura subspell...
  5. I started playing with SFO using the fragments of documentation in the mod folder itself. And what about creating resources (e.g. STO / CRE / SPL / ITM / PRO files) from scratch? IMHO, that's great too... I mean, the key point here is the functional way of doing things. As you said, that means shorter and more readable code; less buggy code; code that's much easier to adjust at a bulk level. I like it! Yes, maybe it's not very suited for doing simple editing of individual resources, but still worth it...? IMHO, yes. LAF edit_creature STR_VAR creature = "bandit" editstring = "xp=>1200" END // Versus COPY_EXISTING "bandit.cre" "override" WRITE_LONG 0x14 1200 // You can basically "forget" about 0x14 and related 'magic' numbers... BUT_ONLY
  6. The variable "loc" written here and here is defined and initialized as an INTEGER variable (so you might want to replace that "STR_VAR loc=xxx" with "INT_VAR loc=xxx"...). This occurs several times and it fake works because the string under consideration is indeed an integer. Anyway, you might want to check that out... The function CRE_delete_opcodes doesn't take any variable called file_ext (just "arguments"...) After this instruction (that should probably be "^.+\.cre$"...?), you might want to throw "PATCH_IF (SOURCE_SIZE > 0x2D3) BEGIN ... END", just in case... Actually, you might want to do it after every COPY_EXISTING_REGEXP so as to skip corrupted files... This READ_SHORT should be READ_LONG! Regarding this complain: I'm 100% sure you can solve it via the so-called PATCH_REINCLUDE trick... You often write (integer) in place of #integer when using WRITE_ASCII (example here). According to WeiDU's docs, #integer is the correct form.
  7. @Bubb Thanks for the extra details (it confirms I cannot achieve what I wanted to achieve...) Just to clarify: what about opcode #211 (Imprisonment) and #213 (Maze)? Do they count as "Target Gone" along with STATE_INVISIBLE, STATE_IMPROVEDINVISIBILITY, and Sanctuary?
  8. What a pity! It'd be really handy for the aforementioned situation – I mean, it's of limited use as of now (true when path is blocked by searchmap/doors)... the 2.6 update will hopefully take that into account and improve it... In the meantime, I'm wondering if 0x4063 InWeaponRange(O:Object*) can be of any help...
  9. Another tweak about healing spells: On IWD:EE, they are coded to be ineffective against unnatural creatures (i.e., undead, fiends, golems, elementals and the like): you might want to do the same for BG games (I mean, it does make sense...)
  10. Does someone know when this trigger is supposed to return true? I wanted to use it to make sure a certain creature doesn't attempt to move towards another creature if it's completely surrounded by other creatures, but it doesn't seem to work...
  11. In case you're interested, my version of "ENFORCE_HP" *should* correctly handle dual-class characters. Note that: I assume the CRE being patched is a playable CLASS my notation is a bit different from yours I'm not interested in "at_best", "at_worst" and the like: I simply want the maximum (possibly adjusted by the INI variable "hitpoint_percentage")
  12. Variable mismatch: macro_read_in_hit_point_levels vs. read_in_hit_point_levels.
  13. Probably the authors of the mod took inspiration from P&P... Again, the authors of the mod probably took inspiration from P&P, that's why it makes use of those spells...
  14. OK, I'll keep reporting issues/oddities then... Missing "warning =" here (after STR_VAR).
  15. OK, I simply find that issue similar to the missing "arguments" string in "enforce_hp"... Sure, maybe it's not critical, but still something that should be taken into account...? Anyway, I really like reading your code and the "functional programming" way of doing things, sorry if I ask you too many questions
  16. Another initialization issue: clone_template doesn't make use of the variable "tv". Is that intended? I'm asking because you set it when launching clone_store and clone_creature...
  17. Me too, otherwise the SSL compiler would complain... It's simply little weird notation to me... I'd write: scsroot=stratagems&tutu_var=%tutu_var%, but whatever...
  18. This seems to be another bad initialization... If you print it, you get (on an EE install): %scsroot%=stratagems&%tutu_var%=. You probably meant scsroot=stratagems&tutu_var= (there's a mismatch between "%" and the variable "percentage"...)
  19. Yes, I agree that Hit Points should be somewhat randomized (as per D&D rules). However, I think it's reasonable to expect the possibility to max them out...
  20. OK, so both "power" and parameter2 are located at 0x18...? That's clearly not possible...?
  21. That's why I said "for now". If someday you use it, then you'll fix it... Anyway, as I've realized afterwards, "enforce_hp" is working as intended. I apologize. It didn't behave as I expected because: the INI entry "hitpoint_percentage=100" is missing you don't launch it when launching "CRE_postbuild" unlike the other "CRE_enforce" functions, the string "arguments" is not initialized to "" (empty string). I'm glad I can use it in the end...
  22. Yeah, if I add something like "enforce_hp=>default" (or any other string but "at_worst", "at_best", "only_if_new"), then "make_creature" works as intended... "only_if_new" => SET new=current = 65535 ? possible : current. Since I didn't specify anything, current is not equal to 65536, thus HP are set to %current%, i.e.: 0.
  23. Another one: power is located at 0x10, not 0x18. You also need to fix the related functions "CRE_power", "CRE_powerGT", "CRE_powerLT", "CRE_read_power" located in "stratagems/sfo/SFO_autofunc.tpa"...
  24. OK, so you're ignoring it for now...? Guess that the HP issue can be "fixed" via using "clone_creature", but it's kinda ugly... Anyway, you might want to check points #3 and #4, since "enforce_hp=>at_worst" is used a lot...
  25. @DavidW I noted a some inconsistencies about something you're not using (as of now!), i.e.: "make_creature". There's no default value for "Maximum HP – offset 0x26" (CRE_build) Is there a particular reason why you don't launch "CRE_enforce_hp" when launching CREpostbuild? I mean, Hit Points depend on Class/Kit and Levels just like "Thac0" and "Saving Throws"... CRE_enforce_hp: Unlike the other "CRE_enforce" functions, the string "arguments" is not initialized to "" (empty string)... Your INI file (stratagems.ini) lacks the entry "hitpoint_percentage=100" (it's checked by "CRE_enforce_hp"). As a result, it gets set to 75% as per "CRE_enforce_hp". I think the most noticeable effect is that "enforce_hp=>at_worst" will return unexpected values... I'm not sure if "enforce_hp=>only_if_new" works as expected or not... I mean, if I write LAF "make_creature" STR_VAR "editstring" = "level=>5 animation=>FIGHTER_MALE_HUMAN class=>THIEF race=>HUMAN kit=>ASSASIN" "creature" = "GTTEST" END Thac0 and Saving Throws are correctly pulled from "THAC0.2DA" and "SAVEROG.2DA", but Hit Points remain at 0/0... I've already tried adding "CRE_enforce_hp" to "CRE_postbuild", still nothing... What's the issue here?
×
×
  • Create New...