subtledoctor Posted March 16, 2021 Share Posted March 16, 2021 I didn't see a script action for this, so I made up a bunch of spells with opcodes 44/15/10/19/49/6. The spells use timing mode 1, parameter1 = [chosen value], and parameter2 = 1 [set score to value of parameter1]. But when a spell would set an ability score to something lower than it is, no change is registered. Is the only way to lower ability scores doing it incrementally? Quote Link to comment
Luke Posted March 16, 2021 Share Posted March 16, 2021 1 hour ago, subtledoctor said: I didn't see a script action for this... What about ChangeStat()? Quote Link to comment
subtledoctor Posted March 16, 2021 Author Share Posted March 16, 2021 20 minutes ago, Luke said: What about ChangeStat()? Oh yeah, huh. Must have made a typo when searching the IESDP page. ...I was about to say "I'll experiment with that for the next update," but I suppose since I haven't yet released the current update, the responsible thing to do is to go experiment with that now. Sigh. The IESDP should probably still mention those opcodes' inability to set scores lower, though. Quote Link to comment
kjeron Posted March 16, 2021 Share Posted March 16, 2021 (edited) Those opcodes have no trouble setting lower base values. The issue is somewhere else. Edited March 16, 2021 by kjeron Quote Link to comment
subtledoctor Posted March 16, 2021 Author Share Posted March 16, 2021 (edited) Testing seemed pretty clean. The dialogue for setting stat scores looks like: IF ~~ THEN BEGIN d5stttlk_20 SAY @2052 IF ~~ THEN REPLY @2058 DO ~ApplySpellRES("D5ST_05",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2059 DO ~ApplySpellRES("D5ST_06",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2060 DO ~ApplySpellRES("D5ST_07",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2061 DO ~ApplySpellRES("D5ST_08",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2062 DO ~ApplySpellRES("D5ST_09",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2063 DO ~ApplySpellRES("D5ST_10",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2064 DO ~ApplySpellRES("D5ST_11",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2065 DO ~ApplySpellRES("D5ST_12",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2066 DO ~ApplySpellRES("D5ST_13",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2067 DO ~ApplySpellRES("D5ST_14",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2068 DO ~ApplySpellRES("D5ST_15",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2069 DO ~ApplySpellRES("D5ST_16",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2070 DO ~ApplySpellRES("D5ST_17",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2071 DO ~ApplySpellRES("D5ST_18",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2072 DO ~ApplySpellRES("D5ST_19",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2073 DO ~ApplySpellRES("D5ST_20",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2074 DO ~ApplySpellRES("D5ST_21",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2075 DO ~ApplySpellRES("D5ST_22",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2076 DO ~ApplySpellRES("D5ST_23",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2077 DO ~ApplySpellRES("D5ST_24",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2078 DO ~ApplySpellRES("D5ST_25",myself)~ GOTO d5stttlk IF ~~ THEN REPLY @2079 GOTO d5stttlk END D5ST_## is a spell setting the STR stat to the value of ##. This is repeated for each ability score: ACTION_FOR_EACH value IN ~5~ ~6~ ~7~ ~8~ ~9~ ~10~ ~11~ ~12~ ~13~ ~14~ ~15~ ~16~ ~17~ ~18~ ~19~ ~20~ ~21~ ~22~ ~23~ ~24~ ~25~ BEGIN COPY ~npc_ee/lib/d5_base.spl~ ~override/d5st_%value%.spl~ LPF ADD_SPELL_EFFECT INT_VAR opcode = 44 target = 1 parameter1 = %value% parameter2 = 1 timing = 1 END COPY ~npc_ee/lib/d5_base.spl~ ~override/d5dx_%value%.spl~ LPF ADD_SPELL_EFFECT INT_VAR opcode = 15 target = 1 parameter1 = %value% parameter2 = 1 timing = 1 END COPY ~npc_ee/lib/d5_base.spl~ ~override/d5cn_%value%.spl~ LPF ADD_SPELL_EFFECT INT_VAR opcode = 10 target = 1 parameter1 = %value% parameter2 = 1 timing = 1 END COPY ~npc_ee/lib/d5_base.spl~ ~override/d5in_%value%.spl~ LPF ADD_SPELL_EFFECT INT_VAR opcode = 19 target = 1 parameter1 = %value% parameter2 = 1 timing = 1 END COPY ~npc_ee/lib/d5_base.spl~ ~override/d5ws_%value%.spl~ LPF ADD_SPELL_EFFECT INT_VAR opcode = 49 target = 1 parameter1 = %value% parameter2 = 1 timing = 1 END COPY ~npc_ee/lib/d5_base.spl~ ~override/d5ch_%value%.spl~ LPF ADD_SPELL_EFFECT INT_VAR opcode = 6 target = 1 parameter1 = %value% parameter2 = 1 timing = 1 END END When I tested it on Imoen and Jaheira in Chateau Irenicus I tried to set their stats to 5-20-5-20-5-20, or 25-6-25-6-25-6, etc.. In every instance, when the applied value was higher than their current value the score would change to the higher number. But no stats were ever changed to 5 or 6 etc. I haven't released it yet but you can test the latest master of the mod here. Install on BG2EE and have Imoen use the innate ability that looks like a person. Edited March 16, 2021 by subtledoctor Quote Link to comment
kjeron Posted March 16, 2021 Share Posted March 16, 2021 (edited) The dialogs are attempting to cast "D5ST_05" instead of "D5ST_5", so all of the single-digit "sets" are failing. Edited March 16, 2021 by kjeron Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.