Today's update:
Code: Select all
math.randomseed( os.time() )
function newPerson(p,q)
local object = {}
object.name = p
object.age = q
object.bama = math.random(1000000,200000000)
function object:sayName()
print(object.name)
end
function object:sayBama()
print(object.bama)
end
return object
end
local bill = newPerson("Bill", 18)
local ted = newPerson("Ted", 18)
print(bill.age)
ted.sayName()
print("Teds Bama ID = ")
ted.sayBama()
print("Bills Bama ID = ")
bill.sayBama()
It is not to much, but spent the night messing with writing MOD files lol. So today wanted to get back to doing some of the game code - just for a break. You can see that the stats from the character generation would just get plugged in here eventually. (instead of just bama, name, age - your have all of the characteristics plugged in also.)
Got the NPC and player ID working. One of the ways the game logic works is assigning a ID to each character in the game. This is how you can send and receive email, use bank accounts, access personal vaults, get paid ect.. Kind of like a social security number.
Next thing is to get a table generated of all the NPCs IDs for easy lookup afterwards. This would be used in saving the state of the game.
Will get the bank account code finished and then plug in the character generation code and things will start to be a bit more interesting.
When the game starts it generates an ID for each character in the game (this avoids people cheating by collecting the IDs from previous play through. As now each time you start a new game the IDs are generated fresh. I was kinda on the fence about doing it this way. Because it prevents people doing cool things like Wiki pages on the game if everything is generated on the fly. But it does make it somewhat more realistic and you can't cheat as bad doing it this way.
The ID is then linked to bank accounts you can open with the various game banks. Just like in real life there are multiple banks that a player or NPC can open an account with. The ID is used to key an account to a player. It also enables transmission of funds from things like the PAX terminals or atms in game.
I wanted to create a real functioning economy, I always disliked games where money that was spent in game just seemed to go into a bottomless pit. Therefore when you buy and sell goods - you pay a tax to the play you are in. That is then used to pay for items that the location purchases. It should create a more realistic game economy.
One nice way to prompt the players to go to a new area is to drop hints of a tax haven ect, better paying jobs. Stuff like that. Trying now to figure out how to implement a economy that wont break but makes sense and fuels the quest/job market. That was something that frustrated me about RPGs was how the shops in game just seemed to get tons of stuff without paying for it, there appeared to be no logistics taking place. I wanted it to be possible that NPCs could trade with the stores and affect the inventory.
The main thing with the quest/job economy in game is if the NPCs can also take part that creates an interesting situation where they can develop/acquire wealth and affect the game world. Make it seem more of a living space and bring rational outcomes to what vendors are selling in a region.
The main thing is making the game world responsive to how a player wants to play. It always seemed unreasonable to me why as a player you couldn't just grind or operate a store if you wanted to.. I think it would be possible to implement this in the game. Especially if I can get the NPCs working properly.
When you think about the typical quests/jobs you get in RPGs most of them are not to demanding. Like take for example a fetch quest. The NPC would just need to go to a location, pick up an item and come back. You could generate hundreds of these and have the NPCs go and acquire the resources needed by the vendors this way. Giving the NPCs something to do and also creating realistic inventory allocations.
In neuromancer this was how it was used..
Your see that next to each character in the game you have there ID number. This is used by the security forces to issue warrants of arrest, its how they know if a person has been put on a watch list or needs to be arrested/liquidated. Who can access what areas ect. It was quite a clever way to implement this as there would be a list of IDs and if your ID was on the list then you were able to enter that area/obtain a widget ect..
One of the best things in Neuromancer was you were able to hack the security forces system and add a persons name to a arrest list. Then the security forces would arrest them if they were encountered in the game.
Tonight's update:
Here are some more of the surnames lists..
Mixed race surnames:
Black surnames:
Latino surnames:
by my back of the napkin calculations with 5200 first names, and 24,000 surnames that gives enough variation to make any game pretty realistic and distinct.
Assuming repeats first names are possible according to one on-line calculator.
1,254,460,238,282,924,094,746,061,852,057,131,823,119,397,222,380,275,620,532,983 permutations...
one novemdecillion, two hundred fifty-four octodecillion, four hundred sixty septendecillion, two hundred thirty-eight sexdecillion, two hundred eighty-two quindecillion, nine hundred twenty-four quattuordecillion, ninety-four tredecillion, seven hundred forty-six duodecillion, sixty-one undecillion, eight hundred fifty-two decillion, fifty-seven nonillion, one hundred thirty-one octillion, eight hundred twenty-three septillion, one hundred nineteen sextillion, three hundred ninety-seven quintillion, two hundred twenty-two quadrillion, three hundred eighty trillion, two hundred seventy-five billion, six hundred twenty million, five hundred thirty-two thousand, nine hundred eighty-three