Jump to content

pete_smith1229

Members
  • Posts

    135
  • Joined

  • Last visited

Everything posted by pete_smith1229

  1. Thank you both @ABlake@subtledoctor , I'm attempting on using the WEIDU code with the TRA2STR and ADD_ITEM_TOOLIPS functions but for some reason, the latter function isn't being recognised. I basically copied/pasted the code into the .tp2 file: DEFINE_PATCH_FUNCTION ~TRA2STR~ // given tra reference, returns string STR_VAR tra = ~~ // e.g. ~@123~ RET str BEGIN PATCH_IF ((~%tra%~ STRING_MATCHES_REGEXP ~@-?[0-9]+~) == 0) BEGIN INNER_ACTION BEGIN <<<<<<<< .../inlined/mi_tra2str.tph OUTER_SPRINT str %tra% >>>>>>>> COPY - ~.../inlined/mi_tra2str.tph~ ~.../inlined/mi_tra2str.tph~ EVALUATE_BUFFER REINCLUDE ~.../inlined/mi_tra2str.tph~ END END ELSE BEGIN TEXT_SPRINT str ~%tra%~ END END DEFINE_ACTION_FUNCTION ~ADD_ITEM_TOOLTIPS~ STR_VAR item = ~~ // e.g. ~sw1h01~ tooltips = ~~ // e.g. ~@123 @124 6620~, takes combination of tra refs and strrefs for as many abilities as you need to specify BEGIN ACTION_IF (STRING_LENGTH ~%item%~ > 0) BEGIN // generate our row to add to tooltip.2da OUTER_TEXT_SPRINT row ~%item%~ OUTER_PATCH ~ %tooltips%~ BEGIN // extract our tooltips from the tooltips string REPLACE_EVALUATE ~[ %tab%]+\(@?-?[0-9]+\)~ BEGIN PATCH_IF ((~%MATCH1%~ STRING_MATCHES_REGEXP ~@-?[0-9]+~) == 0) BEGIN // tra ref // look up string for given tra reference LAUNCH_PATCH_FUNCTION ~TRA2STR~ STR_VAR tra = EVALUATE_BUFFER ~%MATCH1%~ RET str = str END // use REPLACE to get a strref for our new string INNER_PATCH ~0~ BEGIN REPLACE ~0~ ~%str%~ READ_2DA_ENTRY 0 0 1 strref END TEXT_SPRINT row ~%row% %strref%~ // add to our row END ELSE BEGIN // strref TEXT_SPRINT row ~%row% %MATCH1%~ // add to our row END END ~~ END COPY_EXISTING ~tooltip.2da~ ~override~ REPLACE_TEXTUALLY ~^[ %tab%]*%item%[ %tab%].*~ ~~ // remove previous row for this item if it exists COUNT_2DA_ROWS 1 num_rows INSERT_2DA_ROW num_rows 1 ~%row%~ // insert our row at the end // ensure all rows have -1 entries in unused columns REPLACE_TEXTUALLY ~^[ %tab%]*0?[ %tab%]*1[ %tab%]+2[ %tab%]+3.*~ ~~ // remove column labels for now COUNT_2DA_COLS num_cols TEXT_SPRINT entries ~~ TEXT_SPRINT col_labels ~~ FOR (i = 1; i < (num_cols - 1); i += 1) BEGIN // for each number of columns less than there should be TEXT_SPRINT entries ~%entries%[ %tab%]+[0-9-]+~ // generate regexp to detect this many columns TEXT_SPRINT empties ~~ FOR (j = (num_cols - 1); j > i; j -= 1) BEGIN // generate -1 entries for the number of missing columns TEXT_SPRINT empties ~%empties% -1~ END REPLACE_TEXTUALLY ~^\([ %tab%]*[^ %tab%]+%entries%\)[ %tab%]*[%mnl%]?$~ ~\1%empties%~ // add -1 entries to all rows with this many missing columns TEXT_SPRINT col_labels ~%col_labels% %i%~ // generate fresh column labels END INSERT_2DA_ROW 2 1 ~%col_labels% %i%~ // re-add column labels, with last entry where i == (num_cols - 1) PRETTY_PRINT_2DA REPLACE_TEXTUALLY ~2DA +~ ~2DA ~ END END BEGIN ~Add ABILITY tooltips~ LAF ~ADD_ITEM_TOOLTIPS~ STR_VAR item = EVAL ~%RB_STF02%~ tooltips = ~41300~ END This is the error: Installing [Add ABILITY tooltips] [1] Stopping installation because of error. ERROR Installing [Add ABILITY tooltips], rolling back to previous state Will uninstall 0 files for [MOONBOY_MOD/MOONBOY_MOD.TP2] component 2. Uninstalled 0 files for [MOONBOY_MOD/MOONBOY_MOD.TP2] component 2. ERROR: Failure("Unknown function: ADD_ITEM_TOOLTIPS") Please make a backup of the file: SETUP-MOONBOY_MOD.DEBUG and look for support at: SubtleD
  2. Making some new weapons in IW:EE, some having their own abilities which can be accessed from the "Use Item" menu. The abilities are designed as spells using NearInfinity but in-game, the name of the ability is the same as the name of the weapon. And right-clicking on the ability just gives the description of the weapon and not of the spell (IIRC this was also the case in BG:EE). Is there a way to change this?
  3. Ahhh think I got it. I used VLC to convert first to OGG format, then converted the OGG to WAV. I then inserted the WAV file to the override folder, used NI to edit the "/data/SNDFX.bif" file, added the WAV file and now I can use it in-game! Thank you for your help @Graion Dilach
  4. Apologies, I should have been more specific. I am wanting to add new sound effects. I just realised the "/sounds/" directory only contains voice sets and the "/data/SNDFX.bif" contains the sound effects files. I'll use your advice in using OGG Vorbis audio. Is there a recommended method in inserting new sounds effects?
  5. I've made some custom sound files (.wav) using VLC and inserted these into the "/Icewind Dale Enhanced Edition/lang/en_US/sounds/" directory. The NearInfinity tool can read these but it doesn't play the audio, not in the tool or the game. Do these files need to be converted and/or added using Weidu?
  6. That makes sense, thanks. Yes, "Hello world" does work. I think you nailed it, I removed everything after ADD_PROJECTILE and now the .PRO file has been added correctly and I can reference it in the NI tool. I tested the new projectile and it works perfectly! Thank you both @subtledoctor@CamDawg
  7. Thanks but I still get the same error, even if I completely remove everything after the line "VERSION" in the .tp2 file, it still complains of a parsing error at Line 11 (when there is nothing at Line 11). This is what is in the .debug file: WeiDU v 24900 Log C:\Program Files (x86)\Steam\steamapps\common\Icewind Dale Enhanced Edition\setup-moonboy_mod.exe [.\chitin.key] loaded, 532278 bytes [.\chitin.key] 167 BIFFs, 37681 resources [.\engine.lua] loaded, 160 bytes [.\weidu.conf] loaded, 17 bytes [.\lang\en_us\dialog.tlk] loaded, 4470491 bytes [.\lang\en_us\dialog.tlk] 41352 string entries WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory") [MOONBOY_MOD/MOONBOY_MOD.TP2] PARSE ERROR at line 11 column 1-5 Near Text: LPF GLR parse error [MOONBOY_MOD/MOONBOY_MOD.TP2] ERROR at line 11 column 1-5 Near Text: LPF Parsing.Parse_error ERROR: parsing [MOONBOY_MOD/MOONBOY_MOD.TP2]: Parsing.Parse_error ERROR: problem parsing TP file [MOONBOY_MOD/MOONBOY_MOD.TP2]: Parsing.Parse_error FATAL ERROR: Parsing.Parse_error WeiDU Timings load TLK 0.000 Parsing TP2 files 0.016 loading files 0.016 stuff not covered elsewhere 0.016 unmarshal TLK 0.016 unmarshal KEY 0.031 TOTAL 0.094 Perhaps this is not compatible with IW:EE?
  8. Hi @subtledoctor, I followed your example and attempting to apply it to IW:EE but facing issues. I used a similar naming convention and inserted the main folder "moonboy_mod" with a subfolder "data" into my IW:EE directory. I placed my .PRO file into the "data" folder, edited the .tp file and ran the .exe file but received the following error: [C:\Program Files (x86)\Steam\steamapps\common\Icewind Dale Enhanced Edition\setup-moonboy_mod.exe] WeiDU version 24900 In state 32, I expected one of these tokens: [2] ~~ Parse error (state 32) at LAUNCH_PATCH_FUNCTION [MOONBOY_MOD/MOONBOY_MOD.TP2] PARSE ERROR at line 11 column 1-5 Near Text: LPF GLR parse error [MOONBOY_MOD/MOONBOY_MOD.TP2] ERROR at line 11 column 1-5 Near Text: LPF Parsing.Parse_error ERROR: parsing [MOONBOY_MOD/MOONBOY_MOD.TP2]: Parsing.Parse_error ERROR: problem parsing TP file [MOONBOY_MOD/MOONBOY_MOD.TP2]: Parsing.Parse_error FATAL ERROR: Parsing.Parse_error Press ENTER to exit. This is the contents of my .tp file: BACKUP ~moonboy_mod/backup~ AUTHOR ~SubtleD~ VERSION ~1~ BEGIN ~make some changes~ ADD_PROJECTILE ~moonboy_mod/data/RB_BLT01.PRO~ // (Weidu stores the new projectile index in a variable with this name) COPY_EXISTING ~spwi925.spl~ // Comet LPF ALTER_SPELL_HEADER INT_VAR projectile = %RB_BLT01% END // there's that variable IF_EXISTS BUT_ONLY Any ideas what the error is or advice please?
  9. Thanks all for replying, I'll install BG:EE with the SCS mod and see how I go. If I make any progress, I'll report back. Might be a while since I've only just started modding
  10. I would assume since IWD:EE uses the same updated engine as BG:EE and a lot of assets has been transferred from IWD:EE to BE:EE, the reverse should be possible. I'm using the NearInfinity tool to mod Icewind and can see a lot of data from BG. I am hoping that certain assets like AI enemy scripts from the SCS mod can be used in Icewind. Does anyone have any experience or knowledge about this? Apologies for tagging you @DavidW into this but thought it would be polite to ask the author also. (PS: I'm the OP of this thread).
×
×
  • Create New...