Register
Email: Password:
Forum » A few questions about the map editor in Driftmoon

A few questions about the map editor in Driftmoon

AceMatt 11 years ago
So these questions are directed to the map editor,let's begin.

1.) I made some scripts for opening up a chest,I thought you could look at it and tell me how I could make it more "clean" (remove the unnecessary parts)

a) Picture 1 > The opening script http://oi49.tinypic.com/sowcwg.jpg
b) Picture 2 > The closing script http://oi50.tinypic.com/66bszb.jpg

2.) How do you make 3D triangular walls in the "Make new terrain" bar?
3.) How do you place water with the floor editor?
4.) How do I make a quest?
5.) I couldn't find the map editor under the original game,so I had to use the map editors under the mods. Why is that so?
6.) How do I make a simple door? My script always goes berserk when I run it.

Thank you in advance.
#
Pete 11 years ago
Well, Im not a map editor, but I do edit maps sometimes, so here are my humble thoughts:

1) If it aint broke dont fix it. Looking at the pictures, it seems simple enough that you could have dozens of them in a map with no performance loss already anyway.
2) Im not exactly sure what you mean? You can make arbitrary shape walls by moving/adding points, and you can also change their vertical shape by fine-tuning the Z coordinate of them.
3) You dont place water, it simply exists below a certain terrain height level. You can sort of fake it with a transparent texture if you need above sea level water.
4) See quests.ini in either the main game or your mod folder. I can go into more detail if needed.
5) Ville will probably answer that himself at some point, but my guess is that it might be confusing for people who just want to play the main game? "Whats this editor button for aaah where am I what is happening", that sort of thing.
6) I always just pilfered them from one of Driftmoons maps The idea is pretty simple, though: You create two doors, one in the open position and one in the closed, hide one by default, and then make each hide itself and reveal the other copy on use.
#
ChuckV 11 years ago
Hello AceMatt,

If I may, I will jump to point 5 right away:
- Did you use the "Create New Mod" button on the main menu (near the bottom) to start your own mod? (Otherwise, you are editing your local copy of someone else's mod.)
Once you have created your own mod, click on "my mod" in the main menu, open your newly created mod and then go into the editor. The editor is disabled in the main mod, so if you want to look at its maps to see how certain things are done, you will have to copy the .map files from the mainmod folder into your mod's folder, then open them from inside your mod.

Point 1:
- Your script looks fine to me, actually, does it work to your liking?

Point 2:
- I am not sure exactly what you mean, could you describe a bit more what you are trying to make?

Point 3:
- The water is at a certain fixed height relative to the floor, open the "Floor Editor" panel and use the "lower terrain" tool to lower the height of a section of the terrain, it will become covered in water once you reduce it below a certain height.

Point 4:
- Quests have to be detailed in a "quests.ini" file to be functional, go into Driftmoon/mainmod/script/quests.ini and have a look at the structure that they have. Then create a quests.ini text file in your mod's script_add folder where you write the properties of your quests. You can then use scripted events within the editor to start quests and make them progress through the quest states.

Point 6:
- The way I make simple doors in my mod (and this is how some are in the main game as well) is to have two identical door objects, one located in the doorway and one located in the open position. Set the "open" door object to hidden at startup and write scripts such that when the player clicks on the door that is in the doorway, that one becomes hidden and the door in the "open" position becomes un-hidden, and vice-versa when the player clicks on the door in the "open position". Uploads screenshots of your script if you are still having issues.

I hope that this is helpful, tell me if anything is unclear of if you have any additional questions.

- Edit: Well I took so long writing that I got Ninja-ed, oh well.

Edited 11 years ago
#
Anne-on-holiday (guest) 11 years ago
Hi There AceMatt! Nice to hear you're learning to use the editor, and judging by your scripting, you've gotten a good start already. Do you already have plans about the kind of a mod you're making?

Thanks for the replies Pete and Chuck! Ville and I (& our kids, naturally) are away on an Easter Holiday for the next couple of days, so it'll take us a bit longer than normally to be able to reply, so I'm very happy we got some help from you guys.

If you need clarification about anything, AceMatt, you're very welcome to ask for it. Ville and I will check the forums from time to time even now that we're on holiday, but it'll probably take us a bit longer than normally to do it.

Ps. Yeah, I know it's strange that I'm posting as guest... I can't remember my password, drats!
#
AceMatt 11 years ago
Thank you all so much. I'm just testing a bunch of stuff at the moment and getting used to the map editor.
By "3D Triangular walls" I meant a new terrain that looks like a 3D triangle. I'm trying to make some pillars with a pointy end (Also,I managed to get my door to work,yay!)
Anyways,back to the map editor!
#
AceMatt 11 years ago
A few more questions!

1.) How do I make it so that the player must be in a certain proximity to grab an item? In my current map (a dusty,underground jail) I'm standing behind the wooden bars and I'm able to pick up the key a huge distance away!

2.) I couldn't find any commands to make a bot stand still,I'm trying to force the monk in my menu map to stand still so he doesn't wander off the screen!

#
AceMatt 11 years ago
Uhh... seems like opening a certain object crashes my game..
I placed down an object that's 6.000 in height,added the open container script and it crashes my game for some reason.

http://i.imgur.com/JUZMupU.png

I have no idea what I'm doing wrong.
#
Endymion 11 years ago
AceMatt said:

1.) How do I make it so that the player must be in a certain proximity to grab an item? In my current map (a dusty,underground jail) I'm standing behind the wooden bars and I'm able to pick up the key a huge distance away!
I'd do it by just creating an object that looks like and has the same name as the item with a script that gives the item and destroys itself on use.
EDIT:Also in your particular case you could just add (invisible)wall that has tallobject field checked on top of the bars
2.) I couldn't find any commands to make a bot stand still,I'm trying to force the monk in my menu map to stand still so he doesn't wander off the screen!
Hmm at least one way to do it is to change the races.ini so that the bot you want to stay still has
AIIdleStrategy=humanNoIdle

Edited 11 years ago
#
ChuckV 11 years ago
AceMatt said:
Uhh... seems like opening a certain object crashes my game..
I placed down an object that's 6.000 in height,added the open container script and it crashes my game for some reason.

http://i.imgur.com/JUZMupU.png

I have no idea what I'm doing wrong.

I don't get it either, try making that object again from scratch.

AceMatt said:
2.) I couldn't find any commands to make a bot stand still,I'm trying to force the monk in my menu map to stand still so he doesn't wander off the screen!

Give your bot the "stop" script with "activation type: start" and put 0 in the time parameter (0 is for infinite).
#
ville 11 years ago
AceMatt said:
By "3D Triangular walls" I meant a new terrain that looks like a 3D triangle. I'm trying to make some pillars with a pointy end

It's possible to do something to that effect by altering the z position of a vertex in the editor, just click a vertex, and you can see the numbers in the lower left corner. Another option is to make it a 3D model - pretty much any program can output a suitable .obj model that the game сan understand.

AceMatt said:
Uhh... seems like opening a certain object crashes my game..
I placed down an object that's 6.000 in height,added the open container script and it crashes my game for some reason.

There used to be a problem with opening objects in a previous version, so first make sure you've got the latest Driftmoon (1.012). I'll have a look at that object when I get back home.
#
AceMatt 10 years ago
Just another question
I'm trying to implement my logo into the mod but how do I do it?
I was stuttering around with Driftmoon's main mod files and I saw the logo.jpg ( size 256x128 )
So I thought I could just slap MY logo.jpg into my mod dir but it didn't work.
The image is 256x128,it has 41 kb. I don't know what I'm doing wrong

Edited 10 years ago
#
ville 10 years ago
You probably mean the logo in the loading screens, right? The game actually uses the logo that's found on the game server in the loading screens. You can upload your logo to the server when you're uploading your mod. But there's another logo that you can change before uploading, the one in the menu screen. That's located in the gui folder.
#
AceMatt 10 years ago
Thanks for clearing that up for me Ville
#
TheSlider 10 years ago
I have some questions too !

- How can i make two objects (not terrain or AI) interact in a way that object A throws the "explosion" event when object B touches object A (by using "onPolygons" for example or any other/better proximity event).

- how can i create new objects represented by the ob2 files we can see in the objects folder such as trees, rocks, characters ?


thanks ! : )
#
ChuckV 10 years ago
For the first one, you could give object A the explosion script using the "objectIsCloser" condition and putting the activation on Timer with a very short repeat time, like every 0.5 seconds.

For the second one, I remember Ville mentioning that various image software such as Blender can output object files that Driftmoon can work with but I have never done this so I can't tell you more.
#
TheSlider 10 years ago
Thanks it works. The repetition was the key. : )

For the .ob2 files, when opened in a text editor such as notepad++, i can see they have references to textures and the .obj 3D models found in the "models" folder. I don't have any problem with .obj as i can open them in my 3D editor but I can't find a way to edit the .ob2 files as they seem "compiled".

For the example, trees in Driftmoon seem made of two 3D objects with a texture applied on each of them.
The trunk part seems to repeat itself a few times until it reaches a given height and then the foliage model it put on top.

They are simple enough to create a nice forest by scattering them closer to each-other and i'm able to edit the 3D models to make them look less low poly, but i'd like to improve them a bit more if possible by either tweaking the ob2 file or making my own. : )


[EDIT]

Nevermind, i just found out !
Basicaly, you assemble your object (the tree in this case) directly in the editor by clicking the object icon and making a multipart object by using anything you want (sprites, polygons, 3D models, ...).
Then you can script it to add particles effects or give it some animation like bend in the wind and finally click export !
That makes a new ob2 file that you can use later. I should have read more carefully Anne's post about exporting stuff out of the original Driftmoon maps. It's the same thing. : )

Edited 10 years ago
#
TheSlider 10 years ago
Hi,

I'm playing around on some weird stuff in the editor and i'm wondering. Right now, i'm hitting ctrl+C / ctrl+V to duplicate an object or group of objects made of various sub-graphics and scripts. I plan to have hundreds of them on screen but i don't want to go through the tedious keypresses to replace them all in case i decide to update the design or scripts.

So, could it be possible to have something like ctrl+I to instantiate the object that was previously copied ?
This would allow you to change the main objects scripts and appearance and having them automatically update the instances.

: 3
#
Endymion 10 years ago
TheSlider said:
I plan to have hundreds of them on screen but i don't want to go through the tedious keypresses to replace them all in case i decide to update the design or scripts.
I have painful memories of doing exactly that...

Anyway you could relatively easily do what you seem to want by saving the object and using createObject scripts to place them. Note that if you use object groups then it will be created at a center of the group so occasionally it might be necessary to add objects that do nothing to a group to get the center where you want. Also if the group includes terrain objects the path nodes won't notice them until you reload the map.

EDIT: oh yeah cloning also works(and in some cases is a lot better option) but won't do groups(at least as easily) and you'll need to have the object(s) already in the map.

Edited 10 years ago
#
ville 10 years ago
Driftmoon does the random objects on the maps by using the createObject script. That way I don't have to go around all my maps changing them if I change one of the randomized objects. It's a kind of instantiating system, but more difficult to use. Oh, and also the goldfish are done like that.
#
Endymion 10 years ago
Also speaking of .ob2s there should be some sort of save/export object button in addition to the export (as) button, I've occasionally saved over the wrong object causing all kinds of weirdness.
#
TheSlider 10 years ago
Endymion said:
TheSlider said:
I plan to have hundreds of them on screen but i don't want to go through the tedious keypresses to replace them all in case i decide to update the design or scripts.
[...] you could relatively easily do what you seem to want by saving the object and using createObject scripts to place them. [...]

EDIT: oh yeah cloning also works(and in some cases is a lot better option) but won't do groups(at least as easily) and you'll need to have the object(s) already in the map.
Thanks, it didn't occur to me that objects retained scripts on export/import. I'll try that soon.
ville said:
Driftmoon does the random objects on the maps by using the createObject script. That way I don't have to go around all my maps changing them if I change one of the randomized objects. It's a kind of instantiating system, but more difficult to use. Oh, and also the goldfish are done like that.

I see, i should have though about that !
#
Forum » A few questions about the map editor in Driftmoon

Post Reply


Your email:
Your name: