Player Resource Consortium

 

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Arbaal

Pages: [1]
1
Help / Re: Easy Question about disable teleport
« on: March 06, 2018, 04:51:07 AM »
Solved with a script made to go around the problem

2
Help / Easy Question about disable teleport
« on: February 27, 2018, 09:12:44 AM »
In the prc include file, i've found the correct switch i would like to use:

 * A value of PRC_DISABLE_TELEPORTATION_TO_AREA. This disables teleporting
 * from other areas to the area in question.
 */
const int PRC_DISABLE_TELEPORTATION_TO_AREA             = 0x2;


I've understood that if i set the correct variable on the area, that area should not be a target for teleport.

Someone can say me what kind of variable i have to set?

Example:

PRC_DISABLE_TELEPORTATION_TO_AREA                 int                   2
??
In this way it won't work. 0X2 IS AN hexadecimal? What is the correct int value to make it work?

3
Help / Re: Just a tip
« on: January 13, 2018, 02:31:33 AM »
SOLVED
Prc script can be recalled by

case x (where x is the ID row in 2da spells file)

I'm very proud and happy of this :)

4
Help / Just a tip
« on: January 12, 2018, 08:35:12 AM »
Hi, i've done my spellhooking script and it works.

It recalls original nwn spells (modified from prc) without problems, and it does what it's been programmed to do.

I've only a problem. The code calls the spells by constant SPELL_XXXX_XXX, by using the switch function and "case by case" script.
Prc spells does not have constants.

How can i call the prc spell scripts? Is there a syntax to recall directly the spell scripts?

Below the first part of code:
Code: [Select]
void main()
{
object oTarget;
int nSpell=GetSpellId();
int nSpellDC=GetSpellSaveDC();
int nCastLevel=GetCasterLevel(OBJECT_SELF);
object oCaster = OBJECT_SELF;
if (GetCasterLevel(OBJECT_SELF) > 20)
{
nCastLevel = (GetCasterLevel(OBJECT_SELF) + (GetLevelByXP(OBJECT_SELF)-40));
}


     switch (nSpell)
     {

//*Arcane Sfera 1

         //* Evoca I
    case SPELL_SUMMON_CREATURE_I:
               {int nMetaMagic = GetMetaMagicFeat();
               int nDuration = nCastLevel;

and so on...case by case.

Can you help me to recall the spell scripts in my script? I would like to edit by spellhooking the spells/epic spells effects, without importing, exporting, compiling.

5
Help / Re: Need little help/suggestion - Ita Admin
« on: January 05, 2018, 08:03:04 AM »
Ok, i've done what we said. I've used the compiler with all prc scripts (inc and all the others) in a folder.
It compiles the script but it finds errors.

Is there a pious soul that explains me how to use the spellhooking function that the prc staff has gently included in their scripts?

This is what i know:
1 - this is a part of the code in the x2_inc_spellhook
it seems to say that if you want you can tell it to execute a script that you create instead of an original script:


Code: [Select]
//------------------------------------------------------------------------------
// Execute a user overridden spell script.
//------------------------------------------------------------------------------
int X2RunUserDefinedSpellScript()
{
    // See x2_inc_switches for details on this code
    string sScript =  GetModuleOverrideSpellscript();
    if (sScript != "")
    {
        ExecuteScript(sScript,OBJECT_SELF);
        if (GetModuleOverrideSpellScriptFinished() == TRUE)
        {
            return FALSE;
        }
    }
    return TRUE;
}

//------------------------------------------------------------------------------
// Set the user-specific spell script
//------------------------------------------------------------------------------
void PRCSetUserSpecificSpellScript(string sScript)
{
    SetLocalString(OBJECT_SELF, "PRC_OVERRIDE_SPELLSCRIPT", sScript);
}

//------------------------------------------------------------------------------
// Get the user-specific spell script
//------------------------------------------------------------------------------
string PRCGetUserSpecificSpellScript()
{
    return GetLocalString(OBJECT_SELF, "PRC_OVERRIDE_SPELLSCRIPT");
}

2 - part of the code of nw_s0_fireball (fireball original prc script) for example
it says something about spellhook

Code: [Select]
/*
  Spellcast Hook Code
  Added 2003-06-20 by Georg
  If you want to make changes to all spells,
  check x2_inc_spellhook.nss to find out more

*/

    if (!X2PreSpellCastCode())
    {
    // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
        return;
    }

// End of Spell Cast Hook


3 - the most important: it explains how to use the spellhook function i think
(x2_inc_switches - part of the code about spellhooking)

Code: [Select]
//------------------------------------------------------------------------------
//                          S P E L L S C R I P T S
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// Allows the module creator to specify a script that will be run before any spellscript is run
// You can call SetModuleOverrideSpellscript() at the end of the script specified by
// sScriptName. If you call this function this will prevent the original spellscript
// (and all craft item code) from being executed.
// If you do not add this line, the original spellscript and/or crafting code will
// run in addition to your script
//------------------------------------------------------------------------------
void SetModuleOverrideSpellscript(string sScriptName);

Can someone make me an example of how to use that function with prc, without touching the original spell scripts of prc?
I think it's possible but i can't solve by myself

6
Help / Re: Need little help/suggestion - Ita Admin
« on: January 02, 2018, 12:53:33 PM »
Thank you xwarren. I'm very sorry for make you waste time! I've searched forums before writing but i've used wrong keywords.

Thanks again for your amazing work and all prc team. Your work is the best add to nwn ever made and me and my players are very grateful to this masterpiece.
I will follow the instructions in the compiler usage post :) :) :)

7
Help / Need little help/suggestion - Ita Admin
« on: January 01, 2018, 10:01:06 PM »
Good Morning!
Just a suggestion. I'm sure someone of you can know the way to help me.

I use prc from several years on my shard and i've completely translated all prc in Italian, adapting something specific for my world.

No problem with scripts, no problem with classes, no problem with nothing.

I've just a problem that i've tried to solve by myself for months, without finding a solution.
It's not a bug.

I would like to edit some strings of codes, some spell scripts to have them behave slightly different but i can't make it work.

Example: Fireball script; i would like to set the caster level cap to 24 instead of 10 and so on with some other spell scripts.

Now, i know that these scripts are in prcspells.hak and i've exported to edit them.
I can edit the nss but until i can't make a ncs of the script, also re-importing into the hak and using the new hak modified, the fireball will continue to do the same things as before.

The PRC compiler does not work on my windows 7. No compiler for nwn seems to work. It starts for a blink of an eye and then shuts down.
I have not an old machine on which i could make it work the compiler.

The first question: is it right? This is the way to edit that spell scripts or are there other ways?
I would like to touch only spell scripts of original nwn spells and not every spell, just a few; then some epic spells.

1- i open the hak
2- i export the spell script (nss and ncs)
3?
4- i re-import into the hak
5- i use the new hak.

Am i missing something?
Do you have a compiler version that works with windows 7 that i can use to produce an ncs?
Are there other ways to do this?

8
General Discussion / Re: Question about switches
« on: February 29, 2016, 07:19:12 AM »
Ok i surrender to heal potions, it can be also a good thing for players, but someone can help me disable devastating critical?

9
General Discussion / Re: Question about switches
« on: February 25, 2016, 08:59:05 PM »
Sorry i forgot to mention that i host a server in multiplayer.
So for heal is a "int"? Cause i was thinking if i was choosing wrong constant. (float, string...)

PRC_BIOWARE_HEAL       int    1

is it correct?

i use prc 3.2 with cep 2.4 with no problems.

Can you explain me when using int or float o string?
I used string for devastating critical, i'll test this, cause there are several feats to be disabled.
Is it correct?

Thanks, xwarren, you solved me problems several times in the past :)

10
General Discussion / Question about switches
« on: February 25, 2016, 05:02:01 PM »
Sorry, i hope i've choosen the right forum section.
It's not a problem or a bug.

It's only a question:

i want to disable devastating critical and restore normal Healing spell effect (heal all HP)
I've opened with nwhak my prc hak and i've extracted the include file. I've read the file but i don't know if i am doing right

/** Remove the cap PRC added to this spell */
const string PRC_BIOWARE_HEAL                        = "PRC_BIOWARE_HEAL";

Ok, someone can tell me exactly what i have to do?
I am thinking of put a variable in module properties advanced tab, PRC_BIOWARE_HEAL int 1
Is it correct? Cause in this way it does not work, heal spell has still the cap.

 * Disabling specific feat and/or skills
 * Each of these has 2 parts. One part is a variable defining the size of the list
 * The other part is the list itself. The numbers are the row numbers in feat.2da or skills.2da
 * or spells.2da.
 * For example, if you want to disable Knockdown and Improved Knockdown you would set
 * the variables as follows:
 * PRC_DISABLE_FEAT_COUNT = 2
 * PRC_DISABLE_FEAT_1     = 23
 * PRC_DISABLE_FEAT_2     = 17
 */

so i should set 38 lines with PRC_DISABLE_FEAT_1 int xx (number of row in 2da) , 2, 3, AND SO on
and another line with PRC_DISABLE_FEAT_COUNT int 38?

Is it correct?

Thanks

For devastating critical
PRC_

11
General Discussion / Re: PW Servers using PRC
« on: February 25, 2016, 04:55:37 PM »
Candle Keeper - Italian server

Note: i'm translating prc in italian.

IP: CandleKeeper.homepc.it

Pages: [1]