More Blood: What Have We Learnt?

We have hit Session 51 of our Weekly Game of Fates Worse Than Death, so here is a bit of a Summary. It will be a bit rambling, but bear with me:

The State of Play

As detailed in our Game Summaries on The Mute Point forum, the PCs are now quite powerful (Level Five! The book suggests that this is better than 90% of the populace).

Although Vinnie still struggles for cash, the group as a whole have enough folding money to live comfortably, and purchase any special equipment they need (Mack and Dr Watt spent their “big score” on a cryo-chamber, so that their Blood Samples do not decay).

The group have quite  few Minions at their disposal, Mack and Vinnie are carving out their own little sections of Turf, and Dr Watt has a Secret Laboratory! Grendel is building a Voodoo Temple behind her Martial Arts dojo.

Politically, the PCs have played a good game (mainly at Mack’s pushing), and are well placed to ask for favours from Masters. They are also in a position to have favours asked of them!

Voodoo-Power is building up. Mack and Vinnie are bastardising the Faith-Powers into Blood-Based powers, and Grendel is insinuating herself as Voodoo liaison.

External Relations are still a bit stilted.

Psionics/Blood-Magic

Blood Sampling skill, combined with Blood Memory, is VERY powerful.

Blood Sampling allows one to taste a person’s blood, and gain access to their higher-level skills (depending upon how good your Sampling skill is).

Normally, a Blood Sample can only be used to fuel a Psychic Power whilst it is being tasted (a round or two), but Blood Memory allows that to be boosted to an hour (Vinnie can only manage a few extra rounds, but still useful).

As the players have access to Blood Samples for most skills (either directly, through their Minions/Contacts, or buying from other Bleeders), they can be effective in any area they choose!

Belief Attacks are useful as they can implant a Belief in a subject, but only if there is an “attack vector”. What actually happens is that the subject believes what they are currently experiencing, so using during your own Preaching, or arranging for Tannoy Announcements, can be useful!

Emotion Attacks are unpredictable. Firstly, the Psycher must be experiencing the Emotion, to be able to transmit it (I have been generous with this, and Vinnie has played cautiously), and it does not determine Actions. If someone is “Very Sad”, will they attack, run away, hide, call for friends?

We have ruled that Psychic Sensory skills (Mind Reading) cannot be directly blocked. A target may notice the Psychic intrusion, but cannot “shunt them out of my head!”. But usually, only surface-thoughts can be read, so singing a popular tune, or reciting a Mantra can hide any important information. (There are other defences, such as the Math Addicts’ predilection for thinking in Equations. It can be read, but not understood, and ranking Humankalorie have learned Alien ways of thinking, rendering them immune)

Individuals

The premise of the game was “We are all individuals”. Everyone plays members of the same gang (which translates to the same Character Class in other systems), to see what would happen*.

We chose a Gang that has a Generic skill-base, not as focused as the Technophiles, or the Runners, or Roofers, allowing players to choose a few Merits in their specialised areas.

We have ended up with four VERY different characters (even though Vinnie and Mack overlap in certain key Skill areas). To be honest, I think we still would if they had all been given the same Character Sheet! My players see things in very different ways (Not so different that it makes the game untenable, thankfully).

Where Next?

Despite my natural instincts, I want the players to succeed, and they are in a position to do so.

I would like them to continue to combine Voodoo and Bleeder, and come up with the “Game-Changer” power that has been predicted.

This will, of course, lead to them being blocked, attacked, and otherwise hindered!

I would like to leave the City in a state that I could run more adventures there. If this new City is controlled by a small sect of Powerful Bleeders, who demand blood-tithes, I can work with that! There is still the matter of the Skin Borgs, though, who wear advanced armour that needles cannot pierce!

So, lots still to do!


*I would still like to see the game we considered playing: Bin Men! In a dystopian future, someone still needs to empty the trash!

The Android Invasion (Part Three)

Life gets complicated.

Building Random Lists turned out to be a simple procedure. Buttons to choose which Category. Pick Lists (and grammar). Display in Recycler View.

I added a few extras, such as One Button to choose “Furniture”, with a sub-menu for Kitchen, Lounge, Bedroom etc. Quests included a Reward built from the Treasure Lists. Shops called from the Names Lists.

For the Pay Versions, I added some extra Features:

NPCs. Names became clickable, and built a random Person, with Traits pulled from other Lists. Personality, Valued Possession (Treasure), Mundane Items (new List), etc.

Add Data. This was a tricky one. I added the capability to add to the existing Lists. This data is stored in Text Files on the user’s phone, and added to the Array when the App draws up the Lists. I had quite a job figuring out where these files are stored, how to call them, and how to add them to the Array. In the end it worked though.

But we’re just calling Lists, and combining results.

Rome Wasn’t Built In a Day

And neither were my Apps!

But I did build a City-Builder. Not, unfortunately, a map-creator, although I am working on that. This is another Random Lists app that call up traits and features for a Fantasy City, such as Government Type, Local Features, Main Export, etc.

A Random City
A Random City

Again, each Feature was called from a List (still working with XML String-Arrays). Some used combined-lists (such as Renown). The Export facility was also included, and as can be seen from this picture, Exporting also saves a screen-shot.

A new feature for this App was to allow the User to “re-roll” a Trait. Clicking on one of the results will call up a new Trait.

The City is an “Object” (or “Class”) that holds information about each Trait, and when a Trait is re-rolled, the Class is updated with the new information.  (Only one City is held at any time. Creating a new one over-writes the old one).

The City Names are created from two sections. One is a list of predetermined Names, and the other a prefix-suffix combo. Here we see “Pen” + “dale”.  It could have produced “Pen”+”wood”, “Pen”+”ford”, etc.  (As an aside, I am working on a Planet Creator, and those names can pull from an algorithm similar to the one used in Elite, that combines some syllables to form a real-sounding word. The Starport names draw from combos that include a “mixer” between the prefix and suffix. “Hadley’s Hope” might be “Hadley’s New Hope”, or Hadley’s Last Hope”).

Next …

I am reaching the limits of my imagination, and what can be done with Random Lists. While there are many more “skins” I could put on them (Dungeon, Modern City, Monsters, Furniture, you name it …), I need something to allow me to learn more about programming. One area I have been meaning to investigate is Databases. While I did some simple work on them for my RPG pages, I need to know how to fit them into Android!

An idea soon brews up: Random Loots! D&D has always included random Treasure Tables, so I could write something inspired by the latest version, saving all the raw data in in tables, and calling it as needed!

It turns out that the worst part of this is typing in all of the data! As with all of these apps, there is a lot of information that needs storing.

The main structure of the database was easy enough to build, using “DB Browser for SQLite“, although I did have to keep adding more columns as I realised what code I needed.

There are two types of Treasure: Individuals and Hoard. Individuals just carry Cash, which is easy to define the range (dependant upon Challenge Level) and roll some dice. Hoards can include Gems or Artworks, and the chance of Magical Items (OOooh!!). Roll on the Table to determine what sort of thing is in the Loot Pile, and then on each sub-table to find the details.

A section of the Random Treasure Tables from the Dungeon Master's Guide
A section of the Random Treasure Tables from the Dungeon Master’s Guide

There are sub-tables for each Value of Gems and Artworks, and (as noted) multiple Magic Item tables. These are all easy to produce.

More difficult was deciding how much detail to display! Do the players want to know the full details of each gemstone, its exact value (for I introduced a randomiser for that!), what cut it has, etc, or just a Total Value for selling? I decided to include both! The App presents a Total, and clicks to present a list of details (using the previously-mentioned Recycler View).

New addition for Magic Item details was the Pop-Up window. This does  not change what Activity you are in, but adds a new display over the top of it. Here I included Maker, Minor Power, and Quirks that the Item may have.

Loot!
Loot!

Finally the Export Code was added. Again, I used the Screenshot, but also looked at Formatting the Exported Text, so that it was easier to read. This mainly meant iterating the Treasure List and adding a few Line Breaks, with Section Titles.

With the addition of a few details to prettify the App (background Picture, Icons, nice buttons), it was ready to publish!

Finally

It may sound like a lot of this went smoothly, but I spent an inordinate amount of time struggling with sections of code, hunting typos, retyping functions and searching Google/StackOverflow for error-messages. Eventually, I have some workable Apps! You can download them here.

If you would like more detail about the actual Code I ended up with, or if you have ideas for new Apps you would like to see, ytou can contact me at:

admin@maddwarf.co.uk

Thank you.

 

 

More Inspirational Reading

If you copy from one book, that’s plagiarism; if you copy from many books, that’s research.

(Professor Wallace Notestein, 1929. Much re-quoted)

I’m often asked about sources of inspiration, and while my previous article mentioned some forms that I use, it still leaves out a lot of the details.

When I am hoping for a particular theme, I will research other literature and media from that theme. For example my previous Fates Worse Than Death game had a dark, gothic feel to it, and so I included characters named Patricia and Dr Avalanche.

Other names come from mangling themes. In this game, we had a Gang named the “Tea Drinkers” (after their predilection for Soma tea, that supposedly improved their Psychic Powers). Major Players included Cam(from chamomile), Tets (from Tetley), and Ty (from Typhoo).

In Mathematics, an “abelian group” is defined as “a group for which the elements commute“. So  my group of Math Addicts, who lived outside of Gang Turf, took the name “The Abelians”. A subtle in-joke that only I got, but I used nonetheless 🙂

Foreign Languages:

The first port of call here is Latin. I was recently asked about a name for a character that was a Butterfly. I instantly brought up a page of Biological Latin Names to choose from, and/or alter to suit.

In D&D, there are creatures called Illithids (or Mind Flayers) that have tentacled faces, making them look like an octopus or squid (similar to the Ood from Dr Who). My natural tendency when I got to play one of these monstrosities was to call him “Ceph“.

Lists of foreign names are plentiful across t’interwebs, so browsing for one with a particular meaning is quite fruitful. My “Spanish” ex-noble in a fantasy-based New World game was called Sancho (“sainted. holy”), to clash with his obviously-tainted appearance (albino).

Others:

Some of my favourite names have included:

  • Brian’s Little Brother. (We never knew who Brian was)
  • Billy-O (he was run out of town)
  • Santiago (From Alpha Centauri)
  • Hexametric Ice (a group of Math Addicts. Considered to be “special snowflakes” by their peers)
Place Names

Several of my games are set in Urban areas, with large housing blocks. Often, I name these after politicians. A previous Cyberpunk game centred around Tebbit Block, with Lawson Towers, Lamont Park, Hurd Housing and Howe Block all playing their parts.

Pub names are usually randomly generated, but occasionally I manage to mangle something well enough for my needs. The latest is “The Happy Greeter”, where a gang of Bikers hang out. A mix of “Happy Eater” motorway services chain, and “The Salutation” (a biker bar in Nottingham, UK).

Summary

Overall, I take inspiration for any and every place I can get it! Mix it up, mangle it, twist it until it fits!

Take a favourite TV show, poem, song, and change it just enough that it is not instantly recognisable, but still traceable. Draw on your own hometown, or places you have visited (when I re-ran B2 – Keep on the Borderlands, I cribbed all the names from a local street-map!).

Do not be afraid of your players finding out where you got the ideas! It can be good to watch them look out for other references!

Where do you get your names from? What have you been pleased with?

The Android Invasion (Part Two)

Some details

Code: A Summary

I’m not going to publish my whole Code here, but I will present a short explanation of how my App is structured.

Main Files:

  • activity_main.xml – this displays a set of labelled Buttons, one for each Category of List.
  • Main Activity – this contains the control-code for the Buttons, chooses which Activity to launch, and what message to send to it.
  • Several Activities, for different types of List.
  • Several Adaptor (or “Helper”) files, for processing the Lists, and binding them to the Recycler view.
  • A “Class” file for each Category. These define an Object-Type, and show how each Object holds Data*.
  • activity_(category).xml files, with data about how to display each List type
  • (category)_list_row.xml files for showing how each Row of the List should display.

Why Multiple Category Files?

As this was my first real foray into Android Coding, I chose to split the Categories into two main types. Type The First were ones that could be express as “Names”. i.e. two pieces of Data. (Forename and Surname). This applied to Treasures (Type and Amount/Quality), Items (Alchemical, Mundane, Furniture all have Type and Material). Type The Second were ones that did not fit this structure, and each got it’s own set of Files/Classes/Activities/Helpers (Adaptors). e.g. Quests and Locations.

I could have piled up a single set of files with “IF <quest> then <do something different> else IF <Location> do <location code>”, but chose to separate them out for my ease of reading/maintaining.

What Objects Did You Use?

Each “category” was given it’s own Class (type of Object*).

<Deep breath …> Each time an item from a category was needed (each item on a list), I Instantiated a new Object of that Class:

To instantiate a new “Treasure” object:

Treasure thisTreasure = new Treasure();

This calls the Constructor of the Class, to create that instance of the Class (i.e. make that Object.)

e.g. Treasures are randomly chosen from “Coin”, “Art”, “Jewellery” and “Gem”. Each of these has a List of Types (Coins may be gold, silver or copper, Art may be a painting, a sculpture or a vase), and an Amount/Quality (Coins have a number, e.g. 20 Gold Crowns. A painting might be Elaborate or Exquisite, a Gem has a Cut).

Once instantiated, the Object has its set of Values, that can be called (e.g. by the Recycler Helper), to do something with (e.g. Display in a Recycler View).

Are you keeping up?

For the “Name”-type Objects (2 pieces of data each), they are all sent to the Name Adaptor to Display in the Name List (even if they are not names. It’s just what I called the 2-data section).

Quests and Locations got a little more complicated.

Each Quest Object holds several pieces of Data:

A Quest!
A Quest!

As you can see, each Quest is structured:

“You must <activity> the <descriptor> <item> before <time>. If you succeed, you will be rewarded with <reward>”

Each of these is called randomly from its String-Array. The Quest Adaptor must bind each part of this to the appropriate Recycler View.

As a complication, the Reward is called as a Treasure Object!

Locations were built in a similar manner.

Enough!

OK, that will do for today!

Let me know how much of that you understood, or if you would like some more explanations.

————-

*Java is an “Object Oriented Programming” (or “OOP”) language. Most things are “Objects”, that have “Methods” associated with them.

The Android Invasion!

(Or: How I Learnt to Stop Worrying and Love the Code)

How I Learnt to Write Apps (A Summary)

As my regular readers will know, I have been writing Apps for Android Smart Phones. Here is where I share some of my experiences, and technical details. Partly to bring my audience an informative, entertaining insight into my brain-space, and partly to clarify in my own head what is going on!

The Set-up

The first thing I need is an Environment in which to write Code. This can be done with a simple text-editor (such as Notepad, or its big brother Notepad++), but more useful is the Official IDE (Integrated Development Environment) Android Studio. A simple task to download and install.

Simple, but time-consuming. A 758MB download, which, on install, will update itself, and fetch a variety of libraries, the Java SDK, and other assorted extras.

I will also need some way of testing my code. Luckily I have a variety of old Android Phones, and a Tablet. I chose most recent phone that I am no longer using (Samsung J5). This needs drivers finding and installing, and setting some developer Options to allow me to write Apps directly to it, rather than downloading from the Google Play Store.

I could have relied up on the built-in Android Emulator,  but even on Lucretia‘s Power-House Gaming Rig, it is painfully slow to use (an hour to build and transfer a small app, rather than a couple of minutes to a real phone!)

The Inevitable “Hello World” App

Android Studio presents a default App: the ubiquitous “Hello World”. This gives me an opportunity to learn the very basics of what an Android App looks like:

  • A Main Activity file, that stores the main code (Java)
  • A Layout file, telling the App what to display on the screen (XML)
  • A set of Resource files (Pictures – known as “Drawables”, Values – constants for use in the app, codes for Colours and Styles, and many other options)
  • The IDE files – Manifest, Gradle, etc (Do not worry about these yet. Most are automatically created by the IDE)

There are a whole bunch of options when creating an App, such as which version of Android you wish to target, and what is the lowest you will be writing for, how much code you would like the IDE to start with (depending on which Template you choose), and names for your Project, App, and Files. These soon become second-nature.

To test that everything in installed and connected correctly, I hit the “Run” button, and wait for the “Gradle Build Running” message to clear …

The Initial Bug-Hunting

Obviously, things did  not go as smoothly as they should.

The IDE could not detect my phone, so I had to hunt down and install the correct drivers. I had failed to set the Developer Options correctly on my phone. The App was set to a newer version of Android than my phone used …

This was all relatively painless to fix, but put me in the mindset that I was to keep: There WILL be bugs!

But eventually, I had my App!

Hello World!
Hello World!

Writing My Own App

First, I fiddled about with some basics, to get my head around how the IDE worked, and learn the very simplest Java code.

Changing the text from “Hello World!” to “Hello Mad Dwarf!”. Using different colours. Adding a picture. Randomly choosing a Name to say “Hello” to. Inputting a name to be displayed.

None of this was without problems, but Google and Stack Overflow provided some solutions, and soon I was ready to build an actual, functional App!

Idea: an Inspirational App, providing a set of Randomly Generated Lists for use in Role-Playing Games.

Several choices needed to be made: What lists do I include? How complex? What data-structure do I use?

Reading up on data-structures, I chose to store all of my data in XML Arrays in my Resources/Strings file. This uses a very simple syntax:

<string-array name=”clothes”>

<item>Shirt</item>

<item>Trousers</item>

</string-array>

A little experimentation with layouts, and I could display a Button labelled Clothes, and have it react to being pressed.

Technical Notes

When defining the Text Label for the Button, the IDE complains if you enter the text directly. The preferred manner is to define a String, and then call that String as needed.

<string name =”clothes_button”>Clothes</string>

android:text=”@string/clothes_button”

Next, I need to “Start a new activity”, and pass it the chosen List title. To check this actually works, I make sure I have a couple more lists, and label them, and the Buttons need @ID codes, and an OnClickListener that will call the @ID of the pressed Button. So, new File. I already have “Main Activity”, so I create “Display List Activity” … and this is where the “fun” begins …

New Activities

These are launched by defining an Intent, which tells the App which activity you want to launch, and you can add “Extras” to this, which the new Activity can read. I add a “Message” that is the @ID of the button (“clothes”, “alchemy”, “monsters”, etc). This new Activity will  need its own XML Layout File (Advanced: You can define this in the Activity. For now, I don’t).

This new Activity can retrieve the “message” (“Extra”), and call the associated List (I made them the exact same name, for simplicity).

Recycling for Beginners

When I last took a foray into Java/Android, the recommended way of showing a List was to use “List View”. While checking online to remind myself how to build a List View, I found that it has been replaced by “Recycler View”, a way of “recycling” a view, to show lists … It is actually very similar to use, but more flexible (it can display in List, Grid, or Card format!)

I also need the screen to be able to Scroll, if the List goes off the bottom of the screen. Very simple. Define a Scroll View to contain the Recycler View.

I also need to use (according to Stack Overflow!) a Recycler Helper; a secondary file that does the heavy lifting of being sent a list of data. creating holders, binding the list of data to the holder and sending it back to the Activity to display.

Overall, quite a pain to learn, but very useful once done.

In Summary

  • Create several lists (String-Arrays) in Strings file.
  • Display Labelled Buttons
  • “Listen” for a button being pressed, and launch the next activity, telling it which button.
  • New Activity calls the appropriate List, and sends it to the Helper to process.
  • Display the processed List in a Scrolling Recycler View.
    Loot!
    Loot!
    Places!
    Places!

     

With a few added features (like randomising which random list to use: Cash, Jewellery, Gems or Art), I have an APP!

If you feel you’d like to write apps, but are put off by how complicated it looks, why not have a go! Yes, you will hear me screaming into the void about bugs, typos, stupid decisions (by me, the IDE developers, and Google/Android!), and generally pulling all of my hair out, but it is very rewarding!