Hi. I'm making an Achievements mod for Zandronum, but i can't get the achievement progresses to show up. Either in Singleplayer or in Multiplayer. I've been trying to fix it for a VERY long time now, so if anyone would be kind to help me that'll be greatly appreciated. Further information below.
P.S: Sorry for my bad english.
Ok so here's the ACS script source code ( I know, it's long and hard to understand :( ):
Script
[ LINK REMOVED: I don't want anyone to lurk in my source code any more ;P ]
Core wad:
http://www.mydoomsite.com/WADS/AchievementsDOOM2.pk3
'Function void GetProgress(void)' is the function that'll read the progresses of the Achievements from the .ini. It will also convert the progresses to smaller numbers (example: 254 = 1)
'Script 700 (int view)' is the script that shows the Achievements in several pages, and also the progresses.
'Script 712(int x, Int who)' is the script that unlocks an achievement and save it to the .ini.
'Script 703 (int x)' is the script that raises the progresses values and saves them to the .ini.
'Script 702 (int x)' prints the unlocked achievement on the screen so that all players can se who unlocked which achievement.
'Script 704 DEATH' save's the Achievements and also the progresses to the .ini when the player dies.
And script 710 and down are just testning. Ignore them.
Current achievement list ('P' stands for progress):
x_ACH_P1, x_ACH_1 - Imp Killer
x_ACH_P2, x_ACH_2 - Imp Slainer
x_ACH_P3, x_ACH_3 - Zombie Killer
x_ACH_4 - Frenemy
x_ACH_5 - Going Pro
x_ACH_6 - Hard To Kill
x_ACH_LAST - My DOOM site
When the progress shows up when script 700 is called it only shows for example:
Imp Killer
0/0
Even if I've killed imps and set the unlock-value to 50.
It should show for example:
Imp Killer
23/50
[SOLVED] Problems with my Achievements mod for Zandronum
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
[SOLVED] Problems with my Achievements mod for Zandronum
Last edited by Vincent(PDP) on Mon Dec 30, 2013 12:44 am, edited 1 time in total.
RE: Problems with my Achievements mod for Zandronum
It might be because script 700 is CLIENTSIDE and clientside scripts can't return the proper values of serverside (or in this case, ini-stored) variables.
Does it return the proper values when played offline?
Does it return the proper values when played offline?
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Problems with my Achievements mod for Zandronum
Script 700 returns 'Progress[ACHIEVEMENT_NUMBER][PlayerNumber()]' and 'ProgressTOTAL[ACHIEVEMENT_NUMBER][PlayerNumber()].Ænima wrote: It might be because script 700 is CLIENTSIDE and clientside scripts can't return the proper values of serverside (or in this case, ini-stored) variables.
Does it return the proper values when played offline?
And no, it doesn't work offline.
As i read it on ZDoom Wiki, 'Int Progress[ACHIEVEMENT _NUMBER][64];'
Would create an intriger list with 7 arrays, each with the size of 64 (players).
(#Define ACHIEVEMENT_NUMBER 7)
In the GetProgress(void) function they're defined like this:
Str Str1;
Str Str2;
Str Str3;
Str1 = StrParam(s:"x_ACHP1_", d:PlayerNumber()+1);
Str2 = StrParam(s:"x_ACHP2_", d:PlayerNumber()+1);
Str3 = StrParam(s:"x_ACHP3_", d:PlayerNumber()+1);
Progress[IMP50][PlayerNumber()] = DecryptAchievement(GetCVar(Str1), 127)/2;
Progress[IMP200][PlayerNumber()] = DecryptAchievement(GetCVar(Str2), 87)/6;
Progress[ZOMBIE150][PlayerNumber()] = DecryptAchievement(GetCVar(Str3), 251)/3;
ProgressTOTAL[IMP50][PlayerNumber()] = 50;
ProgressTOTAL[IMP200][PlayerNumber()] = 200;
ProgressTOTAL[ZOMBIE150][PlayerNumber()] = 150;
Last edited by Vincent(PDP) on Tue Nov 26, 2013 10:07 pm, edited 1 time in total.
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: [SOLVED] Problems with my Achievements mod for Zandronum
Ok, even though no one is reading this thread, i can still say that i solved the problem myself... Thanks for the support you gave me Ænima