amar-tui 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +675 -0
  3. data/README.md +150 -0
  4. data/amar-tui.rb +8195 -0
  5. data/cli_enc_output.rb +87 -0
  6. data/cli_enc_output_new.rb +433 -0
  7. data/cli_enc_output_new_3tier.rb +198 -0
  8. data/cli_enc_output_new_compact.rb +238 -0
  9. data/cli_name_gen.rb +21 -0
  10. data/cli_npc_output.rb +279 -0
  11. data/cli_npc_output_new.rb +700 -0
  12. data/cli_town_output.rb +39 -0
  13. data/cli_weather_output.rb +36 -0
  14. data/includes/class_enc.rb +341 -0
  15. data/includes/class_enc_new.rb +512 -0
  16. data/includes/class_monster_new.rb +551 -0
  17. data/includes/class_npc.rb +1378 -0
  18. data/includes/class_npc_new.rb +1187 -0
  19. data/includes/class_npc_new.rb.backup +706 -0
  20. data/includes/class_npc_new_skills.rb +153 -0
  21. data/includes/class_town.rb +237 -0
  22. data/includes/d6s.rb +40 -0
  23. data/includes/equipment_tables.rb +120 -0
  24. data/includes/functions.rb +67 -0
  25. data/includes/includes.rb +30 -0
  26. data/includes/randomizer.rb +15 -0
  27. data/includes/spell_catalog.rb +441 -0
  28. data/includes/tables/armour.rb +13 -0
  29. data/includes/tables/chartype.rb +4412 -0
  30. data/includes/tables/chartype_new.rb +765 -0
  31. data/includes/tables/chartype_new_full.rb +2713 -0
  32. data/includes/tables/enc_specific.rb +168 -0
  33. data/includes/tables/enc_type.rb +17 -0
  34. data/includes/tables/encounters.rb +99 -0
  35. data/includes/tables/magick.rb +169 -0
  36. data/includes/tables/melee.rb +36 -0
  37. data/includes/tables/missile.rb +17 -0
  38. data/includes/tables/monster_stats_new.rb +264 -0
  39. data/includes/tables/month.rb +18 -0
  40. data/includes/tables/names.rb +21 -0
  41. data/includes/tables/personality.rb +12 -0
  42. data/includes/tables/race_templates.rb +318 -0
  43. data/includes/tables/religions.rb +266 -0
  44. data/includes/tables/spells_new.rb +496 -0
  45. data/includes/tables/tier_system.rb +104 -0
  46. data/includes/tables/town.rb +71 -0
  47. data/includes/tables/weather.rb +41 -0
  48. data/includes/town_relations.rb +127 -0
  49. data/includes/weather.rb +108 -0
  50. data/includes/weather2latex.rb +114 -0
  51. data/lib/rcurses.rb +33 -0
  52. metadata +157 -0
data/README.md ADDED
@@ -0,0 +1,150 @@
1
+ # Tools for the Amar Role-Playing Game
2
+
3
+ [![Ruby](https://img.shields.io/badge/Ruby-CC342D?style=flat&logo=ruby&logoColor=white)](https://www.ruby-lang.org/)
4
+ [![License](https://img.shields.io/badge/License-Public%20Domain-brightgreen.svg)](https://unlicense.org/)
5
+ [![GitHub stars](https://img.shields.io/github/stars/isene/Amar-Tools.svg)](https://github.com/isene/Amar-Tools/stargazers)
6
+ [![Stay Amazing](https://img.shields.io/badge/Stay-Amazing-blue.svg)](https://isene.org)
7
+
8
+ <img src="images/amarcover.jpg" align="left" width="150" height="150"> Welcome to the swiss army knife for the Amar Role-Playing Game (http://d6gaming.org).
9
+
10
+ This program suite runs on any GNU/Linux system where the scripting
11
+ language Ruby is installed. Ruby is available as tar.gz, rpm packages or
12
+ deb-packages as needed for your specific Linux distribution. For more info
13
+ on Ruby, see http://www.ruby-lang.org.
14
+
15
+ This tool box for the Amar RPG is designed for generating random
16
+ or specific encounters and Non-Player Characters for the Amar RPG, random
17
+ settlements and relationship maps for inhabitants of villages/towns/cities
18
+ as well as random names for various races and for making Open Ended Dice Rolls.
19
+
20
+ In order to make real use of this program, you should be running an Amar
21
+ game as the Game Master.
22
+
23
+ For more info on the Amar RPG, game rules, adventures and more, see
24
+ http://www.d6gaming.org/.
25
+
26
+ For an online version of this program, go to http://isene.org
27
+
28
+ ## Requirements
29
+ GraphViz is a requirement for generating relationship maps for towns and
30
+ between NPCs ('apt install graphviz' on Ubuntu).
31
+
32
+ LaTeX is needed for random weather generation ('apt install
33
+ texlive-latex-recommended' on Ubuntu).
34
+
35
+ To generate an adventure via OpenAI, you need to install my openai gem (see
36
+ https://github.com/isene/openai).
37
+
38
+ ## Setup
39
+ To set up the program, extract npcg.tar.gz:
40
+
41
+ tar -xzvf npcg.tar.gz
42
+
43
+ This creates a directory named "npcg". Go to this directory:
44
+
45
+ cd npcg
46
+
47
+ Then, as root, run the setup program:
48
+
49
+ ./setup.rb
50
+
51
+ This makes it possible for you to run the program by just entering
52
+ "npcg" on the command line.
53
+
54
+ ## Running the command line version (CLI)
55
+ Running npcg on the command line will give you a set of options:
56
+
57
+ A = Generate an adventure from OpenAI
58
+ I = Make a general question or request to OpenAI
59
+ e = Random encounter
60
+ E = Generate a description for a random encounter
61
+ n = Generate a detailed human NPC
62
+ N = Generate a description for an NPC (via OpenAI)
63
+ t = Create a village/town/city
64
+ r = Make town relations
65
+ m = Generate names
66
+ w = Generate a month of weather
67
+ q = Quit npcg
68
+
69
+ Simply pick the tool you want and follow the instructions.
70
+
71
+ By running npcg on the command line with the -h option, this help file will be displayed:
72
+
73
+ Notes on the usage of NPC Generation for the Amar RPG
74
+
75
+ This program will only make sense to you if you know what role-playing
76
+ games (RPGs) are. It is a useful asset to the Amar RPG.
77
+
78
+ The program is used for creating villages/towns/cities, random or
79
+ specific encounters (basic details) or detailed NPC generation as well
80
+ as random weather for a month. It can also generate relationship maps
81
+ for inhabitants of a town or for a list of NPCs (with a graphical map
82
+ showing the various positive and negative relations between them.
83
+
84
+ There is also an Open Ended Dice roller for the Amar RPG (see the rules
85
+ for what that is and how it is used in the game). That program is
86
+ written in the nim programming language and compiled as a stand-alone
87
+ executable called "O6". Simply put this in your path and you can throw
88
+ an Open Ended Dice roll simply by running O6 on the command line..
89
+
90
+ You may select or enter values in any of the NPC's characteristics.
91
+ Those you don't will be randomly generated. When you have selected/
92
+ entered the values you want, press "submit", and the NPC will be generated.
93
+
94
+ When generating a town relationship map, you can upload a file with the
95
+ same format as the one generated when creating a random town. The map
96
+ will then have the name, basic info and the house number in an ellipse
97
+ for each person that has a special relationship with others in the town.
98
+ Or you can simply upload a list of characters, one per line and every
99
+ line with a special relationship will be paired with other lines in the
100
+ file. A black line indicates a special positive relation, while a red
101
+ line signifies a special negative relation. A double black line shows a
102
+ strong alliance, while a double red shows deep hate. A black and a red
103
+ line indicates a complex relationship. A graphical map is created as a
104
+ .png file in the npcg directory.
105
+
106
+ Press "v" when a town, encounters or an NPC is presented to edit the
107
+ values in your default editor. The files for a detailed NPC (temp.npc),
108
+ random encounter (encounter.npc), random town (town.npc) or random
109
+ weather (weather.npc) is generated in the "npcs" directory under "npcg".
110
+
111
+ Happy generation :)
112
+
113
+ Several abbreviations are used. They are easily deciphered if you read
114
+ the Amar RPG rules.
115
+
116
+ The more obscure ones are:
117
+ Spell Heading: A?=Active/Passive? Here a "+" means both Active and passive.
118
+ R?=Resist? AoE="Area Of Effect", and we have A=Animal, C=Creature, D=Demon,
119
+ E=Elemental, O=Object, S=Spell, U=Undead, W=Weapon.
120
+
121
+ The asterisk indicates that it will increase with the spell level.
122
+ 1mr = 1 meter radius.
123
+
124
+ The CLI-version of NPCg has the following options:
125
+ -h Displays this helpfile
126
+ -e Will display results in your editor of choice. Write the name of the
127
+ editor directly following the "-e", such as npcg -e vim. If no editor
128
+ is given, the program outputs the NPC to "less".""
129
+
130
+ ## Running the web version
131
+ When using the html version, amar.html is the starting page.
132
+
133
+ Git clone this directory in the html root directory. Ensure the directories
134
+ "cgi-bin" and "cgi-bin/saved" are owned by the user "www-data".
135
+
136
+ Install Graphviz and LaTeX as noted under "Requirements" above.
137
+
138
+ ## Credits
139
+ Thanks to Alan Skorkin
140
+ (https://www.skorks.com/2009/07/how-to-write-a-name-generator-in-ruby/)
141
+ for providing a basis for the random name generator.
142
+
143
+ Thanks to Jonatan Isene for a multitude of tips. Thanks to the hundred or
144
+ so players in my campaign that has tested, played, fine-tuned and suggested
145
+ improvements to the game mechanics. Some have also suggested improvements
146
+ to these Amar Tools. Thanks to Egil Möller for his suggestions on relationship
147
+ maps for town residents and for saving unique URLS for NPCs and Towns.
148
+
149
+ ## Final note
150
+ Thank you for trying out NPC Generation. Feel free to visit my website at http://isene.com