Rescaling Units

Bump: Nimek's XML Parser might have the ability to do this automatically for all units in a few hours, if rescaling is all done in XML.

Excellent! The only thing that could be a problem would be that not all the animals/units have same values in regard to height. For some I needed to reduce the height from lets say 0,7 to 0,175 and the multiply appearance from 3 instances to 6 or 9 (herd animals!) whereas the sabertooth for example had a base value of 0,5 height which I reduced only to 0,35 and also didn't change the number of sabretooths on the tile as it's no herd animal.

So what I wanted to say, it might be not possible to just change all automatically and then have perfect output, there would be a lot of finetuning still to be done.
What I would like to know though is if the parser would be able to set relations right?

Lets say one units height is 0,7 and another ones 0,5 and I tell the parser to half the height values of all units, it would automatically set the height to 0,35 respectively 0,25?

As a first step, however, we could try to sort out which animals are herd units and should be multiplied and how often... same with units. For instance, I'd say a rogue, berzerker and samurai would be units that should be low on numbers of graphical instances, whereas stonethrower, spearman or trench infantry should be plentiful in that regard...

Thanks for the heads-up, Mr. Azure! I really can't say I am good with programming but the ideas are there so don't give up on me. :)
 
Parser allow you to select units you want and than make changes to them.

Lets say one units height is 0,7 and another ones 0,5 and I tell the parser to half the height values of all units, it would automatically set the height to 0,35 respectively 0,25?

I plan to add this functionality.
 
The heights would have to be normalized in their art files for that to work. I'll have units be defined with sizes by the end of the combat class project here... if the unit art graphics were all individually resized (not in the xml) to some given standard, we could use that size setting to then auto-size the units themselves. (Not sure HOW mind you - just theoretical at this point)
 
we tend to use the Ancient Egyptian and Medieval model of art where the important units are much bigger than they would normally be eg Great people are much bigger than a single person unit even though they are a single person :D
 
@DRJ

I started to prepare my parser to mass edit unitMeshGroup Tag.

EVery ta valu look s like here

Code:
	<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>3</iRangedWaveSize>
<UnitMeshGroup>
          <iRequired>2</iRequired>
          <EarlyArtDefineTag>ART_DEF_UNIT_ARABIA_CAMELARCHER</EarlyArtDefineTag>
        </UnitMeshGroup>

What subtags values you need to mass edit for example add -50% to them?
 
@DRJ

I started to prepare my parser to mass edit unitMeshGroup Tag.

EVery ta valu look s like here

Code:
	<iGroupSize>3</iGroupSize>
<fMaxSpeed>1.75</fMaxSpeed>
<fPadTime>1</fPadTime>
<iMeleeWaveSize>3</iMeleeWaveSize>
<iRangedWaveSize>3</iRangedWaveSize>
<UnitMeshGroup>
          <iRequired>2</iRequired>
          <EarlyArtDefineTag>ART_DEF_UNIT_ARABIA_CAMELARCHER</EarlyArtDefineTag>
        </UnitMeshGroup>

What subtags values you need to mass edit for example add -50% to them?

<fScale>, I think. It's used in files like Civ4ArtDefines_Unit.xml etc.

And maybe we should have tags like "huge herds (animal)" "herd (animal)" and "loner (animal)". The iGroupsize would then be 9/6/3 for the respective tags or something like 10/5/2.

while rabbits would be a "huge herds animal", even after rescaling (maybe only -25% for it as for some birds and other small animals (additional necessary tags small animal, medium sized animal and huge animal - the herd/size tags are also useful for the civs units like infantry = small sized "huge herd" unit, tank or cavalry medium sized "herd" unit and a destroyer = huge loner unit)

The 6 tags would then help to normalize the rescaling process quite a bit without having strange results that don't really fit what the rescaling should do.

Still to be thought about would be the probability that a huge loner unit like a destroyer would be too small in comparison to a huge animal with a medium sized herd like an elephant... well thats maybe taken care of by the original sized that are rescaled anyway....


Or couldn't it be only one additional tag maybe?

<iSizeOccurenceRatio>1</iSizeOccurenceRatio>
small sized loner animal - example: platypus, macaw

<iSizeOccurenceRatio>2</iSizeOccurenceRatio>
small sized herd unit - example: frogs, guinea pigs

<iSizeOccurenceRatio>3</iSizeOccurenceRatio>
small sized huge herd unit - example: pigeons, rabbits

(well i don't know about these... maybe we should only have herds and huge herds for small sized animals, no loner class)

<iSizeOccurenceRatio>4</iSizeOccurenceRatio>
medium sized loner - example: jaguar, tiger, lion

<iSizeOccurenceRatio>5</iSizeOccurenceRatio>
medium sized herd animal - example: pig, deer, pack of lions

<iSizeOccurenceRatio>6</iSizeOccurenceRatio>
medium sized huge herds unit, example: bison, gazelle

<iSizeOccurenceRatio>7</iSizeOccurenceRatio>
huge sized loner unit - example: rhino, grizzly, whale

<iSizeOccurenceRatio>8</iSizeOccurenceRatio>
huge sized herd unit - example: giraffe, elephant, school of whales (could be created anew)

<iSizeOccurenceRatio>9</iSizeOccurenceRatio>
huge sized huge herds unit - example: is there one???
 
This morning, I was brainstorming about how a <iSizeOccurenceRatio> tag could be made and, if included, then work like this

For the rescaling of a, lets say bison
(medium sized unit = -50% size; huge herd unit = +300% groupsize ),
what is needed to change is

<iGroupSize>3</iGroupSize>

and the

<fScale>0,66<fScale>

to

<iGroupSize>9</iGroupSize>

and the

<fScale>0,33<fScale>


if you set this

<iSizeOccurenceRatio>6</iSizeOccurenceRatio>

in a newly created rescaling module xml file, right?

What would be a formula to relate the Tags to each other then? I have really no idea about programming :rolleyes:

If the tag would be implemented, we could finetune very easily.

The hard work at the end would still be to copy paste the tag to each unit and give it a specific value then.

Most units would just get the values 4,5,6 as the ratios of the models is about right;
they just would automatically get downsized and then multiplied
- how often, is decided by their appearance in nature (loner, herd, big herd), but where it isn't correct, like with destroyer vs pig, there could be usage of the values 7,8,9 (although I don't think there is a unit that is so huge sized and has huge "herd" with it. If we ever included alien invasion event maybe this unit could have the
<iSizeOccurenceRatio>9</iSizeOccurenceRatio> attached with it.


The size rations could be

1,2,3 value: model size - 35% fScale
(in relation to lets say a bison, we don't wan't pigeons or rabbits even smaller as they would be mere pixels.)

4,5,6 value: model size -50% fScale (standard rescaling)

7,8,9 model size: -35% fScale -- a destroyer would get bigger in relation to a pig than now.
 
@DrJ: if you want any of this to REALLY work, then what you'll really need to do first is figure out how to resize our mesh models so you can normalize them at that level before you work on any kind of automatic resizing mechanisms.

There are modelling programs where you can take the model and open it up next to other models then resize them all to fit each other then you can re-export them back into the proper file format for our use. I would hope that animation would then still work properly but I can't promise that as I don't fully grasp the animation program yet. Can't say for sure.
 
Back
Top Bottom