Does anyone know a trick to set building scale...

ambrox62

Emperor
Joined
Mar 24, 2005
Messages
1,294
...without go and forth from the game?
I'm testing new building arts in a mod, and I need to set the several XML values (fscale, lsystem, etc...). Is there a way to do that without quit and launch the game for each change?
 
I think you can do it with CityLSystem.xml... it's reloaded during game and you can set scales there for buildings, just that you have to define LSystem entry for each new building type...
 
BTS moved LSystem into CIV4ArtDefines_Building.xml
The values to change are in bold:

<BuildingArtInfo>
<Type>ART_DEF_BUILDING_PALACE</Type>
<LSystem>LSYSTEM_3x2</LSystem>
<bAnimated>0</bAnimated>
<fScale>1.0</fScale>
<fInterfaceScale>0.5</fInterfaceScale>
<NIF>Art/Structures/Buildings/Palace/Palace.nif</NIF>
<KFM/>
<Button>Art/Interface/Buttons/Buildings/Palace.dds</Button>
</BuildingArtInfo>

I need a trick to dinamically update CIV4ArtDefines_Building.xml while I'm in worldbuilder mode :(
 
Heh, I'm stupid, this is annoying as hell and I remember reading about reloading XML through in-game commands once... and then I forgot about it and kept reloading manually. Now this thread reminded me to look it up again:

Xml.reloadArtDefines
Xml.reloadLandscapeInfo
Xml.reloadGameText

No time to test it at the moment but the first command should do the trick. You need cheat mode enabled in the INI and then you can launch the commands from in-game console (~).

EDIT: this may also be useful:

Graphics.ReBuildTerrain
Profile.rebuildCity <x coordinate>, <y coordinate>, <integer>
Profile.rebuildPlot <x coordinate>, <y coordinate>, <integer>
 
BTS moved LSystem into CIV4ArtDefines_Building.xml
The values to change are in bold:

<BuildingArtInfo>
<Type>ART_DEF_BUILDING_PALACE</Type>
<LSystem>LSYSTEM_3x2</LSystem>
<bAnimated>0</bAnimated>
<fScale>1.0</fScale>
<fInterfaceScale>0.5</fInterfaceScale>
<NIF>Art/Structures/Buildings/Palace/Palace.nif</NIF>
<KFM/>
<Button>Art/Interface/Buttons/Buildings/Palace.dds</Button>
</BuildingArtInfo>

I need a trick to dinamically update CIV4ArtDefines_Building.xml while I'm in worldbuilder mode :(
Yes, building art defines do have LSystem entry and scale settings, however those are just the default values and can be dynamically changed from CityLSystem.xml... ie.
Code:
<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_MARKET</Type>
			<LSystem>[B]LSYSTEM_MARKET[/B]</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>1.05</fScale>
			<fInterfaceScale>0.6</fInterfaceScale>
			<NIF>Art/Structures/Buildings/Market/Market.nif</NIF>
			<KFM/>
			<Button>,Art/Interface/Buttons/Buildings/Market.dds,Art/Interface/Buttons/Buildings_Atlas.dds,3,3</Button>
		</BuildingArtInfo>
Now in CityLSystem.xml we can adjust the scale (example from ethnic artstyles)
Code:
<ArtRef Name="building:[B]LSYSTEM_MARKET[/B]">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/Market/Middle_East_Market/Market.nif</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_ARABIA,ARTSTYLE_EGYPT,ARTSTYLE_CRESCENT</Attribute>
			<Attribute Class="Era">ERA_ANCIENT,ERA_CLASSICAL,ERA_MEDIEVAL,ERA_RENAISSANCE,ERA_INDUSTRIAL</Attribute>
			<Attribute Class="Rotation">90,270</Attribute>
			[B]<Scale>25</Scale>[/B]
		</ArtRef>
		<ArtRef Name="building:[B]LSYSTEM_MARKET[/B]">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/Market/Mongolia_Market/Market.nif</Attribute>
			<Attribute Class="Rotation">90,270</Attribute>
			<Attribute Class="Era">ERA_ALL,!ERA_MODERN,ERA_TRANSHUMAN,ERA_FUTURE</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_MONGOLIA</Attribute>
			[B]<Scale>0.9</Scale>[/B]
		</ArtRef>
		<ArtRef Name="building:[B]LSYSTEM_MARKET[/B]">
			<Attribute Class="Scalar">szNIF:Art/Structures/Buildings/Market/newcorp2.nif</Attribute>
			<Attribute Class="ArtStyle">ARTSTYLE_AFRICA,ARTSTYLE_ARABIA,ARTSTYLE_BARBARIAN,ARTSTYLE_EGYPT,ARTSTYLE_INDIA,ARTSTYLE_CRESCENT,ARTSTYLE_MESO_AMERICA</Attribute>
			<Attribute Class="Era">ERA_MODERN,ERA_TRANSHUMAN,ERA_FUTURE</Attribute>
			<Attribute Class="Rotation">90,270</Attribute>
			[B]<Scale>0.2</Scale>[/B]
		</ArtRef>
Note how scale is used in those settings - best part is that if you change these scale values and save the file while playing, the game reloads new settings automatically - at least I think so, it's been a while since I tried these kinds of things.
 
As far as I can tell, the game automatically reloads PlotLSystem, not CityLSystem, so updates to farms, towns etc. are live but not cities. Even if I'm wrong on that, this doesn't work for buildings that use generic base, i.e. 3x2. But then, there is the console.
 
@zappara
Thanks for your useful hints on how "lsystem" works ;)

@embryodead
I remember having troubles with in-game console because of my keyboard model hasn't the (~) key. I also remember that ALT + (~ ASCI sequence) didn't work, as well every attempts to redefine keys through software or plugins :( I did such test far time ago; today I'll try again
 
@zappara
Thanks for your useful hints on how "lsystem" works ;)

@embryodead
I remember having troubles with in-game console because of my keyboard model hasn't the (~) key. I also remember that ALT + (~ ASCI sequence) didn't work, as well every attempts to redefine keys through software or plugins :( I did such test far time ago; today I'll try again

I assume your keyboard doesn't US (English) style. I can only use this "~" character when I set my country preferences to that style. Of course, you have to type in Qwerty then. ;)
On adjusting building scales while ingame: IIRC for scales adjusted in CityLsystem you need to load your gamesave again (no need to start the game again), but scales adjusted in PlotLSystem should happen once you save this file (you don't need to close it, just saving it).
 
Top Bottom