I figured I would simply post to both explain how I expect to implement this and have it work, as well as take ideas.
First off, I would like to let everyone know that I plan to do perks in sets of 5-10, as in releasing packs, probably weekly, once the gamemode is done (public beta). This is so that people will want to keep coming back to level up and earn new perks.
The ultimate way, coding side, I plan to implement them is:
- Each perk has its own LUA file in a /perks/ folder, along with a .VTF texture and .VMT material file of the same name as the LUA file (the gamemode will automatically search these and I will be used rips of the official FO3 perk images from the internet).
- Each perk, in code, will have some functions: PERK.Setup(), PERK.Think(), and then some general functions: player:HasPerk(), player:CanHavePerk(), player:GivePerk(), player:RemovePerk()
All of them are pretty straightforward.
Events in the gamemode, such as when you fire a weapon, attack a player, receive damage, spawn, etc. will call a hook. This hook loops through and calls PERK.Think() for each perk a player has. From there, the perk can then make the modifications in real-time of temporary player stats, scaling damage higher or lower, etc.
There will be three types of perks: Level Up Perks, One Time Use Perks, and Real Time Perks.
Level Up Perks will simply apply something everytime you level up, such as increasing overall AP +2% each level, etc.
One Time Use Perks simply do something once, such as give you 2000 caps in exchange for losing 100 Karma Points.
Real Time Perks are the ones that are event activated, such as weapon-specific perks, damage resistance, luck, etc.
Since I will also be implementing S.P.E.C.I.A.L. and Skills into the game mode, perks will also be able to influence those.
Do not expect to see working perks until I have the HUD sorted out and completed in FO3 style.
Cheers,
Tyler
First off, I would like to let everyone know that I plan to do perks in sets of 5-10, as in releasing packs, probably weekly, once the gamemode is done (public beta). This is so that people will want to keep coming back to level up and earn new perks.
The ultimate way, coding side, I plan to implement them is:
- Each perk has its own LUA file in a /perks/ folder, along with a .VTF texture and .VMT material file of the same name as the LUA file (the gamemode will automatically search these and I will be used rips of the official FO3 perk images from the internet).
- Each perk, in code, will have some functions: PERK.Setup(), PERK.Think(), and then some general functions: player:HasPerk(), player:CanHavePerk(), player:GivePerk(), player:RemovePerk()
All of them are pretty straightforward.
Events in the gamemode, such as when you fire a weapon, attack a player, receive damage, spawn, etc. will call a hook. This hook loops through and calls PERK.Think() for each perk a player has. From there, the perk can then make the modifications in real-time of temporary player stats, scaling damage higher or lower, etc.
There will be three types of perks: Level Up Perks, One Time Use Perks, and Real Time Perks.
Level Up Perks will simply apply something everytime you level up, such as increasing overall AP +2% each level, etc.
One Time Use Perks simply do something once, such as give you 2000 caps in exchange for losing 100 Karma Points.
Real Time Perks are the ones that are event activated, such as weapon-specific perks, damage resistance, luck, etc.
Since I will also be implementing S.P.E.C.I.A.L. and Skills into the game mode, perks will also be able to influence those.
Do not expect to see working perks until I have the HUD sorted out and completed in FO3 style.
Cheers,
Tyler