| 
									
										
										
										
											2019-08-02 18:30:41 -04:00
										 |  |  | # Pathfinder 2 Sqlite
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-02 18:56:21 -04:00
										 |  |  | This will be a repository for the code necessary to generate a sqlite database | 
					
						
							|  |  |  | containing the open gaming content for the Pathfinder 2 table-top | 
					
						
							|  |  |  | role-playing-game system that is available under the Open Gaming License. Pull | 
					
						
							|  |  |  | requests welcomed! | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Why sqlite? 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | It's an open, permissively licensed, and portable single-file database that does | 
					
						
							|  |  |  | not require setting up a client/server model. It's also likely that the database | 
					
						
							|  |  |  | will fit into memory easily so performance issues aren't likely to be a problem. | 
					
						
							|  |  |  | Also, most use cases of this data will likely be read only, so the sqlite | 
					
						
							| 
									
										
										
										
											2019-08-06 12:21:14 -04:00
										 |  |  | limitations on concurrent writes won't be an issue either. Finally, it's | 
					
						
							|  |  |  | permissively licensed. | 
					
						
							| 
									
										
										
										
											2019-08-02 18:56:21 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ## Why not JSON? 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Because I'd rather leverage sql's power, than writing internal code to a future | 
					
						
							|  |  |  | Pathfinder 2 app. Also, because sqlite is pretty much language agnostic at this | 
					
						
							|  |  |  | point; Pythonistas, Gophers, Rustaceans, and anything in between can access a | 
					
						
							|  |  |  | sqlite database. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Roadmap
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 1. Design schema; | 
					
						
							| 
									
										
										
										
											2019-08-02 18:57:00 -04:00
										 |  |  | 2. Write script to generate sqlite database from sql code; | 
					
						
							| 
									
										
										
										
											2019-08-02 18:56:21 -04:00
										 |  |  | 3. Write sql code; and | 
					
						
							|  |  |  | 4. Drinks for all when finished! | 
					
						
							| 
									
										
										
										
											2019-08-02 19:12:59 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Conventions in the Code
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-07 20:16:53 -04:00
										 |  |  | ## Text Encoding
 | 
					
						
							| 
									
										
										
										
											2019-08-07 20:21:31 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-07 20:16:53 -04:00
										 |  |  | The goal is for all of our stored text in the database to be unicode, | 
					
						
							|  |  |  | preferably `UTF-8`. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-07 20:21:31 -04:00
										 |  |  | Also, many of the text fields will be in Github-Flavored Markdown. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Text may use the following escape codes: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 1. `\n` for Newline | 
					
						
							| 
									
										
										
										
											2019-08-07 20:23:09 -04:00
										 |  |  | 2. `\n\n` for a new paragraph | 
					
						
							|  |  |  | 3. `\t` for Tab | 
					
						
							|  |  |  | 4. `\\` for Backslash | 
					
						
							| 
									
										
										
										
											2019-08-07 20:21:31 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-07 20:39:09 -04:00
										 |  |  | The action symbols can be represented by the following characters: | 
					
						
							| 
									
										
										
										
											2019-08-07 20:21:31 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-07 20:39:09 -04:00
										 |  |  | | Meaning | Character | Unicode | | 
					
						
							|  |  |  | | -------- | -- | ------- | | 
					
						
							|  |  |  | | 1 action | ⑴ | U+2474 | | 
					
						
							|  |  |  | | 2 actions | ⑵ | U+2475 | | 
					
						
							|  |  |  | | 3 actions | ⑶ | U+2476 | | 
					
						
							|  |  |  | | Reaction | 🄡 | U+1F121 | | 
					
						
							|  |  |  | | Free action | 🄕 | U+1F115 | | 
					
						
							| 
									
										
										
										
											2019-08-07 20:21:31 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-02 19:12:59 -04:00
										 |  |  | ## Ability Scores in Integer Representation
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | | Ability Type | Value | | 
					
						
							|  |  |  | |--------------|-------| | 
					
						
							| 
									
										
										
										
											2019-08-02 23:33:11 -04:00
										 |  |  | | None         |     0 | | 
					
						
							| 
									
										
										
										
											2019-08-02 19:12:59 -04:00
										 |  |  | | STR          |     1 | | 
					
						
							|  |  |  | | DEX          |     2 | | 
					
						
							|  |  |  | | CON          |     4 | | 
					
						
							|  |  |  | | INT          |     8 | | 
					
						
							|  |  |  | | WIS          |    16 | | 
					
						
							|  |  |  | | CHA          |    32 | | 
					
						
							| 
									
										
										
										
											2019-08-02 22:32:19 -04:00
										 |  |  | | Free 1       |    64 | | 
					
						
							|  |  |  | | Free 2       |   128 | | 
					
						
							| 
									
										
										
										
											2019-08-02 19:12:59 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | If I wanted to say STR and DEX, I would use a `3`. If I wanted STR, WIS, and | 
					
						
							| 
									
										
										
										
											2019-08-06 12:20:11 -04:00
										 |  |  | CHA, that would be 1 + 16 + 32 = `49`. This is to give a program-focused data | 
					
						
							| 
									
										
										
										
											2019-08-07 20:39:09 -04:00
										 |  |  | return in addition to the textual representation. |