Factions
Re: Factions
Nope. Completely wrong. You can get a Ptr to any MW-reference in any cell at any time (cells are silently loaded on demand, if needed).
Re: Factions
Nice!
I've added the script instruction. You can now do funny stuff like player->ForceGreeting (if we want to do an easter egg, we could add funny dialogues to the player :p)
But i'm not sure: i think the only valide syntax is "whateverNPC->ForceGreeting" (having simply "ForceGreeting" seems...strange) so i put -1 for the opcode of the implicitReference, but i'm not sure it's the right way.
I've added the script instruction. You can now do funny stuff like player->ForceGreeting (if we want to do an easter egg, we could add funny dialogues to the player :p)
But i'm not sure: i think the only valide syntax is "whateverNPC->ForceGreeting" (having simply "ForceGreeting" seems...strange) so i put -1 for the opcode of the implicitReference, but i'm not sure it's the right way.
Re: Factions
That is not correct. ForceGreeting is perfectly valid. We are using it a lot in Redemption.
Edit: fixed
Edit2: In case anyone is interested, the recent scripting additions bring us up to 37.4% of all non-dialgoue scripts in Morrowind.esm being compiled correctly. The number looks still a bit low-ish because there is a small number of really commonly used script instructions that have not been implemented yet.
Edit: fixed
Edit2: In case anyone is interested, the recent scripting additions bring us up to 37.4% of all non-dialgoue scripts in Morrowind.esm being compiled correctly. The number looks still a bit low-ish because there is a small number of really commonly used script instructions that have not been implemented yet.
Re: Factions
Great!
But to be fair, i'm not sure I understand exactly what explicit and implicit mean.
But to be fair, i'm not sure I understand exactly what explicit and implicit mean.
Re: Factions
We are talking here about instructions that work on a MW-reference.
You can explicitly specify a reference by using the -> syntax.
Or you can implicitly specify a reference (i.e. not mentioning it at all in the script), when the script the instruction belongs to is associated with a MW-reference (that is true for local scripts).
Example: You want to initiate a dialogue for NPC A.
You can do that from any script with
A -> ForceGreeting
Or you can do it from the NPC's script (or a dialogue script for this NPC) with:
ForceGreeting
Another difference is, that the former case may not result in what you expected, if there is more than one reference for NPC A, while the second once is guaranteed to work with the right reference, because scripts are actually not attached to IDs, but to references.
You can explicitly specify a reference by using the -> syntax.
Or you can implicitly specify a reference (i.e. not mentioning it at all in the script), when the script the instruction belongs to is associated with a MW-reference (that is true for local scripts).
Example: You want to initiate a dialogue for NPC A.
You can do that from any script with
A -> ForceGreeting
Or you can do it from the NPC's script (or a dialogue script for this NPC) with:
ForceGreeting
Another difference is, that the former case may not result in what you expected, if there is more than one reference for NPC A, while the second once is guaranteed to work with the right reference, because scripts are actually not attached to IDs, but to references.
Re: Factions
Thanks! That's a lot more clear now! Maybe I can copy-past that somewhere in the wiki?