Quick Modding Questions Thread

@ the J or Asaf, you said (the j) that i should check the UB when i get that problem, what exactly am i looking for? i checked that all the actuall UB and UU are the ones in the xml files, and that all matech (but one and i fixed htat) and i still get errors, what exactly would the problem be? Would it be the problem with the actuall Unit or building, or would it be the connection between wich UB goes to which civ?

...er....no idea...er...and yes.
I'd say there's probably somewhere a problem with either assignment of a building to a civ, or assignment of the buidlingclass to the related building, but at the end i have no real idea :blush:.
 
Hi

In the world builder how do you delete ONE unit?

When your in player mode and placing units just right click, the unit and civ you are choosing to place will be deleted first (for ex. if your placing an american archer, on a square with 2 american archers, 1 german archer and a vikings swordsman, the american archers will delete first, then german archer then swordsman)
 
You mean the rotating globe/warlord/the sistine chapel?
That's a link from XML\Art\MainMenusInfo to XML\Art\ArtDefines_Interface.xml.

Thanks, i tried to add my own menu tho, connected the art defines interface to a DDS file i have, but it shows up black?! i connected all four BGs to it just incase, messed around with it for a bit taking out shaders adding them doing other things, cant figure it out
 
Is it possible to give promotions to workers and how?

I'm thinking about the modcomp Hardship by Xooll which inflicts damages to units on desert or ice (snow). He created new promotions Desert survivalist and Arctic survivalist and I would like to give them to some workers via a special building.

I tried the tags bMilitaryProduction or iCombat or even giving a UNITCOMBAT_MELEE attribute but then the workers forget that they are just workers and ignore the danger when the enemy is at the gate!

Any idea?
 
Are you confident that you can't give promotions to Workers as is? At least I believe you can if you assign those promotions with a Python script. (Tell me if you need help with this.)
 
Are you confident that you can't give promotions to Workers as is? At least I believe you can if you assign those promotions with a Python script. (Tell me if you need help with this.)

Oh yes, I could assign a promotion to all units directly from the start with the 'FreePromotions' tag but I would like to give it to some workers only via a special building for special civilizations.

And that's where it does not work because workers are not subject to promotions. I was wondering what tag was triggering this but I suspect that it is via the 'Combat' tag and as I said, if you assign a combat definition to a worker, it changes his attitude.

But I think I will opt for a new model of worker. After all, a Viking or Russian worker shouldn't go out dressed like that!

Thanks!
 
Firstly, you can add those promotions to the select few workers with a Python script.

Secondly, I believe that the game already supports ethnic art, like different models for worker units of different Civs. So you shouldn't have to add a new worker unit type for that.
 
I think an unitcombat for the unit might be needed.

And as additional node: Since that modcomp makes units die, and that again is depending on the unit strength, you'll have to give your worker at least 1 strength point, which makes it somehow a combat unit.
 
Thank you Baldyr and The_J.

Baldyr, how would you do that?

The_J: I think too but as I said then the worker does not stop from working when an ennemy is around. But it does not need a unit strength as iCombat. You don't see his 'Hit points' but you can see that he is sick and you can cure him. The modcomp gives a % of damage points per turn and it's true that after a while they could die (and they do!).
 
Baldyr, how would you do that?
You write a script that is run any time a unit is built. The script looks if the city where the unit has been built has the trigger building. If so, it adds the promotion to the unit. Elementary Python modding, really.

If you specify what you need in great detail (I also need all associated XML tags, like "BUILDING_WHATEVER") I - or someone else - could make this for you in a jiffy.
 
Baldyr, isn't it too heavy for the game? Wouldn't it be slowing the game to have that check everytime a unit is built?

In case, here are the tags:
Give PROMOTION_ARCTIC_SURVIVALIST to UNITCLASS_WORKER if there is a building BUILDINGCLASS_HERMITAGE_RUSSIA or BUILDINGCLASS_HERMITAGE_VIKING.

Thanks!
 
If I set
Code:
		<DefineName>FOOD_CONSUMPTION_PER_POPULATION</DefineName>
		<iDefineIntVal>2</iDefineIntVal>
to
Code:
		<DefineName>FOOD_CONSUMPTION_PER_POPULATION</DefineName>
		<iDefineIntVal>[I][B]0[/B][/I]</iDefineIntVal>
And then set all tiles, improvements and any other food yield factors in buildings etc. to 0.

Will this freeze the growth of the cities?

That way the cities stay the same size throughout the scenario (from 1936-1945 in mine)
 
I think it will (not completely sure since I only glimpsed at the code), but unhealthiness issues might cause your population to decrease, so you'll have to take care of that as well.
 
Back
Top Bottom