Bafor Moddeur confirmé


Nombre de messages: 266 Age: 16 Add-On: Oui Date d'inscription: 08/05/2009
 | Sujet: Donner plus de sort a son Heros Mar 4 Aoû - 11:22 | |
| Bonjour, pour l'instant, l'incontesté maitre CDD avais trouver les moyen de donner a votre heros 18 specialpower. Les bouttons apparaissait autour du heros, ce qui ne facilité pas la maitrise et ça faisait plutot moche. Il avait ameliorée son systeme garce a une commande nommée "Dozer" et qui se met dans le kindof, les bouton apparaissait maintenant a droite comme pour les batisseur, il était donc resté a 18 specialpower. J'ais chercher le moyen de mètre tout les boutons dans le palantir, et après de nombreus echecs, Cdd m'as mis sur une piste. j'était demoralisé, je n'ais donc pas tester son idée, puis un jour, je suis tombé dans le code d'une forge avec l'amélioration des batiments, qui faisait changer de commandset, c'était là que cdd avait trouver le code qu'il m'avais proposer, je m'y suis donc remis. Le commandset était notre plus grande limite, puisqu'il ne permétait qu'un nombre limité de commanbuton. En trouvant le moyen de fair changer le command set selon nos envis, je debloquais l'infinité de specialpower. Faire marcher ce code fut, bien que long, plutôt simple. Mais j'ais très vite rencontrer un nouveau problème, les upgrade ne pouvait pas s'aquerir sur un heros. Nous avons chercher, oui je dit nous car jolaerpitola et cdd était de la partie, mais n'avons pas trouver. Puis IL est arrivé, le geni du upgrade, le professionnel de l'evolution des object, vous aurez deviné que je parle de Leo11, que je remerci du font du coeur. Le nouveau systeme de selection de sort est desormait prèt. Un grand merci donc a ceux qui m'on aidés dans mes recherche : cdd59554, Jolaerpitola, Gardien-Elfe et Leo11!Dans cet exemple, nous auron accet a 25 sort. Bute : Le principe consiste a permetre a un object de changer de commandset au desir du joueur et ainsit permetre de cliquer sur une infinitée de bouton. Fichier requis : -Un object (moi j'ais choisis mon heros "Bafor.ini"(fichier que j'ais créer depuis un bon moment^^")) -Upgrade -CommandButon -CommandSet I. Les CommandSet:Nous allons commencer par Créer les CommandSet. | Code: | CommandSet MenuCommandSet 1 = Command_ToggleStance 2 = Command_Section2CommandSet 3 = Command_Section1CommandSet 4 = Command_Section3CommandSet 5 = Command_Section4CommandSet 6 = Command_Section5CommandSet 12 = Command_CaptureBuilding 13 = Command_AttackMove 14 = Command_Stop 16 = Command_SetStanceBattle 17 = Command_SetStanceAggressive 18 = Command_SetStanceHoldGround End
CommandSet Section1CommandSet 1 = ;sort1 2 = ;sort2 3 = ;sort3 4 = ;sort4 5 = ;sort5 6 = Command_MenuCommandSet End
CommandSet Section2CommandSet 1 = ;sort6 2 =; sort7 3 = ;sort8 4 = ;sort9 5 = ;sort10 6 = Command_MenuCommandSet End
CommandSet Section3CommandSet 1 = ;sort11 2 = ;sort12 3 = ;sort13 4 = ;sort14 5 = ;sort15 6 = Command_MenuCommandSet End
CommandSet Section4CommandSet 1 = ;sort16 2 = ;sort17 3 = ;sort18 4 = ;sort19 5 = ;sort20 6 = Command_MenuCommandSet End
CommandSet Section5CommandSet 1 = ;sort21 2 = ;sort22 3 = ;sort23 4 = ;sort24 5 = ;sort25 6 = Command_MenuCommandSet End |
II. Les CommandButton : Maintenant, il faut créer les command buton que l'on a mis dans les commandset
| Code: | CommandButton Command_MenuCommandSet Command = OBJECT_UPGRADE = Options = OK_FOR_MULTI_SELECT Upgrade = Upgrade_MenuCommandSet TextLabel = CONTROLBAR:RadialBack ButtonImage = UCCommon_BackArrow ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipCommandRadialBack Radial = No InPalantir = Yes End
CommandButton Command_Section1CommandSet Command = OBJECT_UPGRADE Upgrade = Upgrade_Section1CommandSet TextLabel = CONTROLBAR:PurchaseTechnologyElvenBasicTraining ButtonImage = BEEregionForge_BannerCarrier ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipPurchaseTechnologyElvenBasicTraining Radial = No InPalantir = Yes End
CommandButton Command_Section2CommandSet Command = OBJECT_UPGRADE Upgrade = Upgrade_Section2CommandSet TextLabel = CONTROLBAR:PurchaseTechnologyElvenBasicTraining ButtonImage = BEElvenBarracks_LorienWarrior ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipPurchaseTechnologyElvenBasicTraining Radial = no InPalantir = Yes End
CommandButton Command_Section3CommandSet Command = OBJECT_UPGRADE Upgrade = Upgrade_Section3CommandSet TextLabel = CONTROLBAR:PurchaseTechnologyElvenBasicTraining ButtonImage = BGFortress_BoilingOil ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipPurchaseTechnologyElvenBasicTraining Radial = no InPalantir = Yes End
CommandButton Command_Section4CommandSet Command = OBJECT_UPGRADE Upgrade = Upgrade_Section4CommandSet TextLabel = CONTROLBAR:PurchaseTechnologyElvenBasicTraining ButtonImage = SBEvil_SummonSpiderlings ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipPurchaseTechnologyElvenBasicTraining Radial = no InPalantir = Yes End
CommandButton Command_Section5CommandSet Command = OBJECT_UPGRADE Upgrade = Upgrade_Section5CommandSet TextLabel = CONTROLBAR:PurchaseTechnologyElvenBasicTraining ButtonImage = BWTreasureTrove_PoisonBlades ButtonBorderType = UPGRADE DescriptLabel = CONTROLBAR:ToolTipPurchaseTechnologyElvenBasicTraining Radial = no InPalantir = Yes End |
A vous d'ajuster le buttonImage, TextLabel et DescriptLabel a votrze convenance, je n'ais pas pris soin de prendre des option secondair de ce type, sauf pour le retou au menu.
III. Les Upgrade : Vous aurez remarquer, que les commandbutton attribu des upgrade, il nous faut donc les créer, ce sera rapide car ils n'ont rien de particuliers.
| Code: | Upgrade Upgrade_MenuCommandSet Type = OBJECT End Upgrade Upgrade_Section1CommandSet Type = OBJECT End Upgrade Upgrade_Section2CommandSet Type = OBJECT End Upgrade Upgrade_Section3CommandSet Type = OBJECT End Upgrade Upgrade_Section4CommandSet Type = OBJECT End Upgrade Upgrade_Section5CommandSet Type = OBJECT End |
IV. Les Moduls dans l'oject : Maintenant, il faut donner dans l'object, l'effet produit par l'obtention des upgrade, et aussi faire en sorte que lorsqu'un upgrade est activé, les autre soit desactivé. Mettez en dessous des autre behavior (dans ENGINEERING Parameters)
| Code: | Behavior = CommandSetUpgrade ModueTag_MenuCommandSet TriggeredBy = Upgrade_MenuCommandSet CommandSet = MenuCommandSet End Behavior = RemoveUpgradeUpgrade MenuCommandSet TriggeredBy = Upgrade_MenuCommandSet UpgradeToRemove = Upgrade_Section1CommandSet Upgrade_Section2CommandSet Upgrade_Section3CommandSet Upgrade_Section4CommandSet Upgrade_Section5CommandSet End Behavior = CommandSetUpgrade ModueTag_Section1CommandSet TriggeredBy = Upgrade_Section1CommandSet CommandSet = Section1CommandSet End Behavior = RemoveUpgradeUpgrade Section1CommandSet TriggeredBy = Upgrade_Section1CommandSet UpgradeToRemove = Upgrade_MenuCommandSet Upgrade_Section2CommandSet Upgrade_Section3CommandSet Upgrade_Section4CommandSet Upgrade_Section5CommandSet End
Behavior = CommandSetUpgrade ModueTag_Section2CommandSet TriggeredBy = Upgrade_Section2CommandSet CommandSet = Section2CommandSet End Behavior = RemoveUpgradeUpgrade Section2CommandSet TriggeredBy = Upgrade_Section2CommandSet UpgradeToRemove = Upgrade_MenuCommandSet Upgrade_Section1CommandSet Upgrade_Section3CommandSet Upgrade_Section4CommandSet Upgrade_Section5CommandSet End
Behavior = CommandSetUpgrade ModueTag_Section3CommandSet TriggeredBy = Upgrade_Section3CommandSet CommandSet = Section3CommandSet End Behavior = RemoveUpgradeUpgrade Section3CommandSet TriggeredBy = Upgrade_Section3CommandSet UpgradeToRemove = Upgrade_MenuCommandSet Upgrade_Section2CommandSet Upgrade_Section1CommandSet Upgrade_Section4CommandSet Upgrade_Section5CommandSet End
Behavior = CommandSetUpgrade ModueTag_Section4CommandSet TriggeredBy = Upgrade_Section4CommandSet CommandSet = Section4CommandSet End Behavior = RemoveUpgradeUpgrade Section4CommandSet TriggeredBy = Upgrade_Section4CommandSet UpgradeToRemove = Upgrade_MenuCommandSet Upgrade_Section2CommandSet Upgrade_Section3CommandSet Upgrade_Section1CommandSet Upgrade_Section5CommandSet End
Behavior = CommandSetUpgrade ModueTag_Section5CommandSet TriggeredBy = Upgrade_Section5CommandSet CommandSet = Section5CommandSet End Behavior = RemoveUpgradeUpgrade Section5CommandSet TriggeredBy = Upgrade_Section5CommandSet UpgradeToRemove = Upgrade_MenuCommandSet Upgrade_Section2CommandSet Upgrade_Section3CommandSet Upgrade_Section4CommandSet Upgrade_Section1CommandSet End |
Mais là, misterieusement, votre heros ne peut pas encor obtenir d'upgrade, pour rendre cela possible, vous devez mètre le code suivant (au mème endrois dans l'object, metez le après les codes que l'on vien de mètre comme ça on est sur ):
| Code: | AddModule Behavior = ProductionUpdate ProductionUpdateDonnelupgradebonsang GiveNoXP = Yes End End |
Maintenant, remonter dans l'object, jusqu'a la ligne : "commandset = "et mettez MenuCommandSet
Et voila, ça devrais marcher, s'il y a un problème, venez en parler dans la section discution ini et code, sur le topic "nouveau systeme de selection de sort" Grace a la mème technique, vous pouvez fair un system de defilement a la place de de système de menu.
Codes a Retenir :
1 - Il permet de donner des upgrade a un object :
| Code: | AddModule Behavior = ProductionUpdate ProductionUpdateblablabla GiveNoXP = Yes End End |
2 - Il permet de faire changer de commandset :
| Code: | Behavior = CommandSetUpgrade ModueTag_Section5CommandSet TriggeredBy = ??? ;Nom de l'upgrade qui declenche le changement de commandset CommandSet = ??? ;Nom du nouveau commandset End |
3 - Il permet d'enlever des upgrade :
| Code: | Behavior = RemoveUpgradeUpgrade Section4CommandSet TriggeredBy = ??? ;Nom de l'upgrade qui declenche la supression des upgrade UpgradeToRemove = ??? ;Nom du ou des upgrade qui sont enlevés End |
Autre detail, ne laisser pas de vide dans vos section, si vous colez simplement mon code, vous aurez un gamecrash, soit vous metez une commande a chaque place, soit vous suprimez la ligne vide tout simplement. Exemple, dans la section deux, je n'ais que 4 sorts a metre, et bien je ne laisse pas ainsi ma ligne 5: " 5 = ;sort10", je l'efface tous simplement._________________ Bafor, une flêche un mort! |
|