Page 1 of 2

[v0.1.1] Stupid Achievements

PostPosted: Sat Apr 25, 2020 7:41 am
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;

Notes on using in your projects

- Please find and replace "sa_" namespace with your own to prevent conflicts.
- License: GPLv3.

Re: [v0.1] Stupid Achievements

PostPosted: Sat Apr 25, 2020 7:46 am
by 3336655445
Huh... Cute

Re: [v0.1] Stupid Achievements

PostPosted: Sat Apr 25, 2020 8:22 am
by HAL9000
Good stuff. Thanks for this :)

Re: [v0.1] Stupid Achievements

PostPosted: Sat Apr 25, 2020 10:46 am
by GeneralDelphox
Neato. All it needs now are fancy icons.

Re: [v0.1] Stupid Achievements

PostPosted: Sat Apr 25, 2020 10:57 am
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.

Re: [v0.1] Stupid Achievements

PostPosted: Sun Apr 26, 2020 8:14 pm
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.

Re: [v0.1] Stupid Achievements

PostPosted: Mon Apr 27, 2020 6:48 pm
by Beetow Brode
can I replace that background gradient with an image?

Re: [v0.1] Stupid Achievements

PostPosted: Mon Apr 27, 2020 7:17 pm
by m8f
No, only alpha map.
Code: Select allExpand view
    // 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:

Re: [v0.1] Stupid Achievements

PostPosted: Tue May 05, 2020 6:29 pm
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.

Re: [v0.1] Stupid Achievements

PostPosted: Tue May 05, 2020 10:48 pm
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.

Re: [v0.1] Stupid Achievements

PostPosted: Thu Jul 02, 2020 8:53 am
by robert_banks
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?

Re: [v0.1] Stupid Achievements

PostPosted: Thu Jul 02, 2020 8:27 pm
by m8f
Accessing achievements through ACS would look like this:
Code: Select allExpand view
ScriptCall("sa_Achiever", "achieve", "MyFirstAchievement");

Re: [v0.1] Stupid Achievements

PostPosted: Fri Jul 03, 2020 2:59 am
by robert_banks
ohhhhhhhh ok, thanks.

Re: [v0.1] Stupid Achievements

PostPosted: Fri Jul 31, 2020 11:40 pm
by robert_banks
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 allExpand view
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.

Re: [v0.1] Stupid Achievements

PostPosted: Sun Aug 02, 2020 12:06 pm
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.