Ohhh, thank you! This is precisely what would be useful! I actually won't be working on this for a while. >___< I think my priority will be finishing working on the bot, and... I probably won't have a lot of time to do so until after Apr-16. So I probably won't work on any game details for now at all. This means that pretty much anything goes in terms of the game details. If you wanted to start designing the game (in pseudocode), it wouldn't take that much effort to implement it regardless of the language if you've figured out all the formulas and tables. Pseudocode example: Code: class Player: int floor int x_pos int y_pos while every_loop(5 minutes): # Bot reads thread and action commands # Compute player actions # Computer monster actions # Bot posts to thread
H1: - So, you'd have a database of player data... In a post on here or somewhere separate? Since there are edit post features... H1-Ex: - You reserve the whole first page for your bots happenings. (Since there is a character limit per posts, even though many don't reach it (Is it still 10k?)) - Into those first page posts, you place the maps of the players and their choices? (trading confirmation?) amongst other things like battle outcomes and shop windows. - You have a secondary thread somewhere that keeps player ID's (user ID) in one post and then in subsequent posts their stats, inventory, 'onlineness', last known position & map, etc.. H2: - Player stats, weapon stats, monster stats, etc... Basic or advanced? H2-Ex: - For instance, do you just have attack, defence, HP, MP? - For instance, do you have STR, AGI, DEF, RES, INT, WIS, etc. (that each have a weight that calculated the attack, defence, etc.)? - For instance, do you have a occupation/race/class system that does what @Fluffums said of adding +% to each to differ from each other? Or do you simply let people choose by themselves (as @xconan25x suggested). - For instance, do you have status modifiers? Weapons, ailments/buffs, etc. that change the stats of the player while they are in play. - For instance, does Weapon X have an advantage over Weapon Y? Does Element of Weapon Y overturn the advantage or level it out? (@Ddraig ,@Fluffums )
Depends on the values involved, each of the advantage or disadvantage will have there modifier variables in the damage calculation formula. Now it depends on what formula the game will use, any special effects and the balancing of dmg numbers Like for example we can have an example system where everyone can deal three types of damage, elemental or magic, melee/weapon and range with there seperate armor types, magical, normal and pierce More important than these we need to come up with atleast a starting framework and formulas for the game which can be improved afterwards
The bot would be running from an external server with its own database. Something like python/selenium + sqlite For players to check their own data, they'd have to use a !status command I forget the character limit. I think @AliceShiki knows. I'm thinking the bot would only update screens for players who are currently "online" and there's been a change to the past screen they had. I'll give an example: ---------------------------------------------- Bot post #431: Spoiler: AliceShiki @AliceShiki Code: ################## ######██████###### ####████████ #### ####████**** #### ##██████ ████## ##██████[]██████## ####██^^ ████#### ################## []: You Terrain: ██: Wall ^^: Rubble **: Shrub (Previously, @AliceShiki was the only one to have made an action in the last 5 minutes) (All the other "online" players received their most recent screen in a prior post) ---------------------------------------------- @AliceShiki's post: !move up right up @Milanin's post: !status @lychee's post: !attack .a Other "online" players (did not take any action): Satan, Tony, Westeller Other "offline" players: 37 offline players ----------------------------------------------- Bot post #432 Spoiler: AliceShiki @AliceShiki Dungeon Floor 3 Code: ################## ######██████###### ####██████████#### ####██████.a.b#### ##████████ **██## ##████**[] ^^.c## ####██ ████#### ################## []: You (on shrub) .a: (1) A fire pit, (2) A skeleton, (3) A pair of worn clothes, (4) Money .b: An orc (on rubble) .c: A chest Terrain: ██: Wall ^^: Rubble **: Shrub Notice that multiple things can stack onto one square. Spoiler: Milanin @Milanin Dungeon Floor 1 Code: ################## ######████ ###### ####██████ ██#### ####██.a ██#### ##████ ████## ##████ [] ## ####██ ████#### ################## []: (1) You, (2) 1 rusted knife .a: A treasure chest Your status: Name: Milanin Level: 3 Exp: 434/732 ATK: 8 DEF: 3 Inventory: (1) 5 pieces of bread, (2) Escape scroll, (3) 2 red potions, (4) 400 gold, (5) copper key Terrain: ██: Wall Spoiler: lychee Too lazy to print lychee's map, but you get the idea. Since 3 players took action in the last 5 minutes, we print the updated screens for those three players. We would also re-print the screen for online players that had their screens change since the last screen they received (e.g. a monster wandered on the screen). As you can see, player's don't have full map vision. They can only see what's around them immediately. All players are in the same "world", but the entire "world" isn't necessarily all printed at once. -------------------------------------------------- Depends on how much time it takes to write it.... brainstorming for now. Probably best to start simple and expand from there. I think this is up for discussion for people designing the game. Simpler is better to start with, I think. If we can get a "alpha" working, it's not as much trouble to try and expand later. I don't play enough games so I can't really say I'm experienced in this. Honestly it's better to think of me as a programmer.
*will read thread later because I got curious* Character limit per post? 150000 characters, do you think you'll use this many?
Yeah, that's why I suggested Fire Emblem - it's one of the least complicated in the bookkeeping department. Even if players come up with a custom class, you just put in the base stats, base level, and % chance to increase on level up, and then on each level up the stats can be overwritten automatically (level +1, other stats +0 or +1). Then just have an inventory and an [Equipped] weapon which you could change easily with a command (!equip iron sword) as long as you can equip it and you have it in your inventory. Then you'd have "current hp" and "current xp" as other variables to keep track of. Enemies are even easier; if a "level 10 Orc" appears, the bot can just take the basic stats for a level 1 orc and automatically add the average bonuses for 9 level ups, then set its "current hp" variable equal to the calculated "hp" stat, and give it an inventory based on the "Orc" and "level 10" tables (the class determines the type of item, the level determines the quality of item). So individual enemies would just need a slot for level, a slot for class, a slot for current hp, and a few slots for inventory, however much they can hold. Even if you have a complicated enemy, like a dragon, you can just stat their attacks as individual weapons and give them an algorithm for switching (random, at certain %hp, certain type of opponent, certain numbers of opponents, opponents behind them, whatever). So a dragon might have Breath, Claw, Tail, Bite, and Wing attacks equipped without making the bookkeeping any more difficult - because a wolf will have a Bite attack, and a cat will have a claw attack, etc. Then weapons have: weapon type (strong vs one type, weak vs one), physical or magic type, base damage, base accuracy, base critical chance, range (standard in FE: 1 for melee, 2 for ranged, 1-2 for magic spells and melee weapons that can be thrown, etc), weight (if your strength is too low for the weight, your speed gets lowered by the difference while it's equipped). Certain weapons are "slayers" - extra effective against certain classes (bows vs flying enemies, or a dragon-slaying weapon vs dragons, or holy magic vs undead) - there can be a "slayer" table listing classes affected by each "slayer" weapon modifer. So weapons need what, 8 fields? You could still simplify that if you don't want to worry about some of the stats in FE, but they're pretty easy to apply.
... A fiction can use it up pretty quickly, especially if it's written in advance and then just copy pasted in...
150000 characters is around 20000 words from my empiric experience, I don't think the first post will make that many.
Resource link: http://angband.oook.cz/steamband/Tricks.pdf http://angband.oook.cz/steamband/Treasure.pdf
EnemyGen(name,type,level,modifier[][] ,growthRate[],inv[]) { Name; Type; level; Modifier will include weakness like F T W M S 2 1 0.5 1 1 We dont even need it to be 2d if we maintain the modifier order correctly always. There will a last element for special modifier So the mon takes double dmg against fire and half dmg against water. (we make this for all monsters in a database) Many of the parameters can be clubbed together into a single object(like name, modifier, type and growthrate defines a single monster object) Growthrate will include there growth rates for all stats, for example Phy atk at level n = phy atk(1) + n*growth rate; (we can use a better, more complex formula here, or even many different formulas like used in pokemon levelling system) Inv will be rng generated with the next item appearing being less and less likely
Fire thunder water melee spell They are not important as the only thing we need to decide is order of modifiers and number of types
Story: Welcome, impoverished adventurer, to the Scavenger City of Nuph. Are you here to seek your fortune? Three thousand years ago, a terrifying yet mysterious ancient civilization existed here. No one knows exactly what happened to them, but they are now extinct. Their only remaining relic is an enormous underground shape-shifting dungeon that we call the Labyrinth, which is infested with monsters and demonic beasts. Are you willing to try your hand at being a scavenger? The entire economy of this city revolves around the trinkets and magic cores that adventurers fish up from the depths of this ancient city. If you are lucky, you may unearth treasure that will allow you to live the remainder of your days in luxury! But beware -- the Labyrinth is no place for those who fear death. It is said that many who enter these doors, will never leave. General Game Mechanics: The Labyrinth is a dungeon that gets wider in diameter and contains more difficult monsters as it gets deeper. The Labyrinth floors are randomly generated and changes shape if: No "online" human player is on that floor for ONE DAY (24 hours) The floor reset/shuffle can be prevented for a temporary period of time if: 1 week: A human player is "offline" but has their position saved on that floor 1 week: A special item ("Observer") purchased from shop is placed on the floor Perma-death Food and rations decline over time (while "online") Limited inventory capacity (need to purchase expanded inventory "item bags", etc.) Players can "logout", but HP/MP does not recover while logged out Need to return safely to surface to sell loot (usually)
Status update (programming): Yesterday I spent time working on bot code. I'll talk a little bit here about what I've done and what directions I'm going in. Programming language Python 3, because I'm most familiar with python and I'm assuming I'm the one doing the most coding I've normally only done webdev with python in the past (flask/django) using python 2.7, but now is probably a good time to use python3 since I'm starting a new project anyways Project design/structure The "bot" will be a separate app from the "game". This is because I can imagine a bot being used for many separate other things, so I will write the "bot" as a standalone python library that's used as a dependency by the "game" I've decided to name the "bot project" as "haori" on github Haven't started the "game project" yet Bot project dependencies BeautifulSoup4 - using to convert raw HTML into something python can traverse programatically Headless browser - needed for the bot to simulate a user logging in and interacting with NUF. Several options: Selenium - Pros: Seems to be most popular - Cons: Needs an underlying browser install (e.g. Chrome, Firefox) Currently using this. Setup is Google Chrome/chomedriver/selenium I'm worried about it running a little slow because Google Chrome needs to be booted up each time its run I'm also worried about how well it will work straight out of the box when I run everything on a server (e.g. heroku) Advantage is that it's a real browser, so it's a near-perfect simulation PhantomJS Pros: formerly most popular, doesn't require an underlying browser Cons: no longer being maintained Cons: Known for sometimes rendering pages inaccurately mechanize Tried this one already Pros: doesn't require an underlying browser, very lightweight and fast Cons: does no simulate javascript, so NUF modals won't work What it would be like using the "haori" library (vague idea): Code: # File: test.py from haori import Bot my_bot = Bot(username="myusername", password="mypassword") # Log in bot my_bot.login() # Get page 2 of NUF thread with id: 63096 # Returns a list of Post objects my_posts = mybot.get_thread(id=63096, page=2) # Get text on the first post single_post = my_posts[0] print(single_post.get_id()) print(single_post.get_text()) # Can also loop over each line in the post for line in singe_post.get_lines(): print(line) # Log out bot my_bot.logout() Thinking about how the syntax should be... Code: class Bot: ... def get_thread(self, id, page=1, limit=1): ```Get the Posts within a NUF thread. Parameters: id (int): NUF thread ID page (int): Page number to start fetching posts from. Default: 1 limit (int): Maximum number of pages to fetch posts from. Default: 1 Returns: Post[] A list of Post objects ``` pass def get_posts(self, since, limit=None): ```Get the thread posts starting from a certain post ID Parameters: since (int): NUF post ID to start fetching posts from. limit (int): Maximum number of posts to return. Default: none Returns: Post[] A list of Post objects ``` pass
I can help write pseudocodes or algo then.. Or just help with listing monsters and getting a game system idea with others
Sure! Whatever you like! I think it will be helpful whichever you'd like to do. I'm focusing on the Bot right now, which is fully encapsulated and separated from the game itself, so there won't be an conflicts if other people start thinking about how the game should be coded.
More scratch paper that may not mean anything: Code: # main.py from apscheduler.schedulers.blocking import BlockingScheduler def loop(arg1, arg2): # Main game loop pass if __name__ == '__main__': # Initialize SQLAlchemy DB # Initialize Bot # Initialize Repeater and pass DB and Bot into each loop scheduler = BlockingScheduler() scheduler.add_job(loop, 'interval', args=[arg1, arg2], seconds=300) # Start the Repeater print('Press Ctrl+C to exit') try: scheduler.start() except (KeyboardInterrupt, SystemExit): pass File directory structure: Code: nuphtower/ main.py database.db models/ player.py floor.py monster.py assets/ # May be re-generated by game floor01.json floor02.json config/ masterconfig.json monsters.json items.json blah Code: F#01: 0000000000 1101111010 1111111010 0111101110 0001001011 0111111000 0111111000 0111111110 0111111010 0111111010 0000000000