RPG Forums

RPG Forums (http://forum.juhlin.com/index.php)
-   Twilight 2000 Forum (http://forum.juhlin.com/forumdisplay.php?f=3)
-   -   Encounter Generator (http://forum.juhlin.com/showthread.php?t=5716)

Lurken 08-16-2018 12:02 AM

Encounter Generator
 
1 Attachment(s)
Hello all!


I am reasonably done with a hobby project of mine. I have coded together a script that will take the inputs of what terrain the characters are in, and what stability it is (as defined in the core rulebooks of T2K), with the options of hard selecting Group/Item/Animal and even what specific Group/Item/Animal.

Unpack this file anywhere, and run the Random Encounter Script.bat (feel free to double check it by editing it in Notepad if you are feeling hesitant). This file will then execute the Project Encounter powershell file, which is where you give the input data. The script will then feed back the output data of the random encounter.

The water encounters are not yet implemented.

The resources is all in the textfiles, which is read and processed by the script. If you are daring you can edit them and the sourcecode.

Also, there is a bonus script, with another executable .bat-file, which generates the motivations of a NPC.

Please let me know of what you think of it and possible improvements.

I included in the help file some definitions on what exactly you can type in on what prompt to make life a bit easier for those who havn't trawled through the source code like I have (so many lines).

Known TODOs:
Implement water encounters
Add Encounter Range to Item-spawned Groups

NOT EVEN CLOSE TO DONE
Character Generator
Combat Resolver (because I am lazy and combat in T2k can be a massive slog with modifiers this and modifiers that)

StainlessSteelCynic 08-16-2018 04:58 AM

Haven't had a chance to look at it yet but I would have loved something like this years ago!
But I don't know one end of a script from the other so I have to wait for some nice scripter to do this :D

Lurken 08-16-2018 05:01 AM

Quote:

Originally Posted by StainlessSteelCynic (Post 78846)
Haven't had a chance to look at it yet but I would have loved something like this years ago!
But I don't know one end of a script from the other so I have to wait for some nice scripter to do this :D

You don't need to do anything. It is ready made and ready to use. Just click on the .bat file and it will do everything for you. (Other than giving it the input it asks for) :cool:

StainlessSteelCynic 08-16-2018 05:10 AM

I should explain myself better. :o
What I meant is that I don't know how to write such a program so I basically wait until someone who does know how to do it, creates it. :)

pmulcahy11b 08-16-2018 08:25 AM

Quote:

Originally Posted by StainlessSteelCynic (Post 78848)
I should explain myself better. :o
What I meant is that I don't know how to write such a program so I basically wait until someone who does know how to do it, creates it. :)

That's the stage I'm in with my vehicle and small arms spreadsheets. I don't know how to correct them, or make new ones (I don't have enough Excel-fu), and I am eternally grateful to Antenna for sharing those with me.

Lurken 08-16-2018 08:58 AM

Quote:

Originally Posted by pmulcahy11b (Post 78850)
That's the stage I'm in with my vehicle and small arms spreadsheets. I don't know how to correct them, or make new ones (I don't have enough Excel-fu), and I am eternally grateful to Antenna for sharing those with me.

Like what would you need help with? Like entering large amount of raw data into spreadsheets or make the data dance at your fingertip and spit out nice output?

Lurken 08-17-2018 05:28 AM

Posted a new version of the package.

This has been updated to have resolver for what group spots what group at what range. Added prompts to ask for size of player group, player vehicles and best observation to allow the script to find out with which group gets the drop, if any or both and at what range, or after how many rounds one group to spot or stumble across the other.

Lurken 09-04-2018 08:39 AM

Updated with a new version that contains much more information and stuff. Much of the new information is thanks to a Tim Drost, whos tables I have put to good use.

Originalpost:
I have done more work on my Encounter Generator. I have added more info and stuff, much thanks to Tim Drost and his tables. Now the encounters will generate a log file that will generate individual information about each and every person in the encounter group. This is so far only implemented for the Group Branch. I have not yet implemented it for the Item Branch.

Unpack this file anywhere, and run the Random Encounter Script.bat (feel free to double check it by editing it in Notepad if you are feeling hesitant). This file will then execute the Project Encounter powershell file, which is where you give the input data. The script will then feed back the output data of the random encounter.

BUG INFORMATION: I discovered that if the package is unpacked where the directory contain somewhere a space, the code will glitch out badly. This is due to a choice of solution I have with dividing up the info-files. I will be looking into a solution of that.

The water encounters are not yet implemented.

The resources is all in the textfiles, which is read and processed by the script. If you are daring you can edit them and the sourcecode.

Also, there is a bonus script, with a different executable .bat-file, which generates the motivations of a NPC.

As always, please let me know of what you think of it and possible improvements.

https://www.dropbox.com/s/bzw2jgzz69...80904.rar?dl=0

Known TODOs:
Implement water encounters
Fix directory bug
Add Vehicle specification for all encounters with vehicles.

NOT EVEN CLOSE TO DONE
Character Generator
Combat Resolver (because I am lazy and combat in T2k can be a massive slog with modifiers this and modifiers that)

pmulcahy11b 09-04-2018 10:19 PM

I got a 404 error when I tried to download it.

pmulcahy11b 09-04-2018 10:22 PM

Quote:

Originally Posted by Lurken (Post 78851)
Like what would you need help with? Like entering large amount of raw data into spreadsheets or make the data dance at your fingertip and spit out nice output?

Quite frankly, Antenna's vehicle worksheet needs a lot of work to include new data and make so much tweaking unnecessary. I'd also like to add some new weapon design elements to that worksheet. And I'd like to work up one for knives and scopes. And I'd like them to be updatable. Etc, etc, etc...

Lurken 09-05-2018 12:03 AM

Quote:

Originally Posted by pmulcahy11b (Post 79052)
I got a 404 error when I tried to download it.

Hot damn! Good for letting me know.

I'll be updating my main post, try this in the mean time:
https://www.dropbox.com/s/bzw2jgzz69...80904.rar?dl=0

Quote:

Originally Posted by pmulcahy11b (Post 79053)
Quite frankly, Antenna's vehicle worksheet needs a lot of work to include new data and make so much tweaking unnecessary. I'd also like to add some new weapon design elements to that worksheet. And I'd like to work up one for knives and scopes. And I'd like them to be updatable. Etc, etc, etc...

Well... I'll take a gander and see what I can do to make it happen.

recon35 09-05-2018 07:18 AM

That would be awesome. I would love the ability to generate spreadsheets for this, or better, character generation, but I'm doing good just to use existing ones.

Lurken 09-05-2018 09:43 AM

Quote:

Originally Posted by recon35 (Post 79063)
That would be awesome. I would love the ability to generate spreadsheets for this, or better, character generation, but I'm doing good just to use existing ones.

Pumping out to a spreadsheet is a bit more tricky. Can be done, but the amount of complexity to the code makes it very low on priorities. For now, pumiping out to a Log.txt is good enough.

You tried my latest version?

Lurken 04-12-2019 03:36 AM

Hi all

After a long hiatus I found time to tune and develop my script.

It should sort the generated NPC more efficiently and correctly than before.

More intuitive input system to make it easier to ask the script what will happen.

Tweaked the script so that cargo vehicles and trailers with liquid tanks will get liquid goods in them and vice versa that they will not get "solid" goods on them. However non-tank cargo and trailers will still have a chance of getting liquid goods. (lots and lots of jerrycans and drums)

If a cart or trailer becomes chosen, the script will also add animals to draw the cart/trailer. If it is a 1-ton trailer, just mentally image that there are more horses pulling.

And some more stuff I can't remember.

But please try it out and let me know what you think or if it is to any use.

After downloading the package, unpack it somewhere to a folder/path that don't have any blank spaces in it. Not doing so may cause the script to crash. It is on my todo list to change those lines that that issue to another solution. After doing so, run the "Random Encounters Script.bat", and you should be getting a commandprompt-window that will run the script.

Edit add: The log file is created in log folder under the Encounter Generator mapp, which also contains the .bat.

Edit add number 2:
Big thing. I notice I had focused a lot on the Group branch of the script so right now it seems that the script won't save anything from the Item branch or Animal branch to the log-file, but it will display that information in the command prompt window. Fixing this will my next big thing to rework.


https://www.dropbox.com/s/pf5qh8eoj1...lease.rar?dl=0

Lurken 01-30-2020 05:30 AM

1 Attachment(s)
Hi!

I have done some work on my Encounter generator script, done in Powershell. I have revamped the group generation, and added a new terrain Urban. This to better capture the possible encounters in cities, deserted, blown up, or inhabited.

The user interface should be friendlier with added options to just type the number of the option you wish to pick.

Fixed a lingering bug that caused crashes when running it in a folder-path that had white-spaces.

You need to run the Random Encounters Script which is in the Encounter_Generator-folder, which is a .bat-file that triggers the powershell-script.

If there are any feedback, in any form. Please let me know. I do this because I know from experience that checking for a possible encounter and then rolling it up is a massive slog, and I want to make GMing of T2k easier.


UPDATE:
UPDATE:
Even if I had done some checking, some unintended bugs came from my white-space bug fixing. Tracking down all instances where I have been lazy was trickier than expected. Please find the newest and more functioning version down below.

Unpacked latest version:
https://www.dropbox.com/sh/kny9shz7p...bdvlyUAca?dl=0

Gunner 01-31-2020 07:04 AM

Very cool. Can't wait to try it.

Gunner 02-02-2020 07:06 AM

I get an error opening the RAR file. "Error opening the archive (check available disk space, that you have a valid password, or that the archive is not damaged or partial)

Using RAR Opening on a new Windows 10 machine, so I know disk space isn't the issue, at least...

Lurken 02-03-2020 12:19 AM

Quote:

Originally Posted by Gunner (Post 82700)
I get an error opening the RAR file. "Error opening the archive (check available disk space, that you have a valid password, or that the archive is not damaged or partial)

Using RAR Opening on a new Windows 10 machine, so I know disk space isn't the issue, at least...

Hmm...

Interesting. I had a similar report on one of the facebook posts. In the mean time, try the unpacked version.

https://www.dropbox.com/sh/kny9shz7p...9YHpbbdvlyUAca

Lurken 02-24-2021 02:16 AM

1 Attachment(s)
Hi all

I have completed the project, I think. Restarted the work on the script and I can't provoke more errors in it that I can recreate.

Here is the Dropbox link: https://www.dropbox.com/s/qtj14tj7yj...10224.rar?dl=0

Just unpack the file and run it. It should be able to run from any destination on your computer. If you have a MAC, you need to install a powershell client for it to be able to run.

If you get any and all errors, please copy the error so I can hunt down the bugs.

I may release a new version soon again though. Going to add Primitive and Improvised weapons to the machinery, so that low end groups may have various bows and improvised weaponry.

wolffhound79 02-24-2021 11:54 AM

I have windows 7 still. I tried to open it but doesnt seem to work for me. Is there something I need to be able to run it?

Lurken 02-24-2021 12:19 PM

Quote:

Originally Posted by wolffhound79 (Post 86840)
I have windows 7 still. I tried to open it but doesnt seem to work for me. Is there something I need to be able to run it?

That is a bit old. I'll take a trip to google and see what I can find.

Gunner 02-24-2021 01:11 PM

Thanks for your work on this. It's working fine for me.


All times are GMT -6. The time now is 11:16 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.