Money Manager

Started by imspeshul, Fri 26/11/2004 06:20:45

Previous topic - Next topic

imspeshul

Hi...Im starting to work on a game where you basically take the place of a homeless man and must work your way up society by whatever means...
I was wondering if a money manager is possible to make...for example, i want to be able to allow the character to panhandle on certain corners and, depending on the area he is in, a random amount of money will be generated. This is just one way i want to use a money manager...my goal is kind of to create a linear world where you have many different paths ahead of you..and then maybe if everything is going well...youll be able to do evil stuff like deal drugs or perform hits...i want to create a karma gauge that will go up and down and trigger events depending on its level..I think ive decided on the name "streets of berkely" .i suppose ill also have to creat a day/night cycle and if anyone can show me a quick, easy way to convert backgounds into night then it would be extremely helpful....

Ive got several backgrounds created but scripting is like my achilles heel....if anyone is interested in helping then id be happy to accept it...


Radiant

I'm not entirely sure what you mean by a money manager, but it's entirely possible to generate a location-dependent random amount of money. For instance, you could create a pan inventory item, then in the script for 'use pan on EGO', add a like like 'money += Random (100) + location_value', then set 'location_value' in each room's 'enter room' script so it can be different eveywhere.

Converting backgrounds into night... you can open them in Photo Editor (comes standard with most windows versions) and crank down the gamma a couple of notches. It also helps if you increase brightness for blue, as bluish nights look better than blackish ones.

Could you show us some of your backgrounds?

Janik

Is your homeless character the bum in Reality-on-the-Norm? That would be cool!  ;D
Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

Edwin Xie

Why would you want to have a random amount of money in each location? How would you get the money? Would it be something like this example? Ex. You go into a place where you are sold drugs. (money-Random(100)=currentmoney). Then you go into a good place where you are offered a job. (Money+Random(1000)=current money. Well, something like that?
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

imspeshul

Ok...let me go in a lil bit more depth...first im going to include the puzzle of finding a proper begging tool like a cup with a message scrawled on it. The proper message that you choose to write...and how high/low your appearance is...will have a direct correlation a how effective it is at recieving money...basically, the more pathetic you look and the location you choose and the message youve chosen to write will determine how much money you recieve. You will also be on a time limit for the game so eventually you will have to move on if you want to make bigger bucks...and this is where I will include the option to deal drugs which will decrease you karma for every succesful sale and, just like the begging, the location, appearance and approach will affect how much money you effectively aquire....also, certain locations like in front of a police station will cause penalties...like getting thrown in jail...and panhandling in a park might get the penalty of taking a viscious beating from some pissed off environmentalists...the game pretty much has a very dark sense of humor mixed in with overtones of gritty reality on the street...and NO i dont intend to include ANY characters from any previous games made with AGS or any other game developer for that matter...however I might make cameo appearances for entertainments sake...

And when I say money manager...I mean a system of buying and selling things...more like an rpg and less like an adventure game...

my goal is to create a game in the sense of fallout...like an rpg/adventure, but not in such a grand scale.... like maybe only three stats like, karma, appearance, and of course. money....I realize how hard this this is going to be so expect me to be a regular on the tech forums...

thanx for the post about converting nights...very helpful...I will post some backgrounds soon but am using a diff computer for the net so will need time to move the images over...

Also...a question about the random variable scripting..the (100)...is that the average amount that it will randomly generate?? Im not so good at scripting so this is going to be a challenge..

Ashen

To break it down a little:
'money += Random (100) + location_value'

money is a variable you create to store how much money the character has
+= is scripting for 'add the following amount to that variable'
Random (100) generates a number between 0 and 100
location_value is another variable you create, representing the minimum amount you'd get at the present location.

So, if location_value was 25, each time you successfully begged you'd add between 25 and 125 (cents, pence, simolians,

whatever) to your total worth (saved as money).

Obviously, you'll need a more complicated equation if you want to take into account appearance, begging message, etc. (For that, I'd suggest you have a limited number of options, rather than give the player completely free choice - for ease of programming if nothing else. Perhaps add a thing that different messages work better in different places, or at different times, if you want it to play a more significant role.)

To handle buying things, the simplest way would probably be to have a SHOPKEERER (or DEALER) character, with their inventory

representing their stock. Then you'd have to switch player character to them, open the inventory and browse their wares.
You also need to compare the money variable to the cost of the item:
Code: ags

if (money >= COST) { // If the money you have is greater than the cost of the thing. (COST is replaced by a number)
  AddInventory (ITEM); // Get ITEM, whatever you just bought
  money -= COST; // Lose that much money. Again, COST is replaced by a number
  // And you might want to add a message saying 'You bought the ITEM', or 'Will there be anything else', or something
}
else { // money is less than COST - you can't afford it
  Display ("You can't afford that just now.")
}


Selling stuff is easier, you just use:
Code: ags

money += COST;
karma -= KARMACOST; // To lower karma on drug deals. Obviously not necessary in a pawnbroker.


Sorry if this is a bit vague about how/where exactly to put this stuff, but that really depends on how you set up the game. If you need more specific help later on, just ask.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk