Factions

Everything about development and the OpenMW source code.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Factions

Post by Zini »

And I see at least two unimplemented faction and dialogue related script instructions:

GetPCRank
ForceGreeting
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Factions

Post by gus »

I don't know how to implement this kind of instruction:

"telvanni sharpshooter"->GetPCRank

from http://www.uesp.net/wiki/Tes3Mod:GetPCRank
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Factions

Post by Zini »

You mean the -> part? See my fixes to your ModDisposition function. Or any other function/instruction of this type.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Factions

Post by gus »

I implemented getPCRank as you suggested, but it does not work. For example if I type GetPCRank "whatever" in the console i get a "no implicit reference". The same goes for ModDisposition.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Factions

Post by Zini »

Working as intended. To use an implicit reference (i.e. not the -> form) the instruction must be called from a script that is associated with a MW-reference (i.e. a local script).
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Factions

Post by gus »

So the function getPcRank works?
Because if I type in the console "player->getPCRank" i get "stack underflow".
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Factions

Post by Zini »

Then your coding for getPCRank is wrong.

Edit: Too many pops. In the second line of execute you pop the first argument (which may not even exist) and then discard it.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Factions

Post by gus »

Corrected thanks!

ForceGreeting seems a little tricky as it force dialogue with an NPC, but the NPC doesn't have to be in the same cell than the player...
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Factions

Post by Zini »

Why is that a problem?
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Factions

Post by gus »

The dialogue system need a ptr of the actor, but if the actor is not in the same cell, it's possible (i believe) that the ptr is not stored by MWWorld right?
Post Reply