ACS access to individual sectors/lines

Moderator: GZDoom Developers

User avatar
Mánibranðr System
Posts: 179
Joined: Sun Aug 26, 2012 5:28 pm
Preferred Pronouns: They/Them
Location: Hong Kong

Re: ACS access to individual sectors/lines

Post by Mánibranðr System »

Gez wrote:Then WFDS I guess
Speaking of which, how long more do we have to wait for Doomscript? :P
Monsterovich
Posts: 59
Joined: Sat Apr 12, 2014 11:10 am

Re: ACS access to individual sectors/lines

Post by Monsterovich »

ArcheKruz wrote:
Gez wrote:Then WFDS I guess
Speaking of which, how long more do we have to wait for Doomscript? :P
I guess, another 8 years, but I really want it!
Last edited by Monsterovich on Thu Apr 17, 2014 10:03 am, edited 4 times in total.
Korshun
Posts: 52
Joined: Thu Dec 13, 2012 1:32 pm

Re: ACS access to individual sectors/lines

Post by Korshun »

Okay, so you refuse to implement direct access to sectors and lines because it would break compatibility (although no one named any mod that uses negative tags, except for CiF3, and that issue can be solved with a compatflag). So instead we could make different functions for direct access, like SectorNum_SetColor, that works the same as Sector_SetColor, but with sector numbers instead of tags. I proposed negative tags because they keep all the old sector/line access functions and I haven't seen a single mod that uses negative tags.

But don't tell me that direct access to sectors and lines (and actors) is useless. Without it, how do I make a day/night/weather system that correctly restores sector properties back to original without manually setting tags for hundreds of sectors and inevitably making mistakes? (that's what my friends want to do in a real project, but got stuck with the tag system) How do I make new gamemodes based on existing maps that add new features to them? (of course, better editing requires more sector information functions)

And the tag system is restrictive because it doesn't allow you to assign more than one tag to one object (sector/line/actor). This means that when there are multiple tag ranges with intersections between them, you have to assign a different tag to every object. And that's no different from individual access, just worse, because the "tag" field could have been used to provide additional information about the sector. And UDMF user vars...

Actually, individual access to sectors/lines/actors would make UDMF user vars A LOT more useful. Any sector can have any vars set, acting like an overhauled tag system, where every sector/line/actor may have multiple tags and those tags may have additional numers attached. THAT would be REALLY convenient!
User avatar
Leonard2
Posts: 313
Joined: Tue Aug 14, 2012 6:10 pm

Re: ACS access to individual sectors/lines

Post by Leonard2 »

Gez wrote:The idea of having gameplay mods that mess around with lines and sectors in maps which weren't specifically designed for them sounds like a recipe for undefined behaviors and game-breaking bugs.
Because using tags to do that is better of course..
Graf Zahl wrote:Without detailed knowledge of the map such access is utterly useless.
I think that's just your opinion.
GooberMan wrote:You know what would be cleaner here? A script that activates once for each sector. Like a new SECTORINIT script type. And then you could get the sector's tag, and if it's zero then you can set it to any unused tag. Say, for example, starting at the minimum value (0x80000000 for 32 bit - chop off the 4 extra zeros if it has to be 16 bit) and checking if that tag is taken and then assigning if it is not.
I don't think I would call that "cleaner".
If his suggestion would be implemented without any problems concerning the tag system I think it would be a much cleaner and better solution than that.
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Re: ACS access to individual sectors/lines

Post by GooberMan »

Korshun wrote:I haven't seen a single mod that uses negative tags.
You should get out more.
Korshun wrote:Without it, how do I make a day/night/weather system that correctly restores sector properties back to original without manually setting tags for hundreds of sectors and inevitably making mistakes?
You don't. And that's not a bad thing.

Both myself and Nash have separate day/night/weather systems. What's the problem? You're clearly not thinking it through. You have no problem setting a sector's properties to give it nukage damage, but a tag for a lighting effect is a bad thing?
Korshun wrote:And that's no different from individual access, just worse, because the "tag" field could have been used to provide additional information about the sector.
Rubbish. A tag provides a (non-)unique identifier for a sector/line/actor. The only thing providing additional information about the sector is the scripts you write/line actions you set to support it.

It also hides the fact that a sector/line/thing number can change underneath the system. Like I said, it is no different to naming an object in a modern engine so that you can access it via script. The internal representation of the data should be completely meaningless to a mapper/modder. Anyone arguing against this has a very specific purpose in mind and should make a fork for their own nefarious needs rather than messing up a long-standing design decision that is still valid in modern engines.
Korshun wrote:Any sector can have any vars set
Welcome to several posts ago.

EDIT:
Leonard2 wrote:I don't think I would call that "cleaner".
Then you're also not thinking it through. A script function that lets you analyze a sector on initialisation and decide what you want to do with it? Cleaner, more flexible, and less error-prone than giving direct access to sectors through a half-assed ill-informed modification to the tag system.

EDIT2: I just want to go on record and state that one of the suggested mods that are possible with direct sector access - one that you can alter the properties of a sector such as height with a gun of some sorts on any map in Doom history - is a horrible idea. Because upper/lower linedefs on either side for the relevant sector won't be set correctly because the map won't have been designed to move in that fashion. Helloooooooooo rendering artifacts. Oh, wait, you want access to lines too so you can set upper/lower textures if they don't exist? Bzzzzt. Say goodbye to every vanilla rendering hack.
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: ACS access to individual sectors/lines

Post by Enjay »

Well, I don't know how flexible something like this would be versus the original intent of this request but, just to make the point, you don't need to use hundred of sector tags to affect things in existing maps. Load the attached file into any of the supported games and start playing.
Korshun
Posts: 52
Joined: Thu Dec 13, 2012 1:32 pm

Re: ACS access to individual sectors/lines

Post by Korshun »

GooberMan wrote:You should get out more.

So, will you name any wad?
GooberMan wrote:Both myself and Nash have separate day/night/weather systems. What's the problem? You're clearly not thinking it through. You have no problem setting a sector's properties to give it nukage damage, but a tag for a lighting effect is a bad thing?
How did you implement support for changing light level, color and fog on about 1000 sectors and then restoring their original values? Like, I have a sector gradient light on a street, and it needs to get brighter as the sun rises, and then get darker, but not less than its original value. To implement this in the original system, I need to manually tag every such sector with a different tag for every light level, and what if I have some areas that sometimes get foggy? Now I need to double the amount of tags. Considering that there would be about 200 such sectors, and a lot of tags, it's easy to mix them and end up in bugs. Individual access to sectors fixes all the problems here. Just mark all street light sectors with one tag and make a script that changes and restores all needed properties.
GooberMan wrote:It also hides the fact that a sector/line/thing number can change underneath the system.
Sector/line/actor numbers need to be NUMBERS only because everything is a number in ACS. If that was DoomScript, they would be object references. Also, what was the last time a sector or line number changed during the game?


EDIT: Enjay, I know that such scripting is possible. But is it possible to apply a DIFFERENT effect to each sector? (like in the example in the first post)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ACS access to individual sectors/lines

Post by Graf Zahl »

So...

What is it with you people anyway?
You demand the things you need and throw a fit if you don't get them for very valid reasons.
Reality check: This is NOT your engine!!!
Locked

Return to “Closed Feature Suggestions [GZDoom]”