~ 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 2017-08-17, 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][Suggestions] GetLocationSpell(type, x, y) and more

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][Suggestions] GetLocationSpell(type, x, y) and more   2017-03-26, 08:45

GetLocationSpell(type, x, y)
type: the ID of the location (see section "Locations").
x: X coordinate on the world map.
y: Y coordinate on the world map.

SetLocationSpell(type, x, y, spell)

Respectively, returns and sets the spell present in the specified location. Can be used with Shrines, Pyramid, etc.

*

GetLocationArtifact(type, x, y)

SetLocationArtifact(type, x, y, artifact)

Respectively, returns and sets the artifact present in the specified location. Can be used with Treasure Chest, Sea Chest, Shipwreck Survivor, Lean-To, Skeleton (Desert), Wagon, Graveyard, Sphinx, etc.

*

GetLocationResourceType(type, x, y)

GetLocationResourceQuantity(type, x, y)

SetLocationResource(type, x, y, resource, quantity)

Respectively, returns and sets the resource type and the quantity of resources present in the specified location. Can be used with Pile of resource, Campfire, Treasure Chest, Sea Chest, Flotsam, Windmill, Magic Garden, Water Wheel, Lean-To, Skeleton (Desert), Wagon, Daemon Cave, Shipwreck, Derelict Ship, Graveyard, Sphinx, etc.

*

GetLocationXp(type, x, y)

SetLocationXp(type, x, y, quantity)

Respectively, returns and sets the quantity of xp present in the specified location. Can be used with Treasure Chest, etc.

*

GetLocationSecondarySkill(type, x, y)

SetLocationSecondarySkill(type, x, y, skill)

Respectively, returns and sets the secondary skill present in the specified location. Can be used with Witch's Hut, etc.

*

GetLocationCostResourceType(type, x, y)

GetLocationCostResourceQuantity(type, x, y)

SetLocationCost(type, x, y, resource, quantity)

Respectively, returns and sets the resource type and the quantity of resources to pay at the specified location. Can be used with Tree of Knowledge, etc.

*

GetLocationQuestion(type, x, y)

SetLocationQuestion(type, x, y, text)

GetLocationResponse(type, x, y)

SetLocationResponse(type, x, y, text)

Respectively, returns and sets the question and response of the specified location. Can be used with Sphinx, etc.

*

GetLocationText(type, x, y, hero, player)
hero: the text displayed when the specified hero is selected. Can be left empty.
player: the text displayed when the specified player is selected (no hero selected). Can be left empty.

SetLocationText(type, x, y, text, hero, player)
hero: the text to display when the specified hero is selected. Can be left empty.
player: the text to display when the specified player is selected (no hero selected). Can be left empty.

Respectively, returns and sets the text displayed at the specified coordinates when the user right-clicks on a square with a location on it on the adventure map. Can be used with Sign, Bottle, and all locations.

*

GetCoordinateText(x, y, hero, player)
hero: the text displayed when the specified hero is selected. Can be left empty.
player: the text displayed when the specified player is selected (no hero selected). Can be left empty.

SetCoordinateText(x, y, text, hero, player)
hero: the text to display when the specified hero is selected. Can be left empty.
player: the text to display when the specified player is selected (no hero selected). Can be left empty.

Respectively, returns and sets the text displayed at the specified coordinates when the user right-clicks on a square on the adventure map. Can be used on any square, empty and even with a location on it.

*

GetNearestPlayerTown(x, y, player)
x: X coordinate on the world map.
y: Y coordinate on the world map.
player: the player from which you want to know the nearest town.

Returns the name of the nearest town owned by the specified player.
Using value of "-1" for player, returns the nearest town independently of the owner.

GetNearestPlayerFreeTown(x, y, player)
x: X coordinate on the world map.
y: Y coordinate on the world map.

Returns the name of the nearest unoccupied town owned by the specified player.
Using value of "-1" for player, returns the nearest unoccupied town (no hero in town) independently of the owner.
Back to top Go down
XT3RM1N8R
Gargoyle
Gargoyle
avatar

Messages : 21
Quality Points : 1
Registration Date : 2016-11-06
Age : 20
Location : USA

PostSubject: How helpful would this be?   2017-04-04, 20:17

Hello,

These commands seem very cool and could prove useful in mapmaking, but I don't understand why you would need most of these if the behavior that they produce can be reproduced in the editor. Since you'll be scripting for a particular map for each script, you'll already have access to most of this information, and you should also be able to set it using the map editor. I'm not sure I see how we would need these as well. Could you perhaps provide some example as to how they would prove particularly handy?

Thank You,
XT3RM1N8R

________________________
Lazy Signature
Back to top Go down
Unknown_Hero
Minotaur
Minotaur
avatar

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

PostSubject: Re: [Script System][Suggestions] GetLocationSpell(type, x, y) and more   2017-04-06, 06:32

In the "Unknown Mod", I would like to display additional and more accurate information when the player right-clicks on any of the squares of the adventure map.

The different elements of the game must also be able to be modified during the course of the game according to the choices and actions of the different players (human and AI).

Most of these game elements are generated randomly by the program at the start of the scenario launch and can not therefore be modified in the map editor (spell in Shrine, secondary skill in Witch's Hut, artifact in Graveyard, etc.).
Back to top Go down
 
[Script System][Suggestions] GetLocationSpell(type, x, y) and more
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» One Woman in India dies every hour due to the dowry system
» Minecraft's Coordinate System
» Danny O'Donoghue
» 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: