Automatically adding libraries; a AUTOLIB lump?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Automatically adding libraries; a AUTOLIB lump?

by Macil » Mon Aug 15, 2005 1:24 pm

This would be cool for somethings. You could make an add-on wad to another mod, which could add some things. I've worked on one WAD for a looonnnnggg time and the main thing I wanted was something like this.

by Talonos » Thu Aug 11, 2005 6:41 pm

Bump.

It's been awhile, and I want to make sure that people see this.

by Talonos » Mon Jul 18, 2005 1:35 pm

If (or when) you implement this, could you let me know in this thread? The main community build thread is really confusing and crowded, and if you notify people there, I probably won't notice it.

by Graf Zahl » Sun Jul 17, 2005 2:15 pm

I'd like to allow that but it would require some setting up because the ACS interpreter is not designed to run functions without a script.

by Costja » Sun Jul 17, 2005 11:58 am

Graf, can't we use functions instead of scripts for autoload libraries?

by Cutmanmike » Sun Jul 17, 2005 11:40 am

Curse raven for their mysterious ways.

by Graf Zahl » Sun Jul 17, 2005 11:36 am

It means that it can't be more than 1000. Raven did some really odd things to mark open scripts and as a result script numbers larger than 1000 can't be used - ever!

by NiGHTMARE » Sun Jul 17, 2005 11:06 am

Does this "internal organization" simply mean the script number can't be more than three digits? If so, might it be possible to allow it to use characters other numbers, e.g. script ABC?

by Costja » Sun Jul 17, 2005 10:57 am

Can't we use ACS-functions then? (And allow only ACS-functions in autoload libraries)

Example:

Code: Select all

function void somefunction(int arg1, int arg2, int arg3, int arg4, int arg5) {
//...
}

Code: Select all

//...
SOME A 0 A_Call("somefunction", 1, 2, 3, 4, 5)
//...

by Graf Zahl » Sat Jul 16, 2005 9:21 am

Sorry, I have no idea why Raven chose 999.
Unfortunately due to internal organization the number cannot be increased at all.

STRFHELP is only loaded with Strife maps not in Hexen format so it won't help you at all.

by Talonos » Sat Jul 16, 2005 8:59 am

999? From a programming prospective, isn't that a bit odd? Why not 1024, or some other bianary number? Could you enable the use of scripts 1000-1024, but make them only available for autoloading scripts? That way, you can use a weapons mod in a wad that already uses scripts up in the 900 ranges, and map authors won't accidentally use scripts that disable weapon mods.

Oh, and that STRFHELP library? You said the code was already there. Does that mean I just put a library in there named STRFHELP in my wad, and it works as described above?

by Graf Zahl » Sat Jul 16, 2005 3:18 am

script numbers are restricted to 0-999.

by wildweasel » Fri Jul 15, 2005 7:01 pm

Here's a (not-so-elegant) solution. Layer the "auto-load" script over any existing scripts, but require the user to use a script number in a certain range (say, script numbers 32000-32100).

by Graf Zahl » Fri Jul 15, 2005 11:33 am

...and to work with Hexen format maps that already contain scripts. Without that limitation I'd have taken care of it already but so far I haven't analyzed the script loading code sufficiently.

by Grubber » Fri Jul 15, 2005 10:42 am

The code is already in there - loading of STRFHELP library. Only thing to make is generalizing the code to autoload any library.

Top