Mapmaking tricks (H4)

Maps and the art of mapmaking.
rhomboidspace
Leprechaun
Leprechaun
Posts: 27
Joined: 06 Jan 2006

Unread postby rhomboidspace » 14 Mar 2006, 01:39

Thelonious wrote:
cherko wrote:first, create a hero. edit him/her. check the "custom" box to edit abilites (but don't edit anything) and press OK.
You can make a hero with other skills as well - lets say an archerclass. You make it a Ranger, and them check ok. Then do trhe whole sequence and you'll still have a Ranger.
this trick only fools the map editor an the game a bit, all characters must start off with atleast 2 skills or 3 in the case of barbarians, if they do not meet this requirement you will notice that their level says they're below level 1 as soon as yo interact wiht any object you will gain levels to meet the requirements, if you customize the level to level 1 instead it randomly generates skills to meet these requirements so it preaty much shows that it is set in the game that starting classes must have so many starting skills or it gets confused, atleast this isn't a bug that causes it to crash though

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 14 Mar 2006, 09:25

Oh that's nice to know. But that could only happen to barbarians right? Because you can't make a hero with totally no skills for the start, right? In my campaign I altered a barbarian to be a thief; it was level 0, but after giving it skills the level went up just as it normally does.

Edit:

Oh wait just check it, and now I have a level -1 male Lord! Cool!

Edit again:

But then when you start up the game the level -1 male lord becomes a normal level 1 lord.

Checked it with a level 0 male lord -> and it indeed does grow one level if it interacts with a script.
Last edited by Thelonious on 14 Apr 2006, 18:27, edited 1 time in total.
Grah!

User avatar
Thelonious
Round Table Knight
Round Table Knight
Posts: 1336
Joined: 06 Jan 2006
Location: right behind the next one

Unread postby Thelonious » 07 Apr 2006, 12:55

Sorry for double posting.

I would like to note that this thread is not just for posting tricks, it also here for questions of people how to do things.
Grah!

Akorg
Leprechaun
Leprechaun
Posts: 4
Joined: 16 Jun 2006

Is there a trick?

Unread postby Akorg » 02 Aug 2006, 05:16

Is there a trick how to give a skill to the definite hero in a one group of 3 heroes? (The normal choice of strongest or weakest hero is not acceptable).

User avatar
wimfrits
Round Table Knight
Round Table Knight
Posts: 2047
Joined: 06 Jan 2006
Location: Utrecht, the Netherlands

Re: Is there a trick?

Unread postby wimfrits » 02 Aug 2006, 06:21

Akorg wrote:Is there a trick how to give a skill to the definite hero in a one group of 3 heroes? (The normal choice of strongest or weakest hero is not acceptable).
Only if the hero is fixed; with a custom event on the hero itself and then triggering that event.
Are you suggesting coconuts migrate?

Akorg
Leprechaun
Leprechaun
Posts: 4
Joined: 16 Jun 2006

Is there a trick?

Unread postby Akorg » 02 Aug 2006, 14:44

All kind of scripts on the hero I need give me only 3 choises:
First Hero, Strongest Hero or Weakest Hero (but not THIS hero).
So I don't understand your advice. Please explain me what you mean.

User avatar
Ururam Tururam
Scout
Scout
Posts: 163
Joined: 06 Jan 2006
Location: the Void
Contact:

Re: Is there a trick?

Unread postby Ururam Tururam » 03 Aug 2006, 07:03

Akorg wrote:All kind of scripts on the hero I need give me only 3 choises:
First Hero, Strongest Hero or Weakest Hero (but not THIS hero).
So I don't understand your advice. Please explain me what you mean.
Instead of using this you should use construction as follows:

-in the event:
If the army has hero FOO than trigger event GOO

- write a triggered script in appropriate window of the hero FOO naming it GOO like:
Give this-and-that to this very hero
Hoc est opus!
UT homepage: http://urtur.webpark.pl

User avatar
wimfrits
Round Table Knight
Round Table Knight
Posts: 2047
Joined: 06 Jan 2006
Location: Utrecht, the Netherlands

Unread postby wimfrits » 03 Aug 2006, 07:55

and be sure that the script GOO is on the hero itself and not on the army.
(first select the army that holds the hero, then in the list of units present double click the hero, and then go to the events tab)
Are you suggesting coconuts migrate?

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 28 Dec 2006, 13:11

Basic H4 editor troubleshooting questions splitted off from this thread. For learning to handle the editor, please go to and post you question in: http://www.celestialheavens.com/forums/ ... 55&start=0
Avatar image credit: N Lüdimois

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

recursive loops

Unread postby RobB » 11 Jan 2007, 21:49

I've been re-reading this thread yet again, and once again I am perplexed by the mention of recursive loops. I am still very much a novice at map-making, but I can't think of any way to to cause a loop; that is to say, I can't think of an editor command that calls another script.

I would much appreciate a more detailed explanation. In particular, an explanation that tells you exactly which editor menu you're looking at, since different commands give you different options.
RobB

User avatar
wimfrits
Round Table Knight
Round Table Knight
Posts: 2047
Joined: 06 Jan 2006
Location: Utrecht, the Netherlands

Unread postby wimfrits » 12 Jan 2007, 18:33

For instance: quest hut event that gives custom hero X 1 wolf for EVERY 100 gold he owns.

on quest hut :
TRIGGER CUSTOM EVENT give wolf

on hero X; triggered events tab; event give wolf

Code: Select all

IF [amount of gold of current player] < 100
  SEQUENCE:
  DISPLAY: "All your gold has been spent"
  REMOVE SCRIPT
ELSE
  SEQUENCE:
  GIVE 1 wolf
  TAKE 100 gold from current player
  TRIGGER CUSTOM EVENT give wolf
END-IF
Are you suggesting coconuts migrate?

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Unread postby RobB » 12 Jan 2007, 22:04

Many thanks for that. I hope all my questions haven't seemed quite as dumb as that one - I should have spotted "trigger custom event", but for some reason I must have thought that was the same as triggered event.

So many things in the editor are not obvious. For example: defeated/victorious is pretty clear when it's your own hero, but when it's a purple army and you've put it only affects green in the general section, it's starts getting confusing: does it mean them defeated or me? Same with the word "owner" in some situations. I guess it's no different from learning any other programming language.

Anyway, thanks again for being so patient with a beginner.
RobB

User avatar
Akul
Round Table Hero
Round Table Hero
Posts: 1544
Joined: 06 Jan 2006

Unread postby Akul » 12 Jan 2007, 22:07

An advice to you:

I don't know if I alredy suggested this, but the best way to learn mapmaking is to play a map and see in editor how it is made. Then try to do something with that script in a test map.

I learn most of my mapmaking skills from "Beebee and three Pigs". It has many scripts and I would advice it to you.
I am back and ready to... ready to... post things.

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Unread postby RobB » 12 Jan 2007, 23:43

Odd you should mention Beebee. That is the very one I have found most useful. That one and the one about searching for old heroes (name gone from my head for the moment).
RobB

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 22 Jan 2007, 22:52

Here's some of mine I wrote back in year 2002 (before 2.0 aka "multiplayer" patch). I might add more to it.

Hidden Paths
Secret passages are easy to create by using either trees or mountains or other large objects to conceal. There can be a town, some creature dwellings, monsters, treasures and artifacts without player ever noticing them behind the thick wall of trees. As a map maker, you can possibly use editor bombs to blow away the concealing trees. Or you can give the player a hint like "Can you see the forest from trees?".

Burned Down Structures and Trees
You can make an illusion of forest fire or a deserted village by hiding dead trees behind the living ones. And during the game you can make the forest fire happen by using the editor bombs. Same can be done for structures as well thanks to burned down houses. Use cool volcanic terrain if you want to make more ashy look.

Handling the Creature Growth
If you want to keep certain stack of creatures from growing, use a continuous event that will take 9999 creatures and then give n number of creatures back. Make sure that you put the mark off from "Run only during owner's turn." in the case of neutrals. If you want to control creature growth by adding more creatures to the stack, the solution to that is a bit more complex affair.
Use a continuous event that will have several conditional actions in a sequence.
Like: If Current Day < 8 then take 9999 trolls from this army and give 9 trolls to this army. And the next one: If Current Day > 7 AND Current Day < 12 then take 9999 trolls from this army and give 12 trolls to this army. Third one: If Current Day > 11 then take 9999 trolls from this army and give 15 trolls to this army.

Scenery
Avoid vast empty areas. There are plenty of objects to fill the map. Another important thing is not to use the same objects over and over, like making whole forest by using a single tree. Avoid also large completely blocked areas in your map. If you have to use them because you have run out of ideas, it would be better that you make a smaller map.
If you want to make lots of hills by using the elevation tool, do not make vast swamps.

Journal
This is mainly useful in story or roleplaying maps, so the game can keep a track of the various events occurred and to show them to the player when (s)he wants so. Use a timed event that will ask a question from the player so the player is not forced to read the same things over and over again. Also don't make it happen every day, as it can soon become annoying.

How to fill the journal then? This happens by using boolean true/false variables in events. For example (Placed Event): Display "Hero Gnubul picks a mushroom from the ground and eats it". Set Ate_Mushroom to True. Remove Script.
When the timed event then occurs and the player wants to view the journal, it will trigger a custom event that has a condition: If Ate_Mushroom = True then (Display "I saw as Gnubul ate a mushroom!" Trigger Journal Page 2) else Trigger Journal Page 2.
This will ensure that if the event haven't yet happened it will not show the page and will show the next page regardless of the variable.

Release Wandering Neutrals
It might be so that you want to keep the map "alive" by releasing time after time some neutral creatures to the map. This can be done in various different ways like blocking the stack behind the trees and then setting it free with a bomb in day 27. Another variation is to block the creatures behind the quest gates that will require that it is the certain day of the week in order to the creature to pass. Another one is by using a creature stack with limited movement range to block neutrals with limitless movement range. And if you want that neutral stacks are able to take towns give them a hero.

Adjusting Difficulty
If you want harder computer opponent you can always let computer have more creatures and dwellings. As well as giving the computer heroes more experience and skills.

There is also the possibility to adjust the scenario difficulty by asking in the timed event from the player does he want that map is hard or normal at the start of map. For example if the player wants harder game, the timed event will set Hard (variable) to true. Now, in the computer opponent's town, will be a timed event in day 7 that has a condition: If Hard = True then construct dwellings else do nothing. Also you can have more events than just one relying on to the same variable making the map really hard.
This can be really useful idea in multiplayer maps when the players want to play against each other and not to lose against computer, but will also enable the map maker to make single scenario challenging as well.

Character Creation

If you want to add more RPG style to your maps you can make series of events to create an illusion of good and flexible story. It is important in RPG map to have many alternative choices and alternative plots. You can also give the player the freedom to create his own main character.

Race
This can be done easily with creatures. It can be done also with heroes but only in the case they can't retreat to any town. In the beginning you can ask from a player what kind of race he wants to pick by using timed event. If you want that there are more than two alternatives and that player can browse between choices, use triggerable events that will cycle until the starting race is chosen.
If it is a creature that you want, then put on the map one of the starting races as a creature. Now the next script will show how can you change the creature:

In Timed Event:
Ask "Do you want to be orc? Yes: Yes. No: Other." If yes then set Orc to TRUE. If no then trigger Troll.

In Troll (Triggerable Event):
Ask "Do you want to be troll? Yes: Yes. No: Other." If yes then set Troll to TRUE. If no then trigger Orc.

In Orc (Triggerable Event):
Ask "Do you want to be orc? Yes: Yes. No: Other." If yes then set Orc to TRUE. If no then trigger Troll.

This way the player can browse between the starting races (there is only two of them in example). Next one will show how the variable will change the creature.

Continuous Event on the starting creature (Orc):
If Troll = TRUE then 'give 1 Troll to this army and take 1 Orc from this army and remove script' else 'If Orc = True then 'remove script'.

If you want to use hero then you will have to put different heroes on the map. And when the player have selected his starting race then other heroes will be deleted by using combat in triggerable events. If you need further instructions how this will be done, just ask.

Character Points
You may also want to include certain attributes like Strength, Defense and Wisdom. If you want that player can himself choose how much points are given to different abilities then do as follows:

In Timed Event:
Set Points (Numeric Variable) to 5. Ask "Do you want that your character is more powerful? (it will cost one character point for you and you start with 5). Yes: Yes. No: Other." If yes then Set Strength to "Strength' +1' and Set Points to "Points' -1'. If no then trigger custom event named Defense.

Defense (Triggerable Event):
If Points > 0 then Ask "Do you want that your character has more defense? Yes: Yes. No: Other.". If yes then Set Defense to "Defense' +1' and Set Points to "Points' -1'. If no then trigger custom event named Wisdom.

This way the player can choose where to put points until he have used all of them. If you have hero then you can for example give that hero attack rating equal to strenght variable. You can also have numerous events in your maps where the bigger strenght will be useful.

Gaining Levels
You can make your map to add experience to creatures. It is a "bit" more complex affair with more than one creature but still possible. For example, your single troll who won a battle he fought against peasants gain a new level. This is done by putting an encountered event into neutral creatures as well as into your troll.

In your troll is a several conditional actions: If Level = 1 then increase morale of this army by 1 else do nothing. If Level = 2 then increase morale and luck of this army by 1 else do nothing.

The event above will increase the morale and luck of troll every time he encounters a creature. And the morale and luck increased will depend on the variable level.

On the peasants is an encountered event (that will calculate the number of peasants):
Sequence:
Set Creature_Number to 0.
Set Creature_Number to Creature_Number + total number of creatures in this army.


And on the peasants defeated branch is:
Set Experience to Experience + Creature_Number.

And then there are a continuous event on that troll: If Experience >= 100 then Sequence: Set Level to Level +1, Set Experience to 0, Display "You gained level! Woohoo!".

Numeric Variables in the above scripts are: Experience, Level and Creature_Number.

If you want that there are more than one creature controllable in the same stack the problem arises if the player divides the creatures in two stacks. This can be avoided by putting eight different armies that can not reach each other on the map or by just warning the player not to do so.

Also, you can add things that have nothing to do with actual game as levels like Lockpicking. To create an illusion of gaining such levels you have to have events where they will have effect.

Whenever player attacks that nearby thief, the thief will say "Aho!" and teaches you some lockpicking. And then there is a nearby Rogue Academy where you will be taught more of lockpicking. Then there are two gates in the northern section of map that both require different levels of lockpicking. And in order to pick a lock you have to have picklocks that can be bought from nearby shop. Here is the scripts:

On Rogue's encountered branch:
Sequence: Display "Aho!", Set Lockpicking to 1, Trigger Rogue Over.

On Rogue's triggerable events (Rogue Over):
(Combat) This army will fight against Titan.

Triggerable event above will dismiss the rogue without player having to actually fight with it.

On Rogue Academy:
If Lockpicking = 1 then Set Lockpicking to 2.

On gate A (Quest Requirement):
Lockpicking >= 1 AND Picklocks.

On gate B (Quest Requirement):
Lockpicking >= 1 AND Picklocks.

On shop:
Set Picklocks to True.

Copying Events
Unfortunately you can't copy paste scripts from adventure objects. Although you can copy scrip along with object. If you want to copy a complicated script like Artifact Merchandise without lots of work, use Placed Events. Place the Event next to adventure object so that player might visit it. You can also copy scripted objects along with their scripts to palettes. Rather useful when you want to copy things like Artifact Merchants from map to map.

Also if you want to copy story fully from really complicated script, use export/import options to make it easier.

Terminating AI
This should be a useful thing for a multiplayer map where players want to complete the scenario faster. Ask in a timed event from a player whether he wants AI to be deleted or not. That event then triggers a custom event. On towns computer opponents control, will be a triggerable event that changes the ownership to a no owner. Alternatively you can use editor bomb to destroy the towns. And on every computer army is also triggerable event, but this one will force them into a combat they can't win. If the computer controlled armies have artifacts you don't want player to have, take artifacts first before combat occurs (in sequence).

Quick Scenario
Particularly useful in a larger map, where player wants to save time by completing the map faster. First you might want to give every neutral town to players, whether they are human or computer. Second is that you might want to delete blocking objects like Quest Gates for instance. This is also done by asking from the player in the form of timed event that will then trigger events in neutral towns and deletes adventure objects. Those towns will change owneship then.

How to make scripting easier?
Start the scripts always with sequence. It is better to make sequence right away than to notice later that you would like to expand the script by putting new actions to it straight from the start. Sequences should also be used after every conditional or ask question action.

Also good thing to do is to start scripts with conditional action (straight after the sequence). This will ensure that you can put a condition to the complicated script in the future if you feel so, even if you don't need condition for the script you can always put it to TRUE. Make your scripts flexible for future whims and you will get off with less work.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Unread postby RobB » 22 Jan 2007, 23:24

Lots of useful tips, but I didn't understand this one:
"If you want to make lots of hills by using the elevation tool, do not make vast swamps."

Can you explain, please?
RobB

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 23 Jan 2007, 16:49

RobB wrote:Lots of useful tips, but I didn't understand this one:
"If you want to make lots of hills by using the elevation tool, do not make vast swamps."

Can you explain, please?
It's because you can't elevate swamp terrain itself. You can though elevate swamp terrain by elevating its surrounding area as well. It can be good if you want to create platos, you can paint over the swamp terrain with different one. Same is true for water terrain, although rivers can be elevated as you like.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
eekstah
Scout
Scout
Posts: 187
Joined: 12 Apr 2006

Re: Mapmaking tricks (H4)

Unread postby eekstah » 26 Mar 2007, 20:36

ronald wrote:difficulty=5
if gold(human)>4000: difficulty=4
if gold(human)>9000: difficulty=3
if gold(human)>14000: difficulty=2
if gold(human)>19000: difficulty=1
Just wanted to let you know that this also can be done with just one single command line:

Code: Select all

Set 'Difficulty' to '5 - ([Quantity of gold owned by HUMAN player] / 5000)'

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Text

Unread postby RobB » 19 Aug 2007, 03:14

My map editor comes without any documentation at all, so although I've learned a lot, I still have questions:

Under "files", I have the options "Export Text" and "Import Text". To try it out, I wrote a quick text file and tried to import it into one of my test maps, but it was greyed out. So my questions are:

What would you use these commands for? And what sort of file are they expecting?
RobB

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Re: Text

Unread postby Pitsu » 19 Aug 2007, 06:57

RobB wrote: Under "files", I have the options "Export Text" and "Import Text". To try it out, I wrote a quick text file and tried to import it into one of my test maps, but it was greyed out. So my questions are:

What would you use these commands for? And what sort of file are they expecting?
I think you first export text from your map. It takes text from map description + all events etc and puts it into a single text file. Then you can use any other text editor to check spelling or modify text. IIRC as soon as you add new paragraphs (line breaks, there were special tags to get line break without defining it as a new text source) the file structure is broken and import process gets lost. It does not know which text goes to which event anymore since the number of paragraphs and text in map file do not match. Also, when editing exported text, I recommend doing no changes on map layout.
Avatar image credit: N Lüdimois


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 5 guests