Unknown_Hero Mage
![Mage Mage](https://i.imgur.com/T6XfYnc.gif)
![Unknown_Hero](https://i.imgur.com/f6yn7Vg.png)
Messages : 780 Quality Points : 78 Registration Date : 2015-09-06
![[Script System] MapPutArmy(x, y, creature, quantity) Empty](https://2img.net/i/empty.gif) | Subject: [Script System] MapPutArmy(x, y, creature, quantity) 2017-03-06, 01:54 | |
| Tested with Ironfist version 1.2.1+ (version of December 15, 2016).
*
MapPutArmy(x, y, creature, quantity) x: X coordinate on the world map. y: Y coordinate on the world map. creature: the creature to be placed on the map. quantity: the number of creatures.
Places a group of creatures on the world map that you can battle against.
*
Small "bug" for the current version. With "MapPutArmy(x, y, creature, quantity)" the horizontal axis and the vertical axis are inverted. The "x" value is used for the vertical axis and the "y" value is used for the horizontal axis unlike for all other uses where the "x" value is used for the horizontal axis and the "y" value is used for the vertical axis.
*
Suggestions:
MapPutArmy(10, 19, CREATURE_ZOMBIE, 0);
Here, it would be really nice if, as in the map editor, the value "0" would generate a random number of Zombies.
*
The mapmaker must know what he is doing when he uses "MapPutArmy", however, I see two cases where he cannot know what is going on: If a hero is positioned on the square where the group of creatures will be generated with "MapPutArmy". If a group of wandering creatures was generated with "The month of the creature" on the square where the group of creatures will be generated with "MapPutArmy".
The same cases can also happen with "TeleportHero".
It would be nice to have the possibility to check if the destination square of "MapPutArmy" is occupied either by a troop of wandering creatures or by a hero.
MapIsOccupiedByHero(x, y) x: X coordinate on the world map. y: Y coordinate on the world map.
Returns true if there is a hero at this position, false otherwise.
MapIsOccupiedByArmy(x, y) x: X coordinate on the world map. y: Y coordinate on the world map.
Returns true if there is a group of creatures at this position, false otherwise.
*
"MapPutArmy" enhanced version:
MapPutArmy(x, y, creature, quantity, group, growth, aggressiveness, morale, luck) x: X coordinate on the world map. y: Y coordinate on the world map. creature: the creature to be placed on the map. quantity: the number of creatures. group: determines the number of creature groups at the start of combat. The number of groups can be set with values from 0 to 5. - "0" the program automatically selects the number of groups at the start of combat. - "1" to "5" sets the number of groups from 1 to 5. growth: determines whether the number of creatures will increase over time, can be set to "0" or "1". - "0" the group of creatures will never grow. - "1" the group of creatures will grow at start of the week. aggressiveness: determines whether the creatures will join the hero, can be: - "0" for Compliant (will always join). - "1" for Friendly (will likely join). - "2" for Aggressive (may join). - "3" for Hostile (unlikely to join). - "4" for Savage (will never join). The default setting is "2" (aggressive), this is also the setting that "Week of the Creature" stacks will have. morale: determines the level of Morale of the creatures at start of combat, it can eventually be affected according to the situation. The Morale value can be set from "-3" to "+3", the value "0" being neutral Morale. luck: determines the level of Luck of the creatures at start of combat, it can eventually be affected according to the situation. The Luck value can be set from "-3" to "+3", the value "0" being neutral Luck.
***** Updated on March 25, 2017 *****
GetMapArmyCreature(x, y)
GetMapArmyQuantity(x, y)
GetMapArmyGroup(x, y)
GetMapArmyGrowth(x, y)
GetMapArmyAgressiveness(x, y)
GetMapArmyMorale(x, y)
GetMapArmyLuck(x, y)
Last edited by Unknown_Hero on 2017-03-26, 08:56; edited 1 time in total | |
|
Darmani Master Modder
![Master Modder Master Modder](https://i.imgur.com/IpF8FfL.gif)
![Darmani](https://2img.net/u/1112/86/44/25/avatars/170-23.png)
Messages : 289 Quality Points : 47 Registration Date : 2014-12-27
![[Script System] MapPutArmy(x, y, creature, quantity) Empty](https://2img.net/i/empty.gif) | Subject: Re: [Script System] MapPutArmy(x, y, creature, quantity) 2017-03-13, 07:56 | |
| | |
|