[v0.2.1] Stupid Achievements

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

[v0.2.1] Stupid Achievements

Post by m8f »

Image

Download
Source code

Achievement mod and script library for GZDoom.

Consists of two parts:
- Stupid Achievements - script library.
- Imp Achievements - example usage of Stupid Achievements.

First, I wanted to created achievements for Doom, but Doom is big, and I concentrated just on imps. So, there are 9 achievements (one of them is hidden until unlocked). Some achievements may be unobtainable with mods, some are surely unobtainable without mods.

Features

User side

- three different animations;
- user-configurable notification position;

Modder side

- showing notifications when an achievement is unlocked or progressed;
- easy to use (single function);
- easy to define new achievements;
- highly customizable new achievements;
- icon support.

Notes on using in your projects

- Please find and replace "sa_" namespace with your own to prevent conflicts.
- License: GPLv3.
Last edited by m8f on Sun Oct 24, 2021 7:04 am, edited 4 times in total.
3336655445
Posts: 34
Joined: Wed Jul 24, 2019 6:54 pm
Graphics Processor: Not Listed
Location: Odessa

Re: [v0.1] Stupid Achievements

Post by 3336655445 »

Huh... Cute
User avatar
HAL9000
Posts: 266
Joined: Fri Mar 16, 2018 7:44 am
Contact:

Re: [v0.1] Stupid Achievements

Post by HAL9000 »

Good stuff. Thanks for this :)
User avatar
GeneralDelphox
Posts: 45
Joined: Sat Sep 30, 2017 1:17 am
Graphics Processor: nVidia with Vulkan support

Re: [v0.1] Stupid Achievements

Post by GeneralDelphox »

Neato. All it needs now are fancy icons.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [v0.1] Stupid Achievements

Post by m8f »

I thought about icon support, but then a ton of achievement parameters would follow, like sizes, borders, icon position and so forth. So, icons most likely won't be added.
User avatar
Moktar
Posts: 29
Joined: Fri Jan 13, 2012 1:52 pm

Re: [v0.1] Stupid Achievements

Post by Moktar »

It's promising :P, all it needs (alongside the fancy icons mentioned before) are some clever denominations and nice DOOM-themed pop-up graphics.
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: [v0.1] Stupid Achievements

Post by Beetow Brode »

can I replace that background gradient with an image?
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [v0.1] Stupid Achievements

Post by m8f »

No, only alpha map.

Code: Select all

    // Background alpha map texture. Default: gradient to background, top to bottom.
    // Must exist.
    // Will be mercilessly scaled to box width and height.
    sa_Achievement.texture "sa_gradb";
Notification size adapts to text size, which can have multiple lines. An image would be stretched to fit the notification.

You can try how it would look like if you change this property, find drawAchievement function in StupidAchievement.zs, and edit box drawing part to look like this:
Spoiler:
User avatar
mrtaterz
Posts: 236
Joined: Wed Feb 14, 2018 8:47 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: [v0.1] Stupid Achievements

Post by mrtaterz »

I would recommend making Achievements for:
  • Getting 100 kills with each weapon.
  • Finding the Wolfenstein Levels. Killing all of the Keens.
  • Finding all of the Secret Levels that aren't the Wolfenstein Levels.
  • Pacifist achievements for each Episode of Doom, Final Doom, and Doom 2.
  • Completing the game on Ultra Violence.
  • Completing the game on Nightmare!
  • Killing the Bosses.
  • Taking no damage during Boss Levels.
  • Finding all of the Secrets in a level. Maybe even adding a unique achievement for finding all the Secrets in each level, each with a unique name.
  • Same as the above, but finding all of the Secrets in both Doom and/or Doom 2.
Just some suggestions, I know it's a lot but I find these to all be good suggestions that are conducive to game play.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [v0.1] Stupid Achievements

Post by m8f »

These are good suggestions! Just noting that I'm personally not going to implement them. Somebody who is willing can do this using Stupid Achievements as a base.
f7cjo
Posts: 5
Joined: Thu Jul 02, 2020 8:42 am
Graphics Processor: nVidia with Vulkan support
Location: poland

Re: [v0.1] Stupid Achievements

Post by f7cjo »

I barely know ZScript, and I want an achievement for finding a secret in a map, could you make a way to trigger the achievements using ACS map scripts?
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [v0.1] Stupid Achievements

Post by m8f »

Accessing achievements through ACS would look like this:

Code: Select all

ScriptCall("sa_Achiever", "achieve", "MyFirstAchievement");
f7cjo
Posts: 5
Joined: Thu Jul 02, 2020 8:42 am
Graphics Processor: nVidia with Vulkan support
Location: poland

Re: [v0.1] Stupid Achievements

Post by f7cjo »

ohhhhhhhh ok, thanks.
f7cjo
Posts: 5
Joined: Thu Jul 02, 2020 8:42 am
Graphics Processor: nVidia with Vulkan support
Location: poland

Re: [v0.1] Stupid Achievements

Post by f7cjo »

I think something is broken with the code you gave me to trigger the achievement using ACS, everytime I pass the linedef with that script it stops the map and goes to console with this error

Code: Select all

Invalid type ClassPointer<sa_Achievement> in call to
sa_Achiever.achieve
it does that no matter if I use my achievement or the ones from the imp achievements examples.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [v0.1] Stupid Achievements

Post by m8f »

Odd. I don't see any reason why it doesn't work. My line doesn't even mention "sa_Achievement". Can you please post the entire line as it is in your code? Or you can PM me the code so I can look what's wrong with it.
Post Reply

Return to “Script Library”