|
|
|
 |
Cry-Ruan  |
Crytek Staff Member | Member since: 11.07.2008, 20:25 | Posts: 11645 | Location: Frankfurt am Main |
Likes: 21 |
| |
|
Post Topic: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 01:44 |
So I was responding to a question on the subject of a level/XP system when I thought hey, that'd be a fun way to learn even more CryENGINE code stuff! Voilà my new pet project, an as of yet unnamed attempt at integrating some RPG systems into the engine. To start off, I've forked CryGame and added an experience points system. It's a really rough draft right now, where killing any enemy rewards the player with 30XP, and every 100XP triggers a level up. There's no UI, it's just logged to the console:  With the unwilling test dummies:  It's also all serialised so your experience and level persists across save games  As per usual from me, the code is all available to take a look at: https://github.com/returnString/CryGameYou'll probably want to check out the CPlayer::AddXP function, which alters the player's member variables, and the CGameRules::OnKill function, which is where we check whether the player has killed anyone.
Anti-flowgraph campaigner, professional server destroyer.
|
|
|
|
|
|
|
|
sm1le  |
Beginner | Member since: 21.04.2012, 22:37 | Posts: 44 |
Likes: 0 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 14:38 |
that must be added to the game what would it all worked, that would not completely change the files?
sorry for my english-google >_<
|
|
|
|
|
|
|
 |
Cry-Ruan  |
Crytek Staff Member | Member since: 11.07.2008, 20:25 | Posts: 11645 | Location: Frankfurt am Main |
Likes: 21 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 14:43 |
Quote by sm1le: that must be added to the game what would it all worked, that would not completely change the files? Download the repo and place the contents in your Code directory. Open up Solutions\CryEngine_GameCodeOnly.sln and compile. Should work with no more setup than that.
Anti-flowgraph campaigner, professional server destroyer.
|
|
|
|
|
|
|
sm1le  |
Beginner | Member since: 21.04.2012, 22:37 | Posts: 44 |
Likes: 0 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 14:55 |
output to HUD no reports of that received by the next level? and adding +1 hp well no?
sorry for my english-google >_<
|
|
|
|
|
|
|
 |
the_grim  |
Superstar Dolphin | Member since: 16.08.2004, 10:46 | Posts: 9565 | Location: Finland |
Likes: 49 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 14:57 |
Heh that's a really nice template for a basic RPG project!  Is the system (or more specifically, will it be) easily customizable? I mean, can the amount of XP awarded, the level up threshold etc be altered in a gamerules script or so, or must those things be hardcoded?
|
|
|
|
|
|
|
 |
Cry-Ruan  |
Crytek Staff Member | Member since: 11.07.2008, 20:25 | Posts: 11645 | Location: Frankfurt am Main |
Likes: 21 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 15:00 |
Quote by sm1le: output to HUD no reports of that received by the next level? and adding +1 hp well no? I'm not building a game for you, you have to do that yourself  Quote by the_grim: Heh that's a really nice template for a basic RPG project!  Is the system (or more specifically, will it be) easily customizable? I mean, can the amount of XP awarded, the level up threshold etc be altered in a gamerules script or so, or must those things be hardcoded?  Atm the level-up threshold is defined by a CVar. Still gotta work out what kind of level system this is gonna be (i.e., should the XP threshold be equal to the current level x 100, or should it scale according to some percentage) but the end goal is to make it customisable, yup.
Anti-flowgraph campaigner, professional server destroyer.
|
|
|
|
|
|
|
sm1le  |
Beginner | Member since: 21.04.2012, 22:37 | Posts: 44 |
Likes: 0 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 15:02 |
I did not understand how to use it in their own ..  ((
sorry for my english-google >_<
|
|
|
|
|
|
|
 |
Cry-Ruan  |
Crytek Staff Member | Member since: 11.07.2008, 20:25 | Posts: 11645 | Location: Frankfurt am Main |
Likes: 21 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 18:29 |
Just added a flownode so you can give the player XP at any time, e.g., finishing a quest or entering a trigger.  And as ever, the source: https://github.com/returnString/CryGame ... PNodes.cpp
Anti-flowgraph campaigner, professional server destroyer.
|
|
|
|
|
|
|
DeltaGhoast  |
Trainee | Member since: 10.03.2012, 16:37 | Posts: 114 |
Likes: 1 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 18:42 |
|
|
|
|
|
|
|
|
 |
the_grim  |
Superstar Dolphin | Member since: 16.08.2004, 10:46 | Posts: 9565 | Location: Finland |
Likes: 49 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 20:06 |
|
|
|
|
|
|
|
|
sm1le  |
Beginner | Member since: 21.04.2012, 22:37 | Posts: 44 |
Likes: 0 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 21:10 |
Open up Solutions \ CryEngine_GameCodeOnly.sln and compile this is what you need to do?
sorry for my english-google >_<
|
|
|
|
|
|
|
sm1le  |
Beginner | Member since: 21.04.2012, 22:37 | Posts: 44 |
Likes: 0 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 21:17 |
I added a note, but it is not fg .. what to do?
sorry for my english-google >_<
|
|
|
|
|
|
|
 |
iniside  |
Uber Modder | Member since: 27.02.2009, 12:51 | Posts: 1401 |
Likes: 6 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 21:33 |
Nice. You are quciker than me, I also wanted to make something like CryRPG on my homebrew RPG mechanics as a testing ground for everyone to use. (thus my system is without leveling). Well.. If I keep getting distracted I might even start this year
|
|
|
|
|
|
|
 |
Cry-Ruan  |
Crytek Staff Member | Member since: 11.07.2008, 20:25 | Posts: 11645 | Location: Frankfurt am Main |
Likes: 21 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 09.05.2012, 22:32 |
Quote by sm1le: I added a note, but it is not fg .. what to do? Whilst the end goal is a system that anyone can use as a project base, right now it's only really for C++ programmers because it's so early in development. If you're not ready to dive into a C++ codebase, I suggest you wait till it's more advanced and user-friendly
Anti-flowgraph campaigner, professional server destroyer.
|
|
|
|
|
|
|
 |
Cry-Ruan  |
Crytek Staff Member | Member since: 11.07.2008, 20:25 | Posts: 11645 | Location: Frankfurt am Main |
Likes: 21 |
| |
|
Post Topic: Re: Unnamed RPG template (w/ XP system) Posted 10.05.2012, 04:15 |
Couldn't sleep, did some more prototyping. I've added a listener node that reports XP (and where it came from) as well as level up events. This helps me do quick UI mockups to avoid staring at the console 
Anti-flowgraph campaigner, professional server destroyer.
|
|
|
|
|