[H4 EDITOR] troubleshooting

Maps and the art of mapmaking.

Moderator: Moderators

User avatar
jeff
Moderator
Moderator
Posts: 3671
Joined: 06 Jan 2006

Postby jeff » Jun 29 2010, 17:35

furret wrote:^ You know, I WISH the computer was smart enough to even think of splitting the army.

Be careful what you wish for, a problem I faced in one of the maps of my last campaign where you had to defeat several AI heroes was the AI tendency to combine forces. This frequently created near impossible armies; occasionally they just transferred creatures which would create one impossible and one push over army. So in equilibris anyway you get the splitting and combining.

The bottom line is the AI is unpredictable and all you can do is increase the odds it will act as you want. Sometimes you get it and other times you don’t. :|

furret wrote: *edit: Another question, this time about Change Owner script: I know how to change owner from none to certain color, but can I make it work backwords or to another color without the game getting crashed?



That does work, in fact if you wish to remove an AI hero you must change it to no owner (gray) before you eliminate it, otherwise the game will crash. What I do is the eliminate script starts with change owner to gray, then the hero fights an impossible army say 999 angels. Now because the change owner script has to be placed on the army this means, if the hero separates from the creature army, the script goes with them. If you then try and eliminate the hero it will not occur. :S
Mala Ipsa Nova :bugsquash:

furret
Leprechaun
Leprechaun
Posts: 17
Joined: 11 Jul 2008

Postby furret » Jul 6 2010, 14:16

1. I miscalculated and started to make a "small" map, and then I regreted and wanted to change it to medium. I don't think it's possible, but at least I can copy-paste the bulidings with their scripts to the other map. Is there a way to copy-paste the map events from one to another or a way to change the map size without deleting the old events?
:(

2. When a hero enter a neutral city, it supposed to change owner to his with all the units inside it too, but when I make the trigger event in the city, it first start a battle between the hero and the garrison, and than turn the garrison's untis the the color of the hero, so he control both sides of the battle... I want the hero to take over the city and the units without the battle. I saw it's possible in a Gathering Storm campiagn.

User avatar
Karmakeld
CH Staff
CH Staff
Posts: 923
Joined: 12 Nov 2011

Postby Karmakeld » Apr 14 2013, 19:46

1: Now I haven't yet tested this my self, therefor I don't know if it copies scripts, but:

To copy the whole level of the source map (yyy.h4c) to the target (xxx.h4c) one use:
H4UTIL -c -w -sl1 -tl0 xxx.h4c yyy.h4c
This will copy the underground (1) level of the map 0 of yyy.h4c to the ground (0) level of the map 0 of xxx.h4c
Important. The point of reference is the upper right corner. So the copied part will be located at that place.
The X coordinate heads from the left top corner (0) to the right bottom one.
The Y coordinate heads from the right top corner (0) to the left bottom one.
All objects, terrain and elevating are copied. All original objects are deleted.
If you copy a part of a map and process a script, the copying is executed first.
The modified campaign will be saved with the next name: xxx1.h4c


To copy a part of the source map (yyy.h4c) to the target (xxx.h4c) one use:
H4UTIL -c -w -sm0l0X50Y20x70y24 -tm0l1X30Y90 xxx.h4c yyy.h4c
This will copy a rectangular part of map 0 of yyy.h4c from 50*20 to 70*24 to the underground of map 0 of xxx.h4c at 30*90 (the right top corner of copied piece).
The modified campaign will be saved with the next name: xxx1.h4c

2: Make a placed event in front of the town, that'll trigger the color change. This way you avoid the battle and change owner of all troops inside the town.


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 2 guests