Hammerwatch Forum

Custom mapping and Mods => Editor Discussion => Topic started by: Linaru on July 13, 2013, 08:44:27 PM

Title: Editor Tutorials
Post by: Linaru on July 13, 2013, 08:44:27 PM
Made a little thread for tutorials on the editor, for those of you who might not of seen them in the steam discussions.

i began writing a simple guide to making dungeons for beginners,
its only a rough draft so far, but thought id post it up here as soon as possible for people to use.

 A guide to Dungeoneering  (https://www.dropbox.com/s/9qq3342syqith0b/Hammerwatch%20A%20guide%20to%20dungeoneering.docx)

enjoy =3
Title: Re: Editor Tutorials
Post by: myroman on August 17, 2013, 10:02:35 AM
following your tutorial and tried this:

Quote
Now you’ve got the basics of the button, but the area trigger isn’t connected to the change state doodad, so it will not tell it to run when pressed.
To fix this select the area trigger hold ctrl-alt and click on the change doodad state.
This will tell the area trigger to change the graphics for the button when someone stands in the area, simply move the area over the top of the button and when a player stands on it the button will change its graphic to a pressed down button.

this don't work on mac. pressing ctrl + leftclick on mac just do a rightclick and spawns another script.
Title: Re: Editor Tutorials
Post by: Myran on August 17, 2013, 12:58:55 PM
So on Mac I had to use the >< button for Ctrl and the Cmd button for Alt, because of the whole modify mouse button thing.
Title: Re: Editor Tutorials
Post by: myroman on August 17, 2013, 01:24:59 PM
thanks again!
Title: Re: Editor Tutorials
Post by: TheLonelyCookie on August 17, 2013, 09:36:07 PM
Thank you so much for this tutorial, especially the part where you mentioned that I could use a pixelated drawing to make my dungeon layout

Thanks!, Cookie
Title: Re: Editor Tutorials
Post by: Dai Tou Zai on August 18, 2013, 04:57:01 AM
"let’s save your map and give it a test, click file> save name it whatever you wish I recommend something like ‘level_floor_1’  and save it into your levels folder.
Next open up the levels.xml from earlier and change the file path of your level
So it looks something like this:

Once your finished go back to the editor and click tools > run game or  press Ctrl-T
You should be presented with a level like so"

I tried to test and i followed every instruction but i keep getting a failed to load level error
Title: Re: Editor Tutorials
Post by: Psyborg on August 18, 2013, 07:44:28 AM
Excellent tutorial! Thanks very much, it showed me a lot I might not have picked up on myself, like how to link scripts to objects.
Title: Re: Editor Tutorials
Post by: Linaru on August 18, 2013, 10:51:26 AM
"let’s save your map and give it a test, click file> save name it whatever you wish I recommend something like ‘level_floor_1’  and save it into your levels folder.
Next open up the levels.xml from earlier and change the file path of your level
So it looks something like this:

Once your finished go back to the editor and click tools > run game or  press Ctrl-T
You should be presented with a level like so"

I tried to test and i followed every instruction but i keep getting a failed to load level error

have you tried copying your entire hammerwatch folder to a new directory to test it? i know that there's a bug some people get and that usually fixes it
Title: Re: Editor Tutorials
Post by: Grokitach on August 18, 2013, 11:40:04 AM
Thank you for that guide. It must be a sticky topic in steam :D !! I will finally begin my Dekaron's Deadfront based map
Title: Re: Editor Tutorials
Post by: Psyborg on August 18, 2013, 10:28:08 PM
If possible, could someone make a short tutorial on creating light sources?

I made a floor lamp and managed to make the base solid, but Im having trouble getting the light color and intensity to look good.

Im not sure why there are 3 color lines, and what the difference is between the additive and multiplicitive sections.

Any info is greatly appreciated!
Title: Re: Editor Tutorials
Post by: Dai Tou Zai on August 19, 2013, 09:26:48 AM
have you tried copying your entire hammerwatch folder to a new directory to test it? i know that there's a bug some people get and that usually fixes it

I copied it and pasted it into my docs than tried to test it, it didn't work i keep getting the level error.
Title: Re: Editor Tutorials
Post by: Gamer720 on August 20, 2013, 09:02:39 PM
I'm having the same issue as Dai Tou Zai, here is the error message when I try to launch it from the editor or in game:

"--- UNHANDLED EXCEPTION - 8/20/2013 2:20:29 PM - HMW 1.01 DEBUG ---
System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at TiltedEngine.ResourceBank.GetResource[T](String name) in C:\Arbete\Programmering\C#\ARPGProj\trunk\Tilted Engine\TiltedEngine\ResourceBank.cs:line 136
   at ARPGGame.ActorBehaviors.CasterActorBehavior..ctor(BehaviorData obj, ResourceBank resBank) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Behaviors\Enemies\CasterActorBehavior.cs:line 105
   at ARPGGame.WorldItemBehaviors.BehaviorFactory.ProduceActorBehavior(String id, BehaviorData param) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Behaviors\BehaviorFactory.cs:line 129
   at TiltedEngine.WorldObjects.WorldObjectProducers.ActorType.Produce(Vector2 pos) in C:\Arbete\Programmering\C#\ARPGProj\trunk\Tilted Engine\TiltedEngine\WorldObjects\WorldObjectProducers\ActorType.cs:line 54
   at TiltedEngine.WorldLoader.LoadActors(SObject save, WorldNode world) in C:\Arbete\Programmering\C#\ARPGProj\trunk\Tilted Engine\TiltedEngine\WorldLoader.cs:line 224
   at ARPGGame.LevelList.LoadLevel(WorldNode world, WorldDrawer worldDrawer, String level, SObject save) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:line 201
   at ARPGGame.GameBase.ClearLevel() in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 494
   at ARPGGame.GameBase.Update(Int32 ms) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 831
   at ARPGGame.ARPGGame.OnUpdateFrame(FrameEventArgs e) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 667
   at OpenTK.GameWindow.RaiseUpdateFrame(Stopwatch update_watch, Double& next_update, FrameEventArgs update_args)
   at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at ARPGGame.Program.Main(String[] args) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 205
------"
Title: Re: Editor Tutorials
Post by: Grokitach on August 21, 2013, 03:43:29 PM
Which doodads states can we use on the changedoodadstate script ?

In the exemple there's "dn" for an activated button, but for a rune on the ground, what state do we use to stay it's activated (glowing blue) ?
Title: Re: Editor Tutorials
Post by: KptnKook on August 22, 2013, 07:54:42 PM
why is it, that when i paste a map (i also tried your example map) that the vertical doodads are not the right ones? it uses the right dodads for the horizontal lines, but changes to a wrong doodad for the verticals...

can i look up and edit, which tiles are preseted?

thanks very much.!
Title: Re: Editor Tutorials
Post by: doonz on August 24, 2013, 05:32:15 AM
I'm having the same issue as Dai Tou Zai, here is the error message when I try to launch it from the editor or in game:

"--- UNHANDLED EXCEPTION - 8/20/2013 2:20:29 PM - HMW 1.01 DEBUG ---
System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at TiltedEngine.ResourceBank.GetResource[T](String name) in C:\Arbete\Programmering\C#\ARPGProj\trunk\Tilted Engine\TiltedEngine\ResourceBank.cs:line 136
   at ARPGGame.ActorBehaviors.CasterActorBehavior..ctor(BehaviorData obj, ResourceBank resBank) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Behaviors\Enemies\CasterActorBehavior.cs:line 105
   at ARPGGame.WorldItemBehaviors.BehaviorFactory.ProduceActorBehavior(String id, BehaviorData param) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Behaviors\BehaviorFactory.cs:line 129
   at TiltedEngine.WorldObjects.WorldObjectProducers.ActorType.Produce(Vector2 pos) in C:\Arbete\Programmering\C#\ARPGProj\trunk\Tilted Engine\TiltedEngine\WorldObjects\WorldObjectProducers\ActorType.cs:line 54
   at TiltedEngine.WorldLoader.LoadActors(SObject save, WorldNode world) in C:\Arbete\Programmering\C#\ARPGProj\trunk\Tilted Engine\TiltedEngine\WorldLoader.cs:line 224
   at ARPGGame.LevelList.LoadLevel(WorldNode world, WorldDrawer worldDrawer, String level, SObject save) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:line 201
   at ARPGGame.GameBase.ClearLevel() in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 494
   at ARPGGame.GameBase.Update(Int32 ms) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 831
   at ARPGGame.ARPGGame.OnUpdateFrame(FrameEventArgs e) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 667
   at OpenTK.GameWindow.RaiseUpdateFrame(Stopwatch update_watch, Double& next_update, FrameEventArgs update_args)
   at OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at ARPGGame.Program.Main(String[] args) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 205
------"


i get this error too :(
Title: Re: Editor Tutorials
Post by: Myran on August 24, 2013, 02:53:42 PM
I'm having the same issue as Dai Tou Zai, here is the error message when I try to launch it from the editor or in game:

"--- UNHANDLED EXCEPTION - 8/20/2013 2:20:29 PM - HMW 1.01 DEBUG ---
...
------"
It looks like you have a custom caster enemy who can summon stuff, but you removed the sound for it.
Title: Re: Editor Tutorials
Post by: LastTourniquet on August 26, 2013, 07:03:58 PM
"This is all well and good but there’s a faster way of getting your dungeons walls in place, by drawing a black and white pixel image and pasting it into the editor." This is a direct quote from your guide, how exactly do you make the pixel image? Does it need to be in a specific program? And how do you paste it into the editor? Anyone who has an answer to these questions that would be great.
Title: Re: Editor Tutorials
Post by: Myran on August 26, 2013, 07:39:58 PM
It should be possible with most image editors, you just need to make a selection in the editor and copy it.
Title: Re: Editor Tutorials
Post by: Heretic on August 27, 2013, 01:57:44 AM
Can someone provide an example of a map that is possible to drag over into the editor?
Title: Re: Editor Tutorials
Post by: LastTourniquet on August 28, 2013, 01:28:09 AM
It should be possible with most image editors, you just need to make a selection in the editor and copy it.
Do you think you could give an example? I have tried with what I have by default on my computer (Paint (not sure if that is what you mean by image editor)) and that didn't work, I have also tried just copy/pasting the example from the guide but with no results. If I need to download a free program that's fine but I'm not going to spend money on something like photo-shop just to make map editing easier :P
Title: Re: Editor Tutorials
Post by: Myran on August 28, 2013, 01:09:31 PM
I think the problem is what you actually copy, you shouldn't copy a file from the explorer, what you need to copy are the actual pixels from in the image editor.
Title: Re: Editor Tutorials
Post by: LastTourniquet on August 28, 2013, 09:13:21 PM
So I tried just copying the pixels and It didn't work, but for some reason after I saved the image it worked.. really weird >.< maybe I just did it wrong the first time, either way I got it to work now :P thanks
Title: Re: Editor Tutorials
Post by: muchopanam on August 29, 2013, 02:48:45 AM
For me, the problem is to succeed of cracking walls when i play with my map. I use deteriorate wall but impossible to crack them in my test.
Otherwise, Thx Linaru to propose this tutorial. I like ideas to do real good maps or story, but i think that editor isn't so simple to put items. A physic colored grid will be welcomed, with "magnetic" ability. It's not so easy to place items. Sometimes, impossible to match some items with a certain position. Arghhh. Developpers of the Map have signed with God to create their good story. No ? lol.
I am waiting for the rest of our good advices, Linaru.

Moreover, you 're in the credits isn't it ?
Did you have participated to crteation of the game ?

I see, you create a map... Greyfall. I don't all like it for the moment. I play once only with friend. I am going to see it again soon. But interesting, the work done for the "light-less", like a Slender game. Lol.
Title: Re: Editor Tutorials
Post by: LastTourniquet on September 01, 2013, 08:08:38 AM
For me, the problem is to succeed of cracking walls when i play with my map. I use deteriorate wall but impossible to crack them in my test.

When I was messing around with the broken walls what I did was go to the example maps, "Breakable_Wall"  is one of those maps. Just open it up in the editor and study how it works. It took me about half an hour to do everything perfectly, and to be honest I probably couldn't remake it without looking at it again. One thing that is hard to see in the editor is the DestroyObject script is connected to the SpawnObject script using Ctrl+Alt and the actual wall piece with the 0+0 thing, and you need the SpawnObject scrip to be in the perfect spot (I suggest using 1/4 grid size. If your going to figure it out that way just move around all the scripts so you can see how they are all connected, then make sure you look at exactly what each individual script's settings are and you should be fine.
Title: Re: Editor Tutorials
Post by: Clarity on September 02, 2013, 04:21:20 AM
EDIT: I can get the lone xml files to run, but I can't do it whilst in the folders...I think I'm doing something wrong lol.
Title: Re: Editor Tutorials
Post by: Heretic on September 02, 2013, 06:15:25 PM
Is there a way to prioritize doodads? They tend to tweak but I need them in a certain 'order' I guess?
Title: Re: Editor Tutorials
Post by: Clarity on September 02, 2013, 09:19:54 PM
Erm new problem. Every time I make a map, for some reason the number of lives and the name never changes. I did exactly as the tutorial asked, but it wont work for me...
Title: Re: Editor Tutorials
Post by: Linaru on September 02, 2013, 11:04:02 PM
Erm new problem. Every time I make a map, for some reason the number of lives and the name never changes. I did exactly as the tutorial asked, but it wont work for me...

if your testing the map in the editor it automatically gives you 10 lives for testing purposes.
other wise the info.xml should control all that, double check you've included it in the right folder before compiling?
Title: Re: Editor Tutorials
Post by: Clarity on September 02, 2013, 11:19:30 PM
Erm new problem. Every time I make a map, for some reason the number of lives and the name never changes. I did exactly as the tutorial asked, but it wont work for me...

if your testing the map in the editor it automatically gives you 10 lives for testing purposes.
other wise the info.xml should control all that, double check you've included it in the right folder before compiling?

Oh...well now I feel like an idiot. Welp, expect a new map today :P
Title: Re: Editor Tutorials
Post by: Heretic on September 03, 2013, 01:06:58 AM
Does anyone know of an easier way to handle multiple doodads in the same spot?
Title: Re: Editor Tutorials
Post by: Heretic on September 03, 2013, 09:21:50 AM
I see a change doodad layer script in the editor - I'm wondering if there is a way to set doodad layers by default without having to script it? This could be a big problem with my campaign if not :*(

EDIT: Figured this one out too - sorry. Not all of the xmls for doodads had this setting, I just happened to go through and check a whole bunch just in case but defaultlayer is the var to change for this!
Title: Re: Editor Tutorials
Post by: Myran on September 03, 2013, 02:50:56 PM
You can also do it for individually placed doodads by selecting them and pressing Ctrl-Number.
Title: Re: Editor Tutorials
Post by: muchopanam on September 03, 2013, 03:34:01 PM
For me, the problem is to succeed of cracking walls when i play with my map. I use deteriorate wall but impossible to crack them in my test.

When I was messing around with the broken walls what I did was go to the example maps, "Breakable_Wall"  is one of those maps. Just open it up in the editor and study how it works. It took me about half an hour to do everything perfectly, and to be honest I probably couldn't remake it without looking at it again. One thing that is hard to see in the editor is the DestroyObject script is connected to the SpawnObject script using Ctrl+Alt and the actual wall piece with the 0+0 thing, and you need the SpawnObject scrip to be in the perfect spot (I suggest using 1/4 grid size. If your going to figure it out that way just move around all the scripts so you can see how they are all connected, then make sure you look at exactly what each individual script's settings are and you should be fine.

Thanks my dear to be so patient with me.
Soon i will have time to think about i will see. ThX.
Title: Re: Editor Tutorials
Post by: Heretic on September 20, 2013, 12:52:27 PM
When testing out a map in the editor, is there a way to test using a different hero other than the paladin?
Title: Re: Editor Tutorials
Post by: Grokitach on September 20, 2013, 01:38:17 PM
Yup, just load out the Hammerwatch.exe under the HammerEditor.exe. Play solo, custom and choose your map. You'll be able to select your map.

You can let the game launched on the main menu while editing your map, saving it and by launching a new custom game your map will be updated with the changes from editor :)
Title: Re: Editor Tutorials
Post by: Heretic on September 22, 2013, 06:36:30 AM
Ah yes I know of that way I just wanted to know if there was a way through the editor - that ctrl t is an awesome shortcut lol. Maybe this could be added as a feature in a later build.