ScenGen: The VGAP scenario generator

Here you can find, hints, strategies and other info for VGA Planets, PHost and it's many addon's and utilities.

Moderators: BitMask, Havok

User avatar
anubis
Posts: 374

ScenGen: The VGAP scenario generator

Post#1 » Fri Jun 01, 2007 4:13 pm

I have written the addon and am currently doing the initial debug (right now it destroys VGAP universes!) I figure I should have it mostly working by the mid part of next week.

The initial addon works like this. When you execute the addon, it accepts three parameters in the form:

ScenGen <phase> <rule_file> <VGAP>.

The phase is 1 for AUXHOST1, 2 for AUXBC, and 3 for AUXHOST2 (the addon needs to know what phase it is in. Rule_File is the name of the file WITHOUT A PATH, located in the VGAP directory. The VGAP directory is the FULL PATH to the universe.

When run, the file parses the rule file, first for variables, then for rules. Variables are internal values that you can check and adjust to do things (whatever you like really). Rules check to see if something is true, and if it is, execute an action.

You can have up to 500 variables; each can be a number or a string up to 20 characters long. My system will NOT do type checking, if you try to add a string to something, it will do something strange.

For the rules, there are 13 different "conditions" that can be checked. They are:

1 Planet X is captured. <Valid>
2 Planet X is owned by player Y (or not owned)
3 Ship X is destroyed. <Valid>
4 Ship X is captured. <valid>
5 Ship X exists.
6 Ship X does not exist
7 Starbase X exists
8 Starbase X does not exist
9 Starbase X *type* Tech level == x (or > x or <x> x or < x).
11 Planet FC = X
12 Ship FC = X
13 Internal Variable Values (i.e. myVar == 5)

For each of these conditions, there are 13 different actions that can be performed. These actions are:

1) Call External program with <parameters>
2) Destroy Ship X
3) Change Ship X to Owner Y
4) Change Planet X to Owner Y
5) Set Base *Type* tech to X
6) Destroy Base X
7) Damage Base X
8) Set Base X fighter level to Y
9) Set Planet X Mines/Fact/Def to Y
10) Create minefield X at Loc y,z
11) Increase/decrease minefield X by Y units
12) Modify Ship/Engine/Beam/Torp files
13) Modify internal variable

For example, you can have a rule that says "If Ship 242 is captured, destroy base 221" Or "if a planet has a F/C of "SCP" create a mine field at 2442:2222 of 20000 units".

If anyone can think of any other conditions and/or actions that would be useful, I can add them easily at this point.

planetmaker
Posts: 88
Contact:

Post#2 » Sat Jun 02, 2007 9:29 am

You might want to add as an action to modify the cargo of a ship, the resources on a planets surface and the core content of a planet.

Regards,

User avatar
anubis
Posts: 374

Post#3 » Sat Jun 02, 2007 2:50 pm

planetmaker wrote:You might want to add as an action to modify the cargo of a ship, the resources on a planets surface and the core content of a planet.

Regards,
Excellent ideas. All three of these (as well as the ION storm control that was emailed to me) are possible.

User avatar
anubis
Posts: 374

Post#4 » Sat Jun 02, 2007 2:53 pm

planetmaker wrote:You might want to add as an action to modify the cargo of a ship, the resources on a planets surface and the core content of a planet.

Regards,

On that same subject, a condition that checks for the cargo of a ship or the surface of a planet would probably be useful too.

User avatar
warpedboard
Posts: 555

Post#5 » Sat Jun 02, 2007 8:17 pm

Looks like a great idea! Can't wait to see it in action...

Another idea -- conditions that check planet count, ship count, base count, etc... ie, "If player 2 has 10+ planets, do XXX".

Of course, I know what that kind of thing entails from the programming standpoint, so feel free to ignore me :D

User avatar
anubis
Posts: 374

Post#6 » Sun Jun 03, 2007 7:20 am

warpedboard wrote:Looks like a great idea! Can't wait to see it in action...

Another idea -- conditions that check planet count, ship count, base count, etc... ie, "If player 2 has 10+ planets, do XXX".

Of course, I know what that kind of thing entails from the programming standpoint, so feel free to ignore me :D
I can do that.

(To be honest, because this is a small program from the early 90's and we all run very overpowered processors, the code I am writing is crap (repeat multiple-nested loops that do the similar things, etc). These checks would not be very hard.

User avatar
warpedboard
Posts: 555

Post#7 » Sun Jun 03, 2007 1:36 pm

anubis wrote:(To be honest, because this is a small program from the early 90's and we all run very overpowered processors, the code I am writing is crap (repeat multiple-nested loops that do the similar things, etc). These checks would not be very hard.
You should see the ineffeciency of the AoA addon... same line of reasoning; I'd rather have simplicity/debugging ease/stability over compactness/speed. No one has to know what it looks like under the hood!

User avatar
Havok
Site Admin
Posts: 7557
Contact:

Post#8 » Sun Jun 03, 2007 2:57 pm

Do any of you programers use the VGAP PDK?
Regards,
][avok

User avatar
warpedboard
Posts: 555

Post#9 » Sun Jun 03, 2007 3:30 pm

Havok wrote:Do any of you programers use the VGAP PDK?
I'll doublecheck (not @ programming computer right now, working from [bad] memory), but think what I use is a version of that, yes... I had mod it a wee bit to work w/ VC++, and fix a few things.

User avatar
anubis
Posts: 374

Post#10 » Sun Jun 03, 2007 3:31 pm

Havok wrote:Do any of you programers use the VGAP PDK?
I am using the VGAP devkit that warp was kind enough to send me, yes

User avatar
Havok
Site Admin
Posts: 7557
Contact:

Post#11 » Sun Jun 03, 2007 3:42 pm

I think there was an updated version of the PDK that came out recently. Maybe it's a beta of a new version.
Regards,
][avok

User avatar
anubis
Posts: 374

ScenGen version 0.0.1

Post#12 » Mon Jun 04, 2007 3:21 pm

I have sent a copy to a couple of "volenteer" testers and I am running some tests as well. Once it passes a very basic (VERY BASIC) Q/A session, I will upload a copy for a more expanded test.

It is VERY early in the testing cycle though, I expect there will be a lot of bugs to work through.

User avatar
anubis
Posts: 374

Re: ScenGen version 0.0.1

Post#13 » Mon Jun 11, 2007 4:44 pm

anubis wrote:I have sent a copy to a couple of "volenteer" testers and I am running some tests as well. Once it passes a very basic (VERY BASIC) Q/A session, I will upload a copy for a more expanded test.

It is VERY early in the testing cycle though, I expect there will be a lot of bugs to work through.
OK, I have a new working version that I hope is better.

If anyone would like an advance copy to test, please just send me an email at rtutter@hotmail.com.

User avatar
Havok
Site Admin
Posts: 7557
Contact:

Re: ScenGen version 0.0.1

Post#14 » Mon Jun 11, 2007 9:35 pm

anubis wrote:
anubis wrote:I have sent a copy to a couple of "volenteer" testers and I am running some tests as well. Once it passes a very basic (VERY BASIC) Q/A session, I will upload a copy for a more expanded test.

It is VERY early in the testing cycle though, I expect there will be a lot of bugs to work through.
OK, I have a new working version that I hope is better.

If anyone would like an advance copy to test, please just send me an email at rtutter@hotmail.com.
Could you email a copy to me sir?
Regards,
][avok

User avatar
warpedboard
Posts: 555

Re: ScenGen version 0.0.1

Post#15 » Mon Jun 11, 2007 11:43 pm

Havok wrote:
anubis wrote:
anubis wrote:I have sent a copy to a couple of "volenteer" testers and I am running some tests as well. Once it passes a very basic (VERY BASIC) Q/A session, I will upload a copy for a more expanded test.

It is VERY early in the testing cycle though, I expect there will be a lot of bugs to work through.
OK, I have a new working version that I hope is better.

If anyone would like an advance copy to test, please just send me an email at rtutter@hotmail.com.
Could you email a copy to me sir?
Likewise

Return to “Intel”

Who is online

Users browsing this forum: No registered users and 1 guest

cron