[Final Frontier] Wormholes Modcomp

TC01

Deity
Joined
Jun 28, 2009
Messages
2,216
Location
Irregularly Online
Wormholes Modcomp v1.2 for Final Frontier

This is a Final Frontier compatible version for the Wormholes modmod, a modcomp I released for the Star Trek mod some time ago. I recently updated that mod to v1.2, and I decided to release a version of it compatible with vanilla Final Frontier as well (so v1.1 for Final Frontier = v1.3 for Star Trek). This mod is primarily for Star Trek, though, so new updates and content will probably be available in that version first, despite the fact that that mod is still only an attachment where this was uploaded to the download database.

It's been included in the Star Trek Expanded modmod for Star Trek by apenpaap (as of v1.2 of that mod), and in MOO2Civ mod by JEELEN as of Patch 4k. Other modders, if you want to use it, all my code is labeled with "Wormholes" or "-- TC01", except for the mapscript code.

Updated to v1.2 (v1.4 of Star Trek version). This version adds two custom

Feature List:

-Added two Wormholes features (blue wormhole, red wormhole)
-Added python code that transports units that move onto one wormhole to the other wormhole of the same type
-Added tutorial popup when you first discover a wormhole of either type
-Added a version of the FinalFrontierFlat mapscript called Wormholes.py that places wormholes (red wormhole placed only on standard, large, or huge maps)
-Added a landmark label via python to each wormhole
-Prevented wormholes from being placed on Duel Maps
-Added a version of the SpiralGalaxy mapscript that places wormholes just like the Wormholes mapscript called WormholesSpiralGalaxy.py
-Made AI consider wormhole position before deciding where to build a starbase
-New in v1.2, a map option allowing you to turn on and off the wormhole labelling
-New in v1.2, a map option allowing you to change the order wormholes appear (which appears on Tiny/Small, which appears on Standard, which appears on Huge)


Links:
Download here
Star Trek version

Changelog:
Code:
v1.2 Changelog:
-Made labeling of wormholes a custom map option
-Added a map option allowing you to alter the order of wormholes
-Fixed Wormholes.py wormhole placement bug

v1.1 Changelog:
-Streamlined installation process
-Added Barzan Wormhole- pale purple- to Huge Maps
-Fixed a bug where not having Star Trek broke the mod

To Install:

Process streamlined since v1.1 was released.

1. Unzip the files to a temporary directory (such as Temp/Wormholes... this is defaulted.)

2. In your Final Frontier.ini file, set "; Modular XML Loading" to 1, if it is not already set that way.

3. You may wish to back-up the following files: CvFinalFrontierEvents.py and CvAI.py in your Final Frontier/Assets/Python directory. If you don't, they
will be overwritten.

4. Copy the Final Frontier folder inside of the temporary directory into your Beyond the Sword/Mods directory. Say yes to overwrite files.

5. To test, run Final Frontier. Go into the civilopedia. If "Bajoran Wormhole" appears, you've done it correctly.

Credits:
TC01 for making the module/modcomp.
God-Emperor for helping fix the WormholesSpiralGalaxy script and with art issues.
The_J and Deliverator for helping me make the Barzan Wormhole graphics
JEELEN for suggesting the labelling map option
renegadechicken for suggesting the order of wormholes option
deanej for creating the Star Trek Mod and the StarTrekFlat/FinalFrontierFlat mapscript.
cephalo for making the SpiralGalaxy mapscript.

Jon Shafer for creating Final Frontier.
Firaxis for making Civilization 4, Sid Meier for making Civilization, etc., etc...
Gene Roddenberry, Paramount, etc, etc... for making Star Trek.

Screenshots:
See here for screenshots.
 
Thanks.

The code is pretty straightforward, I just used onUnitMove in the Event Manager. (In Final Frontier the onUnitMove callback is enabled and is already used for something- playing unit sounds I think).
 
(If anyone's still interested in this) I've updated my Star Trek version to v1.3 and also updated this version to 1.1, the equivalent. It only includes a few of the 1.3 changes, but includes the most important one: a third wormhole on huge maps.

I also fixed a bug where the absence of Star Trek broke the mod (because Wormhole art was not present).

Enjoy!
 
TC, I've playtested several times the Spiral Galaxymapscript now, with no issues appearing - except the one non-wormhole in the MP game reported; so it might just be a MP glitch.
 
TC, I've playtested several times the Spiral Galaxymapscript now, with no issues appearing - except the one non-wormhole in the MP game reported; so it might just be a MP glitch.

Strange, but I guess that's the probable explanation... But did you mean to post this here instead?
 
Released v1.2, equivalent of v1.4. It adds changes recommended by JEELEN and renegadechicken (two new map option).

For the next version I hope to release a scenario where the two sides of the map are seperated by a nebula barrier.
 
Question-where might one find the Final Frontier.ini file?

In the "Final Frontier" folder in the Beyond the Sword\Mods folder. (Full path, assuming you have a normal install of BTS and Civ IV would be "C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Final Frontier". That might change if BTS and Civ IV are not installed in the same place, what drive it is installed on, etc.)

You can open it with Notepad- just double-click on it.
 
TC01
Nice mod!
Tihs mod works with only flat maps?
Imho, in strategy plan FFmap > FFflatmap, because not have borders.
 
TC01
Nice mod!
Tihs mod works with only flat maps or with not flat also?
Imho, flat map not pretty.:rolleyes:

Well, I didn't make a cylindrical or toroidal mapscript for this... simply because in terms of a space map, they don't make sense. It's not like space is a cylinder or doughnut and you can move from one end of it to another. That's just... not how things work. Which is why I based Wormholes.py off of FinalFrontierFlat, not just FinalFrontier.

And it would also be problematic, because if two wormholes were dropped at the opposite ends of a map, you wouldn't need wormholes to cross the map, you could just travel around the edges.
 
Imho, in strategy plan FFmap > FFflatmap, because not have borders, player not mouse in the game...

you wouldn't need wormholes to cross the map, you could just travel around the edges.
No, no, no so simple...
In FFmap => standart size you have 4 civic near, in wormholesFFmap you have 4+1...? civic near, it is were variable strategy element. Wormholes spaceelements were tickle nerves, especially on grosse and huge maps.
 
Imho, in strategy plan FFmap > FFflatmap, because not have borders, player not mouse in the game...


No, no, no so simple...
In FFmap => standart size you have 4 civic near, in wormholesFFmap you have 4+1...? civic near, it is were variable strategy element. Wormholes spaceelements were tickle nerves, especially on grosse and huge maps.

I don't understand what you mean. Why doesn't the player have borders, and how is the player "not a mouse"? How is the player a "mouse" in the first place?

And what do you mean by "civic"? If you mean "civs", then the only way there would be more civs on the Wormholes mapscript is if you yourself added them when configuring a game.

"grosse"?


Maybe I'm not making my point well enough. On the FinalFrontier mapscript, you are capable of looping around the map- going from the top to the bottom, and the left to the right, and in the opposite directions. I don't like this, because it's not realistic. In space, you cannot travel in one direction and suddenly end up behind your starting point.

Therefore, on deanej's FinalFrontierFlat mapscript, you cannot do this. Players on the edge of the map are isolated from players on other edges, yes. But that is realistic, or would be in a future where humanity is in space, like in Final Frontier.

So while wormholes may be useful on the FinalFrontier mapscript (I admit you are right there), I'm not going to make them be on the Final Frontier mapscript, because I do not believe any space map should be toroidal or cylindrical.

If you want the Wormholes mapscript to be toroidal or cylindrical, all you have to do open up the mapscript file (you could open it in Notepad), and find this portion of the code (you'll have to scroll down a little to find it, or just use the find command).

Code:
def getWrapX():
	return False
def getWrapY():
	return False

Make them return True instead, and the mapscript will then automatically wrap.
 
Sorry, for my english.
Why doesn't the player have borders
(border=edge, grosse=large, civic=civs)
and how is the player "not a mouse"?
Yes, for wrap maps (FFmap). Imho, flat maps are good for MOo2 times.

because it's not realistic. In space, you cannot travel in one direction and suddenly end up behind your starting point.
In space to be edges?

Imho, advanced wormholes for FF based mods are revolutionary elements..., these wormholes have dinamic life in spase, wormholes from future CIV5...:crazyeye:

Good please for mapscript wrap-solution, this i mean.:goodjob:
 
I'm trying to re-add the Wormholes to a stable MOO2Civ version, but getting a weird occurrence again: with the first Probe leaving orbit the whole map is revealed and instant contact with all civs established plus several advances are discovered. (Basically the single Probe multiplies on several different map locations. I seem to remember this as an old issue, but couldn't find any info on it. I followed your PM instructions; haven't tried adding non-modular yet.)
 
I'm trying to re-add the Wormholes to a stable MOO2Civ version, but getting a weird occurrence again: with the first Probe leaving orbit the whole map is revealed and instant contact with all civs established plus several advances are discovered. (Basically the single Probe multiplies on several different map locations. I seem to remember this as an old issue, but couldn't find any info on it. I followed your PM instructions; haven't tried adding non-modular yet.)

I know this bug... The python checks if FEATURE_WORMHOLE is on the plot. But if FEATURE_WORMHOLE = -1 (in other words, if it doesn't exist) then the game will look for all plots without a feature and send your probe there. So it will go to all empty plots, and therefore get a lot of advances from goody huts and meet all civs around the map.

It'll do it a second and third time with the other two wormhole features.

Is modular loading enabled? (In the correct .ini file?) If you have the module, but are still getting this, it sounds like the module isn't being loaded.
 
If you go into worldbuilder when you start a game using Wormholes.py, do you see wormholes?

If they're there, then there's a problem with the python code. If they aren't there, then the problem lies with modular loading.
 
No, I checked that. I'll try and not use the modular loading. Thanks. ;) (Bloody Xmas smilies...)
 
(This may have been addressed somewhere else, but) how do I modify 'Wormholes' so that trade can be established thru them?

Let me give you a little background on exactly what I am tring to do: I want to modify the FF+ Wormholes mapscript so that it creates three mini-maps that are connected only by wormholes; however, unless I can get the program to recognize that two solar systems are connected via the worrmhole this becomes a moot quest.
 
Top Bottom