Skip to content

Comments

Scenario 32 Planetary Devourer#1972

Merged
daid merged 2 commits intodaid:masterfrom
Xansta:Devourer
Jun 11, 2023
Merged

Scenario 32 Planetary Devourer#1972
daid merged 2 commits intodaid:masterfrom
Xansta:Devourer

Conversation

@Xansta
Copy link
Contributor

@Xansta Xansta commented May 5, 2023

A scenario celebrating the spirit of "May the 4th be with you."

Any number of player ships may join. The mission may be replayed often since the terrain differs each time the scenario runs. It takes about an hour to run.

The mission outline remains the same: prevent the dreaded "Planet Devourer" from destroying all five planets. The Kraylor have been secretly developing an "ultimate weapon" - a weapon strong enough to destroy an entire planet. Now they are testing it on innocent planets for maximum fear impact. The players are to assess the weapon and destroy it if possible. There are mission plot points to find the technical readouts or plans for the planet devourer, analyze the plans for a weakness, and exploit the weakness.

@daid
Copy link
Owner

daid commented May 8, 2023

Kinda sad you didn't call it a "Murder Moon", even if "Planet Devourer" is a cool name, "Murder Moon" is even more a wink towards starwars.

@daid
Copy link
Owner

daid commented May 8, 2023

With these large scenario scripts, is there a lot of copy&paste between the different scenarios? I am starting to wonder if there is some way to organize this better. 8000 line scripts are a bit of a red flag in code maintenance.

@Xansta
Copy link
Contributor Author

Xansta commented May 8, 2023

There is indeed a fair amount of copy and paste between scenario scripts. I abstracted some functionality related to stations into the place_station_scenario_utility.lua. There are other possibilities for reducing the size of scenarios through abstraction of common functionality, but I have not yet gone back to refactor along those lines.

…cpu ship diversification. Removed generate call sign section and cpu ship diversification section from the devour scenario. This functionality now resides in external files that this scenario requires.
@Xansta
Copy link
Contributor Author

Xansta commented May 14, 2023

I pulled out two large sections that can be reused in other scenarios. This brought the line count to under 8k.

One is for generating call signs (~1000 lines). The call signs can be more like ship names or they can be random 1, 2 or 3 character length prefixes followed by 1, 2 or 3 digit length suffixes.

The other section is for adding more CPU ships without creating more templates (~1700 lines). The list includes armed ships as well as unarmed ships. These functions that add ships also include code to add corresponding entries into the science database.

@daid daid merged commit 7e9f1e8 into daid:master Jun 11, 2023
Piglit pushed a commit to Piglit/EmptyEpsilon that referenced this pull request Jul 6, 2023
* Devourer

* Created two utility files: one for generating call signs and one for cpu ship diversification. Removed generate call sign section and cpu ship diversification section from the devour scenario. This functionality now resides in external files that this scenario requires.
Piglit pushed a commit to Piglit/EmptyEpsilon that referenced this pull request Jul 6, 2023
* Devourer

* Created two utility files: one for generating call signs and one for cpu ship diversification. Removed generate call sign section and cpu ship diversification section from the devour scenario. This functionality now resides in external files that this scenario requires.
Tsht pushed a commit to Tsht/EmptyEpsilon that referenced this pull request Nov 22, 2023
* Devourer

* Created two utility files: one for generating call signs and one for cpu ship diversification. Removed generate call sign section and cpu ship diversification section from the devour scenario. This functionality now resides in external files that this scenario requires.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants