phordicus Posted January 31, 2011 Share Posted January 31, 2011 some of them, like DR03 only use 2 rows of the given 6. if i were modding a default kit and adding a new ability, would it be better to just add an entirely new row or just assume that row 5 or 6 would still be completely unused? Link to comment
Mike1072 Posted January 31, 2011 Share Posted January 31, 2011 You could use code to add a new row only if it needs it. Like this, but tested. SET level = 12 // when the ability is gained TEXT_SPRINT new_ability ~AP_blahblah~ COUNT_2DA_COLS num_cols COUNT_2DA_ROWS num_cols num_rows PATCH_IF (level < num_cols) BEGIN SET added = 0 FOR (row = 0; row < num_rows && !added; row += 1) BEGIN READ_2DA_ENTRY row level num_cols ability PATCH_IF (~%ability%~ STRING_EQUAL ~****~) BEGIN SET_2DA_ENTRY row level num_cols ~%new_ability%~ SET added = 1 END END PATCH_IF (!added) BEGIN SET new_row_num = num_rows + 1 TEXT_SPRINT new_row ~ABILITY%new_row_num%~ FOR (col = 1; col < num_cols; col += 1) BEGIN TEXT_SPRINT new_row ~%new_row% ****~ END INSERT_2DA_ROW num_rows num_cols ~%new_row%~ SET_2DA_ENTRY num_rows level num_cols ~%new_ability%~ END END Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.