[v0.1.1] Stupid Achievements

Post your example zscripts/ACS scripts/etc here.

[v0.1.1] Stupid Achievements

Postby m8f » Sat Apr 25, 2020 7:41 am

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.
Last edited by m8f on Mon Aug 03, 2020 10:43 pm, edited 2 times in total.
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [v0.1] Stupid Achievements

Postby 3336655445 » Sat Apr 25, 2020 7:46 am

Huh... Cute
3336655445
 
Joined: 25 Jul 2019
Location: Odessa
Discord: Счастливая трубка
Operating System: Other OS Not Listed Here
Graphics Processor: Not Listed

Re: [v0.1] Stupid Achievements

Postby HAL9000 » Sat Apr 25, 2020 8:22 am

Good stuff. Thanks for this :)
User avatar
HAL9000
I'm sorry Dave, I'm afraid I can't do that
 
Joined: 16 Mar 2018
Discord: HAL9000#9378

Re: [v0.1] Stupid Achievements

Postby GeneralDelphox » Sat Apr 25, 2020 10:46 am

Neato. All it needs now are fancy icons.
User avatar
GeneralDelphox
 
Joined: 30 Sep 2017
Discord: General Delphox#5567
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [v0.1] Stupid Achievements

Postby m8f » Sat Apr 25, 2020 10:57 am

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
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [v0.1] Stupid Achievements

Postby Moktar » Sun Apr 26, 2020 8:14 pm

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
Moktar
 
Joined: 13 Jan 2012

Re: [v0.1] Stupid Achievements

Postby Beetow Brode » Mon Apr 27, 2020 6:48 pm

can I replace that background gradient with an image?
User avatar
Beetow Brode
 
Joined: 24 Sep 2016
Location: Canadia, Im Serious
Discord: Punkin#8267

Re: [v0.1] Stupid Achievements

Postby m8f » Mon Apr 27, 2020 7:17 pm

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:
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [v0.1] Stupid Achievements

Postby mrtaterz » Tue May 05, 2020 6:29 pm

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
mrtaterz
aka GooseJelly
 
Joined: 15 Feb 2018
Discord: GooseJelly#8476
Twitch ID: thebigchez420
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [v0.1] Stupid Achievements

Postby m8f » Tue May 05, 2020 10:48 pm

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.
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [v0.1] Stupid Achievements

Postby robert_banks » Thu Jul 02, 2020 8:53 am

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?
robert_banks
 
Joined: 02 Jul 2020
Location: poland
Discord: Bodhi#8030
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [v0.1] Stupid Achievements

Postby m8f » Thu Jul 02, 2020 8:27 pm

Accessing achievements through ACS would look like this:
Code: Select allExpand view
ScriptCall("sa_Achiever", "achieve", "MyFirstAchievement");
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [v0.1] Stupid Achievements

Postby robert_banks » Fri Jul 03, 2020 2:59 am

ohhhhhhhh ok, thanks.
robert_banks
 
Joined: 02 Jul 2020
Location: poland
Discord: Bodhi#8030
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [v0.1] Stupid Achievements

Postby robert_banks » Fri Jul 31, 2020 11:40 pm

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.
robert_banks
 
Joined: 02 Jul 2020
Location: poland
Discord: Bodhi#8030
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [v0.1] Stupid Achievements

Postby m8f » Sun Aug 02, 2020 12:06 pm

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.
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Next

Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests