Jump to content

Gwendolyne

Modders
  • Posts

    537
  • Joined

  • Last visited

Everything posted by Gwendolyne

  1. I can understand the first part of your message (REPLACE_TEXTUALLY), but you should learn foreign languages (French or German for example) to understand than translating a simple sentence from English may cause what we are talking about. "Don't blame me!" (15) --> "Ne me rends pas responsable !" (29) : double length for a simple string.
  2. Thanks for the spell description limit. That would be cool Argent77 released this kit length limit.
  3. BG2 for sure. It happened many times with mod translations into foreign languages (kits mods - the last one in date is Kit Revisions - and the BG2 Fixpack Find Familiar spell).
  4. Very often, too long strings used in kits or spells descriptions result in a CTD when creating a new character. Does anyone know which maximum length the Engine accepts? For kits, it seems to be around 4 000... thanks.
  5. In fact, there are a lot of "unknown values". I wrote a macro to read all of them, then fill the first empty slot when I need a new one. Here is the specific.ids file rewritten with all the values used by BG2:EE unmodded plus mine (starting from 19 BLACK_DRAGON). specific.txt
  6. It looks like 47-Pure Dark Red and 58-Dark Blue (and maybe 80-Saturated Bronze).
  7. I could swear I'v seen cases when it wouldn't evaluate properly without percentages, sometimes double percentages. +1 but I can't explain why and in which cases...
  8. #211 is "Spell Effect: Imprisonment". If you are modding EE games, you should use #321 (#206 equivalent) to avoid spells/items stacking: #221 is mostly used to allow cure spells or potion to erase specific effects or magic attack spells to remove specific protection effects.
  9. I don't know how to call ADD_SECTYPE again. So I use my function. I guess you are speaking of Removal: Remove Secondary Type [221]. If yes, I use the same function: COPY ~%MOD_FOLDER%/Kits/Chevalier/GWCD222.spl~ ~override/GWCD222.spl~ // Atweaks stuff INNER_ACTION BEGIN LAF ~GW_FIND_SECONDARY_TYPE~ STR_VAR GW_sectype_to_find = "fl#Fear" RET GW_sectype_found GW_sectype_value END END PATCH_IF "%GW_sectype_found%" STR_CMP "no" BEGIN // Removal: Remove Secondary Type [221] LPF CLONE_EFFECT INT_VAR check_globals = 0 multi_match = 1 match_opcode = 161 opcode = 221 parameter1 = 9 parameter2 = EVAL "%GW_sectype_value%" resist_dispel = 0 END END // of Atweaks stuff Or LPF ADD_SPELL_EFFECT INT_VAR opcode = 221 target = 2 timing = 1 parameter1 = 9 parameter2 = EVAL "%GW_sectype_value%" END // Removal: Remove Secondary Type [221] or COPY ~%MOD_FOLDER%/Kits/Chevaucheuse/GWLi607.spl~ ~override/GWLi607.spl~ INNER_ACTION BEGIN LAF ~GW_FIND_SECONDARY_TYPE~ STR_VAR GW_sectype_to_find = "fl#Disease" RET GW_sectype_found GW_sectype_value END END PATCH_IF "%GW_sectype_found%" STR_CMP "no" BEGIN LPF ALTER_SPELL_EFFECT INT_VAR match_opcode = 221 parameter2 = EVAL "%GW_sectype_value%" END // Removal: Remove Secondary Type [221] END
  10. That's the way I handle the food poisoning in my food component: ADD_SECTYPE GW_Intox @7100951 // ~Intoxication alimentaire soignée.~ (Food poisoning cured) Then, for each spell using it: COPY mymod/spells/myspell.spl override WRITE_BYTE 0x27 GW_Intox // Secondary Type If you want to use it in a #205 effect (Spell: Protection from Spell (Secondary Type) [205]): COPY ~%MOD_FOLDER%/Kits/Chevalier/GWDgRo30.spl~ ~override/GWDgRo30.spl~ // Rust Immunity LPF ALTER_EFFECT INT_VAR match_opcode = 139 parameter1 = RESOLVE_STR_REF (@7140131) END // ~Protégé contre les effets de la rouille.~ = Protected against Rust effects INNER_ACTION BEGIN LAF ~GW_FIND_SECONDARY_TYPE~ STR_VAR GW_sectype_to_find = "GW_Rust" RET GW_sectype_found GW_sectype_value END END PATCH_IF "%GW_sectype_found%" STR_CMP "no" BEGIN LPF ALTER_EFFECT INT_VAR match_opcode = 205 parameter2 = EVAL "%GW_sectype_value%" END // Spell: Protection from Spell (Secondary Type) [205] END BUT_ONLY Using this homemade function: DEFINE_ACTION_FUNCTION ~GW_FIND_SECONDARY_TYPE~ STR_VAR GW_sectype_to_find = "" // École secondaire à trouver dans le fichier msectype.2da = secondary school to find // Secondary school to find in msectype.2da RET GW_sectype_found // Y = École secondaire trouvée - no = École secondaire absente // Y = Secondary school found - no = Secondary school not found GW_sectype_value // Valeur de l'École secondaire trouvée dans le fichier msectype.2da // Secondary school value found in msectype.2da BEGIN OUTER_SPRINT GW_sectype_found "no" OUTER_SET GW_sectype_value = "-99" ACTION_IF "%GW_sectype_to_find%" STR_CMP "" BEGIN ACTION_IF (FILE_CONTAINS_EVALUATED (msectype.2da "%GW_sectype_to_find%")) BEGIN ACTION_IF NOT VARIABLE_IS_SET $GW_sectype(~msectype~ ~%GW_sectype_to_find%~) BEGIN COPY_EXISTING - ~msectype.2da~ ~override~ READ_2DA_ENTRIES_NOW r2da_msectype 2 FOR (i = 1 ; i < r2da_msectype ; ++i) BEGIN READ_2DA_ENTRY_FORMER r2da_msectype i 0 sectype PATCH_IF ("%sectype%" STRING_EQUAL_CASE "%GW_sectype_to_find%") BEGIN SET $GW_sectype(~msectype~ ~%GW_sectype_to_find%~) = i - 1 SET GW_sectype_value = $GW_sectype(~msectype~ ~%GW_sectype_to_find%~) SPRINT GW_sectype_found "Y" END END BUT_ONLY END ELSE BEGIN OUTER_SPRINT GW_sectype_found "Y" OUTER_SET GW_sectype_value = $GW_sectype(~msectype~ ~%GW_sectype_to_find%~) END END END END // of DEFINE_ACTION_FUNCTION Hoping it might help you.
  11. Or you can use Sam's tool BAM Resizer.
  12. As far as I can remember, STATE_REALLY_DEAD is not a vanilla state; but many mods add it. The way Roxanne wrote it.
  13. In WeiDU it seems: none! But as I am far away from being a programmer, I learned the IF THEN condition way of codding at my beginnings, a long time ago. After many years of modding, I know that THEN is not mandatory in WeiDU code but... the force of habit: sometimes I write it, sometimes not...
  14. You can loop through states and transitions. Here is a homemade function used to extend existing dlg: Then: COPY_EXISTING - ~UHOGRE01.dlg~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2f) THEN BEGIN // protects against invalid files // #33324 ~J'ai surtout décidé de mettre un terme à ton ignoble existence, sale monstre !~ // EN = ~I've actually decided to end your monstrous existence, creature!~ LPF ~GW_FIND_DLG_RESPONSE_STRING~ INT_VAR GW_string_dlg = 33324 RET GW_transition_found GW_state_number GW_transition_number END PATCH_IF ("%GW_transition_found%" STRING_EQUAL "Y") AND (GW_transition_number != "-99") BEGIN SET UHOGRE01_Transition16 = GW_transition_number SET UHOGRE01_State16 = GW_state_number END END // of PATCH_IF (SOURCE_SIZE > 0x2f) BUT_ONLY And actually in the d file: EXTEND_TOP UHOGRE01 %UHOGRE01_State16% #%UHOGRE01_Transition16% + ~Global("GWChevaucheuseKit","GLOBAL",2) Global("GWLyrielUmar","LOCALS",0)~ + @11100501 GOTO UhOgre01_Question // ~D'abord, j'aimerais que tu répondes à une question, Madulf.~ END
  15. End of the off-topic : my mod is written for BG2 and BGT and will be EE compatible. The ironic point is that I can use huge tarasque animations (640x640 px) with IA but not in BG2:EE because the enhanced dragon animation format seems to be buggy and does not allow to add new effective slots to ANIMATE.IDS.
  16. Ah, if only I knew how to create new animations and add them to the game. It's been a long-time wish of mine to add griffins, (black) unicorns and nightmares, to name but a few. :-) Sorry for the off-topic, but you won't have to wait too long, at least for unicorns (regular and black ones) and nightmares.
  17. It would be of great use in case of adding new doors to an existing map: for example, modifying the two existing tiles and adding two alternate tiles at the end of the tis file.
  18. It is not that easy because you must modify both the tis and the wed files.
  19. In vanilla games, it is 256 x256, but you can use split bams. I display a 540 x 320 animation bam split into 6 cycles checking the "Draw all cycles" box in the Animations tab.
  20. Good job! I wrote this code to fit my needs (I always use the same template to create my inventory bams : large frame in frame 0 and small one in frame 1). That's the reason why I did not bother to check every case (even if I you noticed I began write the READ_LONG 0x14 lu line, but did not go further). Sorry for the compression process, but it is far out of my skills. I just used a copy paste from Bam Batcher code.
  21. If I didn't want to share it, I would not have posted it. Of course, you can use it and even modify it. You have most probably recognized blocks of code borrowed from Bam Batcher.
  22. If I can help, I was so upset to create hundreds of specific bams for BG2:EE that I wrote the following small workaround to avoid my inventory bams which display different frame 0 and frame 1 (I mean different images, not 32x32 and 64x64 versions of the same picture) not to work in BG:EE inventory screens. I know this coding is not perfect and might be improved but it works. DEFINE_PATCH_FUNCTION ~GW_CONVERT_INVENTORY_BAM_TO_EE~ BEGIN // Read bam. // --------- READ_ASCII 0x0 sg (4) // Signature READ_ASCII 0x0 sn (3) // Short signature // Decompressed if needed. // ----------------------- PATCH_IF (~%sg%~ STRING_EQUAL_CASE ~BAMC~ = 1) BEGIN READ_LONG 0x8 dl // Uncompressed data length DECOMPRESS_REPLACE_FILE 0xc (SOURCE_SIZE - 0xc) dl END ELSE BEGIN dl = SOURCE_SIZE // Uncompressed data length END // Add frame 0 as second frame in the first sequence. // -------------------------------------------------- PATCH_IF (~%sn%~ STRING_EQUAL_CASE ~BAM~ = 1) BEGIN READ_SBYTE 0x0a cc // Count of cycles PATCH_IF (cc = 2) BEGIN // only 2 cycles = inventory bam (ground and description have 1 or 4 frames). READ_SHORT 0x08 fc // Frame count READ_LONG 0x0c fn // Frame entry offset READ_LONG 0x14 lu // Offset (from start of file) to frame lookup table READ_SHORT (fn + (fc * 0xc)) c_fnb0 // Count of frame indices in 1st cycle WRITE_SHORT (fn + (fc * 0xc)) (c_fnb0 + 1) // Adds one frame in 1st cycle END END // Recompressed if needed. // ----------------------- PATCH_IF (~%sg%~ STRING_EQUAL_CASE ~BAMC~ = 1) BEGIN COMPRESS_REPLACE_FILE 0 dl 9 INSERT_BYTES 0x0 0xc WRITE_ASCII 0x0 ~BAMCV1 ~ WRITE_LONG 0x8 dl END END // of DEFINE_PATCH_FUNCTION Then in the tp2 : ACTION_IF (GW_EE) BEGIN ACTION_BASH_FOR ~%MOD_FOLDER%/Bam/~ ~^.+\.bam$~ BEGIN COPY ~%BASH_FOR_FILESPEC%~ ~override~ LPF ~GW_CONVERT_INVENTORY_BAM_TO_EE~ END BUT_ONLY END END
  23. No pb. I will download your files and check if I can use them - as a whole or only a few parts. Thanks again...
×
×
  • Create New...