Jump to content

Bug squeezing from my own mod


svj

Recommended Posts

Quote

 

// This is in my tp2 as of now will it work?

COPY_EXISTING ~ar5004.are~ ~override/ar5004.are~
WRITE_ASCII 0x94 ~ar5004~
EXTEND_TOP ~ar5004.bcs~ ~revan/baf/rqar5004.baf~

 

IF
    Global("rqjaheira4ambush","GLOBAL",1)
    Dead("rqdermin")  // Dermin Courtierdale
    Global("rqjaheira2tobambushSpawn","AR5004",0)
THEN
    RESPONSE #100
        CreateCreature("rqjah135",[557.636],0)  // Jaheira
        SetGlobal("rqjaheira2tobambushSpawn","AR5004",1)
        SetGlobal("rqjaheira2tobambush","GLOBAL",1)
END

IF
    GlobalTimerExpired("SaradushSiegeTimer","GLOBAL")
THEN
    RESPONSE #50
        SetGlobalTimer("SaradushSiegeTimer","GLOBAL",50)
    RESPONSE #50
        ScreenShake([20.20],3)
        PlaySound("AM5004S1")
        SetGlobalTimer("SaradushSiegeTimer","GLOBAL",50)
    RESPONSE #50
        ScreenShake([20.20],3)
        PlaySound("AM5004S2")
        SetGlobalTimer("SaradushSiegeTimer","GLOBAL",50)
END
 

It appears at least to me that my code is smarter than you would think

It copied contents from common areascript and pasted my content above.

Edited by svj
Link to comment

So how does one make ONLY my evil NPCs to never leave due reputation?

I had a look cdtweaks but it makes everyone to not leave by removing numerical values from happy.2da

Tsjuatha does patch Dplayer2 but i do not understand the mechanism of action so i am leery to copy it since i do not understand if it will work for my NPCs

Link to comment
How do i find string number of raver07.waw so i can use it as death sound?
Will it interfere with 2da animation sound if put death sound in cre file but leave the 2da sounds animation as there as it is default?
Link to comment

Hmm. I don't see a clean way to search for the string reference associated with a sound in Near Infinity. Feature request? Seems like something to add to the "StringRef" search panel.

If you know the text associated with the sound, you can search for that text in the StringRef panel. For example, AJANT01.WAV in BGEE is "Halt! Be you friend or foe?" Searching for that text finds #421 (without the sound) and #3502 (with the sound).

Link to comment

Nope none of the sounds are in cre files they are only in 2da i did search for raver07.waw in NI with checkmark for .cre files

Death sound belongs to creature with no speaking so i cannot search for strings.

Link to comment

Well. If it's being assigned by an ini, it might not have an associated string. That can happen too.

(Also, there's no such thing as a .waw file. Persistent error there, and the letters aren't even keyboard-adjacent or anything in the usual layout.)

Link to comment

Well, now. That's something completely different.

Option 1: apply effects (opcode 180) that prevent your item from being used to every other character. You can apply this to joinable characters in their CRE files, or to created PCs other than player 1 by a script.

Option 2: Put an effect (opcode 319) on the item so that it can only be used by creatures with no name, or only by creatures with no script name. That means only player-created characters will be able to use it. Well, normally, anyway. EE-only.

I might go with a hybrid approach; the opcode 319 effect to restrict it to player characters only, and a script that runs once in campaign start areas to apply the opcode 180 effect to players 2 through 6 so that created PCs other than the protagonist can't use it..

Link to comment
I have create Monster that heals all its wounds every round
The problem i have is that when i say use hold effect its override script of applysspell(heal) stops executing is there way around this?
If not i might append something to area script or use some other trick

Link to comment

There are basically two ways around it:

- Apply immunities to the troublesome effects, so they can't stop your script from running. This is why the troll immunity item grants immunity to hold, stun, confusion, etc.

- Do it with spells and effects instead of scripts. See EE trolls for an example. To quote myself from another thread:

Quote

Trolls have four undroppable items.

- TROLLIMM: general troll immunities, which include basically everything mind-affecting or that could prevent scripts from running. Probably because previous versions of trolls did rely on scripts for the fire/acid thing.

- TROLLBOO: Sets movement speed to 11, standardizing trolls as slightly faster than an unaugmented PC.

- MONHP1: min HP 1, no other effects.

- TROLLREG: Regeneration, immunity to Sleep, casts the TROLLREG spell when hit points get low (opcode 232).

So, what does that TROLLREG spell do?

- Immediately dispel everything and cure basically all status effects, including the stuff trolls are immune to already. Set HP to 1.

- Immediately remove the TROLLREG and MONHP1 items.

- Set 100% immunity to all damage types except fire and acid. Cause sleep. Set all saves to 20 (auto-fail). All with duration 20.

- After a delay of 20, set HP to 100% and create the TROLLREG and MONHP1 items.

Basically, adapt those mechanics to your use. If you want a way to counter the healing, then the troll mechanics are definitely the way to go. If you don't, then you can do things more simply and just have a repeating heal effect on the creature or an item it has equipped.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...