~ Forums of Enroth ~

An Enroth diehard fan community
 
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» [EN, RU][Offline] HoMM1 Tournament of the Landless 2017 (Турнир Безземельных)
by Orzie Today at 01:32

» How autoborder/autofixer works...
by Unknown_Hero 2017-08-15, 23:31

» Navigation secondary skill - Too short to disembark
by Unknown_Hero 2017-08-13, 22:08

» [EN, RU][Offline] HoMM1 Trade Guild Tourney 2017 (Турнир Торговой Гильдии)
by Orzie 2017-08-12, 16:27

» Happy Birthdays and Congrats!
by Dr Slash 2017-08-10, 11:10

» The Symphony of Heroes - Paul Romero with ochestra concert
by Sir Albe 2017-08-10, 04:08

» Change to the Arena (PoL)
by Unknown_Hero 2017-08-08, 22:07

Poll
"Wait" in HoMM2?
Yes
80%
 80% [ 44 ]
No
20%
 20% [ 11 ]
Total Votes : 55
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Dervish Faction General Concept
Enrothian Fan Art
H3SW Recruitment Point - Enroth Needs You!
Серия книг "Земли Меча и Магии"
Heroes of Might and Magic 3: The Succession Wars - General info

Share | 
 

 [Script System] GrantArtifact(hero, artifact)

View previous topic View next topic Go down 
AuthorMessage
Unknown_Hero
Minotaur
Minotaur
avatar

Messages : 332
Quality Points : 37
Registration Date : 2015-09-06

PostSubject: [Script System] GrantArtifact(hero, artifact)   2017-03-06, 06:21

Tested with Ironfist version 1.2.1+ (version of December 15, 2016).

*

GrantArtifact(hero, artifact)
hero: the hero to grant the artifact to (see, for example, GetHero).
artifact: the ID of the artifact to give (see section "Artifacts").

Grants the given artifact to the given hero.

*

With this script expression:

GrantArtifact(GetCurrentHero(), ARTIFACT_SPELL_SCROLL);

The hero gets the Spell Scroll.
But, by right clicking on the Spell Scroll, the following text is displayed: "Spell Scroll - This Spell Scroll gives your hero the ability to cast the '(null)' spell."

There is no way currently to set the spell available in the Spell Scroll.

*

Suggestions:

"GrantArtifact" enhanced version:

GrantArtifact(hero, artifact, spell, text)
hero: the hero to grant the artifact to (see, for example, GetHero).
artifact: the ID of the artifact to give (see section "Artifacts").
spell: the ID of the spell(s) to be tied to this specific artifact. Can also be left empty.
text: replacement text displayed when the user views the information on the artifact by right-clicking on the artifact. Can also be left empty, the standard text will be displayed.

Grants the given artifact to the given hero. Spell(s) can optionally be tied to this artifact.
The spells are not written in the Magic Book. And if the hero gives this artifact to another hero or if he loses this artifact during a combat, he no longer knows spells related to the artifact (unless he has learned some or all of them in a Mage Guild).
And the hero who receives the artifact will be able to use the spells tied to the artifact.

Examples of use:

Standard use:
GrantArtifact(GetCurrentHero(), ARTIFACT_WHITE_PEARL);

Use with a Spell Scroll:
GrantArtifact(GetCurrentHero(), ARTIFACT_SPELL_SCROLL, SPELL_ANTI_MAGIC);

And waiting for the possibility to create our own artifacts, we can play with those already available. Smile

Use with a standard artifact:
spellsBookOfElements = {SPELL_SUMMON_EARTH_ELEMENTAL, SPELL_SUMMON_AIR_ELEMENTAL, SPELL_SUMMON_FIRE_ELEMENTAL, SPELL_SUMMON_WATER_ELEMENTAL};
textBookOfElements = "The Book of Elements doubles the effectiveness of all your summoning spells, and gives you the four Summon Elemental spells.";
GrantArtifact(GetCurrentHero(), ARTIFACT_BOOK_OF_ELEMENTS, spellsBookOfElements, textBookOfElements);
Back to top Go down
Darmani
Master Modder
Master Modder
avatar

Messages : 167
Quality Points : 30
Registration Date : 2014-12-27

PostSubject: Re: [Script System] GrantArtifact(hero, artifact)   2017-03-13, 07:29

Noted.
Back to top Go down
 
[Script System] GrantArtifact(hero, artifact)
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» James Connolly: A Working Class Hero
» One Woman in India dies every hour due to the dowry system
» Minecraft's Coordinate System
» Award system
» Latest Topics (new system)

Permissions in this forum:You cannot reply to topics in this forum
~ Forums of Enroth ~ :: Modding Guild :: Heroes of Might and Magic II: Project Ironfist :: Modding and Mapmaking-
Jump to: