Jump to content


Photo

Sciences (Spellbook Powers)


  • Please log in to reply
7 replies to this topic

#1 PNGmangi

PNGmangi
  • Members
  • 35 posts

Posted 09 May 2010 - 02:48 AM

Hey. I am trying to create a new option of powers for a map I am making but have no idea how. I tried reading tutorials but they are confusing. Is it just a matter of going:

CommandSet GondorSpellBookCommandSet_Override
1 = Command_SpellBookScavenger
2 = Command_SpellBookHeal
3 = Command_SpellBookElvenGift
4 = Command_SpellBookAnduril
5 = Command_SpellBookElvenAllies
6 = Command_SpellBookRohanAllies
7 = Command_SpellBookGandalftheWhite
8 = Command_SpellBookWarChant

???

Or is there more to it then that?

Any help would be much appreciated! :p

PNG Mangi

#2 Spartan184

Spartan184

    :)

  • Project Team
  • 1,592 posts
  • Location:Moon
  • Projects:Random Modding Projects
  •  Coder, Map.ini Coder, Mapper, and Beta Tester

Posted 09 May 2010 - 10:01 PM

Yes you would have to do more than that. Here I'll post a map.ini spell book code from a map, I believe the code is from a map called Gladiators :thumbsdownsmiley:
You would have to override the special powers and in the order you buy them.
CODE
CommandSet GondorSpellBookCommandSet_Override
1 = Command_SpellBookScavenger
2 = Command_SpellBookHeal
3 = Command_SpellBookDraft
4 = Command_SpellBookAnduril
5 = Command_SpellBookElvenAllies
6 = Command_SpellBookRohanAllies
7 = Command_SpellBookGandalftheWhite
8 = Command_SpellBookWarChant
End

CommandSet GondorSpellStoreCommandSet_Override
1 = Command_PurchaseSpellScavenger
2 = Command_PurchaseSpellHeal
3 = Command_PurchaseSpellDraft
4 = Command_PurchaseSpellAnduril
5 = Command_PurchaseSpellElvenAllies
6 = Command_PurchaseSpellRohanAllies
7 = Command_PurchaseSpellGandalftheWhite
8 = Command_PurchaseSpellWarChant
End

Object GondorSpellBook_Override
EditorSorting = SYSTEM

AddModule ModuleTag_01
Draw = W3DDefaultDraw ModuleTag_01
End
End

AddModule Whatever_Override
Behavior = ScavengerSpecialPower Whatever
SpecialPowerTemplate = SpellBookScavenger
BountyPercent = 15.0
AvailableAtStart = No
End
End

AddModule ModuleTag_Heal_Override
Behavior = PlayerHealSpecialPower ModuleTag_Heal
SpecialPowerTemplate = SpellBookHeal
HealAffects = INFANTRY CAVALRY MONSTER MACHINE
HealAmount = 1.0 ; 0.5 = half of maximum health
HealRadius = SPELL_HEAL_RADIUS_UNIT_SCAN
HealFX = FX_SpellHealUnitHealBuff ;FX_DefaultUnitHealBuff
; To replenish hordes a bit
HealOCL = OCL_HealSpellHordeReplenishPing
AvailableAtStart = No
End
End

AddModule SpellBookDraft_Draft_Override
Behavior = SpecialPowerModule SpellBookDraft_Draft
SpecialPowerTemplate = SpellBookDraft
AttributeModifier = SpellBookDraft
AttributeModifierRange = 999999
AttributeModifierAffects = ANY +SWARM_DOZER
AffectAllies = No ; Should not try to affect ally units
;AttributeModifierFX = FX_Draft now in SubObjectsUpgrade in the unit
UpdateModuleStartsAttack = No
AttributeModifierFX = FX_PeasantVoiceDraftUpgrade ;voice only
;InitiateSound = PeasantVoiceDraftUpgrade ;this didn't work
AvailableAtStart = No
End
End

AddModule ModuleTag_SpellBookAnduril_Override
Behavior = PlayerUpgradeSpecialPower ModuleTag_SpellBookAnduril
SpecialPowerTemplate = SpellBookAnduril
UpgradeName = Upgrade_Anduril
UpdateModuleStartsAttack = No
AffectAllies = No ; Should not try to affect ally units
AvailableAtStart = No
End
End

AddModule ModuleTag_SummonElves_Override
Behavior = OCLSpecialPower ModuleTag_SummonElves
SpecialPowerTemplate = SpellBookElvenAllies
OCL = OCL_SpawnElvenWarriorsEgg
TriggerFX = FX_ElvenAlliesSummon
CreateLocation = CREATE_AT_LOCATION
UpgradeName = Upgrade_ElvenAllies
AvailableAtStart = No
End
End

AddModule ModuleTag_SummonRohan_Override
Behavior = OCLSpecialPower ModuleTag_SummonRohan
SpecialPowerTemplate = SpellBookRohanAllies
OCL = OCL_SpawnRohanRohirrimEgg
TriggerFX = FX_RohirimSummon
CreateLocation = CREATE_AT_LOCATION
UpgradeName = Upgrade_RohanAllies
AvailableAtStart = No
End
End

AddModule ModuleTag_SpellBookGandalfWhite_Override
Behavior = PlayerUpgradeSpecialPower ModuleTag_SpellBookGandalfWhite
SpecialPowerTemplate = SpellBookGandalftheWhite
UpgradeName = Upgrade_GandalfWhite
UpdateModuleStartsAttack = No
AffectAllies = No ; Should not try to affect ally units
AvailableAtStart = No
End
End

AddModule SpellBookWarChant_ModuleTag_Override
Behavior = SpecialPowerModule SpellBookWarChant_ModuleTag
SpecialPowerTemplate = SpellBookWarChant
AttributeModifier = SpellBookWarChant
AttributeModifierRange = 999999
AttributeModifierAffects = ANY +HORDE +URUK -HERO
TriggerFX = FX_SpellWarChant
UpdateModuleStartsAttack = No
AvailableAtStart = No
End
End

CommandSet = GondorSpellBookCommandSet_Override
RadarPriority = NOT_ON_RADAR
KindOf = SPELL_BOOK IMMOBILE IGNORES_SELECT_ALL INERT
End

ChildObject GondorChildSpellBook_Override GondorSpellBook_Override
CommandSet = GondorSpellBookCommandSet_Override
End

PlayerTemplate FactionGondor
BuildableHeroesMP =
PurchaseScienceCommandSetMP = GondorSpellStoreCommandSet_Override
SpellBookMp = GondorSpellBook_Override
End

CommandSet RohanSpellBookCommandSet_Override
1 = Command_SpellBookScavenger
2 = Command_SpellBookHeal
3 = Command_SpellBookDraft
4 = Command_SpellBookAnduril
5 = Command_SpellBookElvenAllies
6 = Command_SpellBookRohanAllies
7 = Command_SpellBookGandalftheWhite
8 = Command_SpellBookWarChant
End

CommandSet RohanSpellStoreCommandSet_Override
1 = Command_PurchaseSpellScavenger
2 = Command_PurchaseSpellHeal
3 = Command_PurchaseSpellDraft
4 = Command_PurchaseSpellAnduril
5 = Command_PurchaseSpellElvenAllies
6 = Command_PurchaseSpellRohanAllies
7 = Command_PurchaseSpellGandalftheWhite
8 = Command_PurchaseSpellWarChant
End

Object RohanSpellBook_Override
EditorSorting = SYSTEM

AddModule ModuleTag_01
Draw = W3DDefaultDraw ModuleTag_01
End
End

AddModule Whatever_Override
Behavior = ScavengerSpecialPower Whatever
SpecialPowerTemplate = SpellBookScavenger
BountyPercent = 15.0
AvailableAtStart = No
End
End

AddModule ModuleTag_Heal_Override
Behavior = PlayerHealSpecialPower ModuleTag_Heal
SpecialPowerTemplate = SpellBookHeal
HealAffects = INFANTRY CAVALRY MONSTER MACHINE
HealAmount = 1.0 ; 0.5 = half of maximum health
HealRadius = SPELL_HEAL_RADIUS_UNIT_SCAN
HealFX = FX_SpellHealUnitHealBuff ;FX_DefaultUnitHealBuff
; To replenish hordes a bit
HealOCL = OCL_HealSpellHordeReplenishPing
AvailableAtStart = No
End
End

AddModule SpellBookDraft_Draft_Override
Behavior = SpecialPowerModule SpellBookDraft_Draft
SpecialPowerTemplate = SpellBookDraft
AttributeModifier = SpellBookDraft
AttributeModifierRange = 999999
AttributeModifierAffects = ANY +SWARM_DOZER
AffectAllies = No ; Should not try to affect ally units
;AttributeModifierFX = FX_Draft now in SubObjectsUpgrade in the unit
UpdateModuleStartsAttack = No
AttributeModifierFX = FX_PeasantVoiceDraftUpgrade ;voice only
;InitiateSound = PeasantVoiceDraftUpgrade ;this didn't work
AvailableAtStart = No
End
End

AddModule ModuleTag_SpellBookAnduril_Override
Behavior = PlayerUpgradeSpecialPower ModuleTag_SpellBookAnduril
SpecialPowerTemplate = SpellBookAnduril
UpgradeName = Upgrade_Anduril
UpdateModuleStartsAttack = No
AffectAllies = No ; Should not try to affect ally units
AvailableAtStart = No
End
End

AddModule ModuleTag_SummonElves_Override
Behavior = OCLSpecialPower ModuleTag_SummonElves
SpecialPowerTemplate = SpellBookElvenAllies
OCL = OCL_SpawnElvenWarriorsEgg
TriggerFX = FX_ElvenAlliesSummon
CreateLocation = CREATE_AT_LOCATION
UpgradeName = Upgrade_ElvenAllies
AvailableAtStart = No
End
End

AddModule ModuleTag_SummonRohan_Override
Behavior = OCLSpecialPower ModuleTag_SummonRohan
SpecialPowerTemplate = SpellBookRohanAllies
OCL = OCL_SpawnRohanRohirrimEgg
TriggerFX = FX_RohirimSummon
CreateLocation = CREATE_AT_LOCATION
UpgradeName = Upgrade_RohanAllies
AvailableAtStart = No
End
End

AddModule ModuleTag_SpellBookGandalfWhite_Override
Behavior = PlayerUpgradeSpecialPower ModuleTag_SpellBookGandalfWhite
SpecialPowerTemplate = SpellBookGandalftheWhite
UpgradeName = Upgrade_GandalfWhite
UpdateModuleStartsAttack = No
AffectAllies = No ; Should not try to affect ally units
AvailableAtStart = No
End
End

AddModule SpellBookWarChant_ModuleTag_Override
Behavior = SpecialPowerModule SpellBookWarChant_ModuleTag
SpecialPowerTemplate = SpellBookWarChant
AttributeModifier = SpellBookWarChant
AttributeModifierRange = 999999
AttributeModifierAffects = ANY +HORDE +URUK -HERO
TriggerFX = FX_SpellWarChant
UpdateModuleStartsAttack = No
AvailableAtStart = No
End
End

CommandSet = RohanSpellBookCommandSet_Override
RadarPriority = NOT_ON_RADAR
KindOf = SPELL_BOOK IMMOBILE IGNORES_SELECT_ALL INERT
End

ChildObject RohanChildSpellBook_Override RohanSpellBook_Override
CommandSet = RohanSpellBookCommandSet_Override
End

PlayerTemplate FactionRohan
BuildableHeroesMP =
PurchaseScienceCommandSetMP = RohanSpellStoreCommandSet_Override
SpellBookMp = RohanSpellBook_Override
End

Science SCIENCE_Anduril
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR SCIENCE_Scavenger OR SCIENCE_GONDOR SCIENCE_Heal OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD SCIENCE_Scavenger OR SCIENCE_ISENGARD SCIENCE_Heal OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR SCIENCE_Scavenger OR SCIENCE_MORDOR SCIENCE_Heal OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN SCIENCE_Scavenger OR SCIENCE_ROHAN SCIENCE_Heal
End

Science SCIENCE_Draft
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR SCIENCE_Scavenger OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD SCIENCE_Scavenger OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR SCIENCE_Scavenger OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN SCIENCE_Scavenger
SciencePurchasePointCostMP = 3
End

Science SCIENCE_GandalftheWhite
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR SCIENCE_Anduril OR SCIENCE_GONDOR SCIENCE_ElvenAllies OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD SCIENCE_Anduril OR SCIENCE_ISENGARD SCIENCE_ElvenAllies OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR SCIENCE_Anduril OR SCIENCE_MORDOR SCIENCE_ElvenAllies OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN SCIENCE_Anduril OR SCIENCE_ROHAN SCIENCE_ElvenAllies
SciencePurchasePointCostMP = 6
End

Science SCIENCE_Heal
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN
End

Science SCIENCE_Scavenger
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN
SciencePurchasePointCostMP = 3
End

Science SCIENCE_ElvenAllies
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR SCIENCE_Heal OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD SCIENCE_Heal OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR SCIENCE_Heal OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN SCIENCE_Heal
End

Science SCIENCE_RohanAllies
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR SCIENCE_Draft OR SCIENCE_GONDOR SCIENCE_Anduril OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD SCIENCE_Draft OR SCIENCE_ISENGARD SCIENCE_Anduril OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR SCIENCE_Draft OR SCIENCE_MORDOR SCIENCE_Anduril OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN SCIENCE_Draft OR SCIENCE_ROHAN SCIENCE_Anduril
SciencePurchasePointCostMP = 6
End

Science SCIENCE_WarChant
PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_GONDOR SCIENCE_RohanAllies OR SCIENCE_GONDOR SCIENCE_GandalftheWhite OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ISENGARD SCIENCE_RohanAllies OR SCIENCE_ISENGARD SCIENCE_GandalftheWhite OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_MORDOR SCIENCE_RohanAllies OR SCIENCE_MORDOR SCIENCE_GandalftheWhite OR SCIENCE_GOOD OR SCIENCE_EVIL OR SCIENCE_ROHAN SCIENCE_RohanAllies OR SCIENCE_ROHAN SCIENCE_GandalftheWhite
SciencePurchasePointCostMP = 10
End


 

safsignature.png

 


#3 PNGmangi

PNGmangi
  • Members
  • 35 posts

Posted 10 May 2010 - 07:05 AM

Wow. That looks confusing but I am thinking most of it is just copied from Gondor to Rohan to Isengard to Mordor just changing the names?

Thanks for that. I will have a play with it and hopefully I can get it! Thanks again.

PNG Mangi

#4 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 03 July 2010 - 06:01 PM

I have a question, why is it that you can't use "good" powers with an evil faction or vice versa? I've tried copy and pasting the command from one spellbook to another and it works fine if you are just copying from rohan to gondor or something like that. For example i'm currently able to summon ents with gondor or eagles with rohan. But if you tried copying that to mordor and set everything up, like the sciences and all that, it wouldn't work. It makes the radius cursor turn red and you're unable to use the power. I don't get that, so far I haven't been able to find anything that says "this power is meant for the good guys" or anything like that.

#5 Spartan184

Spartan184

    :)

  • Project Team
  • 1,592 posts
  • Location:Moon
  • Projects:Random Modding Projects
  •  Coder, Map.ini Coder, Mapper, and Beta Tester

Posted 03 July 2010 - 07:39 PM

Um did you put the commandbutton name in the "GoodSpellBookCommandSet" and "GoodSpellStoreCommandSet" commandsets? And is the for a map.ini or ini mod?


 

safsignature.png

 


#6 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 04 July 2010 - 11:32 AM

yea i copy and pasted the powers fine that's not the problem, the problem arises when i try to use a "good" power with an evil faction, or a "bad" power with a good faction, it just dosen't let you use the power ingame. you can see it and click it and all but when you go to place it on the map, say for instance, if its a summoning power, the radius cursor turns red, similar to if you are trying to place elven wood and you don't have enough land.

#7 Spartan184

Spartan184

    :)

  • Project Team
  • 1,592 posts
  • Location:Moon
  • Projects:Random Modding Projects
  •  Coder, Map.ini Coder, Mapper, and Beta Tester

Posted 04 July 2010 - 04:20 PM

If you look in system.ini all the behaviors are under "EvilSpellBook" and "GoodSpellBook", try copying and making a new power and placing them under the right spellbook. This might be because in the playertemplate "SpellBook = GoodSpellBook" is in the template of the good factions.


 

safsignature.png

 


#8 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 05 July 2010 - 09:41 PM

Thank you very much!

Ya i knew that i had to add info to system.ini but i never noticed the "object" fields. I'm used to modifying objects and know that if you need to modify an object all you have to do is change or add behaviors to it. But the thing is, i thought that system.ini was just a list of behaviors that can be applied to something...

anyway, enough rambling, my powers are working fine now, for all factions, again, Thank You!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users