Imladris production
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Imladris production

Le forum français de création de cartes et de mods pour Bataille pour la Terre du Milieu
 
AccueilRechercherDernières imagesS'enregistrerConnexion

 

 Creer un nouvel arbre des pouvoirs

Aller en bas 
AuteurMessage
cdd59554
Admin
cdd59554


Nombre de messages : 7235
Age : 31
Location : J'aime les abricots
Add-On : Oui
Date d'inscription : 16/01/2008

Creer un nouvel arbre des pouvoirs Empty
MessageSujet: Creer un nouvel arbre des pouvoirs   Creer un nouvel arbre des pouvoirs Icon_minitimeMer 24 Aoû - 23:49


Dans ce tuto, je vous expliquerai comment modifier completement l'arbre des pouvoirs pour une faction, sans perturber les autres factions (ainsi, vous pourrez sans probleme avoir deux factions avec les meme pouvoirs mais à des prix ou places différentes).

Tout d'abord, voici l'arbre que l'on veut créer avec les pouvoirs numérotés de 1 à 12 :

Code:
  1  2  3
4  5  6  7
  8  9  10
    11 12
Ils sont dans cet ordre dans le commandset qu'on vera plus loin.
Je vous conseille d'écrire quelque part l'ordre des pouvoirs sur l'arbre que vous prévoyez de faire


Dans le bloc PlayerTemplate de votre faction (dans playertemplate.ini), il y a 3 lignes qui déterminent l'arbre des pouvoirs :

Code:
   IntrinsicSciencesMP = truc
   SpellBookMp = bidule
   PurchaseScienceCommandSetMP = machin

IntrinsicSciencesMP correspond à une science qui est donnée dès le départ à la faction
SpellBookMp correspond au spellBook de la faction, c'est un objet invisible qui comprend tout les modules des pouvoirs de l'arbre
PurchaseScienceCommandSetMP correspond à ce qu'on appelle le "spellstore" (magasin à pouvoir) c'est juste un commandset qui détermine les boutons qui sont affiché quand on ouvre l'arbre des pouvoirs

On va commencer par créer de toutes nouvelles valeurs pour ces lignes et on créera, la science, le spellbook et le commandset du spellstore

Donc pour votre faction, modifiez ces 3 lignes comme ceci :
Code:
   IntrinsicSciencesMP       = SCIENCE_PERSO

   SpellBookMp         = SpellBookPerso

   PurchaseScienceCommandSetMP   = SpellStorePersoCommandSet

1 / les Sciences

Commencons par faire fonctionner la ligne IntrinsicSciencesMP = SCIENCE_PERSO, le jeu ne sais pas ce qu'est SCIENCE_PERSO donc on le crée :
Dans science.ini, copiez :
Code:
Science SCIENCE_PERSO
  PrerequisiteSciences = None
  SciencePurchasePointCost = 0
  IsGrantable = No
End

Il faudra aussi créer des sciences pour les 12 pouvoirs, donc copiez aussi a la suite :
Code:
Science SCIENCE_Pouvoir1
  PrerequisiteSciences = SCIENCE_PERSO
  SciencePurchasePointCost = 5
  SciencePurchasePointCostMP = 5
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir2
  PrerequisiteSciences = SCIENCE_PERSO
  SciencePurchasePointCost = 5
  SciencePurchasePointCostMP = 5
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir3
  PrerequisiteSciences = SCIENCE_PERSO
  SciencePurchasePointCost = 5
  SciencePurchasePointCostMP = 5
  IsGrantable = Yes
End

Science SCIENCE_Pouvoir4
  PrerequisiteSciences = SCIENCE_Pouvoir1
  SciencePurchasePointCost = 10
  SciencePurchasePointCostMP = 10
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir5
  PrerequisiteSciences = SCIENCE_Pouvoir1 OR SCIENCE_Pouvoir2
  SciencePurchasePointCost = 10
  SciencePurchasePointCostMP = 10
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir6
  PrerequisiteSciences = SCIENCE_Pouvoir2 OR SCIENCE_Pouvoir3
  SciencePurchasePointCost = 10
  SciencePurchasePointCostMP = 10
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir7
  PrerequisiteSciences =  SCIENCE_Pouvoir3
  SciencePurchasePointCost = 10
  SciencePurchasePointCostMP = 10
  IsGrantable = Yes
End

Science SCIENCE_Pouvoir8
  PrerequisiteSciences = SCIENCE_Pouvoir4 OR SCIENCE_Pouvoir5
  SciencePurchasePointCost = 15
  SciencePurchasePointCostMP = 15
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir9
  PrerequisiteSciences = SCIENCE_Pouvoir5 OR SCIENCE_Pouvoir6
  SciencePurchasePointCost = 15
  SciencePurchasePointCostMP = 15
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir10
  PrerequisiteSciences =  SCIENCE_Pouvoir6 OR SCIENCE_Pouvoir7
  SciencePurchasePointCost = 15
  SciencePurchasePointCostMP = 15
  IsGrantable = Yes
End

Science SCIENCE_Pouvoir11
  PrerequisiteSciences = SCIENCE_Pouvoir8 OR SCIENCE_Pouvoir9
  SciencePurchasePointCost = 25
  SciencePurchasePointCostMP = 25
  IsGrantable = Yes
End
Science SCIENCE_Pouvoir12
  PrerequisiteSciences =  SCIENCE_Pouvoir9 OR SCIENCE_Pouvoir10
  SciencePurchasePointCost = 25
  SciencePurchasePointCostMP = 25
  IsGrantable = Yes
End

Une petite explication s'impose : pour pouvoir débloquer un pouvoir sur l'arbre il faut parfois en avoir acheté un autre
La ligne PrerequisiteSciences décrit les pouvoirs pouvant débloquer l'achat d'un autre pouvoir
Ici j'ai mis l'ordre par défaut comme dans le jeu
Pour le pouvoir 12 par exemple, j'ai mis SCIENCE_Pouvoir9 OR SCIENCE_Pouvoir10, cela signifie que pour débloquer ce pouvoir il faut le pouvoir 9 OU le pouvoir 10
Remarquez que les pouvoirs 1, 2 et 3 sont débloquables dès le départ, donc la science requise est SCIENCE_PERSO, c'est a dire la science que l'on a déjà au départ

Si on avait retirer le OR, ca aurait fait PrerequisiteSciences = SCIENCE_Pouvoir9 SCIENCE_Pouvoir10, et alors le jeu aurait compris qu'il faut le pouvoir9 ET le pouvoir 10 pour débloquer le pouvoir 12.
Juste pour le fun, vous pouvez essayer de retirer les OR pour les sciences des pouvoirs 4 à 12 et alors pour pouvoir débloquer un pouvoir il faut avoir acheté les deux d'au dessus de lui au lieu d'un seul.

2 / Le spell book

C'est l'objet, invisible dans le jeu, qui sert a conserver les modules des pouvoirs (car pour fonctionner un pouvoir a besoin d'un ou plusieurs modules).
Tout se passe maintenant dans system.ini,

Commencons par créer notre spellbook : copiez ceci pour l'instant dans system.ini :
Code:
Object SpellBookPerso
  EditorSorting = SYSTEM
   
  ; *** ART Parameters ***
  Draw                = W3DDefaultDraw ModuleTag_01
  ;nothing
  End  ; Never drawn

  CommandSet          = SpellBookPersoCommandSet
  RadarPriority      = NOT_ON_RADAR
  KindOf              = SPELL_BOOK IMMOBILE IGNORES_SELECT_ALL INERT

;; MODULES DE POUVOIRS

End

vous voyez que j'ai mis un commentaire, c'est là qu'il faut placer les modules de pouvoir.

Là c'est très simple, il suffit de partir à la pêche aux modules : dans ce meme fichier system.ini, il y a les object EvilSpellBook et GoodSpellBook qui correspondent aux spellbook du mal et du bien. Dans ces objets, il suffit de copier les modules des pouvoirs que vous voulez, et de les coller dans votre spellbookperso à la place de mon commentaire.
N'oubliez pas de modules sinon le pouvoir dont le module est oublié ne fonctionnera pas.

comme vous l'avez sans doutes remaqué, dans mon spellbook perso il y a la ligne
Code:
CommandSet          = SpellBookPersoCommandSet

Le jeu ne sais pas encore ce qu'est SpellBookPersoCommandSet donc il faudra le créer

3 / les commandSet

Donc si vous avez bien suivi, il faut créer 2 commandset
- celui pour le spellstore qu'on a utilisé dans le player template : SpellStorePersoCommandSet
- et le commandset du spellbook : SpellBookPersoCommandSet

Allez maintenant dans commandset.ini,

commencez par remplir SpellBookPersoCommandSet comme ceci

Code:
CommandSet SpellBookPersoCommandSet
  1 = Command_SpellBookPouvoir1
  2 = Command_SpellBookPouvoir2
  3 = Command_SpellBookPouvoir3

  4 = Command_SpellBookPouvoir4
  5 = Command_SpellBookPouvoir5
  6 = Command_SpellBookPouvoir6
  7 = Command_SpellBookPouvoir7 
 
  8 = Command_SpellBookPouvoir8
  9 = Command_SpellBookPouvoir9
  10 = Command_SpellBookPouvoir10
 
  11 = Command_SpellBookPouvoir11
  12 = Command_SpellBookPouvoir12
End



Maintenant vous allez modifier chaque commandbutton de ce commandset par celui du pouvoir que vous avez choisi pour cette place
Pour connaitre la liste des commandbuttons des pouvoirs déjà existants, cherchez les commandset EvilSpellBookCommandSet et GoodSpellBookCommandSet qui contiennent les commandbuttons des pouvoirs du mal et du bien. Je vous les ai copié pour vous ici, il vous suffit de copier coller les commanbuttons des pouvoirs que vous avez choisis :
Code:
CommandSet EvilSpellBookCommandSet
   1 = Command_SpellBookTaint
   2 = Command_SpellBookEyeofSauron
   3 = Command_SpellBookBarricade
   4 = Command_SpellBookWarChant
   5 = Command_SpellBookPalantirVision
   6 = Command_SpellBookCrebain
   7 = Command_SpellBookCaveBats
   8 = Command_SpellBookBlight
   9 = Command_SpellBookChillWind

   10 = Command_SpellBookIndustry
   11 = Command_SpellBookDevastation      
   12 = Command_SpellBookUntamedAllegiance
   13 = Command_SpellBookArrowVolleyEvil
   14 = Command_SpellBookWildMenAllies
   15 = Command_SpellBookScavenger
   16 = Command_SpellBookEvilEyeofSauron   
   17 = Command_SpellBookSpiderlingAllies
   18 = Command_SpellBookFrozenLand
   19 = Command_SpellBookSnowbind
   
   20 = Command_SpellBookDarkness
   21 = Command_SpellBookAwakenWyrm
   22 = Command_SpellBookFreezingRain
   23 = Command_SpellBookFueltheFires
   24 = Command_SpellBookWatcherAlly
   25 = Command_SpellBookSummonGiants
   26 = Command_SpellBookSummonWights
   
   27 = Command_SpellBookBalrogAlly
   28 = Command_SpellBookRainOfFire
   29 = Command_SpellBookDragonAlly
   30 = Command_SpellBookDragonStrike
   31 = Command_SpellBookSummonShadeOfWolf
   32 = Command_SpellBookAvalanche
End
CommandSet GoodSpellBookCommandSet
   1 = Command_SpellBookHeal
   2 = Command_SpellBookElvenGifts
   3 = Command_SpellBookLoneTowerDwarf
   4 = Command_SpellBookEnshroudingMist
   5 = Command_SpellBookRallyingCall
   
   6 = Command_SpellBookTomBombadil
   7 = Command_SpellBookHobbitAllies
   8 = Command_SpellBookRebuild
   9 = Command_SpellBookArrowVolleyGood
   10 = Command_SpellBookElvenWood
   11 = Command_SpellBookDwarvenRiches
   12 = Command_SpellBookMenOfDaleAllies

   13 = Command_SpellBookCloudBreak
   14 = Command_SpellBookRohanAllies
   15 = Command_SpellBookDunedainAllies
   16 = Command_SpellBookEntAllies
   17 = Command_SpellBookEagleAllies
   18 = Command_SpellBookUndermine
   19 = Command_SpellBookBombard

   20 = Command_SpellBookArmyoftheDead
   21 = Command_SpellBookEarthquake
   22 = Command_SpellBookFlood
   23 = Command_SpellBookSunflare
   24 = Command_SpellBookCitadel
   
   25 = Command_SpellBookFarsight
End

Par exemple, j'en ai créé un pour ma faction, le voici :
Spoiler:

C'est tout pour ce premier commandset, mais le suivant est aussi chiant que facile à créer...
pour le second copiez ceci dans commandset.ini :
Code:
CommandSet SpellStorePersoCommandSet
  1 = Command_PurchaseSpellPouvoir1
  2 = Command_PurchaseSpellPouvoir2
  3 = Command_PurchaseSpellPouvoir3

  4 = Command_PurchaseSpellPouvoir4
  5 = Command_PurchaseSpellPouvoir5
  6 = Command_PurchaseSpellPouvoir6
  7 = Command_PurchaseSpellPouvoir7
 
  8 = Command_PurchaseSpellPouvoir8
  9 = Command_PurchaseSpellPouvoir9
  10 = Command_PurchaseSpellPouvoir10
 
  11 = Command_PurchaseSpellPouvoir11
  12 = Command_PurchaseSpellPouvoir12
End

Le probleme est que cette fois ci on ne va pas pouvoir utiliser les commandbutton déjà créés par EA, en effet dans commandbutton.ini si on en regarde un (vision d'isengard par exemple) :

Code:
CommandButton Command_PurchaseSpellPalantirVision
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBEvil_PalantirVision
    Science            = SCIENCE_PalantirVision
    TextLabel         = CONTROLBAR:PalantirVision
    DescriptLabel      = CONTROLBAR:TooltipPalantirVision
End

on voit qu'il y a SCIENCE_PalantirVision, mais on ne peut pas modifier cela sinon ca perturerait l'isengard qui utilisent déjà ce pouvoir.
Moi par exemple je le veux en pouvoir 1 pour ma faction, et bien je fais un copier coller et je modifie le nom et la science :

Citation :
CommandButton Command_PurchaseSpellPouvoir1
Command = PURCHASE_SCIENCE
ButtonBorderType = UPGRADE
ButtonImage = SBEvil_PalantirVision
Science = SCIENCE_Pouvoir1
TextLabel = CONTROLBAR:PalantirVision
DescriptLabel = CONTROLBAR:TooltipPalantirVision
End
comme ca le bouton garde les autres propriétés du bouton original, entre autre l'image et la description

Il suffit de faire cela pour chacun des 12 pouvoirs que vous souhaitez ajouter

Voila un exemple de ce que j'ai obtenu pour ma faction (dans commandbutton.ini) :
Code:
CommandButton Command_PurchaseSpellPouvoir1
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBEvil_PalantirVision
    Science            = SCIENCE_Pouvoir1
    TextLabel         = CONTROLBAR:PalantirVision
    DescriptLabel      = CONTROLBAR:TooltipPalantirVision
End
CommandButton Command_PurchaseSpellPouvoir2
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_Rebuild
    Science            = SCIENCE_Pouvoir2
    TextLabel         = CONTROLBAR:Rebuild
   DescriptLabel      = CONTROLBAR:TooltipRebuild
End
CommandButton Command_PurchaseSpellPouvoir3
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = KUChillWindIcon
    Science            = SCIENCE_Pouvoir3
    TextLabel         = CONTROLBAR:ChillWind
   DescriptLabel      = CONTROLBAR:TooltipChillWind
End
CommandButton Command_PurchaseSpellPouvoir4
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_ArrowVolley
    Science            = SCIENCE_Pouvoir4
    TextLabel         = CONTROLBAR:ArrowVolley
   DescriptLabel      = CONTROLBAR:TooltipArrowVolley
End

CommandButton Command_PurchaseSpellPouvoir5
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_ElvenWood
    Science            = SCIENCE_Pouvoir5
    TextLabel         = CONTROLBAR:ElvenWood
   DescriptLabel      = CONTROLBAR:TooltipElvenWood
End

CommandButton Command_PurchaseSpellPouvoir6
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBEvil_AwakenWyrm
    Science            = SCIENCE_Pouvoir6
    TextLabel         = CONTROLBAR:AwakenWyrm
   DescriptLabel      = CONTROLBAR:TooltipAwakenWyrm
End
CommandButton Command_PurchaseSpellPouvoir7
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_RallyingCall
    Science            = SCIENCE_Pouvoir7
    TextLabel         = CONTROLBAR:RallyingCall
    DescriptLabel      = CONTROLBAR:TooltipRallyingCall
End
CommandButton Command_PurchaseSpellPouvoir8
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_CloudBreak
    Science            = SCIENCE_Pouvoir8
    TextLabel         = CONTROLBAR:CloudBreak
   DescriptLabel      = CONTROLBAR:TooltipCloudBreak
End

CommandButton Command_PurchaseSpellPouvoir9
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_EagleAllies
    Science            = SCIENCE_Pouvoir9
    TextLabel         = CONTROLBAR:SummonEagleAllies
   DescriptLabel      = CONTROLBAR:TooltipSummonEagleAllies
End
CommandButton Command_PurchaseSpellPouvoir10
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBGood_Bombard
    Science            = SCIENCE_Pouvoir10
    TextLabel         = CONTROLBAR:Bombard
   DescriptLabel      = CONTROLBAR:TooltipBombard
End

CommandButton Command_PurchaseSpellPouvoir11
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = SBEvil_BalrogAlly
    Science            = SCIENCE_Pouvoir11
    TextLabel         = CONTROLBAR:SummonBalrog
   DescriptLabel      = CONTROLBAR:TooltipSummonBalrog
End

CommandButton Command_PurchaseSpellPouvoir12
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = KUShadeOfTheWolfIcon
    Science            = SCIENCE_Pouvoir12
    TextLabel         = CONTROLBAR:SummonShadeOfWolf
   DescriptLabel      = CONTROLBAR:TooltipSummonShadeOfWolf
End

Et voia c'est terminé pour les commandset c'est long (et encore, 5 minutes ca va...) mais c'était facile.

Il reste quand meme une derniere chose : les special power qui ne sont toujours pas reliés aux SCIENCE_PouvoirXX

4 / Les special powers :

allez dans specialpower.ini, il faut dire aux specialpower que nos sciences sont reliés à eux

par exemple j'ai utilisé le pouvoir de vision d'isengard en premier pouvoir :
je recherche le special power du pouvoir dans specialpower.ini,
comment je fais pour connaitre le nom du special power ? c'est très simple, dans mon SpellBookPersoCommandSet le commandbutton s'appelle Command_SpellBookPalantirVision, donc je cherche ceci dans commandbutton.ini et je tombe 2 lignes en dessous sur SpecialPower = SpellBookPalantirVision. C'est le nom du special power que je recherche dans specialpower.ini et dc'est aussi simple pour tout les autres.
Dans mon cas je trouve :
Code:
SpecialPower SpellBookPalantirVision
   Enum            = SPECIAL_SPELL_BOOK_PALANTIR_VISION
   Flags         = WATER_OK RESPECT_RECHARGE_TIME_DISCOUNT
   ReloadTime         = SPELL_RECHARGE_TIME_TIER_1 ; in milliseconds
   RadiusCursorRadius   = 300.0
   RequiredSciences      = SCIENCE_PalantirVision
   InitiateAtLocationSound      = SpellPalantirVision
End

Je vais juste ajouter ma science à la ligne des sciences requises pour le pouvoir, comme ceci :
Citation :
SpecialPower SpellBookPalantirVision
Enum = SPECIAL_SPELL_BOOK_PALANTIR_VISION
Flags = WATER_OK RESPECT_RECHARGE_TIME_DISCOUNT
ReloadTime = SPELL_RECHARGE_TIME_TIER_1 ; in milliseconds
RadiusCursorRadius = 300.0
RequiredSciences = SCIENCE_PalantirVision SCIENCE_Pouvoir1
InitiateAtLocationSound = SpellPalantirVision
End

Faites pareils pour les autres pouvoirs de SCIENCE_Pouvoir2, SCIENCE_Pouvoir3, etc.... jusqu'a SCIENCE_Pouvoir12

Une fois ceci terminé, sauvegardez, lancez le jeu et profitez de votre nouvel arbre des pouvoirs

Ceci vous a permis d'utiliser des pouvoirs déjà existants, mais comment faire pour ajouter des tout nouveaux pouvoirs ? la suite dans un prochain épisode tuto
Revenir en haut Aller en bas
cdd59554
Admin
cdd59554


Nombre de messages : 7235
Age : 31
Location : J'aime les abricots
Add-On : Oui
Date d'inscription : 16/01/2008

Creer un nouvel arbre des pouvoirs Empty
MessageSujet: Re: Creer un nouvel arbre des pouvoirs   Creer un nouvel arbre des pouvoirs Icon_minitimeJeu 25 Aoû - 1:12

Création de nouveaux pouvoirs pour l'arbre :

Finalement je n'aime pas trop l'ombre du loup comme pouvoir pour mon arbre. Et je vais la remplacer par une invocation de tornade.
Comme ce pouvoir n'existe pas dans d'autre faction, je vais m'inspirer du pouvoir de galadriel pour le créer.

On va commencer par le module
Voila le module de pouvoir de galadriel dont je vais m'inspirer :
Code:
   Behavior = OCLSpecialPower   ModuleTag_OCLSpawnTornado
      SpecialPowerTemplate   = SpecialPowerSpawnTornado
      OCL                  = SUPERWEAPON_SpawnTornado
      CreateLocation         = CREATE_AT_LOCATION
      AvailableAtStart      = Yes
   End
Entre autre je vais utiliser l'OCL (la grosse tornade)

Si je copie le module tel quel dans le spellbook ca ne fonctionnera pas, donc je vais aussi m'inspire d'un autre pouvoir d'invocation du spellbook (la plupart des pouvoirs du spellbook sont des onvocs de toute facon), par exemple celui ci :
Code:
   Behavior             = OCLSpecialPower ModuleTag_PalantirVision
      SpecialPowerTemplate = SpellBookPalantirVision
      OCL                  = SpecialPowerPalantirVision
      CreateLocation      = CREATE_AT_LOCATION
      AvailableAtStart    = No
      RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
      RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
   End

Donc je fais un copier coller de ce module dans mon SpellBookPerso, et je modifie les paramètres que je veux

Citation :
Behavior = OCLSpecialPower ModuleTag_Tornade
SpecialPowerTemplate = SpellBookTornade
OCL = SUPERWEAPON_SpawnTornado
CreateLocation = CREATE_AT_LOCATION
AvailableAtStart = No
RequirementsFilterMPSkirmish = SPELL_BOOK_REQUIREMENTS_FILTER
RequirementsFilterStrategic = SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC
End

Comme vous le voyez j'ai mis le nom d'un specialpower, mais qui n'existe pas SpellBookTornade, on va donc le créer dans specialpower.ini
Pour ce faire, je m'inspire a la fois du special power de galadriel pour certains paramètres, mais je ne le copie pas tel quel en changeant le nom, car sa structure n'est pas compatible avec les pouvoirs du spellbook, pour ca je m'inspire du special power d'un pouvoir du spellbook du meme type (ici une invocation)
donc je m'inspire du special power de galadriel pour les paramètres
Code:
SpecialPower SpecialPowerSpawnTornado
   Enum         = SPECIAL_SPAWN_TORNADO
   ReloadTime      = 300000 ; in milliseconds
   RadiusCursorRadius   = 70.0
   InitiateAtLocationSound   = TornadoSpawnMS
   ViewObjectRange = 400 // how far from hero the spell can be cast
End
ici j'utiliserai le son TornadoSpawnMS, le rayon du curseur 70.0 et le temps de recharge
On s'inspire aussi d'un pouvoir du spellbook, par exemple celui la, on en fait un copier coller :
Code:
SpecialPower SpellBookCaveBats
   Enum         = SPECIAL_SPELL_BOOK_CAVE_BATS
   Flags         = WATER_OK RESPECT_RECHARGE_TIME_DISCOUNT
   ReloadTime      = SPELL_RECHARGE_TIME_TIER_1 ; in milliseconds
   RadiusCursorRadius   = 75.0
   RequiredSciences      = SCIENCE_CaveBats
   InitiateAtLocationSound   = SpellCaveBats
End
Et on change les parametres que l'on veut comme ceci :
Citation :
SpecialPower SpellBookTornade
Enum = SPECIAL_SPELL_BOOK_CAVE_BATS
Flags = WATER_OK RESPECT_RECHARGE_TIME_DISCOUNT
RequiredSciences = SCIENCE_Pouvoir12
ReloadTime = 300000
InitiateAtLocationSound = TornadoSpawnMS
RadiusCursorRadius =70.0
End
J'ai changé la science en SCIENCE_Pouvoir12 j'ai je veux le pouvoir en place 12 a la place de mon invocation de l'ombre du loup,
mais si je voulais remplacer un autre pouvoir j'aurait mis son autre numero

Enfin, on doit modifier les commandset et les command button

J'ai choisis de créer 2 nouveaux commandbuttons, un pour les 2 commandset a modifier, modifions déjà les commandset
Citation :
CommandSet SpellBookPersoCommandSet
1 = Command_SpellBookPalantirVision
2 = Command_SpellBookRebuild
3 = Command_SpellBookChillWind

4 = Command_SpellBookArrowVolleyGood
5 = Command_SpellBookElvenWood
6 = Command_SpellBookAwakenWyrm
7 = Command_SpellBookRallyingCall

8 = Command_SpellBookCloudBreak
9 = Command_SpellBookEagleAllies
10 = Command_SpellBookBombard

11 = Command_SpellBookBalrogAlly
;12 = Command_SpellBookSummonShadeOfWolf
12 = Command_SpellBookTornade

End

CommandSet SpellStorePersoCommandSet
1 = Command_PurchaseSpellPouvoir1
2 = Command_PurchaseSpellPouvoir2
3 = Command_PurchaseSpellPouvoir3

4 = Command_PurchaseSpellPouvoir4
5 = Command_PurchaseSpellPouvoir5
6 = Command_PurchaseSpellPouvoir6
7 = Command_PurchaseSpellPouvoir7

8 = Command_PurchaseSpellPouvoir8
9 = Command_PurchaseSpellPouvoir9
10 = Command_PurchaseSpellPouvoir10

11 = Command_PurchaseSpellPouvoir11
;12 = Command_PurchaseSpellPouvoir12
12 = Command_PurchaseSpellTornade

End
J'ai juste commenté les lignes retirés comme ca si un jour je veux réutiliser l'ancien pouvoir, j'aurai juste a inverser les 2 lignes de commentaires (enfin bref m'voyez...)

Reste donc a créer Command_SpellBookTornade et Command_PurchaseSpellTornade

La encore, on va utiliser le bouton de galadriel pour récuperer les images, les textes, etc... mais sans pour autant utiliser directement le bouton (sinon ca ne marcherai pas), pour ça on utilise encore des boutons du spellbook et du spellstore que l'on copier/colle/modifie.

On va donc s'inspirer du commandbutton de galadriel :
Code:
CommandButton Command_SpecialPowerSpawnTornado
   Command         = SPECIAL_POWER
    SpecialPower      = SpecialPowerSpawnTornado
    ButtonImage         = HSGaladriel_NaturesWrath
   Options         = NEED_TARGET_POS
   TextLabel      = CONTROLBAR:GaladrielTornado
   ButtonBorderType   = ACTION
   DescriptLabel      = CONTROLBAR:TooltipGaladrielTornado
   RadiusCursorType       = NaturesWrathRadiusCursor
   InPalantir      = Yes
End
, on retient les lignes du ButtonImage (l'image), TextLabel (le titre), DescriptLabel (la description), et RadiusCursorType (ll'image du curseur)

Pour le commandbutton du spellstore, je copie/colle/modifie juste le bouton déjà créé :
Code:
CommandButton Command_PurchaseSpellPouvoir12
   Command            = PURCHASE_SCIENCE
   ButtonBorderType   = UPGRADE
    ButtonImage         = KUShadeOfTheWolfIcon
    Science            = SCIENCE_Pouvoir12
    TextLabel         = CONTROLBAR:SummonShadeOfWolf
   DescriptLabel      = CONTROLBAR:TooltipSummonShadeOfWolf
End
Donc je fait un copier/coller et je modifie en :
Citation :
CommandButton Command_PurchaseSpellTornade
Command = PURCHASE_SCIENCE
ButtonBorderType = UPGRADE
ButtonImage = HSGaladriel_NaturesWrath
Science = SCIENCE_Pouvoir12
TextLabel = CONTROLBAR:GaladrielTornado
DescriptLabel = CONTROLBAR:TooltipGaladrielTornado
End

remarquez que je n'ai pas touché au SCIENCE_Pouvoir12 puisque la tornade est sencé remplacer l'invoc du loup

Enfin, le commandbutton du spellbook, on s'inspire de n'importe quel invoc du spellbook pour avoir la structure générale du commandbutton, et on modifie les paramètres.
Par exemple :
Code:
CommandButton Command_SpellBookTomBombadil
   Command            = SPELL_BOOK
    SpecialPower      = SpellBookTomBombadil
   Options            = NEED_TARGET_POS
   TextLabel         = CONTROLBAR:SummonTomBombadil
    ButtonImage         = SBGood_TomBombadil
   ButtonBorderType   = ACTION
   DescriptLabel      = CONTROLBAR:TooltipSummonTomBombadil
   RadiusCursorType   = TomBombadilRadiusCursor   
End

Je fais un copier coller et je modifie :
Citation :
CommandButton Command_SpellBookTornade
Command = SPELL_BOOK
SpecialPower = SpellBookTornade
ButtonImage = HSGaladriel_NaturesWrath
Options = NEED_TARGET_POS
TextLabel = CONTROLBAR:GaladrielTornado
ButtonBorderType = ACTION
DescriptLabel = CONTROLBAR:TooltipGaladrielTornado
RadiusCursorType = NaturesWrathRadiusCursor
End

Et voilà, on a remplacé le pouvoir.
Vous voyez que faire des modifs d'ini c'est juste de copier des trucs dejà existant et de modifier les paramètres
Revenir en haut Aller en bas
cdd59554
Admin
cdd59554


Nombre de messages : 7235
Age : 31
Location : J'aime les abricots
Add-On : Oui
Date d'inscription : 16/01/2008

Creer un nouvel arbre des pouvoirs Empty
MessageSujet: Re: Creer un nouvel arbre des pouvoirs   Creer un nouvel arbre des pouvoirs Icon_minitimeJeu 25 Aoû - 1:20

Bonus rien que pour toi qui est arrivé au bout du tuto : les screens de mon arbre et du nouveau pouvoir Smile

Spoiler:
Revenir en haut Aller en bas
Contenu sponsorisé





Creer un nouvel arbre des pouvoirs Empty
MessageSujet: Re: Creer un nouvel arbre des pouvoirs   Creer un nouvel arbre des pouvoirs Icon_minitime

Revenir en haut Aller en bas
 
Creer un nouvel arbre des pouvoirs
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Arbre des pouvoirs-lavywar (+ Mini tuto FXParticleSystem)
» Créer un héros : Pouvoirs
» [Pouvoirs] Remplacer et ajouter des pouvoirs
» Les Pouvoirs...
» Pouvoirs

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Imladris production :: Ini codes et .str :: Tutoriaux-
Sauter vers: