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

Wormholes code

Discussion in 'Civ4 - MOO2Civ' started by TC01, Jul 24, 2009.

  1. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Hmm. I had this issue when reverting to Final Frontier from Star Trek, I had to manually copy my code over.

    Don't know what the problem is, though- but as a hunch, try using the Star Trek versions of the scripts (from the ST version linked in my sig).

    If that doesn't work, I'll fix this myself by starting fresh in the MOO2Civ versions of the scripts.
     
  2. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Thanks - will try the ST versions first.
     
  3. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Wel, now both scripts get stuck on init... :(
     
  4. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Wait- you say no star systems show up?

    I think I may have the solution: You need these two XML features:

    FEATURE_WORMHOLE
    FEATURE_RED_WORMHOLE

    You should just be able to use the XML module, which has them, their text, and their art.

    apenpaap ran into this issue when I uploaded an older version of the module missing FEATURE_RED_WORMHOLE. The game tried to label every single plot with it's feature type and ran into some problems...
     
  5. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Makes sense... so how do I get 'em in? Simply copy another feature and replace the name with either feature?
     
  6. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Well, they should be in the modular XML in the modcomp. Assuming there are no schema changes to the CIV4FeatureInfos.xml and CIV4ArtDefines_Feature.xml files, the Wormholes modcomp (either version)'s XML modular stuff should work. (Modules\Wormholes)

    If you want to move it out of a module and into the mod, you should probably add the features to the end of CIV4FeatureInfos.xml. Apparently deanej had issues when adding features to the top.
     
  7. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Thanks - I'll check. ;)
     
  8. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Did it work?

    I realized that you probably shouldn't use the Star Trek ones, since the Spiral Galaxy script is set to import the FinalFrontier mapscript normally, but the ST Spiral Galaxy imports the StarTrek mapscript.
     
  9. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Actually, no. Even with modular loading the mod still doesn't seem to get past initializing when selecting either mapscript. (If you like I can upload my current testversion for you to have a look at it.)
     
  10. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Believe I fixed the problem.

    If in your Pedia you don't see two features, Bajoran Wormhole and Jalbrador Wormhole you edited the wrong .ini file (I did this, because of the weird way I installed MOO2Civ I have two .inis, Patch 4i and Patch 4j, but my directory is still called Patch 4i).

    Anyway, I messed up in adding stuff to the tutorial section of the Final Frontier Event Manager. Try downloading the zipped file below, dropping it into your Python folder (overwriting the existing one) and starting a game. Both scripts worked perfectly after fixing this.
     
  11. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Cool. Will check - if OK, I'll include it in patch4k to be released tonight.;)
     
  12. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
  13. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Anyway, I fixed the problem. When I commented out the labeling code I got suns and planets, but no wormholes. So that meant that modular loading wasn't enabled. (this is the issue apenpaap ran into).

    Which is because there are two .ini files, Patch 4i ini and Patch 4k ini. But since the directory is called MOO2Civ Patch4k, it reads from the Patch4k ini.

    Upon enabling modular loading in both files, both scripts worked perfectly. (WSG takes a while to load but that's because Spiral Galaxy normally takes a while to load)

    I've attached the modified MOO2Civ Patch4k directory (the files I modified in it, not the whole thing) In addition simply fixing everything, I added my changes from Wormholes v1.3, which I'm about to release. That adds a 3rd wormhole on Huge maps, and does a few other things that only apply to the Star Trek version.
     
  14. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Yes!:D The finally load OK. Looking great - especially the third wormhole. ;)

    I do have a final suggestion for v 1.4 (or .5): would it be possible to unedit the names of the wormholes?:confused: (I appreciate it for Star Trek, but they aren't quite appropriate for a MoO setting.)

    At any rate, I'll include it in the patch4k upload. Many thanks!:goodjob:
     
  15. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    You're welcome. :)

    I can implement it as a custom map option (like Solar System Density, Feature Density, etc.), and move the code from the event manager to the Mapscript. That would probably be appropriate for Final Frontier as well.

    Of course, you could change the names of the wormholes if you have a MoO-appropriate name in the XML files.
     
  16. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    MoO wormholes don't really have any names, so I'll leave that to you.

    I'm going to release the upload now. ;)
     
  17. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    TC01, I've been playing the patch on IP connection using the Spiral Galaxy wormholes map, and we noticed a fake wormhole (see shot below). If the wormholes don't have names, it wouldn't have shown up. (As is, it's just a name sign with nothing underneath; so just a visual error.) Otherwise the map played fine and everything looked perfect.
     

    Attached Files:

  18. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    Hmm.

    What size map was it? Did all the other wormholes appear? (i.e., if it was a Standard, Large, or Huge map did you find 2 Jalbador Wormholes?)

    That isn't even a valid plot to place a wormhole, since it's one plot away from a Nebula.
     
  19. Agent327

    Agent327 Observer

    Joined:
    Oct 28, 2006
    Messages:
    16,080
    Location:
    In orbit
    Yeah, I noticed location was 1 square next to a Nebula. Size played was Large. We found 2 Wormhole couples; this is as should be on that size, no? (Jalbador and Bajor.) Need a WBS?
     
  20. TC01

    TC01 Chieftain

    Joined:
    Jun 28, 2009
    Messages:
    2,216
    Location:
    Irregularly Online
    No- that's what it should have been. Weird. No idea how that's possible.
     

Share This Page