[ZScript] Lazy Points: basic scoring system

Post your example zscripts/ACS scripts/etc here.

[ZScript] Lazy Points: basic scoring system

Postby m8f » Wed Dec 04, 2019 2:00 pm



Playable Demo
GitHub

Introducing Lazy Points, the most basic scoring system.
Requires GZDoom 4.3.3 or newer.

Features:
- uses standard player score variable, so it's easy to read and write score outside from Lazy Points;
- absolutely no impact on gameplay whatsoever;
- shows other players' scores in multiplayer;
- top 10 map scores that are saved between games* (accessed by assigned key).

Scoring:
1. Damage: players get points for the amount of damage they inflict on monsters.
2. Kills: players get points for 10% of killed monsters;
3. Chain kills: 10 points for each monster killed in 3 seconds after previous kill.
4. Secrets: finding a secret gives 250 points.
5. Map items: collecting an item that counts for item counts gives 5 points.
6. Keys: collectiog a key gives 250 points.
7. Barrels: destroying an explosive barrel gives 5 points.
8. Player with 50% and more health gets kill points (with chain kill bonus) multiplied by 1.5, with 100% and more - by 2.

I'm open to suggestions, but cannot promise they will be implemented, because this is all I need for my other project.
Last edited by m8f on Sun Jan 26, 2020 12:52 am, edited 11 times in total.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [ZScript] Scoring

Postby Xim » Wed Dec 04, 2019 3:49 pm

Hey, this is pretty neat! I know it doesn't directly have an impact on game-play but it does encourage me to switch up my play style. Only played a couple of levels but it's pretty cool.

One minor suggestion, if it's possible or if you'd even want to do it. What if your score got reset after using cheat codes? Kind of like in Wolfenstein 3D. It might be more effort than it's worth but it might be a nice touch, or pointless I dunno. :P

I could see a lot of potential in other modders using this for RPG-style mods, or mods that simply give rewards when certain scores are reached. Not sure what I could personally do with it, but there's some cool ideas out there.
User avatar
Xim
 
Joined: 20 Feb 2009
Location: A wretched hive of scum and villainy

Re: [ZScript] Scoring

Postby mrtaterz » Thu Dec 05, 2019 12:27 am

Yes. Thank you so much for making this!
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: [ZScript] Lazy Points: basic scoring system

Postby m8f » Sat Dec 07, 2019 8:06 am

v0.2 is out. Playable demo.

Changes:

Fixes:
- renamed from Zcore to Lazy Points;
- use original Big Font instead of replacement Big Font, because there are Big Fonts without numbers;
- no more showing on titlemaps;
- fixed floating point truncation warnings;
- made timer animation smooth.

New stuff:
- scoring for keys;
- health multiplier bonus;
- displaying other players' scores in multiplayer.

Multiplayer is checked, but not thoroughly tested. It would be great if someone played in multiplayer with Lazy Points and reported if it desyncs or not.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [ZScript] Lazy Points: basic scoring system

Postby m8f » Tue Jan 07, 2020 8:39 am

Lazy Points updated to 0.3. Changes:
- fixed scoring on telefragging;
- added top map scores.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [ZScript] Lazy Points: basic scoring system

Postby Carrotear » Tue Jan 14, 2020 11:48 pm

been getting this error on LZDoom

Script error, "lazy-points-0.3.pk3:zscript/zc_optionmenuscoreitem.zs" line 65:
Call to unknown function 'drawValue'
User avatar
Carrotear
I like chocky
 
Joined: 04 Sep 2015
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [ZScript] Lazy Points: basic scoring system

Postby amdcrash » Wed Jan 15, 2020 10:35 am

i'm getting a different error on gzdoom 4.2.4

Code: Select allExpand view
Script error, "lazy-points-0.2.pk3:cvarinfo.txt" line 1:
Unknown cvar attribute 'nosave'
amdcrash
 
Joined: 21 Feb 2019

Re: [ZScript] Lazy Points: basic scoring system

Postby m8f » Wed Jan 15, 2020 10:39 am

Oh, I forgot to add version dependency. This needs GZDoom v4.3.2.

LZDoom lags behind in features a bit, so LZDoom users have to wait until drfrag updates it.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff

Re: [ZScript] Lazy Points: basic scoring system

Postby Carrotear » Wed Jan 15, 2020 12:19 pm

No worries then. I'll use GZDoom in the meantime then.
User avatar
Carrotear
I like chocky
 
Joined: 04 Sep 2015
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [ZScript] Lazy Points: basic scoring system

Postby m8f » Wed Jan 15, 2020 7:26 pm

Important notice: Lazy Points data storage system is stable only in devbuilds currently. This is due to an oversight that was found only after GZDoom 4.3.2 release. The problem is handling large amounts of data. You aren't likely to reach data limits, but if you will, GZDoom will crash or freeze.

-To be clear: the oversight is mine, not GZDoom devs'.


Requires GZDoom 4.3.3 or newer.
User avatar
m8f
the dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff


Return to Script Library

Who is online

Users browsing this forum: No registered users and 1 guest