PDA

View Full Version : v2.2 Encounter Generator (JavaScript/JQuery)


Tegyrius
11-21-2020, 01:54 PM
I was tinkering with rules and got frustrated with the amount of page-flipping involved in rolling up a bunch of encounters. The only logical course of action was to write a random encounter generator:

http://www.de-fenestra.com/t2k/encounter_generator_strict.html

This should be fully aligned with v2.2 rules as published. Please report any bugs. Idiosyncratic phrasing will not be considered a bug - I'm not obsessive enough to write conditional grammar-parsing code for a project like this.

Permission is granted to download and use locally, mirror/re-host, and tweak the code as you see fit. Please provide credit.

- C.

bash
11-21-2020, 02:03 PM
That's pretty awesome!

wolffhound79
11-22-2020, 12:46 AM
ive played around with it a bit and it seems pretty good. thank you.

Silent Hunter UK
11-22-2020, 06:17 AM
Excellent work!

nuke11
11-22-2020, 06:56 AM
Generated this encounter.

independent > wood > animal > dogs > 80 meters

A pack of 13 wild dogs.

If the notice the PCs and outnumber them, they attack. If they lack superior numbers, they flee.

I think it should read "If they notice the PCs"

Tegyrius
11-22-2020, 07:30 AM
Generated this encounter.

independent > wood > animal > dogs > 80 meters

A pack of 13 wild dogs.

If the notice the PCs and outnumber them, they attack. If they lack superior numbers, they flee.

I think it should read "If they notice the PCs"

Thanks! Good catch. This should be fixed now for both dogs and wolves.

I also fixed a missing "a(n)" in the text for a patrol's heavy weapon (if present) and added clarification that a specific artillery result can be either self-propelled artillery or air defense artillery.

- C.

The Zappster
11-22-2020, 07:44 AM
Fantastic job. A real time saver

Nyrond24
11-22-2020, 10:04 AM
Brilliant, will save me a load of time in adventures, many thanks.

swaghauler
11-26-2020, 10:08 PM
Nice Work man.

Tegyrius
11-27-2020, 09:26 PM
Thank you, gentlemen.

I decided to do a bit more tinkering and built another simple generator for the book's settlement and urban encounter tables:

http://www.de-fenestra.com/t2k/settlement_generator_strict.html

I'm also playing around with various ways to add more depth and detail to the basic encounter generator. This is a work in progress, and likely shall remain so for some time. Results may vary. Not intended for use by children over 40. Front toward enemy. Apply directly to the forehead.

http://www.de-fenestra.com/t2k/encounter_generator_expanded.html

- C.

The Zappster
11-28-2020, 08:12 AM
Keep them coming, they are fantastic. Many thanks, your work is appreciated

Amagi
12-07-2020, 07:41 PM
Fantastic! These are great.

Do you have a landing page pointing to all of these (and, perhaps any other tools you made)?

*** EDIT ***
I found your landing page.

Tegyrius
12-07-2020, 07:44 PM
First link in my sig file, for any others who may be curious. It's all a work in progress.

I added more material to the expanded encounter generator last weekend, including a bunch of adapted encounters specific to river travel and a lot more detail in villages.

- C.

wolffhound79
12-07-2020, 07:52 PM
looks great

wolffhound79
12-07-2020, 08:01 PM
Thank you for sharing this , this is awesome. I see the potential here for helping to map out areas ahead of where my players are moving to help speed up the game.

Tegyrius
12-07-2020, 09:41 PM
Thank you for sharing this , this is awesome. I see the potential here for helping to map out areas ahead of where my players are moving to help speed up the game.

Excellent! I hope it turns out to be useful. If any of the added material yields cool stories, I'd love to hear about it.

- C.

Tegyrius
08-28-2021, 03:24 PM
Updates to the expanded encounter generator (http://www.de-fenestra.com/t2k/encounter_generator_expanded.html) since last post in this thread:

Cargo tables:
- Added national origin to appropriate smugglers' goods and other cargos.
- Added various products of post-apocalyptic chemistry.
- Cleaned up, expanded, and rationalized merchant cargos.
- Added livestock of various types to merchant cargos.
- Expanded trailer types and their corresponding cargo types.

Villages:
- Added villages' prewar economies for flavor and story seeds.
- Added warlord's personal troops to the defense forces of villages with the appropriate government model.
- Expanded list of trouble plot hooks in villages.
- Smugglers, stragglers, merchant convoys, patrols, military convoys, and large units may also be encountered passing through villages.

Farms:
- Farm encounters in cantonment territory may involve military agriculture.
- Ruined farms may instead be marauder-occupied farms.

Military convoys and large units:
- Some large units will be regimental/brigade/division command units.
- Expanded and rationalized engineering units' vehicles.
- Artillery units usually will be organized around a single gun or MLR type.
- Some military convoys will be repair/maintenance units or fueling units in motion.

Patrols:
- In cantonment and organized territory, some patrols will be training units.
- Added couriers as a variant patrol encounter, as well as possible additions to merchant convoys and villages.
- In independent and organized territory, some patrol encounters will be community militias rather than regular troops.

River encounters:
- Incidental additions to list of boat and gunboat hull types.
- Added river-specific military engineering unit as a sub-variant of military rover convoys.
- Added river-specific variants of refugee, roadblock, and marauder camp encounters.
- Encounters on rivers that flow through woods and swamps have greater (i.e., more plausible for navigable waterways) encounter ranges.

Merchant encounters:
- Added table of subtypes for traveling religious figures.
- Added table of subtypes for traveling entertainers.

Derelict trains:
- Cargo may now appear in intermodal containers atop flatcars.
- Added various special railcar types.
- There is a low probability that locomotives will be damaged but salvageable.

Miscellaneous:
- Pintle-mounted weapons may have gun shields of varying AV.
- Civilian vehicles are possible in some encounters.
- Some roadblocks (and, less frequently, some marauder camps) are fortified to varying levels.
- Removed Wear values from non-derelict vehicles, as it's not immediately relevant to the encounter.
- Added battlefield full of wrecks as another crater encounter variant.
- Chance of a dog encounter being a single friendly dog.

Software architecture and UI:
- Many under-the-hood changes for efficiency and ease of maintenance.
- Reworked architecture. Many functions are now in external JavaScript files rather than in the main HTML document to make debugging and future additions easier.
- Moved buttons to force-generate/debug specific encounter types to a floating sidebar.

- C.

wolffhound79
09-01-2021, 10:13 PM
im excited to give this try when I final get home.

rcaf_777
09-02-2021, 04:31 PM
what no bridging section?

Ursus Maior
09-03-2021, 03:14 AM
I love this, thanks!

unipus
09-03-2021, 05:17 PM
Excellent update, thanks! I've used this a few times in the prior version and it's often very handy.

One recommendation/formatting request? Maybe bolding some of the type would be useful for skimming an encounter on the fly? For instance:

>>
This is a patrol of 7 troops. They are Experienced NPCs with military small arms and a(n) light mortar. They are moving by semi-tractor w/ tanker semi-trailer.

Leader motivations: somewhat greedy (diamond 3), wise (heart jack).

Tegyrius
09-03-2021, 06:48 PM
Thank you, gentlemen.

Unipus - good point. I'll look at more text formatting as an eventual enhancement. I am hesitant to talk too much about the roadmap for this thing because it competes with many other projects (and my wife) for my attention, but it's rapidly becoming unmaintainable due to its organic growth. I need to rearchitect it for ease of maintenance first and foremost, and then I have a couple of major sets of additions I want to make to it. Tuesday was probably my last push of content updates until I'm done with the architectural issues:

- Large unit encounters may now yield homogenous infantry or cavalry units.
- Resolved a bug which was preventing low-probability special primitives encounters from appearing.
- Cleaned up code for navigation hazards encountered during river travel.
- Added several new navigation hazards and fleshed out text for existing ones.
- Some ruined villages have been depopulated by disease.
- Fleeing embassy delegations are now a subtype of straggler encounters, not patrol encounters.
- Couriers have more options for their cargo.

- C.

unipus
09-05-2021, 06:08 PM
Well, not to throw more workload on your feet, then, but I had another idea feature that would be super nice! The ability to re-roll individual aspects within an encounter. Hardly necessary but a cool improvement.


IE, this encounter:

This is a military convoy of 3 squads, each with 6 troops. They are Experienced NPCs. All are armed with military small arms. Heavy weapons, transport, and cargo may vary by squad:

Squad Heavy Weapon Transport Cargo
1 rocket launcher wagon methanol
2 flamethrower wagon obsolete technology parts and civilian vehicle parts
3 rocket launcher wagon biodiesel
(4) 5/4-ton pickup w/ dual 25mm autocannon (AV3 gun shield) n/a - escort vehicle with Veteran crew
(5) 5/4-ton pickup w/ dual 25mm autocannon (AV2 gun shield) n/a - escort vehicle with Experienced crew

Leader motivations: somewhat violent (club 3), coward (diamond jack).

Well, say I don't like those wagons, or that flamethrower, or whatever. It would be rad if I could hit a little recycle icon next to each element and get a new result specific to just that element.

Tegyrius
09-19-2021, 07:11 PM
Yeah, that would take a massive amount of rework. I'd have to go think about how to do it and then rewrite... a bunch of... ugh.. hm... let me consider it.

In the meantime, I wrote a character generator utility for those times when you're having trouble building a new PC (http://www.de-fenestra.com/t2k/character_concept_generator.html).

- C.

Tegyrius
02-12-2022, 02:25 PM
Today, I posted a major update to the expanded encounter generator (http://www.de-fenestra.com/t2k/encounter_generator_expanded.html). The major effort here is behind the scenes - I've phased in some architectural changes to make future expansions and maintenance easier on myself. However, there are plenty of new encounter types and details for referees and solo players:


Added motorized infantry, communications, and intelligence as large military unit sub-types.
Some villages have medical providers.
Some villages have skilled tradespeople.
Some villages have surplus goods for trade.
Some villages have religious leaders.
Some villages have fortifications.
Some villages have live entertainment in their taverns and inns.
All types of large military units may be found embarked on barges during river travel.
All types of large military units have a variety of current agendas.
Ruined villages have a much wider range of reasons for being abandoned.
Chemical cargos may contain compressed gas cylinders with various contents.
Patrols have a small chance to have two vehicles.
Patrols may be escorting prisoners, villages' defense forces may be holding prisoners, and infantry and cavalry units may be escorting POW columns.
A new item class of encounters, points of interest, is available in all territory types. Points of interest are static locations which may serve as landmarks, adventure hooks, or settings for scenes. The initial list includes construction sites, the scenes of recent gunfights, and prewar monuments.
A new group class of encounters, events, is available in all territory types. Events are interactions between two groups that are in progress when the player characters sight them. The initial list includes combat, pursuit, commerce, shakedown/robbery, and peaceful meeting, as well as some low-probability rare sightings.


As always, please PM me with any bugs or odd behavior.

- C.

Tegyrius
05-14-2022, 01:25 PM
Another update to the expanded encounter generator (http://www.de-fenestra.com/t2k/encounter_generator_expanded.html) is up. This one is an assortment of shower ideas accumulated over the last few months:


Added new terrain type, coastal.
- Coastal terrain has unique animal encounter tables in all regions.
- The following group encounter types have coastal variants: hunters, marauders (pirates!), merchants.
- The following item encounter types have coastal variants: derelict vehicles, derelict convoys (shipwrecks!), villages, points of interest.
Added new route type, rail line.
- Chance of finding a derelict train is increased on rail lines.
- Other encounters on rail lines may feature specialty rail vehicles.
A few field hospitals will be veterinary clinics.
Cavalry units may be accompanied by their own blacksmiths.
Event encounters may include armed standoffs between two groups.
Expanded the list of low-probability rare sightings for event encounters.
Expanded the options for derelict trains.
In clear terrain, some merchant encounters may be cattle (or other livestock) drives.
Fixed a bug where smugglers could not be found in a village located on a river.


- C.