Aller au contenu

Photo

Script idea - set player's deity or religion


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Friar

Friar
  • Members
  • 293 messages

I really thought this was discussed somewhere before, but couldn't find it.

 

I have been looking for a global action script that would be called from a conversation.

It would basically look for an "int" in the "NW_deities 2DA" under the category "NameStringref"

the values range from 195868 - 236108 each representing a deity.

 

For example:

195829 - Ilmater

195807 - Gruumsh

//Gruumsh will demand that the player serve as a grey orc cleric. 
//If he does not then the PC head is smashed into red paste.

void main()
{

object oPC = GetPCSpeaker();

SetDeity=195807
}



#2
kevL

kevL
  • Members
  • 4 056 messages

Deities are saved as strings (not ints) on characters. So, more like this

void main()
{
    object oPC = GetPCSpeaker();
    if (GetDeity(oPC) != "Gruumsh")
    {
        // determine combat round
    }
}

or to outright force a deity change:

void main()
{
    object oPC = GetPCSpeaker();
    if (GetDeity(oPC) != "Gruumsh")
    {
        SetDeity(oPC, "Gruumsh");
    }
}

those are just examples
  • Friar et GCoyote aiment ceci