Page 1 of 1

Where are fragglescript scripts stored?

Posted: Sun Dec 04, 2005 22:01
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?

Posted: Sun Dec 04, 2005 22:09
by TheDarkArchon
FraggleScripts are stored in the level header (MAPxy/ExMy lump)

Re: Where are fragglescript scripts stored?

Posted: Sun Dec 04, 2005 22:32
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.

Posted: Sun Dec 04, 2005 22:42
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.

Posted: Sun Dec 04, 2005 23:01
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.

Posted: Sun Dec 04, 2005 23:45
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.

Posted: Sun Dec 04, 2005 23:46
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.

Posted: Sun Dec 04, 2005 23:50
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.

Re: Where are fragglescript scripts stored?

Posted: Mon Dec 05, 2005 17:16
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]

Posted: Mon Dec 05, 2005 17:20
by Graf Zahl
No chance I will add console access. It is far too dangerous.

Posted: Mon Dec 05, 2005 17:25
by justin023
Even if there was it should of course have certain commands blocked out like "unbind all"

Posted: Mon Dec 05, 2005 17:34
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.

Posted: Mon Dec 05, 2005 17:49
by Phobus
why not just code in the useful ones then?