Author Topic: Community Patch discussion and development thread  (Read 21034 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #195 on: April 06, 2014, 07:51:11 am »


               


Is there actually a link to the classes as they are implemented in NWN specifically?




There is not. I was hoping the NWNWiki cover this since this is vanilla content, but so far nothing.


 


But basically it matches with the PRC implementation (Shou) except its all hardcoded into engine. Also there is an undocumented feature that upon taking Shou Disciple, the monk's AC continue to work with light armor, but there might be much more.


 


The Gruumsh is different case, lot of stuff is custom created by me since his feats are not automatic but selectable, so I had to create them from scratch based on the description. I have not tested his automatic feats at all.


 


EDIT: btw I realized the martial flurry feat is badly configured. It must be given into class radial so player can use it - i thought its automatical feat, but appears its selectable as this can be used even without monk class.



               
               

               


                     Modifié par Shadooow, 06 avril 2014 - 07:39 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #196 on: April 06, 2014, 10:18:56 am »


               


Given the issue the WhiteTiger found, they have to have the variable requirement to 0.


 


Im still not sure whether enabling them by default is a good choice as it forces builder to change it (which is an argument even you used before Pstemarie, didnt you?) and because it theoretically changes the balance of any module you play (MM argument).


 




 


Yeah, I had used that argument in the past. It's tough finding a happy medium that suits the majority. As a Builder I tend to prefer that new game system content included in comprehensive packages such as the CPP, CEP, or even Q is disabled by default - or at the very least includes a switch to enable/disable it. However, its also necessary to keep the formatting of implementation the same for such content. For example, with the PrCs you unlocked, having them disabled by default forced builders to use an inverse variable setting to activate them and ultimately caused issues - as you've found out.


 


In any event, whatever you ultimately decide, I'm looking forward to a final release of Patch 1.71.



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #197 on: April 06, 2014, 11:25:33 am »


               

Well since the variable to 1 solution has failed and causing issues, there are only two choices.


 


1) disable them by default in classes.2da


This means this is no longer possile to control via script ingame - and also means that those classes wont appear in the levelup menu at all. Players, who I suspect might be interested in this content, arent really expected to do the 2da magic to plays them so I think this is a bad solution.


 


2) keep them enabled by default


Players who dont want to play these classes can simply ignore them. Builders who install CPP and dont wish their players played these, will have to disable them unfortunately, but they can do that either via variable (SetLocalInt(oPC,"70_AllowShou",1) '<img'> or classes.2da (which works in server override).


 


I think the second option has more advantages than disadvantages. Actually the only disadvantage is that builders who dont like those prestige classes are ultimately forced to disable them and forcing anyone to do anything by installing CPP is wrong. I agree with that but see no other way. Either way, both options forces the other group of peoples to disable/enable them anyway.


 


(Or, if someone know about a third way, please tell me.)



               
               

               


                     Modifié par Shadooow, 06 avril 2014 - 10:26 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #198 on: April 06, 2014, 11:46:11 am »


               

Solution 2 is by far the best choice of the two. It's in line with the way the vanilla PrCs work - they all have a variable defined to disable them - and is the method most familiar to builders. Furthermore, I don't think anyone will cause a big stink about having to disable them if they don't want them in their module but, then again, you  never know...



               
               

               
            

Legacy_Gruftlord

  • Sr. Member
  • ****
  • Posts: 490
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #199 on: April 06, 2014, 02:39:13 pm »


               

i think option 2 is the best as well. CPP is not only for builders (like CEP), but regular players as well. builders will have the required knowledge to disable the PrC should they decide to add CCP to their module but do not like the classes. players who do wish to play these PrC in downloaded modules might not possess that knowledge.



               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #200 on: April 06, 2014, 05:20:46 pm »


               

Assuming you really want to enable those classes, I don't think you really have a choice except to go with option 2 as you can't realistically enable the PrCs otherwise.


 




But basically it matches with the PRC implementation (Shou) except its all hardcoded into engine. Also there is an undocumented feature that upon taking Shou Disciple, the monk's AC continue to work with light armor, but there might be much more.




 


I think the monk AC with light armor is intended for whatever it's worth.


 


One question I would have is whether the "Martial Flurry" simply adds an extra attack for -2 across the board or if also changes the progression to -3 instead of -5.  In other words, would a Fighter/WM/Shou get 18/15/12/9/6/3/0/18 (in terms of BAB progression at level 20) with a Greatsword?  It says "any weapon," so...


 


And yeah, Flurry is selectable.


 


Do you have notes for your implementation of Eye of Gruumsh?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #201 on: April 06, 2014, 06:14:48 pm »


               

My implementation of Eye of the Gruumsh comes from description (line 110690 in dialog.tlk). The feats were already there only unused and unset, but I had to create a two spells, one for Command Horde and second for the Blinding Spittle.


 


He gets the normal barbarian rage feats - and I believe this is intented - as there were no unused feats for this. And the Swing Blindly feat is coded into standard barbarian rage script (which unfortunately means that this wont work in a modules where a nonstandard barbarian rage script is present - I havent thought of this, might be possible to get around this via making the feat selectable triggering new spell instead.)



               
               

               
            

Legacy_Bogdanov89

  • Full Member
  • ***
  • Posts: 155
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #202 on: April 12, 2014, 04:16:01 am »


               

A rather silly question: where can i download all the latest NWN mods you (ShadoOoW) have made for NWN?


 


I know where to find the latest RC4 patch, but i do not know where to find the latest versions of the other mods you have made (like the 50%/75% empower/maximize mod)?


 


Thanks for helping out.


 


edit: Also is the RC5 coming out anytime soon?



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #203 on: April 12, 2014, 02:38:34 pm »


               


A rather silly question: where can i download all the latest NWN mods you (ShadoOoW) have made for NWN?


 


I know where to find the latest RC4 patch, but i do not know where to find the latest versions of the other mods you have made (like the 50%/75% empower/maximize mod)?


 


Thanks for helping out.




All my work at old vault: LINK. (Not what you are looking for, only for a showcase)


All my newer work is on new vault: LINK.


 



 


 


edit: Also is the RC5 coming out anytime soon?



Next version will be final 1.71. Im waiting for finishing the russian texts corrections from one of the external volunteer, but hes quite busy lately...


               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #204 on: April 16, 2014, 02:51:28 pm »


               

Can you fix the TakeNumItems function in nw_i0_plot so it can handle stacks. According to the Lexicon, its broken. While the function isn't used by any core BioWare scripts, it would be nice to have a function that doesn't destroy an entire stack of items when you just want to take one item from the stack.


 


The code currently looks like: 



//:: TakeNumItems
//////////////////////////////////////////////////
//
//  TakeNumItems
//
//////////////////////////////////////////////////
//
//
// Takes the number of items specified from the target.
//
//////////////////////////////////////////////////
//
//  Created By: John
//  Created On: September 19, 2001
//
//////////////////////////////////////////////////
void TakeNumItems(object oTarget,string sItem,int nNumItems)
{
    int nCount = 0;
    object oItem = GetFirstItemInInventory(oTarget);
 
    while (GetIsObjectValid(oItem) == TRUE && nCount < nNumItems)
    {
        if (GetTag(oItem) == sItem)
        {
            ActionTakeItem(oItem,oTarget);
            nCount++;
        }
        oItem = GetNextItemInInventory(oTarget);
    }
 
   return;
}

It should look like (the fixed version from my module):



//:: TakeNumItems
//////////////////////////////////////////////////
//
//  TakeNumItems
//
//////////////////////////////////////////////////
//
//
// Takes the number of items specified from the target.
//
//////////////////////////////////////////////////
//
//  Created By: John
//  Created On: September 19, 2001
//
//////////////////////////////////////////////////
void TakeNumItems(object oTarget,string sItem,int nNumItems)
{
    int nCount = 0;
    object oItem = GetFirstItemInInventory(oTarget);
 
    while (GetIsObjectValid(oItem) == TRUE && nCount < nNumItems)
    {
        if (GetTag(oItem) == sItem)
        {
            if (GetItemStackSize(oItem) > 1)
            {
                SetItemStackSize(oItem, GetItemStackSize(oItem) -1);
            }
            else
            {
                ActionTakeItem(oItem,oTarget);
            }
            nCount++;
        }
        oItem = GetNextItemInInventory(oTarget);
    }
 
   return;
}


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #205 on: April 16, 2014, 03:18:32 pm »


               

definitely, btw the russian corrections are done, im compiling the installer now, next release is now very close



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #206 on: April 16, 2014, 04:42:25 pm »


               

x0_i0_treasure - the lance which was added in v1.69 was never defined as a baseitem for this include in the functions CTG_GetIsWeapon() and CTG_GetIsMeleeWeapon(). Lances do not behave properly when using the alternate BioWare treasure system (XP1 Loot Containers).


 


The affected scripts (for compiling the corrected functions) are: 


 


Searching for: x0_i0_treasure

 

nw_c2_default9.nss(31): #include "x0_i0_treasure"

x0_c2_spwn_cowrd.nss(29): #include "x0_i0_treasure"

x0_c2_spwn_cres.nss(11): #include "x0_i0_treasure"

x0_c2_spwn_def.nss(28): #include "x0_i0_treasure"

x0_c2_spwn_defn.nss(29): #include "x0_i0_treasure"

x0_c2_spwn_lhig.nss(13): #include "x0_i0_treasure"

x0_c2_spwn_llow.nss(13): #include "x0_i0_treasure"

x0_c2_spwn_lmed.nss(13): #include "x0_i0_treasure"

x0_c2_spwn_luni.nss(13): #include "x0_i0_treasure"

x0_c2_spwn_rang.nss(29): #include "x0_i0_treasure"

x0_i0_deckmany.nss(18): #include "x0_i0_treasure"

x0_o2_anyhigh.nss(12): #include "x0_i0_treasure"

x0_o2_anylow.nss(12): #include "x0_i0_treasure"

x0_o2_anymed.nss(12): #include "x0_i0_treasure"

x0_o2_anyuniq.nss(12): #include "x0_i0_treasure"

x0_o2_armhigh.nss(12): #include "x0_i0_treasure"

x0_o2_armlow.nss(12): #include "x0_i0_treasure"

x0_o2_armmed.nss(12): #include "x0_i0_treasure"

x0_o2_armuniq.nss(12): #include "x0_i0_treasure"

x0_o2_bookhigh.nss(12): #include "x0_i0_treasure"

x0_o2_booklow.nss(12): #include "x0_i0_treasure"

x0_o2_bookmed.nss(12): #include "x0_i0_treasure"

x0_o2_bookuniq.nss(12): #include "x0_i0_treasure"

x0_o2_clthhigh.nss(12): #include "x0_i0_treasure"

x0_o2_clthlow.nss(12): #include "x0_i0_treasure"

x0_o2_clthmed.nss(12): #include "x0_i0_treasure"

x0_o2_clthuniq.nss(12): #include "x0_i0_treasure"

x0_o2_goldhigh.nss(12): #include "x0_i0_treasure"

x0_o2_goldlow.nss(12): #include "x0_i0_treasure"

x0_o2_goldmed.nss(12): #include "x0_i0_treasure"

x0_o2_mleehigh.nss(12): #include "x0_i0_treasure"

x0_o2_mleelow.nss(12): #include "x0_i0_treasure"

x0_o2_mleemed.nss(12): #include "x0_i0_treasure"

x0_o2_mleeuniq.nss(12): #include "x0_i0_treasure"

x0_o2_noamhigh.nss(12): #include "x0_i0_treasure"

x0_o2_noamlow.nss(12): #include "x0_i0_treasure"

x0_o2_noammed.nss(12): #include "x0_i0_treasure"

x0_o2_noamuniq.nss(12): #include "x0_i0_treasure"

x0_o2_potnhigh.nss(12): #include "x0_i0_treasure"

x0_o2_potnlow.nss(12): #include "x0_i0_treasure"

x0_o2_potnmed.nss(12): #include "x0_i0_treasure"

x0_o2_potnuniq.nss(12): #include "x0_i0_treasure"

x0_o2_ranghigh.nss(12): #include "x0_i0_treasure"

x0_o2_ranglow.nss(12): #include "x0_i0_treasure"

x0_o2_rangmed.nss(12): #include "x0_i0_treasure"

x0_o2_ranguniq.nss(12): #include "x0_i0_treasure"

x0_o2_weaphigh.nss(12): #include "x0_i0_treasure"

x0_o2_weaplow.nss(12): #include "x0_i0_treasure"

x0_o2_weapmed.nss(12): #include "x0_i0_treasure"

x0_o2_weapuniq.nss(12): #include "x0_i0_treasure"

Found 50 occurrence(s) in 50 file(s)

 

AND because the x0_i0_deckmany.nss is in that list:

 

Searching for: x0_i0_deckmany

 

x0_deck_hatch.nss(7): #include "x0_i0_deckmany"

x0_s3_deckavatar.nss(5): #include "x0_i0_deckmany"

x0_s3_deckmany.nss(14): See the library x0_i0_deckmany for how the individual cards

x0_s3_deckmany.nss(26): #include "x0_i0_deckmany"

Found 4 occurrence(s) in 4 file(s)

 

Can we fix these too?


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #207 on: April 16, 2014, 05:04:56 pm »


               

Ok, I looked at it. It might be better to use baseitems.2da lookup like I did in x2_inc_itemprop (for weapon boost spells to enable custom content weapons). This way it would accept all custom weapons like those from CEP?

 

btw, checked your code for TakeNumItems and corrected since you had a minor logical error there - it took always only one item from each stack it found causing a possible exit while it didnt removed all items it should have to.

 

this is the function prototype I added into CPP:



void TakeNumItems(object oTarget,string sItem,int nNumItems)
{
    int nCount = 0;
    object oItem = GetFirstItemInInventory(oTarget);

    while (GetIsObjectValid(oItem) == TRUE && nNumItems > 0)
    {
        if (GetTag(oItem) == sItem)
        {
            nCount = GetItemStackSize(oItem);
            if (nCount > 1 && nCount > nNumItems)//1.71: proper stacked items handling
            {
                SetItemStackSize(oItem, nCount-nNumItems);
                return;
            }
            else
            {
                ActionTakeItem(oItem,oTarget);
                nNumItems-= nCount;
            }
        }
        oItem = GetNextItemInInventory(oTarget);
    }

   return;
}


               
               

               


                     Modifié par Shadooow, 16 avril 2014 - 08:09 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #208 on: April 16, 2014, 05:56:08 pm »


               I think its better to use the 2da.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Community Patch discussion and development thread
« Reply #209 on: April 16, 2014, 07:51:13 pm »


               


I think its better to use the 2da.




Ok. This is it. I please for a revisit my code if I havent made any errors. I dont have a time for playtesting now.


btw, note I added helmet into armor category and fixed bug with no-ammo category - any thoughts?



// Check if the item's base type is a weapon
int CTG_GetIsWeapon(int nItemBaseType)//1.71: made the function custom content weapons compatible
{
 if(nItemBaseType == BASE_ITEM_INVALID)
 return FALSE;
return StringToInt(Get2DAString("baseitems","WeaponType",nItemBaseType)) > 0;
}

// Check if the item's base type is a weapon but not ammunition
int CTG_GetIsWeaponNoammo(int nItemBaseType)//1.71: fixed bug when bolt and bullet were omitted
{
    return ( CTG_GetIsWeapon(nItemBaseType)
             && nItemBaseType != BASE_ITEM_ARROW
             && nItemBaseType != BASE_ITEM_BOLT
             && nItemBaseType != BASE_ITEM_BULLET);
}

// Check if the item's base type is a ranged weapon
int CTG_GetIsRangedWeapon(int nItemBaseType)
{
    return (nItemBaseType == BASE_ITEM_DART
            || nItemBaseType == BASE_ITEM_GRENADE
            || nItemBaseType == BASE_ITEM_HEAVYCROSSBOW
            || nItemBaseType == BASE_ITEM_LIGHTCROSSBOW
            || nItemBaseType == BASE_ITEM_LONGBOW
            || nItemBaseType == BASE_ITEM_SHORTBOW
            || nItemBaseType == BASE_ITEM_SHURIKEN
            || nItemBaseType == BASE_ITEM_SLING
            || nItemBaseType == BASE_ITEM_THROWINGAXE);
}

// Check if the item's base type is a melee weapon
int CTG_GetIsMeleeWeapon(int nItemBaseType)//1.71: made the function custom content weapons compatible
{
    return !CTG_GetIsRangedWeapon(nItemBaseType) && CTG_GetIsWeapon(nItemBaseType);
}

// Check if the item's base type is armor
int CTG_GetIsArmor(int nItemBaseType)
{
    return (nItemBaseType == BASE_ITEM_ARMOR
            || nItemBaseType == BASE_ITEM_LARGESHIELD
            || nItemBaseType == BASE_ITEM_SMALLSHIELD
            || nItemBaseType == BASE_ITEM_TOWERSHIELD)
            || nItemBaseType == BASE_ITEM_HELMET;//1.71: added missing helmet
}

// Check if the item's base type is clothing
int CTG_GetIsClothing(int nItemBaseType)//1.71: any item that can be equipped into boot/arms/cloak/belt slot is now considered to be clothing
{
    string sSlot = Get2DAString("baseitems","EquipableSlots",nItemBaseType);
    return sSlot == "0x00004" //boots
        || sSlot == "0x00008" //gloves/bracers
        || sSlot == "0x00040" //cloak
        || sSlot == "0x00400"; //belt
}


               
               

               


                     Modifié par Shadooow, 16 avril 2014 - 07:51 .