Duke4.net Forums: [M32 Script]Rotate map, level sectors, 'splosions - Duke4.net Forums

Jump to content

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

[M32 Script]Rotate map, level sectors, 'splosions

#1

I thought I might as well post this here…

Extract the content of the archive in Duke3D directory, open Mapster32's console, type "include acc_rota5" and confirm.

The script is meant to rotate selected walls and sprites in a transparent way (you won't need to open the console ever again, and it won't bother you while using Mapster): select a part of the map with RSHIFT, press and hold LCTRL to enable rotation mode (release LCTRL to leave). In rotation mode, you get a preview of the rotated selection, move the mouse cursor around to change the selected area's orientation. Press TAB to cycle through five different rotation points (upper left, upper right, lower left, lower right or center of the selection). Press SPACE to apply the rotation.

There's also a sector leveling code included : it allows you to create complex prefabs (car, cupboard, fountains…) and past them into another sector without having to worry about the floor/ceiling/shading. Select a few sectors with RALT, move your cursor above another sector and press Q to level the floor and ceiling to the destination sector (the lowest floor and the highest ceiling are used for reference; their texture, flags, shading and tags are also changed to match the destination's). You can change the leveling mode with TAB: 0 - Adjust ceiling & floor (sprites stick to floor) 1 - Adjust ceiling & floor (sprites stick to ceiling) 2 - Adjust to floor (ceiling is slave -- height of the sector is preserved) 3 - Adjust to ceiling (floor is slave -- height of the sector is preserved)

'Splosions: in 3D mode, place the mouse cursor above an explosive device (SEENINE, REACTOR, FIREEXT, OOZFILTER, CRACK1, CRACK2, CRACK3 or CRACK4) and press X. If no HiTag is defined, the script tries to find the next highest value available. If the selected sprite has a friend (another visible sprite with the same HiTag (or LoTag for REACTOR) and PicNum), a trail of explosion is created to link them both. If it has multiple friends, only the first found is used. It is also possible to "append" extra explosions to an existing sequence (ie: a SEENINE with a LoTag of 100 can be used to spawn more explosions, starting with a wait time of 100). The explosion frequency and spread depends on the sprite PicNum. The extra explosions count depends on the type (cloud uses default count/trail uses distance) (sorry, just fixed a bug where the script would never exit a loop because there's a wall in the way of the trail and no extra sprite can be placed)

Note there's a small bug with the rotation script: if you select only one of two points of a wall, the second point will be previewed, even though it's really ignored by the rotation.

EDIT: updated file, latest version.

Attached File(s)



This post has been edited by alias conrad coldwood: 16 November 2014 - 10:54 AM

5

User is offline   Paul B 

#2

Yea, this is pretty awesome!

This post has been edited by Paul B: 18 October 2014 - 03:19 PM

0

#3

View PostPaul B, on 18 October 2014 - 11:12 AM, said:

Yea, I just tried this. While the sector rotating thing is pretty neat. The floor / ceiling leveling leaves much to be desired. Selected objects don't really match their heights of the destination sector that Q is pressed on. Also the sprites didn't retain their vertical position. What really happens is the ceiling and floor join being squished together. No further adjustment can occur after that happens. But the theory is good.

Okay, instead of copying someone else's sector from a map. I created a new sector with different ceiling heights. With the new sector I created I was able to merge the two sectors together so that the joining sector took on the same ceiling heights as the sector it was being connected with. So it worked with two new sectors as it was intended.

For some reason it didn't work copying a sector from another map into my test map. Please see the attached map where the truck fails to join the larger square sector. Any suggestions?

P.S - Whatever you do don't tell Methy I was trying to steal his truck. =P

Thanks for the file! I'll look into that.
1

User is offline   Paul B 

#4

View Postalias conrad coldwood, on 18 October 2014 - 11:49 AM, said:

Thanks for the file! I'll look into that.



Leave it to me to find some bullshit problem. I'm a magnet for trouble! =)

This post has been edited by Paul B: 18 October 2014 - 12:00 PM

0

#5

View PostPaul B, on 18 October 2014 - 11:56 AM, said:

Leave it to me to find some bullshit problem. I'm a magnet for trouble! =)

Found the issue: there are four sectors in your selection (let's call 'em 1: Sprite work, 2 & 3: Doors, 4: Empty room), sector 2, 3 and 4 are causing the issue (because it's technically the lowest ceiling)
FIX: remove all three sectors, or move them out of the selection (that's why I should probably use a marker system to define the reference floor/ceiling)

(Edit: a small tiny little detail almost too insignificant to mention: sprites are aligned according to the floor, not the ceiling)

This post has been edited by alias conrad coldwood: 18 October 2014 - 12:16 PM

0

User is offline   MetHy 

#6

View PostPaul B, on 18 October 2014 - 11:12 AM, said:

P.S - Whatever you do don't tell Methy I was trying to steal his truck. =P


That's High Treason's truck, like the ID plate says.
0

User is offline   Micky C 

  • Honored Donor

#7

I haven't checked the script out, but it sounds like the rotating thing does exactly what mapster's more recent rotating feature already does.
0

#8

View PostMicky C, on 18 October 2014 - 01:30 PM, said:

I haven't checked the script out, but it sounds like the rotating thing does exactly what mapster's more recent rotating feature already does.

The extended scripts? Never managed to get them to work, and from what I understand it expects me to change the rotation value using console vars, and execute the rotation with another console command... and convert myself degrees to 0-1023... that's a lot of work I'm not feeling like doing.
(edit: unless there's something more recent?)

This post has been edited by alias conrad coldwood: 18 October 2014 - 01:51 PM

0

User is offline   Micky C 

  • Honored Donor

#9

View Postalias conrad coldwood, on 18 October 2014 - 01:50 PM, said:

(edit: unless there's something more recent?)


Yep. From the wiki:
(Like I said, it seems to pretty much do the exact same thing, it's a useful feature).


Quote

LSHIFT+LMB (with RSHIFT-highlighted points) interactively scale highlighted points (+CTRL forces square aspect)
LSHIFT+RMB (with RSHIFT-highlighted points) interactively rotate highlighted points



The frepab script sounds like it may be useful. I'm probably the biggest copy-paste whore ever. Still not quite sure what Paul's problem is.

This post has been edited by Micky C: 18 October 2014 - 02:33 PM

0

#10

View PostMicky C, on 18 October 2014 - 02:31 PM, said:

(Like I said, it seems to pretty much do the exact same thing, it's a useful feature).

That's on me for not reading the wiki.

View PostMicky C, on 18 October 2014 - 02:31 PM, said:

The frepab script sounds like it may be useful. I'm probably the biggest copy-paste whore ever. Still not quite sure what Paul's problem is.

There was another sector underneath the actual selection screwing up the thing, should be "fixed" now (well, if you use leveling mode 2 or 3)
1

User is offline   Micky C 

  • Honored Donor

#11

View Postalias conrad coldwood, on 18 October 2014 - 02:38 PM, said:

That's on me for not reading the wiki.


Nah that's ok. Features are added all the time and the only way to keep track of them is to have a full-time job watching the forumsPosted Image

Just checked out the prefab script, I can definitely see myself using this. It's fairly easy to use and automatic, maybe even something that should be included with eduke32 (but probably won't). I've been waiting for something like this for a while. The only thing that could make it better, and into a true prefab thing, is if you could have like an original prefab, and when you made changes to the prefab (like shape, textures etc) it applies those changes to all the sectors generated from it. The only issue is I can't think of a simple way of how to keep track of what's generated from what, and apply the changes like that. I was going to wait until the new map format came out which can easily have extra arbitrary sector tags and things added when needed, and request such a prefab feature then Posted Image (along with some convenience sloping tools I think of as "sloping groups"; triangular and quadrilateral sectors that can be tagged to always be slope-aligned to either the wall adjacent to or opposite the firstwall respectively).

The issue is I can't seem to see what mode is currently selected?
0

User is offline   Paul B 

#12

View PostMetHy, on 18 October 2014 - 12:29 PM, said:

That's High Treason's truck, like the ID plate says.



Oh sorry about that Methy, I just picked a vehicle from the map I didn't bother looking to see whose it was. I was just wanting to test this script out and that was the first vehicle I saw in 2D mode. Anyway I'll try the new script out to see how it works.

Ahh yes I see now that there was another group of sectors that were accidentally selected with the vehicle at the time I copied it. So really this fault was my own doing. Sorry about that. Very cool and useful script features. Thanks for clearing up my confusion.

This post has been edited by Paul B: 18 October 2014 - 03:11 PM

0

#13

View PostMicky C, on 18 October 2014 - 02:48 PM, said:

The issue is I can't seem to see what mode is currently selected?

It displays the mode when you cycle through, but yeah, it should always be written somewhere.

About the prefab stuff, maybe it could be possible using sector's hitag? Another super fancy way would be to keep track of the sectors with a "list" (made of sprites, somewhere, out of the map). I don't know, just throwing ideas.
0

User is offline   Micky C 

  • Honored Donor

#14

It's probably best that it's only shown only when you're cycling, since you don't want to bloat up the screen with stuff, but I'm not seeing it at all.

Hitags would probably work since IIRC they're not used for anything with sectors.

This post has been edited by Micky C: 18 October 2014 - 04:17 PM

0

#15

View PostMicky C, on 18 October 2014 - 04:16 PM, said:

It's probably best that it's only shown only when you're cycling, since you don't want to bloat up the screen with stuff, but I'm not seeing it at all.

Get the last version, it should work now.
1

User is offline   Micky C 

  • Honored Donor

#16

It's working now Posted Image

That explosion thing is pretty cool btw.
0

User is offline   oasiz 

  • Dr. Effector

#17

This script sounds really useful, can't wait to try it out.
Explosion generation sounds really useful, it's always tons of manual labor for individual sequences that end up being alike anyway aside from slight pseudo randomness.
0

User is offline   Micky C 

  • Honored Donor

#18

I'm getting lots of instances when the Michael Bay Presents feature that generates explosions between two sprites linked by hitag not working even though they have a direct line of sight. Any ideas?
0

#19

View PostMicky C, on 08 November 2014 - 03:04 AM, said:

I'm getting lots of instances when the Michael Bay Presents feature that generates explosions between two sprites linked by hitag not working even though they have a direct line of sight. Any ideas?

Safest bet: there's not enough space between both sprites. I also overlooked one case: when you try to add explosions to a group of visible Seenines from the same family but using different timings (that should be fixed now)... There's also another case I'm unable to explain at all where sprite don't see each other even though there's nothing in the way; it happened once with cracks: I had to move one of the cracks away from the wall, then use the script before putting it back against the wall (I suspect it's a bug in the function I use; if I recall correctly I tried two different ways to check if they saw each other and both method failed in that one specific setup, and I really have no idea why)

Try this?

I'm also attach ExploTest.Map, check the rightmost crack in the wall (Sprite[11]): it doesn't connect at all unless I move it away from the wall first. I can't explain that ("aliens.jpg" #illuminatis #lulz, wow very meme much relevance)

This post has been edited by alias conrad coldwood: 08 November 2014 - 05:53 AM

0

User is offline   Micky C 

  • Honored Donor

#20

Hmm it's just not working for me for any sprites that I actually place in the level. I'm sure they have the same tags. Seems to work for the ones that are already in that map though. I must be overlooking something?

Btw here's an idea, what if when the script searches for a friend to make a trail, the friend should also have the same pal? That way it would be much easier to use the script to make several branches of explosions by changing the pal of the two sprites before you use it.
0

#21

View PostMicky C, on 08 November 2014 - 02:39 PM, said:

Hmm it's just not working for me for any sprites that I actually place in the level. (...) Seems to work for the ones that are already in that map though.

If I get it right, unless you save the map or load a map, it's not working? If you try to link two sprites using the script, it won't work until you save and reload the map? Can you send or attach what you're working on?

View PostMicky C, on 08 November 2014 - 02:39 PM, said:

Btw here's an idea, what if when the script searches for a friend to make a trail, the friend should also have the same pal?

I should totally add that

EDIT: removed all attached files, check the first post for the last version

This post has been edited by alias conrad coldwood: 16 November 2014 - 10:52 AM

0

User is offline   Micky C 

  • Honored Donor

#22

It seems I can't get the seenines or oozfilters to link at all.
0

#23

View PostMicky C, on 10 November 2014 - 08:07 PM, said:

It seems I can't get the seenines or oozfilters to link at all.

Aoutch. It's by design: I thought "containers" (SEENINE, FIREEXT, OOZFILTER) would more likely be stacked together, so the link would be only a few feet long and since you need to make all containers nearby belong to the same family (or you only get one explosion in game), you'd ALWAYS get an explosion trail even if you actually wanted some kind of "cloud" explosion. However, REACTOR, CRACK1, CRACK2, CRACK3 and CRACK4 are never stacked one next to the other, so having a trail makes more sense. Also, trails imply that both start point and end point are destroyed at the same time (it was designed with SectorEffector 13 in mind)

I thought it could be a possibility to say that the starting point would be visible and the end point would be invisible, but that could become an issue if you add multiple trails from the same start point as the new explosions created by a previous trail could possibly be a destination point too.

It's tricky.
0

User is offline   Micky C 

  • Honored Donor

#24

Hmm well in a previous version I could get the seenines to link so you're saying you restricted it later?

What I'd like to use this for is to create trails of explosions flying all over the place (which shouldn't be too hard thanks to the pal thing) rather than through destructible walls.
0

#25

View PostMicky C, on 11 November 2014 - 05:52 AM, said:

Hmm well in a previous version I could get the seenines to link so you're saying you restricted it later?

Yep, because I thought you tried to add explosions and nothing happened because the distance between the two objects was too small. So I disabled the trail in that case to force the script to create a cloud instead (which would at least produce a result). I can enable it back it's super easy. But I'm puzzled...

Did you try to link the cracks in the wall in the example map? Did it work? What version of Mapster do you use?
0

User is offline   Micky C 

  • Honored Donor

#26

Yeah it worked for the cracks, make a trail between them. I'm using r4552 which is about 5 months old.

Enabling it back would be nice. (If anything I thought the problem back when I first mentioned it was that the distance was too big).

This post has been edited by Micky C: 14 November 2014 - 09:07 PM

0

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