RPG Scoring/Cash sytem
Moderator: Moderators
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
RPG Scoring/Cash sytem
After having spent ages reading through both stock scripts and Mav's ffx lua, not to mention making a campaign level (that gets more and more complicated as it progresses), I feel like I'm ready to start making the story based map(s) I've been making sides and skins for. However, there's a couple of ideas I need to flesh out/learn the limits of, the most importanat one is a cash/scoring system.
Since each mission or 'chapter' is planned to be short (longer than a normal campaign mission - but shorter than ffx, reb ops or OFM), a leveling up system doesn't make much sense (there's another system that gives you a temporary health bonus for killing a certain kind of enemy, but once you die the change is gone). So I was thinking a system where you gain 'cash' which can be traded for items (gun upgrades, ammo increases, health packs, extra lives) at the 'market.' The simplest way to do the cash sytem (as far as I know) is to score a point per unit killed (more for certain enemies) and detract points fo buying items. Problem with this is I need some way of showing the cash points on screen, and aren't entirely sure how (maybe...using team 2's reinforcement count? and then just have a single hidden, unkillable enemy on team 2? Just an idea).
Second way of doing it (and I doubt this is possible), is to have a certain pickup item give you points, and enemies drop them at random instead of ammo or health packs. Like I said, unsure if its possible.
Since each mission or 'chapter' is planned to be short (longer than a normal campaign mission - but shorter than ffx, reb ops or OFM), a leveling up system doesn't make much sense (there's another system that gives you a temporary health bonus for killing a certain kind of enemy, but once you die the change is gone). So I was thinking a system where you gain 'cash' which can be traded for items (gun upgrades, ammo increases, health packs, extra lives) at the 'market.' The simplest way to do the cash sytem (as far as I know) is to score a point per unit killed (more for certain enemies) and detract points fo buying items. Problem with this is I need some way of showing the cash points on screen, and aren't entirely sure how (maybe...using team 2's reinforcement count? and then just have a single hidden, unkillable enemy on team 2? Just an idea).
Second way of doing it (and I doubt this is possible), is to have a certain pickup item give you points, and enemies drop them at random instead of ammo or health packs. Like I said, unsure if its possible.
-
ryukaji
- Major

- Posts: 513
- Joined: Mon Sep 17, 2007 7:46 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
Re: RPG Scoring/Cash sytem
The second one sounds like it would work better but thats only if an item can score points, but there are lines that determine the probability of dropping certain items at death
EDIT: I was looking at map scripts and one of them is called "points" and it has lines like
But i dont have much knowledge in this area so i dont know how you would make a new line work
and they dont help much by commenting at the top by saying
EDIT: I was looking at map scripts and one of them is called "points" and it has lines like
Code: Select all
{ point_gain = 5 }, --// PS_CON_CAPTURE_CP,
{ point_gain = 1 }, --// PS_CAP_PICKUP_FLAG,
and they dont help much by commenting at the top by saying
Code: Select all
-- Format: { point_gain = number }, --// description
-- Notes: number should between [-128, 127]
-- If you need to ADD/REMOVE items, please ask programmer to change accordingly
-- enum PointStatT in PlayerStats.h- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: RPG Scoring/Cash sytem
Why? What would that unit be for?Skyhammer_216 wrote:...have a single hidden, unkillable enemy on team 2...
You can't add another line in the point values, but you can change the existing ones. However, you don't have to base the money off of points. Just use a variable to hold how many points/money the player has. One something happens, like a strong monster is killed or a certain object is picked up, increase that money variable. If you want to display it, every time you change the variable, redisplay it on screen. You can display numbers through the reinforcement count, team points, or a non-active timer.
-
MasterSaitek009
- Black Sun Slicer
- Posts: 619
- Joined: Wed Aug 23, 2006 4:10 pm
Re: RPG Scoring/Cash sytem
That was my thought too. A frozen timer would be very noticeable to players.[RDH]Zerted wrote:or a non-active timer.
Now.. giving a unit a new weapon... Don't units have to respawn before changes like that take place? On the other hand Health and Shields/Armour would be easy. Changing a weapons damage wouldn't be to hard either. Just use something like this.
Code: Select all
damageAdded = 50
OnObjectDamage(
function(object, damager)
--If the weapon that hit last is not your souped up weapon, or the the damager is not your RPG unit, or the object/unit you shot is dead, exit.
if GetObjectLastHitWeaponClass(object) != "NAME_OF_WEAPON" or damager != VarContainingYourUnit or object == nil then return end
SetProperty(object, "CurHealth", GetObjectHealth(object) - damageAdded)
end
)- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: RPG Scoring/Cash sytem
Changing weapons and their stats will cause crashes in MP. However, they work fine in SP.
After changing a class' weapon you could kill the player, then directly force spawn him back to his old location. Since this will be SP, theres no reason to increase the damage through the lua like that. Change the odf properties instead. Theres no need to come up with workarounds if you can do something the way you're supposed to do it.
After changing a class' weapon you could kill the player, then directly force spawn him back to his old location. Since this will be SP, theres no reason to increase the damage through the lua like that. Change the odf properties instead. Theres no need to come up with workarounds if you can do something the way you're supposed to do it.
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: RPG Scoring/Cash sytem
Pretty sure I answered my own question in paragraph 2. The way it works is pretty much the same as Mav's level system from FFX (uses some of the same code - based on a variable). The important difference is setting the reinforcement count to the variable (skillcount). The weapons thing isn't an issue either - cash bought weapons and powerups are bought at a 'market' - I'll implement that systemof killing and respawning Zerted suggested so every time you buy a weapon upgrade you'll get respawned at the market CP.Skyhammer_216 wrote:After having spent ages reading through both stock scripts and Mav's ffx lua, not to mention making a campaign level (that gets more and more complicated as it progresses), I feel like I'm ready to start making the story based map(s) I've been making sides and skins for. However, there's a couple of ideas I need to flesh out/learn the limits of, the most importanat one is a cash/scoring system.
Since each mission or 'chapter' is planned to be short (longer than a normal campaign mission - but shorter than ffx, reb ops or OFM), a leveling up system doesn't make much sense (there's another system that gives you a temporary health bonus for killing a certain kind of enemy, but once you die the change is gone). So I was thinking a system where you gain 'cash' which can be traded for items (gun upgrades, ammo increases, health packs, extra lives) at the 'market.' The simplest way to do the cash sytem (as far as I know) is to score a point per unit killed (more for certain enemies) and detract points fo buying items. Problem with this is I need some way of showing the cash points on screen, and aren't entirely sure how (maybe...using team 2's reinforcement count? and then just have a single hidden, unkillable enemy on team 2? Just an idea).
Second way of doing it (and I doubt this is possible), is to have a certain pickup item give you points, and enemies drop them at random instead of ammo or health packs. Like I said, unsure if its possible.
Also, team 2 doesn't need any units? Sweet.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: RPG Scoring/Cash sytem
If you don't use any of the of the game's official Objectives then yes, the map will only end when you tell it to end.
- bobfinkl
- Rebel Colonel

- Posts: 593
- Joined: Sun Jul 13, 2008 9:01 am
- Projects :: Lots of unreleased stuff
- xbox live or psn: No gamertag set
- Location: The quaint little city gametoast.
Re: RPG Scoring/Cash sytem
I know it would be sloppy but couldn't you use the "money" that Zerted mentioned and the weapon unlock system to allow weapon pickups, my theory is to use the variable point value to give the unit that weapon if they have Y number of points and the unit holding that weapon drops Y points? (sorry if this is unclear how I said it)
-
ryukaji
- Major

- Posts: 513
- Joined: Mon Sep 17, 2007 7:46 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Contact:
Re: RPG Scoring/Cash sytem
If im understanding you I dont think he wants weapon pick-ups he wants them bought from a store. And i dont think you can "drop" points and I'm wondering how a store would be possible. Is there a way to display weapons and prices and select one or were you planning on weapon upgrades not having choice to what you upgrade to.bobfinkl wrote:I know it would be sloppy but couldn't you use the "money" that Zerted mentioned and the weapon unlock system to allow weapon pickups, my theory is to use the variable point value to give the unit that weapon if they have Y number of points and the unit holding that weapon drops Y points? (sorry if this is unclear how I said it)
-
Tygr
- Corporal

- Posts: 150
- Joined: Mon Aug 25, 2008 1:11 pm
Re: RPG Scoring/Cash sytem
For the store, you could have weapon models as destroyable props, and when the player shoots one, it will deduct that weapon's cost and give it to the player. If the player doesn't have enough points, the weapon prop will immediately respawn.
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: RPG Scoring/Cash sytem
Here's how it works (got the cash/point system working now). Most is through lua coding. It's for a singleplayer RPG/story, not a norml game mode. Points are displayed in the place of team 2 reinforcements.ryukaji wrote:If im understanding you I dont think he wants weapon pick-ups he wants them bought from a store. And i dont think you can "drop" points and I'm wondering how a store would be possible. Is there a way to display weapons and prices and select one or were you planning on weapon upgrades not having choice to what you upgrade to.bobfinkl wrote:I know it would be sloppy but couldn't you use the "money" that Zerted mentioned and the weapon unlock system to allow weapon pickups, my theory is to use the variable point value to give the unit that weapon if they have Y number of points and the unit holding that weapon drops Y points? (sorry if this is unclear how I said it)
Every time you kill an enemy, your points increases (by 1 for a standard enemy, 2 for an advanced enemy, more for bosses/elite enemies). Every time you pick up an 'artifact' (actually a flag with different model....dissappears instantly when you pick it up), your points go up by 10.
In a certain area (the 'market') there are stalls with NPCs in them. Each one sells one item/upgrade. Now, I need two weapons to get it to work properly, 'talk' and 'action.' Use talk on a market stall owner, and they tell you what they sell, how much it is, what it does. Use 'action', and you get whatever the upgrade/item is and get the cost of it detracted from your cash/credits/score. You get instantly respawned in the middle of the market if you bought a weapon/weapon upgrade (don't if you bought a health bonus/life). So you have to (1) earn points, then (2) go to the market to get things with them.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: RPG Scoring/Cash sytem
Since you have to walk up to the seller to talk/buy from them, why not just give each one a close region. When the player walks into the region, the seller automatically starts talking. That would save you from using another weapon and save the players from needing to learn how to use it.
- Sky_216
- Droid Pilot Assassin

- Posts: 2086
- Joined: Mon Feb 13, 2006 3:28 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: RPG Scoring/Cash sytem
@Zerted: Good idea, will do.
