View Full Version : StarWars.py Mapscript


TC01
Aug 13, 2009, 10:23 AM
Updated 9/23/09

The mapscript has been something I've been working on as part of my python work for this mod, but it's different enough from that that I wanted to open a new thread to discuss it.

Currently, as of the version at the bottom of the post, it does this:

-Instead of placing a Solar System like in Final Frontier, it will place a feature called the Planet Core (the "center" plot of the planet- it has no visual representation).
-Then, it will roll a random number and place a random type of planet around that Planet Core.
-The types are, as of the current script:

-"Class M": Good for food, production, and gold/credits. Represented by grassland and plains.
-Arctic: Good for production, weak in food and gold/credits. Represented by snow.
-Volcanic: Good for production, weak in food and gold/credits. Represented by Fall from Heaven 2 Burning Sands.
-Desert: Good for gold/credits, weak in food and production. Represented by desert.
-Aquatic: Good for food only. Represented by an island ringed by coast (water).
-Swamp: Good for food only. Represented by swamp.
-Forest: Good for gold/credits and food. Represented by forest on plains.
-Jungle: Good for food and gold/credits. Represented by jungle on swamp.
-Rocky: Good for production and gold/credits. Represented by Bare Rock from Song of the Moon.
-Gas Giant: Good for gold/credits. Represented by Gas Giant terrain by civ_editor11.

-Planets have a chance of appearing depending on how many yields they are good at producing. Types with 3 good yields have 1x chance, types with 2 have 2x chance, and types with 1 have a 3x chance.
-Large/Small planets (suggested by God-Emperor) have a full fat cross and a "thin cross" respectively. The percentage of worlds that are like this are governed by a map option.
-Solar System-style cities DO NOT exist in this mod.
-Orbital Space Terrain is added in a small ring around each planet.
-A "planetary name" (real Star Wars planet) is assigned to each planet, randomly. Currently, the random planets are:

* Balmorra
* Foerost
* Fondor
* Hypori
* Mechis III
* Metalorn
* Mustafar
* Nelvaan
* Ord Cestus
* Queyta
* Saleucami
* Skako
* Tar Morden
* Telti
* Vulpter
* Xagobah
* Geonosis

What's planned for the future?

-More random planet names


What's the purpose of this thread?

Well, there are a few questions I have for everyone:

1. What additional types of planets should the script be able to place, in addition to the four above? What kind of terrain should be used to represent them?

2. What other planetary names should be used in addition to the list of current planetary names?

3. Do you have any other ideas for the mapscript? Right now, it does default Final Frontier stuff outside of the changes I outlined. What else do we want on the map? Be it planetary related or not.

Also, of course, if you find a bug, post it here.

Credits:
-TC01
-civ_editor11
-T_KCommanderbly
-God-Emperor

Latest Version:

T_KCommanderbly
Aug 13, 2009, 12:47 PM
good work your doing, here some more ideas for you

1. More planet types:
Forest Planet (like Kashyyyk) -good for credits and food
Rocky Terrian (like Kessel) -good for production and credits
Water Planet (like Komino) -good for food
and i dont know if you want to add a city planet or the planet can just devolope into one?

2. I would add all the planets IMO maybe planets like tatooine and naboo access a special resource that is unique from other planets. Like naboo would get nerfs and tatooine would get banthas.

3. Um well there are tons more i would add but the option of #2 would have to be figured out

4. no other ideas come to mind

civ editor11
Aug 13, 2009, 04:37 PM
I'd have to do a serious reworking of the units to make them work on water currently they're all land so water planets would probaly not work very well.
Your other ideas are great.

TC01
Aug 13, 2009, 04:48 PM
I'd have to do a serious reworking of the units to make them work on water currently they're all land so water planets would probaly not work very well.
Your other ideas are great.

Well, we could just make Water another type of land terrain.

Or, you could make the center of an aquatic planet be an island (where the city is), and then just make the tiles around it a barrier- workable, but impassable, terrain.

civ editor11
Aug 13, 2009, 05:00 PM
That would work it might take some time but it would work

God-Emperor
Aug 13, 2009, 05:14 PM
Another possibility:

The big planet. Instead of a 3x3 square, it is a full fat cross. Those 12 extra tiles could be quite an advantage. This could complicate the map scrip a bit, and with the addition of some "coastal" orbit terrain around it the space taken up by the thing could be excessive.

TC01
Aug 13, 2009, 05:25 PM
The big planet. Instead of a 3x3 square, it is a full fat cross. Those 12 extra tiles could be quite an advantage. This could complicate the map scrip a bit, and with the addition of some "coastal" orbit terrain around it the space taken up by the thing could be excessive.

Interesting idea. I think we might just be able to manage huge planets. There should be enough space- maybe I have to cut out a few radiation clouds or a supernova- but it should be workable.


In regards to Forest worlds, the problem I'm seeing is the Planet Core implementation as a vital, but invisible, feature. (That and Jungle worlds- another idea). So I think we might have to copy the Forest and Jungle feature code as a variation of Planet Core. Understand what I mean? We can use the FeatureVariety art code to make Planet Core have three different appearances:

-Blank
-Jungle
-Forest

Then, depending on which planet type appears, we can display a different type of Planet Core. (On Forest Worlds, we display the Forest one).


Next script version will have the following planet types for sure:

-Forest (grassland covered in Forest- to make this work, I suggest renaming Asteroids to FEATURE_ASTEROIDS- I'll handle the python issues on my end), 1x chance of appearing
-Jungle (grassland covered in Jungle- again, you should rename Supernova to FEATURE_SUPERNOVA, I'll handle the python issues), 1x chance of appearing
-Aquatic (island surrounded by water), 1x chance of appearing
-Rocky (hills and plains), 1x chance of appearing

If I can get the Big Planet to work, I'll add that in as well.

civ editor11
Aug 13, 2009, 05:29 PM
What advantages would there be. Other than bigger land battles?

TC01
Aug 13, 2009, 05:32 PM
What advantages would there be. Other than bigger land battles?

Well, for one you get a full fat cross for your cities.

For another, you just said it. You're the one who championed the idea of land battles over solar systems...

civ editor11
Aug 13, 2009, 05:35 PM
Okay I was just wondering if there was another one I didn't see.
I do like the idea though

God-Emperor
Aug 13, 2009, 05:47 PM
Now that I mentioned big planets, it occurs to me that you could also have the opposite:

The small planet. Remove the 4 corner squares from the usual 3x3 planet.

This would be a significant disadvantage. Not only would there be many fewer tiles to work but you could actually directly attack the central plot from the space tiles by coming at it diagonally, bypassing the land you normally have to cross. Sprinkling in a small number of these might make the map more interesting, but finding one close to your start could be a bit dissappointing - the equivalent of finding your starting location to be surrounded by tundra or desert in the regular game, I suppose.

TC01
Aug 13, 2009, 07:44 PM
That's also a good idea. But I think I'm going to do differently-sized planets slightly differently. There will be a small defined number of altered size worlds. The script has a random chance to make each world smaller or large until the defined value is exhausted.


Anyway, I've implemented both the TERRAIN_ORBIT (please tell me this is the right name) placement and the random planet name.

I have NOT yet renamed existing Forest and Jungle (asteroids and supernovas) to FEATURE_ASTEROIDS and FEATURE_SUPERNOVA. That will be for the next version. If you already have, civ_editor, tell me and I'll fix this first.

Otherwise, I'll release it in the first post to test it.

T_KCommanderbly
Aug 13, 2009, 08:28 PM
Another terrian that just came to mind and i dont know if it will work out or if is possible to put it would be

Gas Giant (Like Bespin) credits based because of carbonite
Swamp (like Dagobah) Food probably would be alot like jungle(?)

TC01
Aug 14, 2009, 09:27 AM
Another terrian that just came to mind and i dont know if it will work out or if is possible to put it would be

Gas Giant (Like Bespin) credits based because of carbonite
Swamp (like Dagobah) Food probably would be alot like jungle(?)

Good ideas. Swamp should probably be the base for Jungle planets as well (maybe Jungle can give food and production, but Swamp just gives food).

Gas Giant I don't know about. It would be cool, but do you have a graphic suggestion for it?

civ editor11
Aug 14, 2009, 10:35 AM
Gas giants would be great it could have the tibbana gas resource.
if we only had a graphic for it. I can try I shouldn't be too hard to make a terrain they're just 2d graphics.

TC01
Aug 14, 2009, 12:20 PM
For "Rocky" planets, I'm wondering if we should use the terrain graphics from Song of the Moon? (the old lunar colonization mod)?

Or should we create a seperate planet type to use that kind of lunar terrain?

Either way, I have the mod, so if you want it's art, you can have it.


I've released a new version of the mapscript in the first post. Here are a list of features and terrains that you MUST have defined in the XML. As you note, I've re-introduced forests and jungles and renamed Asteroids and Supernovas. Also, Planet Core now has three variety types as I mentioned earlier:

-Normal (no graphic)
-Forest graphics
-Jungle graphics

Make sure to add the extra varities in or you'll get an error.

(Because of this, you will also need to download a new python folder that's in the first post of the python modding thread)

def __initFeatureTypes(self):
self.featureForest = self.gc.getInfoTypeForString("FEATURE_ASTEROIDS")
self.featureIce = self.gc.getInfoTypeForString("FEATURE_ICE")
self.featureFallout = self.gc.getInfoTypeForString("FEATURE_FALLOUT")
self.featureJungle = self.gc.getInfoTypeForString("FEATURE_SUPERNOVA")
self.featureSupernovaArea = self.gc.getInfoTypeForString("FEATURE_SUPERNOVA_AREA")
self.featureOasis = self.gc.getInfoTypeForString("FEATURE_OASIS")
self.featureGravField = self.gc.getInfoTypeForString("FEATURE_GRAV_FIELD")
self.featureFloodPlain = self.gc.getInfoTypeForString("FEATURE_FLOOD_PLAINS")

#Planet terrain types (and space, and other features)
self.planetCore = self.gc.getInfoTypeForString("FEATURE_PLANET_CORE")
self.planetClassMCore = self.gc.getInfoTypeForString("TERRAIN_GRASS")
self.planetClassMEdge = self.gc.getInfoTypeForString("TERRAIN_PLAINS")
self.planetArctic = self.gc.getInfoTypeForString("TERRAIN_SNOW")
self.planetDesert = self.gc.getInfoTypeForString("TERRAIN_DESERT")
self.planetVolcanic = self.gc.getInfoTypeForString("TERRAIN_BURNING_SANDS")
self.planetAquaticEdge = self.gc.getInfoTypeForString("TERRAIN_COAST")
self.planetSwamp = self.gc.getInfoTypeForString("TERRAIN_SWAMP")
self.planetForest = self.gc.getInfoTypeForString("FEATURE_FOREST")
self.planetJungle = self.gc.getInfoTypeForString("FEATURE_JUNGLE")
self.spaceOrbit = self.gc.getInfoTypeForString("TERRAIN_ORBIT")

civ editor11
Aug 14, 2009, 01:45 PM
Whats terrain swamp

TC01
Aug 14, 2009, 01:55 PM
Whats terrain swamp

Well, it's Swamp terrain, for Swamp planets.

It appears in Colonization and Fall from Heaven 2. Do you need me to upload it?

civ editor11
Aug 14, 2009, 01:57 PM
Yes that would be helpful. I don't have colonization.

T_KCommanderbly
Aug 14, 2009, 03:01 PM
I dont have a suggestion for gas maybe could color water or something, ill try and find onethough

civ editor11
Aug 14, 2009, 03:35 PM
The building MECHISlll is going to be BUILDING_MECHIS, and building ord cestus is going to be BUILDING_CESTUS

TC01
Aug 14, 2009, 03:44 PM
Can you make them BUILDING_MECHIS_III and BUILDING_ORD_CESTUS?

Sorry, but I've already made it that way in the python and I don't want to have to change it.

civ editor11
Aug 14, 2009, 03:47 PM
Okay I'll just change it to that.

civ editor11
Aug 14, 2009, 04:28 PM
This is the graphic i made for gas planets. i used a picture of bespin to make it
http://img32.imageshack.us/i/civ4screenshot0002h.jpg/

TC01
Aug 14, 2009, 04:31 PM
Why does that terrain look so weird? (the blips of orange in the space tiles, I mean).

Otherwise, it looks good. I'll add gas planets in with Big and Small worlds in next script release.

civ editor11
Aug 14, 2009, 04:34 PM
Its the same with a lot of other ones i think it has something to do with the space texture I'm using
The terrain is called gas

TC01
Aug 14, 2009, 05:03 PM
Its the same with a lot of other ones i think it has something to do with the space texture I'm using

What space texture are you using? The Final Frontier one?

I note that included in Final Frontier is a file called Terrain\CIV4TerrainSettings.xml. If you're using the FF one, perhaps you should try adding that file from FF?

There's also a GameInfo\CIV4TerrainPlaneInfos.xml. Maybe try adding that as well?

civ editor11
Aug 16, 2009, 02:28 PM
I'll make sure to try that

civ editor11
Aug 17, 2009, 10:28 AM
I have made gas TERRAIN_GAS

How do i make all three of those graphics I can't get it to except a feature variety with no graphics when I have others with graphics

civ editor11
Aug 17, 2009, 11:12 AM
Here is a new error. I've done all that you asked me to so i don't think thats what's wrong.

Traceback (most recent call last):

File "StarWars", line 565, in addFeatures

File "StarWars", line 425, in addFeatures

IndexError: list index out of range
ERR: Python function addFeatures failed, module StarWars

This doesn't crash the game

TC01
Aug 17, 2009, 11:48 AM
Overwrite lines 422 to 426 of the mapscript:


if not len(g_apPlanetScripts) == 0:
iPlanetScriptNum = len(g_apPlanetScripts) + (len(g_apPlanetScripts) / 10)
iPlanetNameRnd = game.getSorenRandNum(iPlanetScriptNum, "Place Planet Scripts")
if iPlanetNameRnd <= len(g_apPlanetScripts):
self.map.plot(iX, iY).setScriptData(g_apPlanetScripts[iPlanetNameRnd])
g_apPlanetScripts.remove(g_apPlanetScripts[iPlanetNameRnd])

As for the planet core, I'll get back to that and see if there is a way to solve the issue.


Next version will have:

Gas Giants
Large Planets
Small Planets

TC01
Aug 18, 2009, 06:59 PM
How do i make all three of those graphics I can't get it to except a feature variety with no graphics when I have others with graphics

I think you can.

Here's Final Frontier's asteroid:

<FeatureVariety>
<FeatureArtPieces>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_01_01.nif</ModelFile>
<Connections>NW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_02_01.nif</ModelFile>
<Connections>NE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_03_01.nif</ModelFile>
<Connections>NW NE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_04_01.nif</ModelFile>
<Connections>SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_05_01.nif</ModelFile>
<Connections>NW SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_06_01.nif</ModelFile>
<Connections>NE SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_07_01.nif</ModelFile>
<Connections>NW NE SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_08_01.nif</ModelFile>
<Connections>SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_09_01.nif</ModelFile>
<Connections>NW SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_10_01.nif</ModelFile>
<Connections>NE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_11_01.nif</ModelFile>
<Connections>NW NE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_12_01.nif</ModelFile>
<Connections>SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_13_01.nif</ModelFile>
<Connections>NW SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_14_01.nif</ModelFile>
<Connections>NE SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_01.nif</ModelFile>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_02.nif</ModelFile>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_03.nif</ModelFile>
<Connections>NW NE SE SW</Connections>
</FeatureArtPiece>
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/Forest.dds</VarietyButton>
</FeatureVariety>
<FeatureVariety>
<FeatureArtPieces>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_01_01.nif</ModelFile>
<Connections>NW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_02_01.nif</ModelFile>
<Connections>NE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_03_01.nif</ModelFile>
<Connections>NW NE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_04_01.nif</ModelFile>
<Connections>SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_05_01.nif</ModelFile>
<Connections>NW SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_06_01.nif</ModelFile>
<Connections>NE SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_07_01.nif</ModelFile>
<Connections>NW NE SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_08_01.nif</ModelFile>
<Connections>SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_09_01.nif</ModelFile>
<Connections>NW SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_10_01.nif</ModelFile>
<Connections>NE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_11_01.nif</ModelFile>
<Connections>NW NE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_12_01.nif</ModelFile>
<Connections>SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_13_01.nif</ModelFile>
<Connections>NW SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_14_01.nif</ModelFile>
<Connections>NE SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_01.nif</ModelFile>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_02.nif</ModelFile>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_03.nif</ModelFile>
<Connections>NW NE SE SW</Connections>
</FeatureArtPiece>
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/ForestEvergreen.dds</VarietyButton>
</FeatureVariety>
<FeatureVariety>
<FeatureArtPieces>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_01_01.nif</ModelFile>
<Connections>NW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_02_01.nif</ModelFile>
<Connections>NE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_03_01.nif</ModelFile>
<Connections>NW NE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_04_01.nif</ModelFile>
<Connections>SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_05_01.nif</ModelFile>
<Connections>NW SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_06_01.nif</ModelFile>
<Connections>NE SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_07_01.nif</ModelFile>
<Connections>NW NE SE</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_08_01.nif</ModelFile>
<Connections>SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_09_01.nif</ModelFile>
<Connections>NW SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_10_01.nif</ModelFile>
<Connections>NE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_11_01.nif</ModelFile>
<Connections>NW NE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_12_01.nif</ModelFile>
<Connections>SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_13_01.nif</ModelFile>
<Connections>NW SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_14_01.nif</ModelFile>
<Connections>NE SE SW</Connections>
</FeatureArtPiece>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_01.nif</ModelFile>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_02.nif</ModelFile>
<ModelFile>Art/Terrain/Features/Asteroids/Asteroids_15_03.nif</ModelFile>
<Connections>NW NE SE SW</Connections>
</FeatureArtPiece>
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/ForestSnowyEvergreen.dds</VarietyButton>
</FeatureVariety>

Here's the Gravity Field:

<FeatureVariety>
<FeatureArtPieces/>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/FloodPlains.dds</VarietyButton>
</FeatureVariety>

So all you have to do is this:

<FeatureVariety>
<FeatureArtPieces/>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/FloodPlains.dds</VarietyButton>
</FeatureVariety>
<FeatureVariety>
<FeatureArtPieces>
<!--Forests: Change button too.-->
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/FloodPlains.dds</VarietyButton>
</FeatureVariety>
<FeatureVariety>
<FeatureArtPieces>
<!--Jungles: Change button too.-->
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/FloodPlains.dds</VarietyButton>
</FeatureVariety>

civ editor11
Aug 18, 2009, 07:58 PM
When you say forests and jungles do you mean asteroids and supernovas?

civ editor11
Aug 18, 2009, 09:05 PM
Ive set up feature asteroid and feature supernova instead of forest and jungle which i've re added from the bts version. When the map loads it makes it forest instead of asteroids would you change it or should i?

TC01
Aug 18, 2009, 10:10 PM
When I said forest and jungle I mean forest and jungle, not asteroid and supernova.

Are you using the latest version (the one in the first post)?

def __initFeatureTypes(self):
self.featureForest = self.gc.getInfoTypeForString("FEATURE_ASTEROIDS")
self.featureIce = self.gc.getInfoTypeForString("FEATURE_ICE")
self.featureFallout = self.gc.getInfoTypeForString("FEATURE_FALLOUT")
self.featureJungle = self.gc.getInfoTypeForString("FEATURE_SUPERNOVA")
self.featureSupernovaArea = self.gc.getInfoTypeForString("FEATURE_SUPERNOVA_AREA")
self.featureOasis = self.gc.getInfoTypeForString("FEATURE_OASIS")
self.featureGravField = self.gc.getInfoTypeForString("FEATURE_GRAV_FIELD")
self.featureFloodPlain = self.gc.getInfoTypeForString("FEATURE_FLOOD_PLAINS")

#Planet terrain types (and space, and other features)
self.planetCore = self.gc.getInfoTypeForString("FEATURE_PLANET_CORE")
self.planetClassMCore = self.gc.getInfoTypeForString("TERRAIN_GRASS")
self.planetClassMEdge = self.gc.getInfoTypeForString("TERRAIN_PLAINS")
self.planetArctic = self.gc.getInfoTypeForString("TERRAIN_SNOW")
self.planetDesert = self.gc.getInfoTypeForString("TERRAIN_DESERT")
self.planetVolcanic = self.gc.getInfoTypeForString("TERRAIN_BURNING_SANDS")
self.planetAquaticEdge = self.gc.getInfoTypeForString("TERRAIN_COAST")
self.planetSwamp = self.gc.getInfoTypeForString("TERRAIN_SWAMP")
self.planetForest = self.gc.getInfoTypeForString("FEATURE_FOREST")
self.planetJungle = self.gc.getInfoTypeForString("FEATURE_JUNGLE")
self.spaceOrbit = self.gc.getInfoTypeForString("TERRAIN_ORBIT")

According to this, I renamed FEATURE_FOREST to FEATURE_ASTEROIDS and enabled FEATURE_FOREST as the real forest. And the same for Supernova. Open your version of the mapscript and check if this function "def _initFeatureTypes(self):" looks like the one above.

civ editor11
Aug 19, 2009, 05:06 AM
That is what i did. I do have the most recent version but it still shows trees instead of asteroids.

Edit: I fixed it I had it on the wrong art defines

Jawa'sRevenge
Aug 20, 2009, 08:24 PM
What space texture are you using? The Final Frontier one?


The Blue Marble Version I hope

TC01
Aug 21, 2009, 03:58 PM
So, for "Rocky Planets", what art should we use? Space terrain from Mars, Now or Song of the Moon?

After I get that in, I'll release another version of the script.

T_KCommanderbly
Aug 21, 2009, 04:08 PM
http://starwars.wikia.com/wiki/Kessel

here is sort of what terrian kessel had, its like a asteroid almost

TC01
Aug 21, 2009, 04:10 PM
http://starwars.wikia.com/wiki/Kessel

here is sort of what terrian kessel had, its like a asteroid almost

Then probably Song of the Moon style-terrain is what we're looking for.

TC01
Aug 23, 2009, 03:47 PM
Updated mapscript to have TERRAIN_GAS (Gas Giant) and TERRAIN_BARE_ROCK (see the post I made in the Graphics thread) as well as Large and Small sized planets.

Now, it seems the only thing left to do for StarWars is to add more planet names, unless anyone else has suggestions?

civ editor11
Sep 13, 2009, 04:02 PM
Could we make it so that different units spawn depending on what era it is?

TC01
Sep 13, 2009, 04:16 PM
Could we make it so that different units spawn depending on what era it is?

What do you mean by "different units spawn"?

Final Frontier has a function that generates barbarian units based on the part of the game it is. I could replicate it for Star Wars, and check based on eras. You'd have to give me a list of barbarian units to create though.

civ editor11
Sep 13, 2009, 08:28 PM
No I mean like the wookie. A different unit in all the eras starts in your capitol.

TC01
Sep 13, 2009, 08:38 PM
Oh. :blush:

Yes, I could implement that easily.

Have we come up with better starting units for all civilizations yet?

civ editor11
Sep 13, 2009, 08:40 PM
No but I'm going to ask in the unit thread for everyone elses ideas.

HolmstN
Oct 03, 2009, 03:06 PM
So I have a quick question about the mapscript (I haven't downloaded it yet, I want to keep my perspective as 'fresh' as possible for the moment).

Does it incorporate both land and space? If so, how is this done? Does space simply represent the 'sea' and land planets?

TC01
Oct 03, 2009, 06:07 PM
So I have a quick question about the mapscript (I haven't downloaded it yet, I want to keep my perspective as 'fresh' as possible for the moment).

Does it incorporate both land and space? If so, how is this done? Does space simply represent the 'sea' and land planets?

It does not include both land and sea (although, this would all be defined in the XML. All the mapscript does is place terrains defined in the XML as either sea or land in certain places). We've currently implemented it so that both space and planets are land, so that ships can be built in the center of a planet and move into space. However, this causes problems as the AI does not understand how to make "land transports" work. There was a project to make it work, but it was discovered this only worked when a transport and transportable unit crossed paths (the transportable unit was automatically loaded), and the project was postponed for now.

However, if you can make naval units able to move over land tiles as well in the SDK, the Orbital Space and Deep Space terrains can be turned into ocean with a simple XML change, and all space units can be turned into naval units, not land.

I guess this is a pretty important thing to work on... I should have probably mentioned it in the other thread.

HolmstN
Oct 03, 2009, 07:34 PM
What if we used "Air" units as ships instead of Naval units? Or perhaps a hybrid of both?

Land and air could cross land, air and naval could cross sea.

Land = Standard Units (stormies, etc)
Naval = Large, non-atmospheric vessels (Death Star, Capital Ships, etc)
Air = Smaller, atmosphere-capable vessels (X-wing, Y-wing, Tie Fighter, etc)

Most of the code is in place already for allowing transportation using this mechanism. Simply transform space into naval and all types of units should be able to somehow cross from land to land (though Naval will never be able to reach inland, just like in-game). This works out quite well in numerous contexts, from a 2-Dimensional point of view. If we were to go into a third dimension it WOULD require code work, but is definitely possible.

Alternatively, we code in a new domain type, Space. Solves all the issues just puts some work into its implementation.

civ editor11
Oct 04, 2009, 08:21 AM
That was one idea I had had to mess with the Domains. I found out that you had to go into the DLL to do it so I decided not to since I didn't have much knowledge at the time. I'll post what I would like you to do in the DLL Modding thread.

Ahriman
Oct 10, 2009, 05:22 PM
Land = Standard Units (stormies, etc)
Naval = Large, non-atmospheric vessels (Death Star, Capital Ships, etc)
Air = Smaller, atmosphere-capable vessels (X-wing, Y-wing, Tie Fighter, etc)

This seems like how it should be to me. Fighters and bombers should obviously be aircraft.