Quick Modding Questions Thread

oh yeah knowing how to removing visual city growth on map would be nice to know =)
When cities go past 15+ in size, their image on map begins to overlap near by tiles, which makes them harder to see and click/direct units there

Uh, i guess that's also somewhere in the CityLSystem.xml, so no real idea :ack:.

I'm trying to replace vanilla cityset with this one, but the game won't show the buildings.

How did you replace it?
Because the easiest way is putting the new cityset in a directory in your mod, in which normally the default cityset would be, and renaming the file accordingly.
Worked for me for 3 citysets, so should probably work here too.
 
I've put the south_pacific.nif cityset from Freya to Art/Structures/Cities and renamed it to mod_eu.nif already.


And last night at 11 pm, with the power of 4 cups of coffee, i figured out how to remove city ground tiles. Just manually delete everything in mod_city_lot.nif in Art/Structures/Cities.

Spoiler :
attachment.php


Now i need to get the new cityset to work.

[EDIT]

I compared the vanilla mod_eu.nif to the one in my mod, and notised something.

Spoiler :

Vanilla
attachment.php

Custom
attachment.php

Vanilla mod_eu.nif had different NiNodes that the custom one. So i changed all NiNodes in the Custom to match the vanilla ones.
Spoiler :
attachment.php

Then i copied some buildings from the vanilla mod_eu.nif to the custom one.
Spoiler :
attachment.php
 

Attachments

  • Civ4ScreenShot0009.JPG
    Civ4ScreenShot0009.JPG
    58.4 KB · Views: 270
  • Capture.JPG
    Capture.JPG
    29.8 KB · Views: 255
  • Capture2.JPG
    Capture2.JPG
    30.7 KB · Views: 239
  • Civ4ScreenShot00C00l.JPG
    Civ4ScreenShot00C00l.JPG
    40.8 KB · Views: 248
  • Civ4ScreenShot0008.JPG
    Civ4ScreenShot0008.JPG
    40.2 KB · Views: 247
It depends on what you want it to do. The tricky part is to get the AI to use it.

You may be able to do it via Python, as per the How To Make Python Action Buttons tutorial. This includes some stuff showing how you might get the AI to use the new functionality.

Or you can modify the DLL, an example of which is in the [SDK HOW TO] Add new missions for units tutorial. This does not include anything to get the AI to use the new mission.

I was thinking more along the lines of "Add a new type of mission. (In the sense the building improvements, moving, boarding transports, etc. are types of missions.) I'm getting the Dll code for the new action type written, but am not sure where to go to display icons, allow players to interact with the action, etc.

Thanks for the links, though.
 
another question today :)

I know how to add Unique Unit to a nation as replacement.
Is it possible to add a UU to a nation just by itself?
Cause if its a replacement UU - it has to be replacing something. But what if I want to give different number of available units to different civs?

I think I saw a thread with this question asked just recently, but I can't find it anymore..
 
Easiest solution I know: add your planned UU as a new unit (with its own unit class) and let everyone else have NONE as UU of that unit class, i.e. add
Code:
<Unit>
        <UnitClassType>UNITCLASS_MY_NEW_UNIT</UnitClassType>
        <UnitType>NONE</UnitType>
</Unit>
It tends to make the UU lists quite large if you do this often but it works perfectly. Disadvantage: it's not displayed as unique unit in the civ's civilopedia.
 
Is it possible to have a promotion that changes the ArtDefineTag of an unit?
From this...
Code:
	<UnitMeshGroup>
	      <iRequired>2</iRequired>
	      <EarlyArtDefineTag>ART_DEF_UNIT_US_MARINES<EarlyArtDefineTag>
	</UnitMeshGroup>
	<UnitMeshGroup>
	      <iRequired>1</iRequired>
	      <EarlyArtDefineTag>ART_DEF_UNIT_ARVN_INFANTRY<EarlyArtDefineTag>
	</UnitMeshGroup>
to this?
Code:
	<UnitMeshGroup>
	      <iRequired>2</iRequired>
	      <EarlyArtDefineTag>ART_DEF_UNIT_US_MARINES<EarlyArtDefineTag>
	</UnitMeshGroup>
	<UnitMeshGroup>
	      <iRequired>1</iRequired>
	      <EarlyArtDefineTag>ART_DEF_UNIT_US_MARINES_M60<EarlyArtDefineTag>
	</UnitMeshGroup>
 
Okay, still, it *might* be.
Not sure, but i think so.

If you want to see a reason for "*might* be":
The chinese version of Civ4 doesn't have Mao as leader, but one of their older emperors.
If you take a look at the XML files, there's no LEADER_MAO, but LEADER_CHINESE_LEADER.
I guess this has been done to ensure MP compatibility, so that chinese players can still play with the other people.
Which would mean, as long as the XML is the same, there's MP compatibility, even if the art is not the same.

But well, this is still a guess.
 
Sorry about asking so many questions but I'm finding that assets are quite complicated. At least I'm making some progress now :)

Since not all assets in FFH2 are packed, I'm trying to repack them to see if the loading and response times increase a bit. I have a unpacked version that works without any noticeable issues (besides taking several minutes to load, of course). I packed all FFH2 assets in the art folder except Movies following this tutorial, but after that I'm getting a lot of errors like the one in the attached screenshot.

I have not altered any of the original XML or python files. What can be causing this issue?
 

Attachments

  • error.png
    error.png
    20.7 KB · Views: 50
I just checked, there are no XML files in the art folders I packed (I only packed art). Thanks for your answer, it confirms my suspicions of something strange happening... I'll try to pack every folder separately to see if at least I can find what files are causing the issue.

EDIT: The strange thing happening was me failing to notice that the unpacked version gave the same errors... I probably fell into the usual "test that something works, change X, fail to test after X, change Y, test, assume that Y is failing" mistake. Sorry and thanks again :)
 
Back
Top Bottom