Cnr Et lag

Répondre
Partager Rechercher
J'ai remarque que le cnr 3.05 lagger beaucoup et surtout lors de l'activation d'un menu.

Maintenant ce menu affiche uniquement ce que tu est capable de faire. Par contre cela provoque une charge proc 100% pendant 1s a l'activation.

Par contre avant le menu affichais tous ce qui était possible de faire avec le placable et ne provoquer pas de lag. Et il possible de remettre l'ancien système de menu qui et moins beau mais qui provoque moins de lag sur le nouveaux cnr3.05.

Moi et les script ca fait deux et je ne voit pas trop ou ce passe le traitement pour savoir si on a les capacité a faire l'objet.

Merci de votre aide.
Alors pour ce lag tu vas dans le cnr_config_inc (de mémoire, mais Festyxx en parle dans son Readme - fo pas le jeter celui la !!) et tu enlèves l'option de chargement de toutes les constantes au démarrage. (remplace le TRUE par FALSE) Tu compiles tout le module (Faire créer module) et le tour est joué.

Sinon, qd tu auras + d'expérience, tu gèreras le CNR directement avec la database MySQL et la le lag, tu ne l'auras plus du tout.

Prince
Oups, j'ai honte, je remonte un post oublié... Dsl...

Bon, on avait 0 lag avec CNR et DB de bioware et là, le mod doit en avoir plein la gueule et lagg méchant dès qu'il y a un accès à la DB par le CNR.

On va donc passé sous NWNX2. Par contre, prince, tu dis que c'est pas très simple. Il me samblait qu'on avait que le fichier de persist_inc a modifier. C'est plus compliqué ou y'a que ça en dehors de l'install de nwnx2?
Oui incroyablement plus compliqué ! Il te faudra remplir tous les champs dans les tables recipe etc... Soit plus de 1000 champs à remplir avec pour chacun les détails des mélanges amenant à la création de l'objet.

Festyxx dit qu'il est en train de développer un soft pour le faire donc attends sa sortie mais en tous cas, ce sera un travail de longue haleine.

Prince
J'ai exactement le meme problème est avant s'en parler je cherché d'où cela pouvais venir sans succés Nexus tu parle de changer une ligne dans ce scrypt. mais la quel exactement?


Code PHP:


/*** This file has been processed using FF_Translator 1.2 (c) 2003 FastFrench ***/
/////////////////////////////////////////////////////////
//
//  Craftable Natural Resources (CNR) by Festyx
//
//  Name:  cnr_config_inc
//
//  Desc:  General CNR configuration
//
//  Author: David Bobeck 22Mar03
//
/////////////////////////////////////////////////////////

/////////////////////////////////////
// Float version of d100().
// Range is 0.1 to 100.0 (in tenths)
/////////////////////////////////////
float cnr_d100(int nDice);
/////////////////////////////////////
float cnr_d100(int nDice)
{
  
float fAccum 0.0;
  
int n;
  for (
n=0n<nDicen++)
  {
    
fAccum += (IntToFloat(Random(1000)+1) / 10.0); // 0.1 - 100.0
  
}
  return 
fAccum;
}

// You can now add you own tradeskills!
// Each trackable tradeskill must have a unique ID.
// The default trade names are assigned when
// "cnr_trade_init" executes. If you add a new tradeskill,
// you should add a unique ID for it here. ID's in the
// range of 0 thru 99 are reserved for future updates to
// CNR. Builders should assign ID's starting at 101.
int CNR_TRADESKILL_NONE 0;
int CNR_TRADESKILL_SMELTING 1;
int CNR_TRADESKILL_WEAPON_CRAFTING 2;
int CNR_TRADESKILL_ARMOR_CRAFTING 3;
int CNR_TRADESKILL_ALCHEMY 4;
int CNR_TRADESKILL_SCRIBING 5;
int CNR_TRADESKILL_TINKERING 6;
int CNR_TRADESKILL_WOOD_CRAFTING 7// includes BOWERING, FLETCHING, CARPENTRY
int CNR_TRADESKILL_ENCHANTING 8;    // includes IMBUING
int CNR_TRADESKILL_GEM_CRAFTING 9;
int CNR_TRADESKILL_TAILORING 10;
int CNR_TRADESKILL_FOOD_CRAFTING 11;

// Define your tradeskills here starting at 101. Also define
// the display text for you tradeskills per instructions in
// "cnr_trade_init"
//int CNR_TRADESKILL_TRASH_COLLECTING = 101;

// Resource gathering not tied to a specific tradeskill
// HARVESTING
// ORE MINING
// GEM MINING
// LUMBERJACKING

// ore mining
float CNR_FLOAT_ORE_MINING_FIND_SECOND_NUGGET_PERCENTAGE 20.0;
float CNR_FLOAT_ORE_MINING_FIND_MYSTERY_MINERAL_PERCENTAGE 5.0;
float CNR_FLOAT_ORE_MINING_PICKAXE_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_ORE_MINING_DEPOSIT_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_ORE_MINING_DEPOSIT_RESPAWN_TIME_SECS 900.0// 15 mins real time

// forge operation
int CNR_BOOL_FORGES_REQUIRE_COAL TRUE;
float CNR_FLOAT_FORGE_COAL_BURN_TIME 60.0f// 1 min per nugget

// gem mining
float CNR_FLOAT_GEM_MINING_FIND_FIRST_MINERAL_PERCENTAGE 20.0;
float CNR_FLOAT_GEM_MINING_FIND_SECOND_MINERAL_PERCENTAGE 20.0;
float CNR_FLOAT_GEM_MINING_FIND_MYSTERY_MINERAL_PERCENTAGE 5.0;
float CNR_FLOAT_GEM_MINING_CHISEL_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_GEM_MINING_DEPOSIT_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_GEM_MINING_DEPOSIT_RESPAWN_TIME_SECS 900.0// 15 mins real time

// misc mining deposit (dug with shovel, ie: clay & sand)
float CNR_FLOAT_MISC_MINING_DEPOSIT_CHANCE_OF_SUCCESS_PERCENTAGE 40.0;
float CNR_FLOAT_MISC_MINING_DEPOSIT_SHOVEL_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_MISC_MINING_DEPOSIT_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_MISC_MINING_DEPOSIT_RESPAWN_TIME_SECS 900.0// 15 mins real time

// wood cutting
float CNR_FLOAT_WOOD_MINING_AXE_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_WOOD_MINING_TREE_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_WOOD_MINING_TREE_RESPAWN_TIME_SECS 900.0// 15 mins real time

// misc tool breakage
float CNR_FLOAT_SMITH_HAMMER_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_GEM_CRAFTERS_TOOLS_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_TINKERS_TOOLS_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_CARPS_TOOLS_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_SEWING_KIT_BREAKAGE_PERCENTAGE 0.2;

// plant/fruit respawns
float CNR_FLOAT_DEFAULT_PLANT_RESPAWN_TIME_SECS 300.0// 5 mins real time

// If TRUE, when a plant's fruit is harvested, the entire plant will disappear
// and respawn at a later time. If FALSE, when a plant's fruit is harvested,
// the plant will remain and only the fruit will respawn.
int CNR_BOOL_RESPAWN_PLANTS_NOT_FRUIT FALSE;

// game XP (not trade XP) awarded on recipe success
int CNR_BOOL_GAME_XP_SCALAR_ENABLED FALSE;
float CNR_FLOAT_GAME_XP_SCALAR 0.2;

// To enable the crafting of HCR items, set this flag to TRUE.
// Note: At this time, only cure potions and animal meat are supported.
// Note: CNR does not provide the blueprints for HCR items.
int CNR_BOOL_ENABLE_HCR_ITEM_CRAFTING FALSE;

// skinnable corpses
float CNR_FLOAT_SKINNABLE_CORPSE_FADE_TIME_SECS 300.0// 5 mins real time

// If you're a power builder/DM that uses APS/NWNX2 and would like to tweak recipes and
// reload them without restarting the mod, then you can set this flag to TRUE. CNR will
// create four related tables to hold the recipe data.
int CNR_BOOL_RECIPE_DATA_IS_PERSISTENT_IN_SQL_DATABASE FALSE;

// If you prefer to bypass the long delays associated with recipe initialization,
// you can set this flag to FALSE. ** WARNING ** This flag should be used during
// module development only as deferred initialization will have a one-time impact
// on each device when it is first used. When your module goes public, it's best to
// have the recipes initialize at module load so that players don't get subjected to
// unnecessary lag during game play.
int CNR_BOOL_INIT_RECIPES_ON_MODULE_LOAD TRUE;

// By default, spells defined as components in recipes will be decremented on both
// successful and failed crafting attempts. If, however, you would prefer that
// spells not be decremented on failed recipe attempts, then set this to TRUE.
int CNR_BOOL_DECREMENT_SPELLS_ON_SUCCESS_ONLY FALSE;

// If you prefer that the top ten lists are not dispayed by by trade journal,
// then set this to TRUE.
int CNR_BOOL_HIDE_TRADE_JOURNALS_TOP_TEN_LISTS FALSE;

// If you prefer that crafting convos only show satisfied recipes, then set this
// flag to TRUE. When TRUE, players will need to experiment to determine the
// components required to make a recipe. ** WARNING ** Filtering adds overhead.
// You will see some lag.
int CNR_BOOL_HIDE_UNSATISFIED_RECIPES_IN_CRAFTING_CONVOS FALSE;

// If you prefer that crafting convos hide recipes that are statistically impossible
// for the PC to make, then set this to TRUE. ** WARNING ** Filtering adds overhead.
// You will see some lag.
int CNR_BOOL_HIDE_IMPOSSIBLE_RECIPES_IN_CRAFTING_CONVOS TRUE
Moi g un prob avec le cnr de FF, je peux tout faire sans avoir la capacité, par ex l'autre jour j'ai fait un potion d'invisibilité et pourtant j''ai jamais fait aucune potion..et pis dans les dial y'a des trucs comme <UNCONIZED TOKEN> ou un truc du genre
Citation :
Provient du message de Euronism
Moi g un prob avec le cnr de FF, je peux tout faire sans avoir la capacité, par ex l'autre jour j'ai fait un potion d'invisibilité et pourtant j''ai jamais fait aucune potion..et pis dans les dial y'a des trucs comme <UNCONIZED TOKEN> ou un truc du genre
Le unconized Token c'est parce que tu n'a pas initialiser le cnr . Les quatre scipt a mettre dans les propriété du module.
c'est marquez sur doc world fournis avec quand tu décompressé alors voila ce qu'il dit:




dans propriété du module:

dans la case Onactivateitem tu mes le scypt cnr_module_onact

" Oncliententer " cnr_module_oce
" Onmoduleload " cnr_module_oml
" Onunaquireitem " cnr_module_oui





voila je pense que la c'est bon!!
Voila le script qu'il te faut pour éviter le lag :
Code PHP:

/*** This file has been processed using FF_Translator 1.2 (c) 2003 FastFrench ***/
/////////////////////////////////////////////////////////
//
// Craftable Natural Resources (CNR) by Festyx
//
// Name: cnr_config_inc
//
// Desc: General CNR configuration
//
// Author: David Bobeck 22Mar03
//
/////////////////////////////////////////////////////////

/////////////////////////////////////
// Float version of d100().
// Range is 0.1 to 100.0 (in tenths)
/////////////////////////////////////
float cnr_d100(int nDice);
/////////////////////////////////////
float cnr_d100(int nDice)
{
float fAccum 0.0;
int n;
for (
n=0n<nDicen++)
{
fAccum += (IntToFloat(Random(1000)+1) / 10.0); // 0.1 - 100.0
}
return 
fAccum;
}

// You can now add you own tradeskills!
// Each trackable tradeskill must have a unique ID.
// The default trade names are assigned when
// "cnr_trade_init" executes. If you add a new tradeskill,
// you should add a unique ID for it here. ID's in the
// range of 0 thru 99 are reserved for future updates to
// CNR. Builders should assign ID's starting at 101.
int CNR_TRADESKILL_NONE 0;
int CNR_TRADESKILL_SMELTING 1;
int CNR_TRADESKILL_WEAPON_CRAFTING 2;
int CNR_TRADESKILL_ARMOR_CRAFTING 3;
int CNR_TRADESKILL_ALCHEMY 4;
int CNR_TRADESKILL_SCRIBING 5;
int CNR_TRADESKILL_TINKERING 6;
int CNR_TRADESKILL_WOOD_CRAFTING 7// includes BOWERING, FLETCHING, CARPENTRY
int CNR_TRADESKILL_ENCHANTING 8// includes IMBUING
int CNR_TRADESKILL_GEM_CRAFTING 9;
int CNR_TRADESKILL_TAILORING 10;
int CNR_TRADESKILL_FOOD_CRAFTING 11;

// Define your tradeskills here starting at 101. Also define
// the display text for you tradeskills per instructions in
// "cnr_trade_init"
//int CNR_TRADESKILL_TRASH_COLLECTING = 101;

// Resource gathering not tied to a specific tradeskill
// HARVESTING
// ORE MINING
// GEM MINING
// LUMBERJACKING

// ore mining
float CNR_FLOAT_ORE_MINING_FIND_SECOND_NUGGET_PERCENTAGE 20.0;
float CNR_FLOAT_ORE_MINING_FIND_MYSTERY_MINERAL_PERCENTAGE 5.0;
float CNR_FLOAT_ORE_MINING_PICKAXE_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_ORE_MINING_DEPOSIT_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_ORE_MINING_DEPOSIT_RESPAWN_TIME_SECS 900.0// 15 mins real time

// forge operation
int CNR_BOOL_FORGES_REQUIRE_COAL TRUE;
float CNR_FLOAT_FORGE_COAL_BURN_TIME 60.0f// 1 min per nugget

// gem mining
float CNR_FLOAT_GEM_MINING_FIND_FIRST_MINERAL_PERCENTAGE 20.0;
float CNR_FLOAT_GEM_MINING_FIND_SECOND_MINERAL_PERCENTAGE 20.0;
float CNR_FLOAT_GEM_MINING_FIND_MYSTERY_MINERAL_PERCENTAGE 5.0;
float CNR_FLOAT_GEM_MINING_CHISEL_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_GEM_MINING_DEPOSIT_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_GEM_MINING_DEPOSIT_RESPAWN_TIME_SECS 900.0// 15 mins real time

// misc mining deposit (dug with shovel, ie: clay & sand)
float CNR_FLOAT_MISC_MINING_DEPOSIT_CHANCE_OF_SUCCESS_PERCENTAGE 40.0;
float CNR_FLOAT_MISC_MINING_DEPOSIT_SHOVEL_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_MISC_MINING_DEPOSIT_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_MISC_MINING_DEPOSIT_RESPAWN_TIME_SECS 900.0// 15 mins real time

// wood cutting
float CNR_FLOAT_WOOD_MINING_AXE_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_WOOD_MINING_TREE_BREAKAGE_PERCENTAGE 1.0;
float CNR_FLOAT_WOOD_MINING_TREE_RESPAWN_TIME_SECS 900.0// 15 mins real time

// misc tool breakage
float CNR_FLOAT_SMITH_HAMMER_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_GEM_CRAFTERS_TOOLS_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_TINKERS_TOOLS_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_CARPS_TOOLS_BREAKAGE_PERCENTAGE 0.2;
float CNR_FLOAT_SEWING_KIT_BREAKAGE_PERCENTAGE 0.2;

// plant/fruit respawns
float CNR_FLOAT_DEFAULT_PLANT_RESPAWN_TIME_SECS 300.0// 5 mins real time

// If TRUE, when a plant's fruit is harvested, the entire plant will disappear
// and respawn at a later time. If FALSE, when a plant's fruit is harvested,
// the plant will remain and only the fruit will respawn.
int CNR_BOOL_RESPAWN_PLANTS_NOT_FRUIT FALSE;

// game XP (not trade XP) awarded on recipe success
int CNR_BOOL_GAME_XP_SCALAR_ENABLED FALSE;
float CNR_FLOAT_GAME_XP_SCALAR 0.2;

// To enable the crafting of HCR items, set this flag to TRUE.
// Note: At this time, only cure potions and animal meat are supported.
// Note: CNR does not provide the blueprints for HCR items.
int CNR_BOOL_ENABLE_HCR_ITEM_CRAFTING FALSE;

// skinnable corpses
float CNR_FLOAT_SKINNABLE_CORPSE_FADE_TIME_SECS 300.0// 5 mins real time

// If you're a power builder/DM that uses APS/NWNX2 and would like to tweak recipes and
// reload them without restarting the mod, then you can set this flag to TRUE. CNR will
// create four related tables to hold the recipe data.
int CNR_BOOL_RECIPE_DATA_IS_PERSISTENT_IN_SQL_DATABASE FALSE;

// If you prefer to bypass the long delays associated with recipe initialization,
// you can set this flag to FALSE. ** WARNING ** This flag should be used during
// module development only as deferred initialization will have a one-time impact
// on each device when it is first used. When your module goes public, it's best to
// have the recipes initialize at module load so that players don't get subjected to
// unnecessary lag during game play.
int CNR_BOOL_INIT_RECIPES_ON_MODULE_LOAD FALSE;

// By default, spells defined as components in recipes will be decremented on both
// successful and failed crafting attempts. If, however, you would prefer that
// spells not be decremented on failed recipe attempts, then set this to TRUE.
int CNR_BOOL_DECREMENT_SPELLS_ON_SUCCESS_ONLY FALSE;

// If you prefer that the top ten lists are not dispayed by by trade journal,
// then set this to TRUE.
int CNR_BOOL_HIDE_TRADE_JOURNALS_TOP_TEN_LISTS FALSE;

// If you prefer that crafting convos only show satisfied recipes, then set this
// flag to TRUE. When TRUE, players will need to experiment to determine the
// components required to make a recipe. ** WARNING ** Filtering adds overhead.
// You will see some lag.
int CNR_BOOL_HIDE_UNSATISFIED_RECIPES_IN_CRAFTING_CONVOS FALSE;

// If you prefer that crafting convos hide recipes that are statistically impossible
// for the PC to make, then set this to TRUE. ** WARNING ** Filtering adds overhead.
// You will see some lag.
int CNR_BOOL_HIDE_IMPOSSIBLE_RECIPES_IN_CRAFTING_CONVOS TRUE
et voila !
Prince Nexus.
Si je me trompe pas, à part ça :
Citation :
int CNR_BOOL_INIT_RECIPES_ON_MODULE_LOAD = FALSE;
, tu n'as rien changé (et les XP game mais ça moi je le laisse )

N'as-tu pas peur par contre qu'en faisant ça, on génère un petit lag à chaque première création d'un recipe? A la limite, je prefere avoir 3 minutes de lag au lancement de mon serveur et après être tranquille non?
et bien mon module est en persistand role en permanence, est ca a l'aire de tres bien marcher il ne lague plus quand on ferme l'enclume apres y avoir mis, les ingrediens. merci merci merci merci
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés