kreso Posted April 15, 2017 Share Posted April 15, 2017 I want to add a spell to hidespl.2da, w/o overwriting the file. How to do it? I tried with SET_2DA_ENTRY but it doesn't work. Link to comment
subtledoctor Posted April 15, 2017 Share Posted April 15, 2017 ACTION_IF FILE_EXISTS_IN_GAME ~hidespl.2da~ BEGIN APPEND ~hidespl.2da~ ~blah 1 0~ END Link to comment
kreso Posted April 15, 2017 Author Share Posted April 15, 2017 Great. Had to space it out a bit, but it works. Fwiw, I'll include this my SR fix/tweak. In short, Wish cheese will actually be balanced. You will only be able to cast it via scrolls - it won't be possible to write it down in your spellbook nor pick it for your sorcerer. Will remain an optional component, ofc. I'll see what I can do about making all options always available, rather than relying on random dice. Link to comment
kreso Posted April 15, 2017 Author Share Posted April 15, 2017 Yea, but I doubt many people will use it . Btw, while you're here - I've just installed M&G mod. Why can't I install "scout and revised swashbuckler" component? I see a "FORBID" in .tp2, so that kinda explains the technicalities...but is there a reason to do so? Link to comment
Wisp Posted April 15, 2017 Share Posted April 15, 2017 INSERT_2DA_ROW offers a bit more control than APPEND does. Link to comment
Galactygon Posted April 15, 2017 Share Posted April 15, 2017 Note that there are different implementations of HIDESPL.2da; the ToBEx/Taimon implementation uses one less column than the EE implementation. I would do a COUNT_2DA_COLS check first i.e. COPY_EXISTING "HIDESPL.2da" "override" COUNT_2DA_COLS hidespl_col_num PATCH_IF hidespl_col_num = 3 BEGIN // If EE version is used INSERT_2DA_ROW 0 3 ~myspell 1 0~ END ELSE PATCH_IF hidespl_col_num = 2 BEGIN // If ToBEx version is used INSERT_2DA_ROW 0 2 ~myspell ****~ END PRETTY_PRINT_2DA IF_EXISTS This will add your spell as the first row of HIDESPL.2da. Link to comment
kreso Posted April 15, 2017 Author Share Posted April 15, 2017 That will do I guess. Tnx. Link to comment
Mike1072 Posted April 16, 2017 Share Posted April 16, 2017 I think we planned to write one or more functions for modifying hidespl.2da because then we could deal with any differences from the different formats there. (In the meantime, our shortcut was to include a pre-built hidespl.2da file for each format and install whichever one was appropriate.) Doing it in a function would also make it possible to safely handle the situation where the spell is already listed in the file. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.