Jump to content

MyNPC [CD_STATE_NOTVALID]


Harutsune

Recommended Posts

You've done a very nice job on this, it helps *SO* much! Thank you very much again! ;) All I can do now is offer to do the job 'add keywords for all valid dlg' (a nice way to give something back to the community). ;) But writing about 2k dlg-names is errorful and insane, so I need an exported folder to generate a list or just a (complete) list, at least I need some weidu-syntax to massexport it.

 

Excuse me please for forcing an above question again:

This Char is a former pitfightslave, so he *has to* refuse pitfighting in Ust Natha - any ideas how to solve this? ;)

Link to comment

*solved*

I decided to just ask for the death of the first pitfightslave ("udumber") after an ict to warn the PC, so it doesn't matter who is sent into the pit. Not really elegant but works satisfying, at least it serves roleplaying well. :)

 

so why a new post instead of a plain edit..?

 

Here's my 'game_over-script': // only if AI is off

ReallyForceSpell("Myself",4423) // poison weapon

ReallyForceSpell("Myself",4655) // impr. haste

Enemy()

Attack([PC])

 

'Poison weapon' and 'impr. haste' are not cast, he goes hostile but attacks Viconia instead of the PC. Seems I missed definitions again, does 'PC' mean just a group-member? And why are my spells not cast?

Link to comment

No quotes around "Myself" (right now the game is looking for someone with that script name to apply effects to); for Improved Haste you may want 2613 instead.

 

[PC] is going to include all party members, Player1 is what you'd want :)

Link to comment

Autsch! I could have seen the solution a few lines above :) - please excuse this stupid question.., and thank you of course :) . Now it's working very nice, strange is that the group-members don't fight back no matter AI on or off. And if the Player wants to fight back manually he will select the red-footed in stead of attacking, he will have to use F2 (with group selected) - a bit poor :) .

Is there a way to make the group notice one of them turned hostile and then react accordingly? ;)

Link to comment

I'm not quite sure who you are refering to here, if it's your NPC then he'd proabably need to leave party before turning red or he might still be selectable. As for the rest of the party, you could probably control them to attack with ActionOverride(),

Link to comment

Heh, divine punishment? You know what they say though, ask a question and you'll be an idiot for10 minutes, don't and you'll stay an idiot forever. So keep asking questions, modding is hard at the beginning, it took me years to get to a decent level myself and I wish I had asked more questions back then. :)

Link to comment

Agreed 100% - do a search on PPG and G3 for my back posts, and you will get a good picture of someone who decided to ask stupid questions early, often, and with great frequency - the best way to learn ever created. Dive in, try something, go read everything you can find on a forum search regarding the problem, then try again, then ask a bunch of questions on forums, then repeat - the "shortcut" to almost being able to mod, like me! :)

Link to comment

Warm words is what I need times like this, thank you very much!! :D

In fact my whole machine died the other day because of the mainboard, but now everything is replaced (had to setup my system again, too much of new stuff there). So I'm back on it again, going to finish him in the first walk (second walk will follow, to add a quest and to accompany another mainchar).

 

So there still was and is that issue with 'IsValidForPartyDialog', I've often been told that this is far from optimum, CamDawg would have done something *much* better - at least I think I've found it (though with almost no explanation):

 

.tp2

APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~

UNLESS ~CD_STATE_NOTVALID~

(I'm missing the 'Code'-Button)

 

Suure I don't have any idea what exactly the hex-codes means, but I'm going to trust the gurus here as a good N00b should do.. :cry: (what does 'CD' mean?)

 

Starting to replace all my former 'IVFPDs' with the new checks:

 

INTERJECT KORGANJ 35 haru_korgan_tricked_us

== HaruJ IF ~InParty("Haru") See("Korgan") !StateCheck("Haru",CD_STATE_NOTVALID)~ THEN

 

This is clear so far, he's InParty, can see Korgan, and is 'valid'. But in the next part Korgan has to check all that again (?) before he'll reply, what about the 'see-check'? We switch to 'KorganJ', is Korgan checking for Haru's visibility now or is still Haru checking for Korgan's visibility..?? And do I really have to check for this again? It's not that I'm initiating dialog, just interjecting to something somebody says, can't he be sure I'm there..?? ;)

Link to comment

CD means CamDawg - as far as I am aware of, the idea originated on old Dragonlance Total Conversion forums or thereabouts, and CamDawg has graciously provided the actual code for the future generations of modders. (There. Should be sufficiently flattering.)

 

Seriously, though, the state means that your character is able to talk: he is not silenced, not asleep, not confused and hasn't just exploded, strictly speaking.

 

So in your interjection, Haru is in party(and not dead), he sees Korgan(Haru is checking - since Korgan is already talking in this state, Korgan should be all right), and Haru is able to talk.

 

I really recommend I_C_T instead of INTERJECT(unless you use INTERJECT + COPY_TRANS later), because this way the player may not see the content other mods add. (EDIT: if you use I_C_T, the player sees everything; if you use just INTERJECT, other mods' additions may be lost).

Link to comment

CD == CamDawg muhaha, *that* would be a nice topic on a quiz-thread.. ;)

 

So you say it's *always* the interjector who's checking whatever? Thanks, that's exactly what I needed to know. :cry:

 

99% of my work is I_C_T (so far), not only because it's the safest way to get triggered. Using INTERJECT in this case has it's reasons:

1. Korgan just talks with no replies (CC-Roof after killing his fellows)

2. Players will be warned in my readme not to plan their group with Haru AND Korgan (and *the* traitor of course) - no evil ways will be allowed

3. It's *very* unlikely other mods would interject here.

 

But do I really have to check presence again? As Korgan speaks he *must* be standing, Haru has to stand still to interject, so they already see another. If I check for visibility again there might be one other groupmember who just walks between them cause the player ordered them to (no, not very likely while the textbox is present), breaking the dialog by making a true condition untrue..?? Confusing enough, I hope.. :D

Link to comment

Yes, I never check See(), myself.

 

I would advise you to use InMyArea() instead, because if you don't, your game may get stuck. For example: say, you're in Government District and somebody is speaking to Korgan and Haru *should* interject, BUT Haru has temporarily gone to buy a few potions in the temple of Waukeen(for example), your game will be stuck - you'll have to exit and reload.

 

So, it will be

 

~InParty("Haru") InMyArea("Haru") !StateCheck("Haru",CD_STATE_NOTVALID)~

 

- meaning that Haru is in the same area as Korgan, in party and able to talk.

Link to comment

Alright, that argues a lot since there are lots of doors you don't have to gather your group to pass thru. Hm, what is CD_STATE_NOTVALID exactly checking for? Range for example, can he hear what the other one says? (I hate those situations where an npc interjects thru a whole outdoor-map while the PC is taking a reward with the only Nikes on)

Link to comment

Aha, 'charmed' and 'range' are not covered by CD_STATE_NOTVALID.

 

(please don't think I'm too lazy to search, it's just I searched for CD's original post when introducing and explaning it, but only found one where he replied to Jastey)

 

So how to satisfy realizm if 'InMyArea' is not close enough and 'See()' is flawed..??

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...