View previous topic :: View next topic |
Author |
Message |
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Tue Feb 14, 2012 2:31 am Post subject: LOADACS - coolest new feature since DEHACKED? |
|
|
The 1.09b24 changelog wrote: | 17. 9. Implemented support for LOADACS libraries. |
"LOADACS" huh? No, I had no clue what that was either - until Worst explained it to me.
Here's the Zdoom wiki entry for it.
Think like how before now you could run DEHACKED patches, sprite or sound mods on servers, and how everything would then be altered on each map? Now you can run whole chunks of ACS scripting the exact same way - even on Boom format maps!
Examples?
Say you want to pretend you're playing your favourite maps, but underwater?
A simple patch like watery adds blue colour, fog and less gravity to (all untagged sectors on) any map!
Jinkies! I'm Dwangoing in my scuba gear
Or maybe you want a script that gives you 10 Heretic timebombs every time you respawn? No problem!
ZDCTF just got real interesting!
Oh noes... did I just give away that Heretic items can now be spawned and used in Doom?
Or, on a more expansive scale, you could write a complete modifier, like I did with my haxmod over in the other thread
All you need for one of these patches? Well, you'll have to know some ACS, and be able to use a lump editor (like XWE). Then?
All the patches that I linked to above contain are the following entries:
Code: | LOADACS
A_START
TEHCODE
A_END
SCRIPTS |
LOADACS is a very simple lump that tells Zdaemon which code lumps to load. In the example above, it would simply contain the name TEHCODE.
A_START and A_END are the markers which tell the engine where to find the compiled script lumps.
TEHCODE is that compiled script. Easiest way to make this in XWE? Create a new entry directly above your scripts lump, then hit compile. The new entry should now have a size above 0 bytes - if it does not then something is wrong in your code and it failed to compile.
SCRIPTS is the ACS itself, which is only included for reference, as it is unused in the WAD. Your script needs to have a library header at the very start, ie
Note: Using high/obscure thing tag and script numbers in your ACS is highly recommended to avoid clashes with any existing map code. There is no such problem if you only want a patch to run on Boom format maps.
Go forth and experimentate!
Last edited by Cybershark on Thu Jul 12, 2012 12:38 am; edited 3 times in total |
|
Back to top |
|
|
The Ultimate DooMer God like!
Joined: 30 Aug 2004
|
Posted: Tue Feb 14, 2012 2:34 am Post subject: |
|
|
I used that to make a mod that autosaves every X seconds (you choose what X is) and a mod that turns Hexen (or any of it's pwads) into an RPG...certainly didn't expect the feature to end up in ZD
Quote: | Oh noes... did I just give away that Heretic items can now be spawned and used in Doom? |
Surely that means we can also use Heretic weapons in Doom...gogo ZDCTF with crossbows and morph eggs |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Tue Feb 14, 2012 3:00 am Post subject: |
|
|
The Ultimate DooMer wrote: | Surely that means we can also use Heretic weapons in Doom...gogo ZDCTF with crossbows and morph eggs |
Mano and I already played around with this on a server.
I've always wanted to include timebombs and chaos spheres in regular DM maps
One other (silly) thing I'd like to do is to glue Heretic E1M1 to Doom E1M1 and play it as a TDM - Corvus vs Doomguy
I like Heretic... and I like Doom... but which is better?
There's only one way to find out:
FIGHT!!! |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Wed Jul 25, 2012 2:21 pm Post subject: |
|
|
I recently came to realise I'd made one important omission from all my LOADACS scripts (thankyou Worst for setting me straight!).
All script lumps need to have
Code: | #library "codename" | at the very beginning (alongside #include "zcommon.acs"). Where 'codename' is the name of the compiled code - for the above example that would be "TEHCODE".
This is very important if you want your mod to work with maps which contain their own ACS script. Your code will be ignored if the library definition is not in place!
So, I need to redo Haxmod, Sr should update Regeneration, Krawa may want to add that to his tag667workaround, etc.
[original post edited too] |
|
Back to top |
|
|
Sr69Mm-jC Unstoppable!
Joined: 21 Jul 2011
|
Posted: Fri Aug 09, 2013 4:31 pm Post subject: |
|
|
Cybershark wrote: | All script lumps need to have
Code: | #library "codename" | at the very beginning (alongside #include "zcommon.acs"). Where 'codename' is the name of the compiled code - for the above example that would be "TEHCODE".
This is very important if you want your mod to work with maps which contain their own ACS script. Your code will be ignored if the library definition is not in place! |
I've stumbled upon a weird bug with my regeneration patch today where it seemed like most scripts work fine but one of them is simply ignored altogether. The funny thing is when I found this topic I noticed this:
Cybershark wrote: | So, I need to redo Haxmod, Sr should update Regeneration, Krawa may want to add that to his tag667workaround, etc. |
You literally told me how to fix my own wad more than an year ago and I just did not listen back then. It was hilarious.
Either way, my patch is indeed fixed now - no scripts are ignored. |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Tue Aug 13, 2013 1:28 am Post subject: |
|
|
Long as we got it fixed in the end |
|
Back to top |
|
|
|