View Full Version : EnclosedSpace Mapscript Discussion


TC01
Aug 30, 2009, 02:27 PM
UPDATE: 9/20/09

Based on discussion in the Next Patch thread, I'm working on making a variation of the Final Frontier mapscript to produce a region of "enclosed space" for Antaran territory. Then, there will be two wormhole-style Dimensional Portals linking the enclosed space and the territory outside.

CURRENTLY: The mapscript makes the enclosed space. It places a Dimensional Portal(FEATURE_DIMENSIONAL_PORTAL) inside. It places one outside as well. It randomizes the enclosed space- it can be in one of four corners. It places a barbarian city and 5 Battleship IIIs inside.

IT DOESN'T: Give "Teh Alienz" civilization the stuff inside enclosed space.

Changelog for latest update:

-Fixed bug where the row of nebula on the edge of the map was not generated, thus placing a hole in the barrier.
-Forced a solar system to appear in the enclosed space (as the generator didn't always put one there).
-Prevented radiation clouds, asteroids, or nebula from appearing inside the enclosed space (so the fractal generator can't fill the enclosed space full of radiation clouds before the solar system and portal are placed). Nebula still appear outside.

So a few questions to think about:

1. What should the Dimensional Portal look like? Should it just be one of the existing wormholes? Or should it be another recolor? If so, what color should it be?

2. What should be placed inside the Enclosed Space?

3. Should I change the name to "AntaranSpace"?

4. Should I allow the player to choose which portion of the map the enclosed space is located in?

Download: Download the zip below, overwrite your MOO2Civ patch4k directory with the one in the link, say yes to overwrite files. This isn't intended as a modmod, but you could install it as one.

JEELEN
Aug 30, 2009, 11:53 PM
First off: thanks for picking this up so quickly.:thumbsup:

1. What should the Dimensional Portal look like? Should it just be one of the existing wormholes? Or should it be another recolor? If so, what color should it be?

Purple seems fine. (Is it possible to make it a hidden feature? Not sure if that's really necessary though.)

2. What should be placed inside the Enclosed Space?

I think the Antaran capital (i.e. Antares). A problem I see here is that it should contain the most advanced units available. Would it be possible to use the mapscript for a multiple scenario? (Where one of, say 4, scenarios load at random? So you'll know that Antares will be in a corner, but not which one? Don't know if that's possible with Civ IV.)

3. Should I change the name to "AntaranSpace"?

I'll leave that up to you, but it might be more appropriate,

4. Should I allow the player to choose which portion of the map the enclosed space is located in?

I think that's not really desirable. (See #2.)

TC01
Aug 31, 2009, 05:58 AM
Purple seems fine. (Is it possible to make it a hidden feature? Not sure if that's really necessary though.)

By "hidden" do you mean that you can't see it on the map? Well, since there's only two on the map, one inside and one outside, this shouldn't be a problem. You have to search for it.

I think the Antaran capital (i.e. Antares). A problem I see here is that it should contain the most advanced units available. Would it be possible to use the mapscript for a multiple scenario? (Where one of, say 4, scenarios load at random? So you'll know that Antares will be in a corner, but not which one? Don't know if that's possible with Civ IV.)

It should be possible. I've been working on randomizing it to appear in the other possible corners. Once that's done, I'll release a version of it.

JEELEN
Sep 01, 2009, 01:52 AM
By "hidden" do you mean that you can't see it on the map? Well, since there's only two on the map, one inside and one outside, this shouldn't be a problem. You have to search for it.

Yeah, I was thinking of Dimensional Portal being linked to a specific tech in MOO II. In BtS that may be both unpractical as well as unnecessary.

It should be possible. I've been working on randomizing it to appear in the other possible corners. Once that's done, I'll release a version of it.

Cool!:thumbsup:

TC01
Sep 01, 2009, 05:59 AM
Yeah, I was thinking of Dimensional Portal being linked to a specific tech in MOO II. In BtS that may be both unpractical as well as unnecessary.

I'd probably create a new feature then, using either the Purple Wormhole graphics or new graphics, call it DIMENSIONAL_PORTAL, and then you can block units from being able to move onto it without a certain technology (<FeaturePassableTechs> in CIV4UnitInfos.xml). But for the first version, I'm just using the Purple Wormhole.

JEELEN
Sep 01, 2009, 02:09 PM
Thanks for the hint.;)

TC01
Sep 01, 2009, 05:36 PM
I've uploaded a beta version. There are probably some bugs, but what it should do is make the enclosed space, randomly in a corner, and then place a solar system and Dimensional Portal in it.

It currently places a barbarian city and 5 battleship III units on the solar system.

JEELEN
Sep 01, 2009, 05:54 PM
Will check it out ASAP. :goodjob:

JEELEN
Sep 02, 2009, 03:14 PM
There seem to be some problems with the mapscript. I installed it as per post #1, but on turn 2 my first Probe unit appears randomly on the map when I move it out of the starting position and I gain huge amounts of cash and several advances. Also, did you make the Portal feature hidden? (As it doesn't actually show.) I tried it on Huge size with Play Now and Custom Game, using different civs. There also seems to be a hidden Option added and checked , with no description as to what it does (didn't open the file to see what it was). Other than that, the Enclosed Space appears correctly on the map each time (in one of the corner areas) - I checked in Worldbuilder.

TC01
Sep 02, 2009, 05:15 PM
Do you have FEATURE_DIMENSIONAL_PORTAL defined correctly in CIV4FeatureInfos.xml? Exactly that?

The problem you are experiencing is the "Move through every plot at once!" problem. One of the four features below:

FEATURE_WORMHOLE
FEATURE_RED_WORMHOLE
FEATURE_PURPLE_WORMHOLE
FEATURE_DIMENSIONAL_WORMHOLE

is not defined in CIV4FeatureInfos.xml or in my module. The bug occurs because the code gets another plot with one of the above features if you move onto it and then sends you there. If FEATURE_WORMHOLE = -1, then all featureless plots will have FeatureType = -1, and your unit will be sent to every one. (Thus springing goodies, getting you cash and advances).

I didn't actually add FEATURE_DIMENSIONAL_PORTAL... you have to do that yourself, to the XML files. (Sorry, maybe I should have been clearer).

The_J
Sep 02, 2009, 06:09 PM
There seem to be some problems with the mapscript. I installed it as per post #1, but on turn 2 my first Probe unit appears randomly on the map when I move it out of the starting position and I gain huge amounts of cash and several advances.

Also endless promotions?
If yes: Turn on the python exceptions, something crashes on loading.

JEELEN
Sep 03, 2009, 01:39 AM
No promotions occurred, just gaining several advances.

Do you have FEATURE_DIMENSIONAL_PORTAL defined correctly in CIV4FeatureInfos.xml? Exactly that?

The problem you are experiencing is the "Move through every plot at once!" problem. One of the four features below:

FEATURE_WORMHOLE
FEATURE_RED_WORMHOLE
FEATURE_PURPLE_WORMHOLE
FEATURE_DIMENSIONAL_WORMHOLE

is not defined in CIV4FeatureInfos.xml or in my module. The bug occurs because the code gets another plot with one of the above features if you move onto it and then sends you there. If FEATURE_WORMHOLE = -1, then all featureless plots will have FeatureType = -1, and your unit will be sent to every one. (Thus springing goodies, getting you cash and advances).

I didn't actually add FEATURE_DIMENSIONAL_PORTAL... you have to do that yourself, to the XML files. (Sorry, maybe I should have been clearer).

I figured as much, so yeah, that's what I did. Since there were no errors or warnings after I changed the files, I assumed I did it correctly.

Ah, I forgot to mention: also on turn 2 my civ gains contact with all civs and the whole map is revealed.:confused:

JEELEN
Sep 05, 2009, 03:00 PM
I thought maybe I did something wrong installing (using my working version for the next patch, with Minor Annoyance's Charisma files), but that doesn't appear to be the case following some PMing with him...

TC01
Sep 05, 2009, 04:01 PM
I'll do some testing with this when I have time... worst comes to worst I can just make the Dimensional Portal the Purple Wormhole.

One thing you can try- try moving the Dimensional Portal feature from CIV4FeatureInfos.xml into Wormholes_CIV4FeatureInfos.xml. I don't know why it should work, but it might.

TC01
Sep 05, 2009, 09:29 PM
Try the zipped CIV4FeatureInfos.xml. Overwrite your existing one. A quick test revealed everything worked fine...

JEELEN
Sep 06, 2009, 12:25 AM
OK (haven't had the opportunity yet to follow up on your previous suggestion...); I'll check ASAP. ;)

TC01
Sep 12, 2009, 07:09 PM
OK (haven't had the opportunity yet to follow up on your previous suggestion...); I'll check ASAP. ;)

So... have you had the time to check it yet?

Just wondering how this is going.

JEELEN
Sep 14, 2009, 08:47 AM
Sorry, I've been on a bit of a modding break. Using your latest file, I now get stuck on init again... :( (I've used patch4k, not my current working version, so you can check if you want to.)

TC01
Sep 14, 2009, 05:20 PM
I downloaded the zip in the first post, copied over the mapscript into PublicMaps and the CvFinalFrontierEvents.py into Assets\Python. Then I unzipped the CIV4FeatureInfos.xml and copied it into Assets\XML\Terrain.

No errors occured on doing that... I successfully loaded a Duel map game. Was working off of an unmodded Patch 4k download... at least I think I was...

JEELEN
Sep 14, 2009, 05:56 PM
Well, that sounds good. Perhaps you could upload the mapscript with the correct attach files instead? Ready to install, as it were. That way I could include your creation easier in the next patch. Would that be a problem? (There must be an error somewhere, but assuming it's on my end, after I edit my files I get no errors/warnings and other than that I can't tell what I've done wrong.)

TC01
Sep 14, 2009, 06:31 PM
Okay, I've updated the first post with a MOO2Civ patch4k directory that you should just be able to zip into Beyond the Sword\Mods and overwrite the existing one.

I also forced the name of the city created in the barrier region to be "Antares".

JEELEN
Sep 14, 2009, 09:14 PM
Cool! Thanks for the update. :thumbsup:

EDIT I'm sorry, but I still get stuck on initialization... :( Perhaps you should make this an official modmod; it would be invaluable to get some actual player feedback except mine, plus it seems like the perfect base to start a scenario from.

JEELEN
Sep 15, 2009, 01:06 PM
Thought of another thing (don't know if it makes sense): could it be OS related (I'm using Vista) or that the mapscript doesn't work consistently?:confused:

TC01
Sep 15, 2009, 05:24 PM
Possibly. I'm an XP user myself.

What I'll do is try deleting my existing MOO2Civ folder, reinstalling it from a fresh download, and unzipping the folder I've attached here over it, and then try it repeatedly on all mapsizes.

If that all works, then I would suggest you try a similar process. If it doesn't work then... then third-party testers are needed.

TC01
Sep 15, 2009, 08:24 PM
I redownloaded, reinstalled, reapplied the package in the first post, and ran a series of tests where everything worked fine.

I'd suggest that you download your own mod ( :) ) and try the same thing. If it doesn't work, then I don't know what's going on here.

JEELEN
Sep 15, 2009, 10:51 PM
third-party testers are needed.

I asked Zippadeedoodah to check and he confirms it works. (He also noted - because I know it should work, because one of the versions did - that the Antaran space wasn't completely sealed off. I noticed this too on one or two occasions that I did have a chance to look at the loaded mapscript. I also noticed this doesn't happen consistently; sometimes the space is completely sealed off, sometimes not.) Anyway, I'll try again, as I really like this to be included in patch4l. ;)

BTW, I notice from your sig you've been busy lately.:goodjob:

TC01
Sep 16, 2009, 06:00 AM
I asked Zippadeedoodah to check and he confirms it works. (He also noted - because I know it should work, because one of the versions did - that the Antaran space wasn't completely sealed off. I noticed this too on one or two occasions that I did have a chance to look at the loaded mapscript. I also noticed this doesn't happen consistently; sometimes the space is completely sealed off, sometimes not.) Anyway, I'll try again, as I really like this to be included in patch4l. ;)

I'll look at why the space isn't being completely sealed off.

BTW, I notice from your sig you've been busy lately.:goodjob:

I have been busy, although I haven't been doing as much modding as I was lately. There are a few things I've been working on but have not yet had the time to polish up or need help with- one thing I've been trying to figure out is how to make Worldbuilder work better for Final Frontier by letting you add and remove solar systems properly.

JEELEN
Sep 16, 2009, 11:15 PM
... - one thing I've been trying to figure out is how to make Worldbuilder work better for Final Frontier by letting you add and remove solar systems properly.

Hm - that's been bugging me since I started with MOO2Civ...

JEELEN
Sep 20, 2009, 01:48 AM
I've uploaded MOO2Civ 4l beta here: http://jump.fm/OSCVE (so you can check if the mapscript works with the upcoming version, which I'm MP testing today; Enclosed Space is included as is).

BTW, the file in post #1 now doesn't actually have a mapscript in it. (PrivateMaps folder is empty.)

JEELEN
Sep 20, 2009, 02:52 AM
I've checked the beta version a couple of times on a Huge map: enclosed space shows up, but with a row of nebula tiles missing and there's no system or ships in it.

TC01
Sep 20, 2009, 11:13 AM
I've fixed the bugs (hopefully) and reuploaded the mapscript. All of these were tested with Patch 4k, not 4l, though, and the files in the upload are from my version of Patch 4k (which just adds EnclosedSpace and Portals in)- and the folder is still called "Patch 4k".

Changes in this version are:

-Fixed bug where the row of nebula on the edge of the map was not generated, thus placing a hole in the barrier.
-Forced a solar system to appear in the enclosed space (as the generator didn't always put one there).
-Prevented radiation clouds, asteroids, or nebula from appearing inside the enclosed space (so the fractal generator can't fill the enclosed space full of radiation clouds before the solar system and portal are placed). Nebula still appear outside.

JEELEN
Sep 20, 2009, 01:05 PM
Cool! I'll test it ASAP. :goodjob:

JEELEN
Sep 21, 2009, 09:02 AM
OK, I've uploaded the mapscript as a patch4k add-on here: http://forums.civfanatics.com/downloads.php?do=file&id=13316.

---

NOTE: I still can't get it to work with my current test version (4l beta), which we tried to test Multiplayer style yesterday with a Large size map. (Init got stuck on the host's side, so we couldn't actually check how it looked or worked. That may not be caused by the mapscript though, as we couldn't start without it either...) With the FF Worldbuilder beta you uploaded this may also not really be a problem, I think: great work on that one! :thumbsup:

JEELEN
Sep 21, 2009, 11:18 PM
Well, more or less: I've tried the mapscript with my current beta and it creates Antares w/units. Only glitch is that it left a top row of tiles free of nebula. No biggie, as using your FF Worldbuilder utility I closed the gap and now have a set up for a first MOO2Civ scenario including Antares. (I intend to include it with the upcoming MOO2Civ 4 l upload.) So things are definitely looking up! ;)

TC01
Sep 22, 2009, 05:51 AM
Weird. I was considering stacking the map full of print statements to see exactly where it was hanging for you. Evidently it worked at least once?

Thought I fixed the nebula error, but glad to hear you got it working as a scenario!

JEELEN
Sep 23, 2009, 03:39 AM
Hm, well I posted a comment on the FF worldbuilder utility thread saying I couldn't really edit it, so my announcement(s) may have been premature. At any rate I'll try and see if I can get a basic scenario working for the upcoming patch.

JEELEN
Sep 24, 2009, 09:50 AM
I've noticed some other oddities with the mapscript: wormholes and supernova's appearing too close to star systems (shots taken from my current beta, but I saw it with patch4k as well)

TC01
Sep 24, 2009, 05:02 PM
Well, I think (though I don't have the script in front of me right now) that that is the minimum distance from feature to feature. Normally, the game doesn't have to pack them in that tightly. But since I've turned a lot of plots into a bunch of nebula, a solar system, and wormhole... the game has to pack them in tightly. So I could reduce the numbers of Supernovas, Black Holes, and decrease the amount of Nebula, Radiation Clouds, and Asteroids to try and fix this.

JEELEN
Sep 24, 2009, 11:35 PM
Isn't there a parameter for the closest distance where a nova/nebula might appear from a star system? Or is there a fixed number that needs to be placed on a particular map size? (I usually choose Huge map size, which would suggest the latter judging from the screenies, but I don't really know.)

JEELEN
Oct 04, 2009, 12:43 AM
I've noticed another issue with the mapscript: Saved Games don't load as should be: 5,000 points are added to each civ's score or even all star system features are gone. (With patch4k; with patch 4l the Enclosed Space shows up OK, but no Antares system or units.)

JEELEN
Oct 04, 2009, 11:27 PM
Perhaps this tool could be helpful: http://forums.civfanatics.com/showpost.php?p=7618821&postcount=1. (Gr3yhound claims it works with any mod, so... I haven't checked if it does, but it looks pretty nifty - actually more professional than the official Civ4 Worldbuilder.)

JEELEN
Oct 09, 2009, 01:03 PM
Another, perhaps minor, comment: when trying the enclosed space mapscript with patch 4k (for which it should work) on MP, we noticed that it showed up empty; this might be a MP glitch, but I thought you might want ot know about it anyway (the Enclosed Space-wormhole also didn't work).

TC01
Nov 18, 2009, 07:07 PM
Okay, I have time to do some modding again (as evidenced by my work on the FF Worldbuilder project recently).

What, currently, are the problems with this mapscript? I'd really like to get this working...

JEELEN
Nov 18, 2009, 09:52 PM
Well, the ones I mentioned in the posts below pretty much sum it up.

JEELEN
Dec 29, 2009, 12:51 PM
Ummm... any progress? :confused: (I'm asking 'cause I want to get a stable version of the mod up. Otherwise I can see what I can do with your FF Worldbuilder.)

TC01
Dec 29, 2009, 06:06 PM
I think I got it working, at least on my end. The zip attached contains the mapscript.

I provided a screenshot as well, which shows how things should look.

You'll need the Wormholes module, or at least the wormhole features and art defines and text keys in the XML.

JEELEN
Dec 30, 2009, 01:01 AM
Thanks, I'll check it out. BTW, what do you mean I'll "need the Wormholes module, or at least the wormhole features and art defines and text keys in the XML"? I intend to include your wormhole mapscripts; does Enclosed Space need additional files? :confused:

TC01
Dec 30, 2009, 09:28 AM
Thanks, I'll check it out. BTW, what do you mean I'll "need the Wormholes module, or at least the wormhole features and art defines and text keys in the XML"? I intend to include your wormhole mapscripts; does Enclosed Space need additional files? :confused:

It needs the XML stuff for wormholes, the XML where the various types of wormholes and art defines are defined. Otherwise, when the mapscripts try to place FEATURE_PURPLE_WORMHOLE, nothing will happen.

Assuming you have that stuff either in the main XML folder, merged in with the rest of the mod, or the XML Wormholes module, you shouldn't need anything else.

JEELEN
Dec 30, 2009, 09:33 AM
Ah, OK. (That's what I thought.) ;)