cmorgan Posted February 7, 2007 Share Posted February 7, 2007 Democracy belongs to those who show up. Sometimes it belongs to whoever shows up with working code Link to comment
cirerrek Posted February 7, 2007 Share Posted February 7, 2007 Democracy belongs to those who show up. Sometimes it belongs to whoever shows up with working code Ah-men! Nythrun, you are going to make me come out of retirement, aren't you? Well that, and I can't seem to keep NWN2 stable on my system. A couple of months back, I think I sent a copy of Horred's last update to CamDawg. Did you perchance get a copy of that to work with or are you going it from the notes in this thread? I might still have a copy of it lying around somewhere if you are interested. It would likely be sometime this weekend before I could get it to you. Thanks, Link to comment
Nythrun Posted February 8, 2007 Share Posted February 8, 2007 I'd appreciate it, thanks. If you've wiki access, just up there would be fine too - I'll not be doing anything with this for at least a week, so no rush (my cup runneth over as it is!) I'm using whatever I've gleaned from the discussion here, less anything that seems totally redundant or needs to be coded differently to work better. Anything that I'm getting wrong, someone jump in and say so There's a few open slots left too. /edited to add (god I never shut up) I wasn't planning on coding anything for on-cre effects, for several reasons. It'll probably be better to point people to something like <<<<<<<<embedded.effect >>>>>>>> COPY ~embedded.effect~ ~override~ PATCH_IF 1 THEN BEGIN INSERT_BYTES 0x00 0x108 WRITE_LONG 0x08 0x00 // opcode WRITE_LONG 0x0c 0x1 WRITE_LONG 0x10 0x00 // parameter 1 WRITE_LONG 0x14 0x00 // parameter 2 WRITE_LONG 0x1c 0x9 WRITE_SHORT 0x24 0x64 WRITE_ASCII 0x28 ~~ // resref WRITE_LONG 0x78 0xffffffff WRITE_LONG 0x7c 0xffffffff WRITE_LONG 0x80 0xffffffff WRITE_LONG 0x84 0xffffffff WRITE_LONG 0x9c 0xffff END COPY_EXISTING ~somecre.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d4) THEN BEGIN READ_LONG 0x02a0 "kso" READ_LONG 0x02a8 "smo" READ_LONG 0x02b0 "mso" READ_LONG 0x02b8 "iso" READ_LONG 0x02bc "ilo" READ_LONG 0x02c4 "elo" READ_LONG 0x02c8 "elc" WRITE_LONG 0x02a0 ("kso" >= "elo") ? ("kso" + 0x108) : "kso" WRITE_LONG 0x02a8 ("smo" >= "elo") ? ("smo" + 0x108) : "smo" WRITE_LONG 0x02b0 ("mso" >= "elo") ? ("mso" + 0x108) : "mso" WRITE_LONG 0x02b8 ("iso" >= "elo") ? ("iso" + 0x108) : "iso" WRITE_LONG 0x02bc ("ilo" >= "elo") ? ("ilo" + 0x108) : "ilo" WRITE_LONG 0x02c8 ("elc" + 0x1) INSERT_FILE "elo" ~embedded.effect~ END UNLESS ~%embedded.effect%~ for the rare fringe cases where that's necessary. Items and spells that use .effs are another story, though, and probably ought to be added. Link to comment
Avenger Posted February 9, 2007 Share Posted February 9, 2007 Haha, another one who is motivated by NWN2's performance. Long live IE modding. Link to comment
cirerrek Posted February 10, 2007 Share Posted February 10, 2007 Nythrun, I located the .zip file in my sent items. I've uploaded to my website. You can grab it from there. http://www.cirerrek.addr.com/B...ast_Update.zip Haha, another one who is motivated by NWN2's performance.Long live IE modding. I think non-performance is a better way to put it. Link to comment
Nythrun Posted February 16, 2007 Share Posted February 16, 2007 Thanks, cirerrek. Looks like it's functionally identical to BP Detectable stats though Link to comment
Nythrun Posted February 20, 2007 Share Posted February 20, 2007 The problem with that, by the way, is that while it's true that proficiency/stats overwrite rather than increment, the engine reads the highest value present on the creature when doing CheckStatGT and the like. So none of the "cure stat by adding new stat with zero parameter" stuff is going to work at all. I'll still run through the unused things today and see if I can't mine out the rest that are reserved by the engine (e.g. 185 reads as greater than zero after being set to zero, no idea what it's used for if anything). /edit utterly stupid typo fixed. Link to comment
Nythrun Posted February 20, 2007 Share Posted February 20, 2007 By "doesn't work" I mean after setting the stat and state to zero with an effect, CheckStatGT(Myself,0,%stat%) returns true anyway. Stat 182 / State 26 - doesn't work - on the list as DISPEL_GOOD, gotta go. Stat 188 / State 32 - does work with the scripting state opcode only - but displays the Magic Saucer .bam underfoot, dunno what it means Stat 193 / State 37 - does work with the scripting state opcode only - didn't see any side effects, but didn't look too long. There also appears to be some inexplicable behavior with stat 200, I've gotten it to work before, but now it's refusing and I'm not at all sure why. Going to have to test a bit more to be sure I'm not pulling up false negatives here. /edit Figured that out. And somehow the stat can be set for a duration of zero and it still works Link to comment
Nythrun Posted February 21, 2007 Share Posted February 21, 2007 In addition to pulling the redundant LEVEL_DRAIN, I'll be yanking 176 GAZE_REFLECTION (HasItem covers this). Very tempted to pull SPELL_DEFLECTION, SPELL_TURNING, SPELL_TRAP also, as they'll never work well. /edit One other bit: if someone still wants a No ToB version of something like this, it would be mighty helpful to check which stats are actually available in those games. OUTER_SET "stat" = 200 <<<<<<<<zzstatsc.baf IF Global("FJStatsCheck","LOCALS",0) THEN RESPONSE #100 ReallyForceSpellRes("zzstatsc",Myself) DisplayStringHead(Myself,2642) SetGlobal("FJStatsCheck","LOCALS",1) END IF GlobalLT("FJStatsCheck","LOCALS",3) THEN RESPONSE #100 IncrementGlobal("FJStatsCheck","LOCALS",1) Wait(3) END IF GlobalGT("FJStatsCheck","LOCALS",2) CheckStatGT(Myself,0,%stat%) THEN RESPONSE #100 ReallyForceSpellRes("zzstatsr",Myself) PlaySound("CAS_M06") DisplayStringHead(Myself,12087) ReallyForceSpell(Myself,CLERIC_RESTORATION) END IF GlobalGT("FJStatsCheck","LOCALS",2) CheckStatLT(Myself,1,%stat%) THEN RESPONSE #100 DisplayStringHead(Myself,1682) ReallyForceSpell(Myself,SIRINE_TELEPORT_FAKE) END >>>>>>>> COPY ~zzstatsc.baf~ ~override/zzstatsc.bcs~ EVALUATE_BUFFER COMPILE_BAF_TO_BCS COPY_EXISTING ~wolf01.cre~ ~override/zzstatsc.cre~ WRITE_SHORT 0x024 0x64 WRITE_SHORT 0x026 0x64 WRITE_BYTE 0x234 0x20 WRITE_ASCII 0x248 ~zzstatsc~ WRITE_ASCII 0x280 ~zzstatsc~ COPY_EXISTING ~spcl131.spl~ ~override/zzstatsc.spl~ DELETE_BYTES 0x72 (SOURCE_SIZE - 0x72) INSERT_BYTES 0x72 (0x28 + 0x60) WRITE_LONG 0x64 0x72 WRITE_SHORT 0x68 0x1 WRITE_LONG 0x6a (0x72 + 0x28) WRITE_SHORT 0x6e 0x0 WRITE_SHORT 0x70 0x0 WRITE_BYTE (0x72 + 0x00) 0x1 WRITE_SHORT (0x72 + 0x02) 0x4 WRITE_BYTE (0x72 + 0x0c) 0x5 WRITE_SHORT (0x72 + 0x0e) 0x1 WRITE_SHORT (0x72 + 0x10) 0x1 WRITE_SHORT (0x72 + 0x1c) 0x1 WRITE_SHORT (0x72 + 0x1e) 0x2 WRITE_SHORT (0x72 + 0x22) 0x1 WRITE_SHORT (0x72 + 0x24) 0x1 WRITE_SHORT (0x72 + 0x26) 0x1 // 0x11a for sstate, 0xe9 for stat WRITE_SHORT (0x9a + 0x00) 0xe9 WRITE_BYTE (0x9a + 0x02) 0x2 WRITE_LONG (0x9a + 0x04) 0x22 WRITE_LONG (0x9a + 0x08) "stat" WRITE_BYTE (0x9a + 0x0c) 0x0 WRITE_LONG (0x9a + 0x0e) 0x0 WRITE_BYTE (0x9a + 0x12) 0x64 WRITE_SHORT (0x9a + 0x30) 0xd8 WRITE_BYTE (0x9a + 0x32) 0x2 WRITE_LONG (0x9a + 0x34) 0x2 WRITE_LONG (0x9a + 0x38) 0x0 WRITE_BYTE (0x9a + 0x3c) 0x0 WRITE_LONG (0x9a + 0x3e) 0x100 WRITE_BYTE (0x9a + 0x42) 0x64 COPY_EXISTING ~zzstatsc.spl~ ~override/zzstatsr.spl~ WRITE_SHORT (0x9a + 0x00) 0xe9 WRITE_BYTE (0x9a + 0x02) 0x2 WRITE_LONG (0x9a + 0x04) 0x0 WRITE_LONG (0x9a + 0x08) 0x0 WRITE_BYTE (0x9a + 0x0c) 0x0 WRITE_LONG (0x9a + 0x0e) 0x1 WRITE_BYTE (0x9a + 0x12) 0x64 WRITE_SHORT (0x9a + 0x30) 0xe0 WRITE_BYTE (0x9a + 0x32) 0x2 WRITE_LONG (0x9a + 0x34) 0x0 WRITE_LONG (0x9a + 0x38) 0x0 WRITE_BYTE (0x9a + 0x3c) 0x0 WRITE_LONG (0x9a + 0x3e) 0x1 WRITE_BYTE (0x9a + 0x42) 0x64 Knock yourselves out if you want to Link to comment
Avenger Posted February 27, 2007 Share Posted February 27, 2007 Nythrun: SURGEMOD is an existing stat (154) and modifies the wild surge roll CHAOSSHIELD (189) is surge resistance. They are two different stats already provided by the engine. Link to comment
Nythrun Posted February 28, 2007 Share Posted February 28, 2007 Yeah, I know. I will never, ever check 154 and neither will anyone else (it's an instant modifier anyway and not applied for the entire casting duration, yes?) It's a waste to have an ids listing for something useless (did we really need to check both luck stats when only one is available in the game?). Mostly, that's just a sigh Link to comment
pro5 Posted March 16, 2007 Share Posted March 16, 2007 So, say I need to use Modify Scripting State for a custom spell of mine, what's the best stat to modify which won't conflict with something crucial here? Link to comment
Nythrun Posted March 16, 2007 Share Posted March 16, 2007 The million dollar question, isn't it What's the spell meant to do? If it's something unique I'd just set a variable with a limited duration (you can add this as a spell effect, I'm sure you know this). Stats are really for stuff that already interacts with other modifiers Link to comment
pro5 Posted March 16, 2007 Share Posted March 16, 2007 I just need to mark the creature targeted by the spell, with something that can be checked from another creature's script. As far as I can tell, IF See(...) CheckStat(LastSeenBy,??,??) THEN is the only nice way of doing it. If not, I'm all ears. This is an attempted version of "Phantasmal Killer" 3E spell. Link to comment
Nythrun Posted March 16, 2007 Share Posted March 16, 2007 Gotcha...unfortuately the last public release is already trying to use more stats than are actually available. No one has done anything with 193/ss 37 yet, so if you want to experiment, feel free - it'll won't conflict with anything other than lack of ToB. It also hasn't seen extensive testing...so if anything odd turns up, you'll have interesting discoveries to report Of course, you've already EXTEND_BOTTOMed every creature script once, might as well do it again /teasing Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.