amar-rpg 2.0.1

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 +155 -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,155 @@
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
+ ## Version 2.0 Released!
11
+
12
+ Complete rewrite with both Terminal User Interface (TUI) and Web interface.
13
+ Install the gem with `gem install amar-tui` and run with `amar-tui`.
14
+
15
+ This program suite runs on any GNU/Linux system where the scripting
16
+ language Ruby is installed. Ruby is available as tar.gz, rpm packages or
17
+ deb-packages as needed for your specific Linux distribution. For more info
18
+ on Ruby, see http://www.ruby-lang.org.
19
+
20
+ This tool box for the Amar RPG is designed for generating random
21
+ or specific encounters and Non-Player Characters for the Amar RPG, random
22
+ settlements and relationship maps for inhabitants of villages/towns/cities
23
+ as well as random names for various races and for making Open Ended Dice Rolls.
24
+
25
+ In order to make real use of this program, you should be running an Amar
26
+ game as the Game Master.
27
+
28
+ For more info on the Amar RPG, game rules, adventures and more, see
29
+ http://www.d6gaming.org/.
30
+
31
+ For an online version of this program, go to https://isene.com/amar3.html
32
+
33
+ ## Requirements
34
+ GraphViz is a requirement for generating relationship maps for towns and
35
+ between NPCs ('apt install graphviz' on Ubuntu).
36
+
37
+ LaTeX is needed for random weather generation ('apt install
38
+ texlive-latex-recommended' on Ubuntu).
39
+
40
+ To generate an adventure via OpenAI, you need to install my openai gem (see
41
+ https://github.com/isene/openai).
42
+
43
+ ## Setup
44
+ To set up the program, extract npcg.tar.gz:
45
+
46
+ tar -xzvf npcg.tar.gz
47
+
48
+ This creates a directory named "npcg". Go to this directory:
49
+
50
+ cd npcg
51
+
52
+ Then, as root, run the setup program:
53
+
54
+ ./setup.rb
55
+
56
+ This makes it possible for you to run the program by just entering
57
+ "npcg" on the command line.
58
+
59
+ ## Running the command line version (CLI)
60
+ Running npcg on the command line will give you a set of options:
61
+
62
+ A = Generate an adventure from OpenAI
63
+ I = Make a general question or request to OpenAI
64
+ e = Random encounter
65
+ E = Generate a description for a random encounter
66
+ n = Generate a detailed human NPC
67
+ N = Generate a description for an NPC (via OpenAI)
68
+ t = Create a village/town/city
69
+ r = Make town relations
70
+ m = Generate names
71
+ w = Generate a month of weather
72
+ q = Quit npcg
73
+
74
+ Simply pick the tool you want and follow the instructions.
75
+
76
+ By running npcg on the command line with the -h option, this help file will be displayed:
77
+
78
+ Notes on the usage of NPC Generation for the Amar RPG
79
+
80
+ This program will only make sense to you if you know what role-playing
81
+ games (RPGs) are. It is a useful asset to the Amar RPG.
82
+
83
+ The program is used for creating villages/towns/cities, random or
84
+ specific encounters (basic details) or detailed NPC generation as well
85
+ as random weather for a month. It can also generate relationship maps
86
+ for inhabitants of a town or for a list of NPCs (with a graphical map
87
+ showing the various positive and negative relations between them.
88
+
89
+ There is also an Open Ended Dice roller for the Amar RPG (see the rules
90
+ for what that is and how it is used in the game). That program is
91
+ written in the nim programming language and compiled as a stand-alone
92
+ executable called "O6". Simply put this in your path and you can throw
93
+ an Open Ended Dice roll simply by running O6 on the command line..
94
+
95
+ You may select or enter values in any of the NPC's characteristics.
96
+ Those you don't will be randomly generated. When you have selected/
97
+ entered the values you want, press "submit", and the NPC will be generated.
98
+
99
+ When generating a town relationship map, you can upload a file with the
100
+ same format as the one generated when creating a random town. The map
101
+ will then have the name, basic info and the house number in an ellipse
102
+ for each person that has a special relationship with others in the town.
103
+ Or you can simply upload a list of characters, one per line and every
104
+ line with a special relationship will be paired with other lines in the
105
+ file. A black line indicates a special positive relation, while a red
106
+ line signifies a special negative relation. A double black line shows a
107
+ strong alliance, while a double red shows deep hate. A black and a red
108
+ line indicates a complex relationship. A graphical map is created as a
109
+ .png file in the npcg directory.
110
+
111
+ Press "v" when a town, encounters or an NPC is presented to edit the
112
+ values in your default editor. The files for a detailed NPC (temp.npc),
113
+ random encounter (encounter.npc), random town (town.npc) or random
114
+ weather (weather.npc) is generated in the "npcs" directory under "npcg".
115
+
116
+ Happy generation :)
117
+
118
+ Several abbreviations are used. They are easily deciphered if you read
119
+ the Amar RPG rules.
120
+
121
+ The more obscure ones are:
122
+ Spell Heading: A?=Active/Passive? Here a "+" means both Active and passive.
123
+ R?=Resist? AoE="Area Of Effect", and we have A=Animal, C=Creature, D=Demon,
124
+ E=Elemental, O=Object, S=Spell, U=Undead, W=Weapon.
125
+
126
+ The asterisk indicates that it will increase with the spell level.
127
+ 1mr = 1 meter radius.
128
+
129
+ The CLI-version of NPCg has the following options:
130
+ -h Displays this helpfile
131
+ -e Will display results in your editor of choice. Write the name of the
132
+ editor directly following the "-e", such as npcg -e vim. If no editor
133
+ is given, the program outputs the NPC to "less".""
134
+
135
+ ## Running the web version
136
+ When using the html version, amar.html is the starting page.
137
+
138
+ Git clone this directory in the html root directory. Ensure the directories
139
+ "cgi-bin" and "cgi-bin/saved" are owned by the user "www-data".
140
+
141
+ Install Graphviz and LaTeX as noted under "Requirements" above.
142
+
143
+ ## Credits
144
+ Thanks to Alan Skorkin
145
+ (https://www.skorks.com/2009/07/how-to-write-a-name-generator-in-ruby/)
146
+ for providing a basis for the random name generator.
147
+
148
+ Thanks to Jonatan Isene for a multitude of tips. Thanks to the hundred or
149
+ so players in my campaign that has tested, played, fine-tuned and suggested
150
+ improvements to the game mechanics. Some have also suggested improvements
151
+ to these Amar Tools. Thanks to Egil Möller for his suggestions on relationship
152
+ maps for town residents and for saving unique URLS for NPCs and Towns.
153
+
154
+ ## Final note
155
+ Thank you for trying out NPC Generation. Feel free to visit my website at http://isene.com