Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: [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. | |
|
XT3RM1N8R Gargoyle
Messages : 23 Quality Points : 1 Registration Date : 2016-11-06 Age : 27 Location : USA
| Subject: 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
| |
|
Unknown_Hero Mage
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
| Subject: 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.). | |
|
Sponsored content
| Subject: Re: [Script System][Suggestions] GetLocationSpell(type, x, y) and more | |
| |
|