Duke4.net Forums: Two question about level editing - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Two question about level editing

User is offline   blizzart 

#1

Hi,
I have to questions about mapping.

1st: How do I copy sectors from one map to another? I know it is possible and written in some faq, but I can´t find it right now.

2nd: How do I shade several sectors (with walls and sprites) at once? The problem here is, that I build the sectors, textured them and filld them up with some basic spritework, but I didn´t shade them. So I need to know, how I can shade them all to one shade (and maybe visibility).



Thanks in advance
0

User is offline   CruX 

#2

Can't help you with the second question, but to copy a sector from one map to another, load up that map that has the sector, and hold down the right alt button. When you drag the cursor around, it'll form a greenish rectangle, which you can use to envelope the sector you want to copy. Once you've covered everything you want copied, hit the insert key, and that'll duplicate the sector. Load up the new map and zoom way out. The duplicated sector(s) will be plotted somewhere out on the grid, but will still be glowing green, so you can move it around. Once you've gotten it moved where you want it, hit the right alt key again and the sector will be plotted.
0

User is offline   underTaker 

#3

Well, EmericaSkater have already responded to your first question. Second one is very simple - just select the sectors you want to shade with right control (just like for copying), switch into 3D mode and change the shade of anything inside one of the selected sectors.
0

User is offline   Micky C 

  • Honored Donor

#4

That's how you shade everything by the same amount, but not how to give everything the same shade, which is what I think he's asking. I'd also like to know how to give everything the same shade Posted Image
0

#5

I would like to know that too xD
0

User is offline   blizzart 

#6

View PostMicky C, on 18 April 2011 - 04:16 PM, said:

That's how you shade everything by the same amount, but not how to give everything the same shade, which is what I think he's asking. I'd also like to know how to give everything the same shade Posted Image


No, giving everything the same shade was exactly what I was asking for. But how to give some sectors which already have a shade the same shade as mentioned above, would be interesting, too.

Anyways, thanks for the quick answers!
0

User is offline   NerdZilla 

#7

View Postblizzart, on 17 April 2011 - 10:58 PM, said:


1st: How do I copy sectors from one map to another? I know it is possible and written in some faq, but I can´t find it right now.



Hold the {right Ctrl key} over an area. When the area is glowing. Then load the other map. That glowing area will now be in that map you just opened.

Here are some keys to flip or rotate the glowing sectors. Or copy and delete them if needed

X - rotate sectors
F - flip sectors
C or - Copy sectors
Del - Erase sectors

I hope this helps.

PS: same key will shade all glowing sectors at ones when in 3D

This post has been edited by NerdZilla: 24 April 2011 - 04:26 PM

0

User is offline   Mark 

#8

You could PM DanM about how to get all sectors the same shade. I sent him a map to help with a problem I was having and he accidently sent it back with all sectors shaded the same number. I think it might have been a short script he wrote??? Either that or it's a feature in Mapster that I forgot about after he told me.
0

User is offline   Micky C 

  • Honored Donor

#9

He also must have done it for "Tribute to Action 2" as he reworked it into the first level of Duke Nukem Eternity. I believe the original had sector based shading but DNE obviously had a fairly uniform shade with polymer lighting.
0

User is offline   Hank 

#10

start here Posted Image
http://wiki.eduke32....yboard_Commands

and a must read, yes, old, but still valid
http://wiki.eduke32....i/Level_editing

I think the command you are looking for is ;V that sets the visibility of multiple sectors?

Also, I think sprites do not get shaded. Their shading value is set at run time to either the floor value or paralaxed sky value. Having the same shading value for all floors, walls and ceilings may look boring. If it's for a lighting sector, you set that value with the sector effector sprite and the room, once illuminated get's the value of the floor/ceiling.
0

User is offline   Danukem 

  • Duke Plus Developer

#11

To make all surfaces in the map the same shade, you can use a mapster script. First, paste the following code into a txt file, then rename the file to "FILENAME.m32"


define MYSHADE 20
gamevar i 0 0

defstate sameshade

for i allsectors
{
	set sector[i].floorshade MYSHADE
	set sector[i].ceilingshade MYSHADE
}

for i allwalls set wall[i].shade MYSHADE

ends



Obviously, you can change the '20' to whatever you want the shade to be.


Place the file in the same folder as mapster32.exe

Start mapster and load the map.

Open the console. For most people, that is done using the ` key.

Type the following:

include FILENAME.m32
do state sameshade
2

User is offline   Zaxtor 

#12

Quote

1st: How do I copy sectors from one map to another? I know it is possible and written in some faq, but I can´t find it right now.


To copy a sector or many sectors map to another is easy.

When you copy it also copy all the sprites in the selected areas you're about to copy map to another map.
BUT
May not work if the loaded map that you will paste has tons of sprites (will have some sprites missing).


How a copy sectors/sprites and paste to another map.
I select all the stuff. Load another map and you will see all your selected sector flashing green in the newly loaded map.
That trick been around since build era.

This post has been edited by Zaxtor: 09 May 2011 - 07:24 AM

0

User is offline   Micky C 

  • Honored Donor

#13

View PostDeeperThought, on 26 April 2011 - 05:01 PM, said:

To make all surfaces in the map the same shade, you can use a mapster script. First, paste the following code into a txt file, then rename the file to "FILENAME.m32"


define MYSHADE 20
gamevar i 0 0

defstate sameshade

for i allsectors
{
	set sector[i].floorshade MYSHADE
	set sector[i].ceilingshade MYSHADE
}

for i allwalls set wall[i].shade MYSHADE

ends



Obviously, you can change the '20' to whatever you want the shade to be.


Place the file in the same folder as mapster32.exe

Start mapster and load the map.

Open the console. For most people, that is done using the ` key.

Type the following:

include FILENAME.m32
do state sameshade



Hey DT, I've been using your script a bit and it works brilliantly. As you might be aware, I'm adding lights to Spiker's Project Zero DukePlus map, and I'm planning to make it one of the best looking maps around. I was wondering if you could modify your script so that it can distinguish between sectors based on whether they have a parallaxed sky. I.e if I type "do state sameshade" it will give sectors with a parallaxed sky a certain shade and sectors which don't have a parallaxed sky a different shade?

This post has been edited by Micky C: 13 May 2011 - 10:37 PM

0

User is offline   Helixhorned 

  • EDuke32 Developer

#14

That's just 7 lines away:

define MYSHADE 20
define MYSHADEP 10
gamevar i 0 0

defstate sameshade

for i allsectors
{
        ifand sector[i].floorstat 1
            set sector[i].floorshade MYPSHADE
        else
            set sector[i].floorshade MYSHADE

        ifand sector[i].ceilingstat 1
            set sector[i].ceilingshade MYPSHADE
        else
            set sector[i].ceilingshade MYSHADE
}

for i allwalls set wall[i].shade MYSHADE

ends


Well, not entirely, it still needs logic on what to do with the walls (and/or/constant?).
Not tested, so broken with 99% probability ;).
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options