1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

EnclosedSpace Mapscript Discussion

Discussion in 'Civ4 - MOO2Civ' started by TC01, Aug 30, 2009.

  1. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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.
     

    Attached Files:

  2. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    First off: thanks for picking this up so quickly.:thumbsup:

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

    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.)

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

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

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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.

    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.
     
  4. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    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.

    Cool!:thumbsup:
     
  5. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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.
     
  6. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    Thanks for the hint.;)
     
  7. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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.
     
  8. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    Will check it out ASAP. :goodjob:
     
  9. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    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.
     
  10. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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).
     
  11. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    30,748
    Location:
    Germany / Netherlands
    Also endless promotions?
    If yes: Turn on the python exceptions, something crashes on loading.
     
  12. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    No promotions occurred, just gaining several advances.

    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:
     
  13. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    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...
     
  14. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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.
     
  15. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Try the zipped CIV4FeatureInfos.xml. Overwrite your existing one. A quick test revealed everything worked fine...
     
  16. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    OK (haven't had the opportunity yet to follow up on your previous suggestion...); I'll check ASAP. ;)
     
  17. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    So... have you had the time to check it yet?

    Just wondering how this is going.
     
  18. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    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.)
     
  19. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    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...
     
  20. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,051
    Location:
    In orbit
    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.)
     

Share This Page