Skill/Difficulty Shotgun Global Start

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

So, I may have just posted a script version, but I was hoping to have a MAPINFO effect.

It is for an internal package with no maps at all and would like to get some info on how to integrate the script-GameSkill-GiveInventory into MAPINFO.
User avatar
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Skill/Difficulty Shotgun Global Start

Post by Accensus »

You don't necessarily have to have maps to use ACS. Add a script file with either .txt extension or .acs (latter is preferred) in the root folder of the .wad/.pk3 and when you're done compile with SLADE. Don't forget to make a LOADACS file and add the script file's name in there. Without the extension.
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

Lud wrote:You don't necessarily have to have maps to use ACS. Add a script file with either .txt extension or .acs (latter is preferred) in the root folder of the .wad/.pk3 and when you're done compile with SLADE. Don't forget to make a LOADACS file and add the script file's name in there. Without the extension.
I am trying to figure out how that would look like in SLADE
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

How should everything look like?
I am trying to research but I am not sure on how to do everything.

I have in LOADACS:

Code: Select all

#import "Shotgun_Start.acs"
#include "zcommon.acs"
Slade is giving me an error when compiling
User avatar
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Skill/Difficulty Shotgun Global Start

Post by Accensus »

Script file:

Code: Select all

//Let's assume the file is called SOMESCRIPT.acs.
#library "SomeLibraryName"
#include "zcommon.acs"

Script 1 ENTER
{
    if (GameSkill() >= 6) //7 & 8. That's because skills start from 0.
    {
        GiveInventory("Shotgun", 1);
    }
}
LOADACS file:

Code: Select all

SOMESCRIPT
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

Lud wrote:Script file:

Code: Select all

//Let's assume the file is called SOMESCRIPT.acs.
#library "SomeLibraryName"
#include "zcommon.acs"

Script 1 ENTER
{
    if (GameSkill() >= 6) //7 & 8. That's because skills start from 0.
    {
        GiveInventory("Shotgun", 1);
    }
}
LOADACS file:

Code: Select all

SOMESCRIPT


That makes MORE sense - but I try and compile it and it says:

Code: Select all

Line 1 in file "C:\Program Files (x86)\SLADE\temp\LOADACS.acs" ...
C:\Program Files (x86)\SLADE\temp\LOADACS.acs:1: Invalid declarator.
> Shotgun_Start
>            ^
User avatar
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Skill/Difficulty Shotgun Global Start

Post by Accensus »

You compile the script file, not the LOADACS one. And try to make the names 8 characters long or less. Like, use SHOTSTRT instead of Shotgun_Start.
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

Lud wrote:You compile the script file, not the LOADACS one. And try to make the names 8 characters long or less. Like, use SHOTSTRT instead of Shotgun_Start.
It isn't working

Here is what I did:
Script file (shotstrt.acs in the root folder of .wad)

Code: Select all

#library "ShotStrtLib"
#include "zcommon.acs"

Script 1 ENTER
{
    if (GameSkill() >= 6) //7 & 8. That's because skills start from 0.
    {
        GiveInventory("Shotgun", 1);
    }
}
LOADACS (in Slade)

Code: Select all

shotstrt
User avatar
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Skill/Difficulty Shotgun Global Start

Post by Accensus »

Is there an error? If yes, what is it? Do you have ACC set up in SLADE?
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

Lud wrote:Is there an error? If yes, what is it? Do you have ACC set up in SLADE?
"Could not find Autoloaded ACS Library SHOTSTRT" - I did set ACC up in SLADE
User avatar
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Skill/Difficulty Shotgun Global Start

Post by Accensus »

If this happens on startup - it sounds like ACC did not compile SHOTSTRT. In .wad files, the compiled file should be between A_START and A_END. Can you send me a screenshot of the root directory in SLADE?
If this happens when compiling...idk, man, screenshot might still be helpful.
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

Lud wrote:If this happens on startup - it sounds like ACC did not compile SHOTSTRT. In .wad files, the compiled file should be between A_START and A_END. Can you send me a screenshot of the root directory in SLADE?
If this happens when compiling...idk, man, screenshot might still be helpful.
. . . . . . . . I totally got it now. UGH . . . . I just named the file in Slade SCRIPTS this whole time instead of naming it SHOTSTRT
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

Thank you so much Lud - I just needed to be walked through it as I had my hand held - now I totally know how to do this.
User avatar
Accensus
Banned User
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Skill/Difficulty Shotgun Global Start

Post by Accensus »

Hey, it's my pleasure. :) Feel free to ask if you're having issues with anything else.
User avatar
JagDogger2525
Posts: 38
Joined: Sun Jan 08, 2017 6:10 pm

Re: Skill/Difficulty Shotgun Global Start

Post by JagDogger2525 »

You should see this in the update of my wad (within DoomWorld), Hell's Train Station
Locked

Return to “Editing (Archive)”