Where are fragglescript scripts stored?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Where are fragglescript scripts stored?

Post by Enjay »

I'm trying to make a fragglescript and a regular Zdoom behavior lump co-exist on the same level. I need to do this because, AFAIK, the fraggle script function I need (runcommand("viewheight X")) doesn't have an ACS eqivalent.

I can sometimes get it to work. In DeePsea, if I compile and save my behavior lump, then insert the fs file, it works. If I then re-insert the behavior lump, the fs script stops working. When I inspect the lumps in the working file with either DeePsea or XWE, I can't see anything obvious that relates to the fs scripts.

So, I guess I have a few questions:

Where is the fragglescript data stored?

Is there a way of simply inserting an appropriately named text file that will work to run fs scripts but only on a specific level like you can do with the fsglobal lump?

Is there, or could there be an equivalent to the fs viewheight made available to ACS?

And a couple of subsidiary questions:

After much trial and error, running right up to walls and seeing where my view ends up, it seems that, in GZDoom at least, "viewheight 41" gives me the same view as the default. The number strikes me as a touch low (although I always knew the Doomguy had eyes in his chest). Is 41 correct? 42 is definitely too high by one pixel and 46, which is what I thought it was is way too high.

Would it be possible to have the viewheight command also affect the height of crosshairs? I'd quite like to make the Doomguy appear a little taller - especially as most of the enemies look a little taller in GZdoom due to being shifted up so their feet don't get clipped. However, when I do this, even by a couple of units, the crosshair and where bullet decals appear on the wall are noticably out of step with each other (not that they were ever dead on - for reasons Randy has explained many times). Or would the solution be for me to just alter the offsets of the crosshair graphics?
User avatar
TheDarkArchon
Posts: 1000
Joined: Wed Jul 06, 2005 11:58
Location: What's that fucking smell
Contact:

Post by TheDarkArchon »

FraggleScripts are stored in the level header (MAPxy/ExMy lump)
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Where are fragglescript scripts stored?

Post by Graf Zahl »

Enjay wrote:
Is there a way of simply inserting an appropriately named text file that will work to run fs scripts but only on a specific level like you can do with the fsglobal lump?
As TheDarkArchon said, it's stored in the level header.
Is there, or could there be an equivalent to the fs viewheight made available to ACS?
No. Not yet.
And a couple of subsidiary questions:

After much trial and error, running right up to walls and seeing where my view ends up, it seems that, in GZDoom at least, "viewheight 41" gives me the same view as the default. The number strikes me as a touch low (although I always knew the Doomguy had eyes in his chest). Is 41 correct? 42 is definitely too high by one pixel and 46, which is what I thought it was is way too high.
41 is the default.
Would it be possible to have the viewheight command also affect the height of crosshairs? I'd quite like to make the Doomguy appear a little taller - especially as most of the enemies look a little taller in GZdoom due to being shifted up so their feet don't get clipped. However, when I do this, even by a couple of units, the crosshair and where bullet decals appear on the wall are noticably out of step with each other (not that they were ever dead on - for reasons Randy has explained many times). Or would the solution be for me to just alter the offsets of the crosshair graphics?
The crosshair always marks the spot you are looking at. If the view is higher the crosshair adjusts with it. It should always be in the center of the screen.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, thanks for the info. I guess the crosshair problem is a result of the view being shifted up, therefore the crosshair also being shifted up to stay central, but the origin of my attacks still being their at their usual height.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Hmmmm, thinking aloud...

Does anyone know - is there anyway to add something to the FSGLOBAL lump that can check which level you are on and then execute a script only for that level? I'm guessing no, because I can see people arguing that it would be pointless to do so, however it could have some use, so just maybe it exists.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

There's a levelnum() function that returns the number you can assign in the MAPINFO. For MAPxx maps the default number is assigned if nothing is specified.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Enjay wrote:OK, thanks for the info. I guess the crosshair problem is a result of the view being shifted up, therefore the crosshair also being shifted up to stay central, but the origin of my attacks still being their at their usual height.

The crosshair doesn't show where the weapon is aiming at. It shows what you are looking at. That's even so in normal ZDoom and as a result bullet holes always appear a few units lower.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Yeah, I knew that. But it's usually close enough for it to be a pretty good aiming guide - and of course most of the time it doesn't matter anyway. It's just that with altering the view height, the difference becomes pronounced enough to feel weird most of the time (IMO). So be it, I guess.
User avatar
justin023
Posts: 165
Joined: Wed Sep 21, 2005 10:51
Location: Illinois
Contact:

Re: Where are fragglescript scripts stored?

Post by justin023 »

Graf Zahl wrote:
Enjay wrote:Is there, or could there be an equivalent to the fs viewheight made available to ACS?
No. Not yet.
It would be cool if there was an ACS command to execute console commands because it would be possible to make custom zooming for each weapon rather than have unlimited zooming always enabled through console aliases. That's the only big thing acs lacks. [/off topic]
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

No chance I will add console access. It is far too dangerous.
User avatar
justin023
Posts: 165
Joined: Wed Sep 21, 2005 10:51
Location: Illinois
Contact:

Post by justin023 »

Even if there was it should of course have certain commands blocked out like "unbind all"
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

You can't selectively exclude any command that is potentially dangerous. Some are only dangerous in certain situations. You'd have to cripple the console access to the point of uselessness.
User avatar
Phobus
Posts: 227
Joined: Sat Sep 03, 2005 11:48
Location: Orpington, Kent, England
Contact:

Post by Phobus »

why not just code in the useful ones then?
Locked

Return to “GZDoom”