Level Up (A5E) On making a region encounter generator

Morrus

Well, that was fun
Staff member
So I've been working on a region encounter generator. It basically works, but with a limited data set (Haunted Lands tiers 0-2 so far). The actual coding and logic part is all done, but the data entry side of it is the nightmare--I've spent a whole week on just those 3 encounter tables, and there are about 120 such tables in T&T. Part of the issue is of course that I'm not a coder and the way I'm doing it is laborious and not the way anybody who actually knew what they were doing would do.

Screenshot 2023-08-30 at 1.20.47 PM.png

But that's by-the-by! Basically, each entry on an encounter table looks like this. Multiply this by 120 ish tables with d100 results on each, and you can see what an immense job it is. And of course with code, every comma, every semi-colon has to be perfect or it just doesn't work.Realistically, this can only really be a concept piece, as I can't devote the next 6 months to it. But I wanted to share it anyway. You can find it at the link below.

http://www.morrus.online/a5e/encounters/index.php
 

log in or register to remove this ad

Ondath

Hero
So I've been working on a region encounter generator. It basically works, but with a limited data set (Haunted Lands tiers 0-2 so far). The actual coding and logic part is all done, but the data entry side of it is the nightmare--I've spent a whole week on just those 3 encounter tables, and there are about 120 such tables in T&T. Part of the issue is of course that I'm not a coder and the way I'm doing it is laborious and not the way anybody who actually knew what they were doing would do.


But that's by-the-by! Basically, each entry on an encounter table looks like this. Multiply this by 120 ish tables with d100 results on each, and you can see what an immense job it is. And of course with code, every comma, every semi-colon has to be perfect or it just doesn't work.Realistically, this can only really be a concept piece, as I can't devote the next 6 months to it. But I wanted to share it anyway. You can find it at the link below.

http://www.morrus.online/a5e/encounters/index.php
This is a lot of work, but having such automation would definitely be fantastic!

I'm currently making my own Region encounter tables for a future game, but I'm using the Random Encounter Table style from AD&D 2E (so 2d10 encounters, 3 Very Rare, 4 Rare, 4 Uncommon and 8 Common encounters). It's less boxes to fill, but still quite a lot...
 

Morrus

Well, that was fun
Staff member
My region encounter generator is coming along! It now does all five tiers of Haunted Lands. It gives you the encounter, treasure, signss, behaviour, etc. plus some alternatives if the first option doesn't work for you. And it you tell it your total party level, it also tells you how difficult the encounter is for them. Plus it now has pretty illustrations of each monster!


Screenshot 2023-09-01 at 11.52.01 AM.png
 


rouboudou

Villager
Hi Morrus,

I am a (French) big fan of your podcast. So, sorry for my bad English.

I looked at your code and I understand it is quite complex to maintain. I am not a PHP expert so, as I don't have your backend code, it is complicated to have a precise analysis of how you do things.

Generally, your structured data should be inside a database in various tables (or nodes if you're using a graph database). It could also be in JSON format, even if it is more complex to do joints. Your front page should be able to send request to your backend reading the database. That means that whether you access the data via a URL like Ogre Zombie | Level Up or via your encounter designer, you access to the same set of data and format it differently.

The design of the database is a complex topic, and it will be for initiatives such as Open | D&D. Normally, we design the structure of data and afterwards, we design the pages to present and navigate into them.

With your screenshot, it seems that you want to randomize the choice inside the HTML, whereas it should be more efficient to have a randomizer service on the backend side. The randomizer could look into a specific table, extract some alternatives based on a specific selection (you would have filters on your table) and return the randomized choice. Another kind of design would be that your backend service sends a list to the frontpage and the front page has a local javascript randomize chooser code to do the randomization in local (knowing that you will have to get the images anyway).

Since the podcast, I follow on the initiatives of turning the TTRPG content into structured data with care. Those topics are complex if there is no object model to have a robust way of storing the information. As the guy invited in your podcast said, there is a non negligible cost to enter the data in a structured format, but afterwards, those data should be usable for many platforms. I just think the database is far more powerful than just json files which use will generate many troubles to the front end developers (manual joints especially).
 

Morrus

Well, that was fun
Staff member
Hi Morrus,

I am a (French) big fan of your podcast. So, sorry for my bad English.

I looked at your code and I understand it is quite complex to maintain. I am not a PHP expert so, as I don't have your backend code, it is complicated to have a precise analysis of how you do things.

Generally, your structured data should be inside a database in various tables (or nodes if you're using a graph database). It could also be in JSON format, even if it is more complex to do joints. Your front page should be able to send request to your backend reading the database. That means that whether you access the data via a URL like Ogre Zombie | Level Up or via your encounter designer, you access to the same set of data and format it differently.

The design of the database is a complex topic, and it will be for initiatives such as Open | D&D. Normally, we design the structure of data and afterwards, we design the pages to present and navigate into them.

With your screenshot, it seems that you want to randomize the choice inside the HTML, whereas it should be more efficient to have a randomizer service on the backend side. The randomizer could look into a specific table, extract some alternatives based on a specific selection (you would have filters on your table) and return the randomized choice. Another kind of design would be that your backend service sends a list to the frontpage and the front page has a local javascript randomize chooser code to do the randomization in local (knowing that you will have to get the images anyway).

Since the podcast, I follow on the initiatives of turning the TTRPG content into structured data with care. Those topics are complex if there is no object model to have a robust way of storing the information. As the guy invited in your podcast said, there is a non negligible cost to enter the data in a structured format, but afterwards, those data should be usable for many platforms. I just think the database is far more powerful than just json files which use will generate many troubles to the front end developers (manual joints especially).
Sadly, this is all way beyond my skill level--I'm not a coder, and I don't even understand half the words you're using! I know a bit of html and a tiny bit of PHP, but that's it. :)

I'll have to stick with the clumsy method I'm using. :)
 

Eyes of Nine

Everything's Fine
Sadly, this is all way beyond my skill level--I'm not a coder, and I don't even understand half the words you're using! I know a bit of html and a tiny bit of PHP, but that's it. :)

I'll have to stick with the clumsy method I'm using. :)
What @rouboudou said is basic structural internet architecture - and is great advice.
It would actually probably be worth any more time you would spend on this project to instead develop skills in PHP and taking a local college's cheap class on database design.

OR! hire a college kid to build this for you for their final project. From a "go back and fix later" stand point and a "test the app" standpoint, your future selves will thank present you.
 

bedir than

Full Moon Storyteller
What @rouboudou said is basic structural internet architecture - and is great advice.
It would actually probably be worth any more time you would spend on this project to instead develop skills in PHP and taking a local college's cheap class on database design.

OR! hire a college kid to build this for you for their final project. From a "go back and fix later" stand point and a "test the app" standpoint, your future selves will thank present you.
This is very much "to bake an apple pie first you must create the universe" stuff.
Morris said he didn't know how to do it. The solution isn't to study for years.

And, he's also been rather open with the budgets for EN Publishing projects. Is there an extra tens of thousands sitting around to hire a new person? Probably not
 



Remove ads

Top