Palace in CityLSystem

Tholish

Emperor
Joined
Jul 5, 2002
Messages
1,344
Location
Japan
I am trying to make buildings have non anachronistic looks by using the CityLSystem, and for most buildings this is working. However, any attempt to do the Palace results in a crash as soon as it updates. I have tried putting it on every node, I've tried changing its Priority in building infos to 1, I've tried all kinds of different art. It even crashes with the default art.

Here, the Granary works fine (as do several other buildings I've used this way) but the Palace crashes as soon as you enter an era where it should update EVEN THOUGH THE ART IS IDENTICAL.


Code:
<LNode Name="Leaf_1x1">
             <Width>1</Width>
	<Height>1</Height>
	<ArtRef Name="building:LSYSTEM_GRANARY">
		<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/Granary/Granary.nif</Attribute>
		<Attribute Class="Rotation">0,180</Attribute>
		<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL,ERA_MEDIEVAL,ERA_RENAISSANCE</Attribute>
		<Scale>0.9</Scale>
	</ArtRef>
	<ArtRef Name="building:LSYSTEM_GRANARY">
		<Attribute Class="Scalar">szNIF:Mods/The Road to War/Assets/Art/Structures/Buildings/Modern_Granary/modern_granary.nif</Attribute>
		<Attribute Class="Rotation">0,180</Attribute>
		<Attribute Class="Era">ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
		<Scale>0.9</Scale>
	</ArtRef>
	<ArtRef Name="building:LSYSTEM_PALACE">
		<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/Palace/Palace.nif</Attribute>
		<Attribute Class="Rotation">0,180</Attribute>
		<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL,ERA_MEDIEVAL,</Attribute>
		<Scale>1.0</Scale>
	</ArtRef>
	<ArtRef Name="building:LSYSTEM_PALACE">
		<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/Palace/Palace.nif</Attribute>
		<Attribute Class="Rotation">0,180</Attribute>
		<Attribute Class="Era">ERA_RENAISSANCE,ERA_INDUSTRIAL,ERA_MODERN,ERA_FUTURE</Attribute>
		<Scale>1.0</Scale>
	</ArtRef>

Any notion why or idea for a fix?
 
I modded the palace via the citylsystem and it worked for me. No one ever complained about errors nor did I recognize bugs myself. And I'm pretty sure that Geo also modded the palace, so in general it's possible to do that.

If you are using the default art anyways, you might delete the lines with the paths to the nifs. At least for test purposes. Then, the game should use the file given in the artdefines file. See whether it still crashes.
Also, you might check for conflicting definitions. You didn't give a definition for which artstyle these entries are valid. The game won't complain about that. Furthermore, my experience is, that the game uses any of the available definitions without a crash. For testing, you might exclude any artstyle that your definition isn't meant to be for.
The path itself shouldn't be a problem, even if there is a typo as the game usually shows an empty square if it can't find the nif.
You should check the artdefines whether it points to LSYSTEM_PALACE.
If all these things don't work, you might check the buildinginfos and building artdef files. Maybe the error is there. In this context, it would be interesting to know how you figured out that the palace s the problem and that it is related with its artstyles. Maybe it's not the palace that causes your problem? Also, what exactly does 'update' mean? Does it work if you found a first city no matter in which era you start the game? Does it crash during an update from a certain era to another or during any era update?
 
What I mean by "update" is the palace is fine until the Renaissance, when the later era art should kick in.

ArtDefines is set for
<LSystem>LSYSTEM_PALACE</LSystem>

If I remove this and just use the default art, everything is fine.
I mean to use different art for it, but tried it using the LSystem with just the default art for both earlier and later eras for testing. I did this once I started thinking it must be something to do with the art itself not being suitable for this purpose. I had isolated the Palace as the problem and dumped the RtW Modern Palace. I tried a Versailles, but it was way too small on the scale I used, and but otherwise no problem, but when I enlarged it and restarted it crashed. If I did this with World Builder, I got a vague popup about a C++ problem, though I could see the later Palace in the city, but if I left world builder, it crashed. So I tried a giant standard palace, and no problem until the Renaissance. Then I tried just a standard palace as above and still it crashes. A Custom Game on Industrial or later will crash on starting (logical, seeing as you don't get Renaissance art initially on a Renaissance start).

I have customized the DLL, but nothing related to building art. The closest thing would be UNIT art. I had made a work around, but I'll put it back and get that popup. Nevertheless, come to think of it, maybe I should try to do the same Lsystem stuff in isolation.
 
Yeah, test it without that dll, just to exclude some error sources. Otherwise, the second entry (for later eras) must be the problem. Unfortunately, I have no time anymore. I'll check again later.
 
Thanks for helping me focus. It was fine without the DLL and in fact, when I put it all back like before, even with the DLL, I was able to start in the Ren, get a tech, the Palace updated, no problem, or start in any early era, and WB into the Industrial and no problem. Only crash now is with late era custom starts. Leading me to think its something else I did that happens to occur at the same time.
 
Found some minutes for a reply.

Hmm... that's weird. The CityLSystem can be hard to mod, so yeah, you better don't do anything else in the same time. Just to be able to find causes for errors afterwards. Maybe your problem is related with units. I can remember that I added a custom unit leading to a crash. That was caused by a typo...
 
Oh yeah, that's true... I looked at the listing several times, but still missed that...
 
Top Bottom