SimDing0 Posted April 4, 2008 Posted April 4, 2008 Oh, I forgot to mention the biggest point of suck: we need to find a way so that the game doesn't end when Player1 dies. And I'm sure somebody will hit me for this, but I have to say, I don't actually think it matters. Consider: unless we all start our games in multiplayer (which I contend will look a tad silly), we're only going to be creating Player1 anyway. The rest of the party are going to have to be NPCs, really. Yeh, okay, it's a shame we can't offer them the opportunity to resurrect us (since we don't have the Bhaalspawn-turning-to-dust excuse), but I don't think it's devastating. Incidentally, isn't the solution to letting Player1 die to use the Replace Self effect or something, with the side-effect that the Player1 scripting object doesn't work?
CamDawg Posted April 4, 2008 Author Posted April 4, 2008 igi mentioned he may have a way around it, but I'm not sure where that is.
SimDing0 Posted April 4, 2008 Posted April 4, 2008 Okay, yeh, it looks like Replace Self does work, and surprisingly well. Player1 still functions in scripts, and the game ends when ALL your party members die. I did come across a slightly weird problem with new joinables getting assigned the original PC's portrait, but I can't reproduce it reliably.
SimDing0 Posted April 4, 2008 Posted April 4, 2008 No, I'm lying. It doesn't work quite well enough. The first creature added AFTER you apply Replace Self becomes the new Player1, and killing that ends the game. Anyone added BEFORE Replace Self can be killed freely, but also won't identify as Player1. (And you can't get a full party of 6 that way.) Incidentally, I never really considered that [PC] is the nearest party member who isn't the object running the script. That threw me a little.
Nythrun Posted April 8, 2008 Posted April 8, 2008 Oh yeah, forgot usability. Enjoy! Steal the (horrible, horrible) Level One NPCs code. Other than alignment restrictions, you can rip out the class names from the BGII dialog.tlk and evaluate the .tra - manual touchup advisable
Nythrun Posted May 8, 2008 Posted May 8, 2008 Steal the (horrible, horrible) Level One NPCs code. So, I'm an idiot and decided to rewrite that whole mod. Again. And somewhere along the line contracted the bright idea to skip begging people to translate "Not Usable By: Flintknapper" into every language, and just patch together item restriction text from existing item descriptions - e.g. OUTER_PATCH worst_idea_ever BEGIN GET_STRREF 1083 $mixed_desc(bard) GET_STRREF 1079 $mixed_desc(cleric) GET_STRREF 1080 $mixed_desc(druid) GET_STRREF 16799 $mixed_desc(fighter) GET_STRREF 9987 $mixed_desc(mage) GET_STRREF 45858 $mixed_desc(monk) GET_STRREF 1078 $mixed_desc(paladin) GET_STRREF 1077 $mixed_desc(ranger) GET_STRREF 45856 $mixed_desc(sorcerer) GET_STRREF 1082 $mixed_desc(thief) GET_STRREF 10189 $mixed_desc(fighter_mage) GET_STRREF 10187 $mixed_desc(fighter_cleric) GET_STRREF 10178 $mixed_desc(fighter_thief) GET_STRREF 10191 $mixed_desc(fighter_mage_thief) GET_STRREF 10193 $mixed_desc(mage_thief) GET_STRREF 10180 $mixed_desc(cleric_mage) GET_STRREF 10184 $mixed_desc(cleric_thief) GET_STRREF 10188 $mixed_desc(fighter_druid) GET_STRREF 10190 $mixed_desc(fighter_mage_cleric) GET_STRREF 10182 $mixed_desc(cleric_ranger) // 1073 ? GET_STRREF 9107 $npc_name(yoshimo) INNER_PATCH_FILE kitlist.2da BEGIN READ_2DA_ENTRIES_NOW rows 0x9 FOR (i_0 = 0x01; i_0 < rows; i_0 += 0x01) BEGIN READ_2DA_ENTRY_FORMER rows i_0 0x01 temp_0 TO_LOWER temp_0 READ_2DA_ENTRY_FORMER rows i_0 0x03 temp_1 SET $mixed_desc(~%temp_0%~) = temp_1 READ_2DA_ENTRY_FORMER rows i_0 0x08 temp_1 SET $EVALUATE_BUFFER ~class_%temp_1%~(~%temp_0%~) = temp_1 END END GET_STRREF 22721 not_usable_by INNER_PATCH_SAVE not_usable_by ~%not_usable_by%~ BEGIN REPLACE_TEXTUALLY ~[%0t_10%]* *%mixed_desc_cleric%[%0t_10%]*~ ~~ SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END GET_STRREF 16303 unusable_by INNER_PATCH_SAVE unusable_by ~%unusable_by%~ BEGIN REPLACE_TEXTUALLY ~[%0t_10%]*[ ]*%mixed_desc_mage%[ ]*[%0t_10%]*~ ~~ SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END GET_STRREF 2496 usable_by INNER_PATCH_SAVE usable_by ~%usable_by%~ BEGIN REPLACE_TEXTUALLY ~[%0t_10%]*[ ]*%npc_name_yoshimo%[ ]*[%0t_10%]*~ ~~ SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END GET_STRREF 7366 only_usable_by INNER_PATCH_SAVE only_usable_by ~%only_usable_by%~ BEGIN REPLACE_TEXTUALLY ~[%0t_10%]*[ ]*%mixed_desc_mage%[ ]*[%0t_10%]*~ ~~ SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END GET_STRREF 10037 good_characters INNER_PATCH_SAVE good_characters ~%good_characters%~ BEGIN SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) END ELSE BEGIN SET i_0 = 1 END END SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END GET_STRREF 10063 neutral_characters INNER_PATCH_SAVE neutral_characters ~%neutral_characters%~ BEGIN SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) END ELSE BEGIN SET i_0 = 1 END END SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END GET_STRREF 10064 evil_characters INNER_PATCH_SAVE evil_characters ~%evil_characters%~ BEGIN SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) END ELSE BEGIN SET i_0 = 1 END END SET i_0 = BUFFER_LENGTH FOR (temp_0 = 65535; i_0 > 0; i_0 -= 1) BEGIN READ_BYTE i_0 - 1 temp_0 PATCH_IF temp_0 = 10 || temp_0 = 13 BEGIN DELETE_BYTES 0 (i_0) SET i_0 = 1 END END END END PRINT ~ unusable_by = %unusable_by% not_usable_by = %not_usable_by% usable_by = %usable_by% only_usable_by = %only_usable_by% good_characters = %good_characters% neutral_characters = %neutral_characters% evil_characters = %evil_characters% ~ Well, it won't work in BGII, thanks to the weedy tendrils of GTU (how I do hate thee) - it's a wasted day for my purposes. But IwD hasn't seen that kind of tampering, and it may well still be possible there.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.