Page 1 of 2

Copy / Paste Tool

Posted: Sun May 04, 2014 9:49 am
by docopoper
I have created a tool for making large scale edits to levels, allowing you to do things like:

Move large areas of the level.
Duplicate large areas of the level.
Delete large areas of the level.
Select all objects with a given id / on a given layer.
Quickly find the id of whatever is under your selection.
Resize the window to view larger areas of the level.

Hopefully this should make editing levels much much easier.

Download

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 10:50 am
by RudeGuy
Could you explains how to use this programme?

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 11:09 am
by Wohlstand
Good job ;-)

but, you forgot use the format version control....
I did experimentally try to open files from SMBX 1.0 (for example, the Invasion 1), and I got this error:
Image

This can help to you fix this problem:
http://engine.wohlnet.ru/docs/_SMBX64/f ... iption.pdf
I did set the file-format version control, and my editor now can open LVL files of any versions

More info and other file-formats here: http://engine.wohlnet.ru/docs/_SMBX64/

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 11:22 am
by docopoper
Oh ok. Well I guess I'll add a check for that and just not let you open them... Because it seems like a lot of work for how few people will be using old formats.

Ok - the link has been updated. Though I wouldn't bother re-downloading it if you already have. It's a tiny change.
Christian07 wrote:Could you explains how to use this programme?
Just press F1 in the editor - it's a pretty simple tool.

The most basic functionality is to select an area (Press S to go into selection mode) and then move it around (Press M to go into movement mode) and duplicate the selection wherever you want by pressing D.

There is more functionality - just check F1.

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 11:38 am
by RudeGuy
docopoper wrote:
Christian07 wrote:Could you explains how to use this programme?
Just press F1 in the editor - it's a pretty simple tool.

The most basic functionality is to select an area (Press S to go into selection mode) and then move it around (Press M to go into movement mode) and duplicate the selection wherever you want by pressing D.

There is more functionality - just check F1.
Oh, yeah, now I understand all.
just a little thing, but may you have to make more good the graphics, because there is some black around them. It seems the graphics doesn't have masks!
Good programme, though.

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 12:25 pm
by Wohlstand
docopoper wrote:Oh ok. Well I guess I'll add a check for that and just not let you open them... Because it seems like a lot of work for how few people will be using old formats.

Ok - the link has been updated. Though I wouldn't bother re-downloading it if you already have. It's a tiny change.
Means this: "If you wanna create new level with using of the old files". I.e. Version control need only for read from old files, but write all only in 64th format

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 12:45 pm
by Emral
After I put this into the proper directory, the Test Level button didn't work anymore. It did save the level, but wouldn't start the testing process anymore. I tried deleting the file, but it didn't change anything. I don't neccessarily know if this is related to the program, but it's the only clue I have.
E:

My problem^^

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 1:06 pm
by docopoper
Oooh, yes. I am having that problem too. :/ I guess I'll try and fix that now. I have no idea what it could be.

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 2:05 pm
by docopoper
Ok, I'm honestly very confused by this. The file outputted by my program is pretty much identical to the file the editor outputs apart from decimals like 0.5 being written as 0.50 and the object order is slightly different. (but each section is the same length - so they're all there).

I don't know what the problem is.

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 2:10 pm
by Wohlstand
docopoper wrote:Ok, I'm honestly very confused by this. The file outputted by my program is pretty much identical to the file the editor outputs apart from decimals like 0.5 being written as 0.50 and the object order is slightly different. (but each section is the same length - so they're all there).

I don't know what the problem is.
I think,
This
https://github.com/Wohlstand/PlatGEnWoh ... vl.cpp#L37
and this
https://github.com/Wohlstand/PlatGEnWoh ... l.cpp#L364
can be help to read level data correctly.
(C++ with Qt)

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 5:25 pm
by docopoper
Well, it looks like it should be fine from that code. Regardless I changed my program to output its floats the same way SMBX does and it made no difference. Now the files are exactly the same length.
The weird thing is that now SMBX won't let me play any levels - even ones untouched by my program. And that doesn't make any sense since my program only edits the LVL file. 0_o

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 7:20 pm
by docopoper
Ok, it seems that I am causing some weird bug in windows. The temporary solution is to just press the escape key at any time after the program has closed...

The bug also has the symptoms of not letting you drag files in explorer or operate the SMBX main menu... But again - it's solved by pressing escape for some reason.

I'll work on a way not to cause this bug.

EDIT: Ah ha! I found the problem. It was that I was simulating the escape key when you close the window with the X button in order to make the code neater. For some reason that was screwing up Windows.

EDIT 2: Ok - I've updated the link in the OP with the fix, and I also made it possible to resize the window to get extra working space. So you should go and download that update.

Re: Copy / Paste Tool

Posted: Sun May 04, 2014 9:15 pm
by FanofSMBX
Can this be integrated into upcoming SMBX 1.3.0.2?

Re: Copy / Paste Tool

Posted: Mon May 05, 2014 2:50 am
by Veudekato
FanofSMBX wrote:Can this be integrated into upcoming SMBX 1.3.0.2?
this tool only for copy/paste . he cant integrate into smbx becouse smbx are not open source .
P.S. what with problem background?
very good programm! but i tired open this programm-openfile-wait when load file - savefile.

Re: Copy / Paste Tool

Posted: Tue May 06, 2014 3:57 pm
by docopoper
Veudekato wrote: P.S. what with problem background?
Well there's more than that wrong with the visuals. Because of the amount of hardcoded stuff in SMBX (all the backgrounds have to be drawn differently in their own way) - I decided it was way too much work for how much people would care. I mean you don't really need it to look right for a copy-paste tool.

The bigger problem in this regards is that some NPCs are drawn off center (because their sprites have a different origin by default) and thus that might make you think you're moving them to a different place than you actually are. Someone would have to go through all the NPCs and figure out their origins for me to fix this.
Veudekato wrote:i tired open this programm-openfile-wait when load file - savefile.
I'm sorry - I don't really follow what you said here.

Re: Copy / Paste Tool

Posted: Tue May 06, 2014 4:21 pm
by Willhart
Some things.
This program is very useful for placing custom size blocks.
It is possible to move a selection to another section if you drag it and press page up/down.
Copying npc generators alters them slightly. The game crashes if you try to move them on the editor afterwards.

Re: Copy / Paste Tool

Posted: Tue May 06, 2014 5:29 pm
by docopoper
Willhart wrote:Copying npc generators alters them slightly. The game crashes if you try to move them on the editor afterwards.
It does? I'll have to look into that.

Re: Copy / Paste Tool

Posted: Fri May 09, 2014 1:26 am
by Willhart
docopoper wrote:
Willhart wrote:Copying npc generators alters them slightly. The game crashes if you try to move them on the editor afterwards.
It does? I'll have to look into that.
I mentioned about it earlier. It was something about a value resetting to zero. It makes a quiet, instantaneous warp spawner that spawns npcs to it's own layer instead of the "spawned npcs layer".

Re: Copy / Paste Tool

Posted: Fri May 09, 2014 8:21 pm
by docopoper
Ok, I've fixed this bug. It was also causing NPCs with special settings (such as para-goombas and firebars) to erroneously have their values set to 0 if you duplicate them.

So, you should probably download the update in case you run into that bug.

I updated the main link btw.

Re: Copy / Paste Tool

Posted: Sat May 10, 2014 3:48 am
by Wohlstand
Oh, you forgot about "backgrounds magiс" :D
And don't forgot about double-rowed backgrounds

My tips for fix this:

SMBX Background specification and list:
http://engine.wohlnet.ru/docs/Backs2%20list.pdf

See to 5th page:
Spoiler: show
Image
https://github.com/Wohlstand/PlatGEnWoh ... _bkgrd.ini
This is a background configuration for my engine

Examples: (hold mouseWheel as middle button for scroll image to left-right)
Spoiler: show
Double row example:
Image

Whats now (wrong background):
Image

as it is necessary (background is true):
Image