~ Forums of Enroth ~

An Enroth diehard fan community
HomeHome  ChatChat  FAQFAQ  SearchSearch  RegisterRegister  Log inLog in  
Latest topics
» H3SW Recruitment Point - Enroth Needs You!
by MaXenaeL 2018-07-14, 02:00

» Хочу сделать коллаж по любимой игре
by Stryker34RUS 2018-07-11, 03:19

» Advanced Dialogue Boxes in Project Ironfist
by DarkAtom 2018-07-03, 04:32

» H3SW: General Graphics discussion
by Orzie 2018-06-25, 03:32

» I'm looking for one really crazy map to H2
by Orzie 2018-06-25, 03:23

» MasterMind Heroes: The Succession Wars (wip title)
by Orzie 2018-06-25, 03:20

» Introduce yourself
by Orzie 2018-06-25, 02:48

"Wait" in HoMM2?
 80% [ 55 ]
 20% [ 14 ]
Total Votes : 69
Most Viewed Topics
H3SW: General Graphics discussion
Ragoon's Graphics For HoMM3SW
H3SW General Discussion
H3SW: Dwelling Development
H3SW Map List: Work in progress
Enrothian Fan Art
Dervish Faction General Concept
Welcome fellow Enrothians!
H3SW Recruitment Point - Enroth Needs You!

Share | 

 [Script System] GrantArtifact(hero, artifact)

Go down 

Messages : 347
Quality Points : 44
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.



"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:

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

Use with a standard artifact:
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
Master Modder
Master Modder

Messages : 184
Quality Points : 36
Registration Date : 2014-12-27

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

Back to top Go down
[Script System] GrantArtifact(hero, artifact)
Back to top 
Page 1 of 1
 Similar topics
» [Script System][Suggestions] So, which expressions are the most desirable?
» James Connolly: A Working Class Hero
» One Woman in India dies every hour due to the dowry system
» Minecraft's Coordinate System
» Award 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: