Modding, Mission Design, and Coding > Help Wanted/Offering Help

Random mission generator

(1/7) > >>

krevett62:
Hi all, I'm currently trying to work on a random mission generator for our favorite game ;)
The goal is not to create very advanced mission involving many sexps, but to allow the creation of simple missions of 5 basic types, with simple sexps just for testing purpose.

As I don't have any coding skills I'm doing it using an excel sheet with a macro to generate the file. It's nothing spectacular for now but I'm able to generate a readable mission file for one type of mission (with just fighters for now).
The downside of this method is that you don't read vp's so data has to be entered beforehand (but the sheet already contains standard FS2 data as well as some custom).
All data in the lists are optional during mission generation so you can add multiple mod to the data tables and just select the data that will be used with userforms.

How it works:
The sheet contains a "Data" and a "Name" sheet that contains class names for weapons and ships by category, and names for wings/individual ships.
When you generate the file it prompts userforms to allow options and to select the savefile.
It then write to the file with parameters generated depending on the type of mission and difficulty.

I just started working on it yesterday but I can already generate a small "patrol" mission with one line briefing, enemy wings spawning after a timer elapsed, and directives appearing to destroy those wings.

Main functions are being implemented to add more variety, and many parameters are still not working.
It does not generate background for now but options are in to allow it at later time.

If people are interested to lend a helping hand I'd be happy to share it ;)

potterman28wxcv:
Just imagine the possibilities if there was a way to include mission generation code (e.g. in Python, or another interpreted script language) directly within Freespace SCP.. You could vary the content of missions dynamically based on the results of the previous one, or actually have random generation integrated in a campaign, or play a mix of turn-based with real time battles.. In terms of modding it would be heaven.

I know it's a huge amount of work.. But a man can dream  :)

wookieejedi:

--- Quote from: krevett62 on January 28, 2018, 05:52:31 am ---Hi all, I'm currently trying to work on a random mission generator for our favorite game ;)
The goal is not to create very advanced mission involving many sexps, but to allow the creation of simple missions of 5 basic types, with simple sexps just for testing purpose.

As I don't have any coding skills I'm doing it using an excel sheet with a macro to generate the file. It's nothing spectacular for now but I'm able to generate a readable mission file for one type of mission (with just fighters for now).
The downside of this method is that you don't read vp's so data has to be entered beforehand (but the sheet already contains standard FS2 data as well as some custom).
All data in the lists are optional during mission generation so you can add multiple mod to the data tables and just select the data that will be used with userforms.

How it works:
The sheet contains a "Data" and a "Name" sheet that contains class names for weapons and ships by category, and names for wings/individual ships.
When you generate the file it prompts userforms to allow options and to select the savefile.
It then write to the file with parameters generated depending on the type of mission and difficulty.

I just started working on it yesterday but I can already generate a small "patrol" mission with one line briefing, enemy wings spawning after a timer elapsed, and directives appearing to destroy those wings.

Main functions are being implemented to add more variety, and many parameters are still not working.
It does not generate background for now but options are in to allow it at later time.

If people are interested to lend a helping hand I'd be happy to share it ;)

--- End quote ---

I would suggest using LUA, it will be immensely helpful in this endeavor, trust me. I did not know programming much beyond R and Excel but was able to pick up LUA and, over the past year, I have been able to integrate it with when-argument sexps to create something with random generation and player persistence (ie the player gains rank, fleet grows, previous missions affect next missions). If you would like I can give you some extra pointers that I found out the hard way.

krevett62:
Your system seems very interesting indeed but it's a different approach if i understand you're using the built-in lua system to alter existing missions and track player through a whole campaign. You still need to create a mission in fred and add random elements via scripting. I didn't thought about that.

My generator on the other way don't start from an existing mission but attempts to create a .fs2 file from scratch.
Taking both method might lead to intersting things ^^ for now i focus on getting playable random missions with the generator, then i'll perhaps look into lua.

wookieejedi:

--- Quote from: krevett62 on January 28, 2018, 11:00:33 am ---Your system seems very interesting indeed but it's a different approach if i understand you're using the built-in lua system to alter existing missions and track player through a whole campaign. You still need to create a mission in fred and add random elements via scripting. I didn't thought about that.

My generator on the other way don't start from an existing mission but attempts to create a .fs2 file from scratch.
Taking both method might lead to intersting things ^^ for now i focus on getting playable random missions with the generator, then i'll perhaps look into lua.

--- End quote ---

I probably didn't explain that well...my bad. My generator uses lua to create a new mission each time (ie new .fs2 file). And it uses a template, thus once the mission is created nothing has to be changed and it can be played directly. If Excel works for you then I would say go with it! To each their own :)

Navigation

[0] Message Index

[#] Next page

Go to full version