Galactic (World) Wonders

PsiCorps

FF: Babylon 5 mod team
Joined
Dec 30, 2007
Messages
1,425
Location
Britain
Hi all
I've come across a small problem with a World Wonder I've added to the B5 Mod. The Wonder in question is a variation of the Great Wall wonder. Whilst I am happy that the effects of the wonder work as I wanted I am less than happy that the Great Wall graphic is floating in space around the borders of the empire that built it.

Do you know how I can switch off this graphic but keep all the other benefits?
 
It might be due to the art def for it using LSYSTEM_GREAT_WALL as that has a unique "szBuilder:GreatWallBuilder" attribute, or it could be caused by the bBorderObstacle property itself.

So, first try changing the art def to just match some other building (using the empty nif and an NxM Lsystem type). If that doesnt' work, then it is presumably the property itself.

If all else fails, you can maybe retexture the wall parts (or get someone who knows more abotu this than either one of us to do so). The Great Wall was added with the Warlords expansion, so the art is in "\Warlords\Assets\Art\Structures\Buildings\Great_Wall". It should be possible to make the models transparent with effectively no texture, or maybe you could change the dds files to give them a more sci-fi look - it may be possible to substitute an effectively empty NIF for each part, although there may be important things (nodes that are not part of the visible structure) in the NIF to indicate where they are to be connected to each other and things like that.
 
"And thus I ceremonially declare this space wall to be open! Well, not literally, wouldn't be a very good wall if it was open now would it be? The wall itself however is quite literal."
"You keep using that word. I don't think it means what you think it means."
"I am quite sure it does."
"Yeah, no, unless you literally built a wall in space-"
"But that's what this whole ceremony is about, to celebrate the completion of our space wall!"
"Well yeah, that's what it's called, buy obviously it's just a figurative term for an energy shield or something."
"No it's not, I assure you it's a real wall."
"... So you mean to tell me, someone actually gathered up a bunch of rocks, cement and mortar and built a wall... through space?"
"Eeyup."
"But... that makes no sense! Where'd you even get enough raw materials to surround hundreds of cubic lightyears of space?"
"Well nobody said it was a cheap wall! Besides, it's only a wall, so really we're only talking about hundreds of square lightyears of space."
"But that's even worse! Enemy ships can just fly above or below it!"
"Well... It looked good on paper?"
"Would that be two dimensional paper?"
"Touché."
 
It might be due to the art def for it using LSYSTEM_GREAT_WALL as that has a unique "szBuilder:GreatWallBuilder" attribute, or it could be caused by the bBorderObstacle property itself.

So, first try changing the art def to just match some other building (using the empty nif and an NxM Lsystem type). If that doesnt' work, then it is presumably the property itself.

If all else fails, you can maybe retexture the wall parts (or get someone who knows more abotu this than either one of us to do so). The Great Wall was added with the Warlords expansion, so the art is in "\Warlords\Assets\Art\Structures\Buildings\Great_Wall". It should be possible to make the models transparent with effectively no texture, or maybe you could change the dds files to give them a more sci-fi look - it may be possible to substitute an effectively empty NIF for each part, although there may be important things (nodes that are not part of the visible structure) in the NIF to indicate where they are to be connected to each other and things like that.

Thanks God-Emperor, i'll take a look at what you've suggested and let you know how it goes.

"And thus I ceremonially declare this space wall to be open! Well, not literally, wouldn't be a very good wall if it was open now would it be? The wall itself however is quite literal."
"You keep using that word. I don't think it means what you think it means."
"I am quite sure it does."
"Yeah, no, unless you literally built a wall in space-"
"But that's what this whole ceremony is about, to celebrate the completion of our space wall!"
"Well yeah, that's what it's called, buy obviously it's just a figurative term for an energy shield or something."
"No it's not, I assure you it's a real wall."
"... So you mean to tell me, someone actually gathered up a bunch of rocks, cement and mortar and built a wall... through space?"
"Eeyup."
"But... that makes no sense! Where'd you even get enough raw materials to surround hundreds of cubic lightyears of space?"
"Well nobody said it was a cheap wall! Besides, it's only a wall, so really we're only talking about hundreds of square lightyears of space."
"But that's even worse! Enemy ships can just fly above or below it!"
"Well... It looked good on paper?"
"Would that be two dimensional paper?"
"Touché."

That was very good, brought a smile to my face as I read it.
 
Hi God-Emperor, no luck with the solution you proposed first
So, first try changing the art def to just match some other building (using the empty nif and an NxM Lsystem type). If that doesnt' work, then it is presumably the property itself.
Below is the Great Wall ArtDefine and below that is the Art Define I have set up for the B5 Mod.
Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_GREAT_WALL</Type>
			<bAnimated>1</bAnimated>
			<fScale>1.0</fScale>
			<fInterfaceScale>0.4</fInterfaceScale>
			<NIF>Art/Structures/Buildings/Great_Wall/Great_Wall_civlopedia.nif</NIF>
			<KFM/>
			<Button>,Art/Interface/Buttons/Buildings/SpaceElevator.dds,Art/Interface/Buttons/Warlords_Atlas_1.dds,2,5</Button>
		</BuildingArtInfo>
Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_DEEP_SPACE_DEFENCES</Type>
			<LSystem>LSYSTEM_NxM</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>1.1</fScale>
			<fInterfaceScale>0.7</fInterfaceScale>
			<NIF>Art/Empty.nif</NIF>
			<KFM/>
			<Button>Art/Units/Planetary_Defenses/ODSAT_Mid/ODSAT_Mid_Button.dds</Button>
		</BuildingArtInfo>
Is it possible that the Great Wall visual effect is coded into the C++, or well hidden in Python?
 
That's unfortunate.

By the way, I didn't mean literally LSYSTEM_NxM, since it doesn't exist, but copying some other building which could be any size that actually exists. 1x1 exists, as it turns out, so LSYSTEM_1x1 would be OK. But I doubt that would make it stop drawing the wall effect.

So it looks like it is caused by the property itself rather than the L-System type. Looking at the DLL source, I think I have found where it is added.

At the end of the CvCity::setNumRealBuildingTimed function is a section of code that starts with a comment "//great wall". Using my amazing powers of deduction, I think that has something to do with displaying the Great Wall. That code determines if the count of buildings producing the effect is going from 1 to 0 or from 0 to > 0 and removes or adds the effect, respectively.

So the effect can be elimited by removing (or just commenting out, if you prefer) this section of code:
Code:
		//great wall
		if (bFirst)
		{
			if (GC.getBuildingInfo(eIndex).isAreaBorderObstacle())
			{
				int iCountExisting = 0;
				for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
				{
					if (eIndex != iI && GC.getBuildingInfo((BuildingTypes)iI).isAreaBorderObstacle())
					{
						iCountExisting += getNumRealBuilding((BuildingTypes)iI);
					}
				}

				if (iCountExisting == 1 && iNewValue == 0)
				{
					gDLL->getEngineIFace()->RemoveGreatWall(this);
				}
				else if (iCountExisting == 0 && iNewValue > 0)
				{
					gDLL->getEngineIFace()->AddGreatWall(this);
				}
			}
		}
 
So it looks like it is caused by the property itself rather than the L-System type. Looking at the DLL source, I think I have found where it is added.

That's unfortunate, I have no clue about how to do things in the DLL, looks like this is one building I can't add in due to the graphics.

Thanks God-Emperor.
 
Top Bottom