Mirage Source
http://miragesource.net/forums/

Putting Map Editor in a Different Form
http://miragesource.net/forums/viewtopic.php?f=183&t=5364
Page 1 of 82

Author:  KruSuPhy [ Sat Apr 04, 2009 2:18 am ]
Post subject:  Putting Map Editor in a Different Form

Difficulty; 1/5(Not really even any code in this, Barely)

This tutorial... Is probably not going to be the best one. I'm not going to list all of the places where you have to change code, Too many.
First of all, Though, For those of you too lazy to Make a form for your Map Editor;
http://www.megaupload.com/?d=6GZEOE6Q

That's set to the height and width of a Pokemon Tileset(I was fooling around with different tilesets, Lol)

Basically, All you have to do is Find and Replace(CTRL+F) And Look through all codes of frmMirage (there are also instances in some of the modules) that have to do with the mapeditor, And Replace the frmMirage.control instances with frmMapEditor.control. thanks to rian for helping me improve how i said that part ;P

The Only coding you have to actually do is the Command, Which is;
Code:
        frmMapEditor.Show
     With frmMapEditor
        .Width = 6800
        .lblTileset = Map.TileSet
           .scrlTileSet = Map.TileSet
           .scrlPicture.Max = (.picBackSelect.Height \ PIC_Y) - (.picBack.Height \ PIC_Y)
     End With

That is going in the ModGameEditor, Under the Map Editor Sub.
Comment out or Delete all of this;
Code:
    With frmMirage
      .Width = 14175
      .picMapEditor.Visible = True
     .lblTileset = Map.TileSet
        .scrlTileSet = Map.TileSet
        .scrlPicture.Max = (.picBackSelect.Height \ PIC_Y) - (.picBack.Height \ PIC_Y)
    End With


I'm probably missing something in this tutorial. It feels way too short To be right. I'll think about it and If I come up with what I did wrong I'll fix it.

NOTES:
Make sure you change the Width in the With frmMapEditor Code so it fits to your mapeditor.

I had a problem with Animation when I did this. I couldn't edit the maps, So I had to completely delete them so the animation problem would fix. I don't know how I caused it, Or How to fix it. Help me?

My Mapeditor works perfectly, Nothing is wrong. I just hope I did the tutorial right.

How to Edit MapEditor Width for a different tileset;
Code:
' Number of tiles in width in tilesets
Public Const TILESHEET_WIDTH As Integer = 7 ' * PIC_X pixels

Change the 7 to however many tiles wide your sheet is.

Author:  Rian [ Sat Apr 04, 2009 6:30 am ]
Post subject:  Re: Putting Map Editor in a Different Form

KruSuPhy wrote:
Btw. Asshole comments aren't welcome. If you're here to tell me how much the tutorial sucks and all this, I've heard it before. It's my second tutorial. I know any idiot with a brain could do this, better than I did even. You're wasting your energy trying to call me stupid, honestly. Heard that all before, Too.


This is normally when I'd edit your post to delete the above quote, as it really only encourages people to flame you. You're tutorial is nice, and informative.

Quote:
All you have to do is Find and Replace(CTRL+F) And Look through all codes of frmMirage that have to do with the mapeditor, And Replace them with frmMapEditor


That quote above is the only thing that I think may confuse newer mirage users.

Quote:
All you have to do is Find and Replace(CTRL+F) And Look through all codes of frmMirage (there are also instances in some of the modules) that have to do with the mapeditor, And Replace the frmMirage.control instances with frmMapEditor.control

Author:  KruSuPhy [ Sat Apr 04, 2009 2:32 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

Rian wrote:
KruSuPhy wrote:
Btw. Asshole comments aren't welcome. If you're here to tell me how much the tutorial sucks and all this, I've heard it before. It's my second tutorial. I know any idiot with a brain could do this, better than I did even. You're wasting your energy trying to call me stupid, honestly. Heard that all before, Too.


This is normally when I'd edit your post to delete the above quote, as it really only encourages people to flame you. You're tutorial is nice, and informative.

Quote:
All you have to do is Find and Replace(CTRL+F) And Look through all codes of frmMirage that have to do with the mapeditor, And Replace them with frmMapEditor


That quote above is the only thing that I think may confuse newer mirage users.

Quote:
All you have to do is Find and Replace(CTRL+F) And Look through all codes of frmMirage (there are also instances in some of the modules) that have to do with the mapeditor, And Replace the frmMirage.control instances with frmMapEditor.control


I'm aware of this. I figured I would have already been flamed or something, to be perfectly honest.

But thanks, I'll change 'em.

Author:  Labmonkey [ Tue Apr 07, 2009 12:48 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

Don't be afraid of getting flamed. The community isn't really that bad.



Anyway, I haven't downloaded your form yet, but it seems like it would be a good tutorial/resource.

Author:  KruSuPhy [ Tue Apr 07, 2009 2:09 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

I'm not afraid of being flamed, I was thinking I'd get a few flameposts though.

And Thanks ;P

Author:  doomJoost1 [ Tue Apr 07, 2009 2:43 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

Most programmers here will try to keep amound of forms used to a mimumen.

On the other hand, in a proper client, admin stuff should be taken out anyawy, in the rare event someone hacks admin access.

Author:  KruSuPhy [ Tue Apr 07, 2009 2:50 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

There's a shitload of forms anyways, One more won't hurt ;D
Why don't we put the training form into frmMirage. And Trade. and all this other stuff that would be possible to merge into that form D;< :P

Author:  doomJoost1 [ Tue Apr 07, 2009 2:59 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

That''d be a very good thing, in my opinion.
In my own ooold engine, I moved all editors in one form as well, it decreases file size, time it takes to compile, load, and probably some other things.

Oh, about your disclaimer, I don't think ANYONE has a problem with someone posting a tut. But, accepting critisismn (if it makes sense, that is) is a good way of improving your own programming skills, and makes the tutorial a bit better.

Author:  Anthony [ Tue Apr 07, 2009 3:03 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

I've managed to cut my forms down to having 11. Still quite a few but better than the vanilla code :). I also want to get all my editors into a single form like Joost mentioned.

I prefer to have my map editor in it's own form though.

Author:  doomJoost1 [ Tue Apr 07, 2009 3:20 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

Hehe, totally correct, I can't take into account people's preferences ;p. If you prefer having it in an independant form, this is the way to go.

Author:  KruSuPhy [ Tue Apr 07, 2009 9:57 pm ]
Post subject:  Re: Putting Map Editor in a Different Form

I don't mind constructive criticism in the least, It's the "OH you fail this tutorial sucks go get a new hobby you lifeless bastard" Kind of stuff I don't care for.

Author:  wanai [ Wed Dec 01, 2021 8:42 am ]
Post subject:  Re: Putting Map Editor in a Different Form

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Mon Jan 03, 2022 2:04 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Econ

Author:  wanai [ Mon Jan 03, 2022 2:06 am ]
Post subject:  Re: Putting Map Editor in a Different Form

84

Author:  wanai [ Mon Jan 03, 2022 2:07 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Bett

Author:  wanai [ Mon Jan 03, 2022 2:08 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Bett

Author:  wanai [ Mon Jan 03, 2022 2:09 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Jeff

Author:  wanai [ Mon Jan 03, 2022 2:10 am ]
Post subject:  Re: Putting Map Editor in a Different Form

True

Author:  wanai [ Mon Jan 03, 2022 2:11 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Aziz

Author:  wanai [ Mon Jan 03, 2022 2:12 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Henr

Author:  wanai [ Mon Jan 03, 2022 2:13 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Mark

Author:  wanai [ Mon Jan 03, 2022 2:15 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Woma

Author:  wanai [ Mon Jan 03, 2022 2:16 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Nort

Author:  wanai [ Mon Jan 03, 2022 2:17 am ]
Post subject:  Re: Putting Map Editor in a Different Form

NiMH

Author:  wanai [ Mon Jan 03, 2022 2:18 am ]
Post subject:  Re: Putting Map Editor in a Different Form

Orie

Page 1 of 82 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/