cohka cohka

Modding questions/help thread

Modding questions/help thread

Figured we needed a thread for questions that didn't need to take up valuable room from talented mod'rs.

1,923,890 views 844 replies
Reply #601 Top

Actually, is there a list of all attributes for game modifiers somewhere?

 

Reply #603 Top

I've been doing more investigating. It looks like in the unit builder, you were right, unlimited traits could be made.

 

However, what is restricted are the champion traits. You cannot assign champion traits to units and expect them to be built, even if you modded them to be henchmen.

 

Edit:


Basically if it has the tag:

 

<AbilityBonusType>Unit_Level</AbilityBonusType>

 

You cannot build it in the unit designer, with the notable exceptions of the "path" abilities.

 

Quoting Primal_Savage, reply 602


Quoting UnleashedElf, reply 601
Actually, is there a list of all attributes for game modifiers somewhere?

 

 

No, but this might help you out (Post 1 + Replies 1, 2)
End of Primal_Savage's quote

 

Which game modifier attribute gives the ability for your to give a a perk to a unit?

Reply #604 Top

For a trait to be in the unit designer it has to have two things.

Code: xml
  1. &lt;AbilityBonusType&gt;Unit_Design&lt;/AbilityBonusType&gt;

and 

Code: xml
  1. &lt;AdditionalTrainingTurns&gt;6&lt;/AdditionalTrainingTurns&gt;

With these two lines of code added to a core ability it can be also used for unit design.  Just beware that this can be added to very powerful abilities as well so units can skip the trait tree chain and get higher level abilities for trained units if you wanted to create a cheat unit.

Reply #605 Top

Quoting halmal242, reply 604

For a trait to be in the unit designer it has to have two things.

Code: xml
<AbilityBonusType>Unit_Design</AbilityBonusType>
and 

Code: xml
<AdditionalTrainingTurns>6</AdditionalTrainingTurns>
With these two lines of code added to a core ability it can be also used for unit design.  Just beware that this can be added to very powerful abilities as well so units can skip the trait tree chain and get higher level abilities for trained units if you wanted to create a cheat unit.
End of halmal242's quote

 

Yeah I was thinking about a way to adjust the unit pricing too for that. Expensive unit = slow build times, expensive build costs and resources like crystal.

Reply #606 Top

Turns out there's a simpler way to get around the perks. Just use a game modifier in that unit:

 

            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>UnlockUnitAbility</Attribute>
                <StrVal>Parry</StrVal>
            </GameModifier>

 

Then only that unit will get the perk.

 

Edit:

Odd sometimes this causes the game to hang.

Reply #608 Top

You can attach bonus options to the unit and not count it toward the ability bonus option count. Allowing one to use more perks than 4 and design such units without moving balance away. Think of it as a way to add special units to the mix that still get to choose ability bonus options. Although, I'd stick with the original method to to maintain balance (The one PrimalSavage) suggested.

Reply #609 Top

Quoting Primal_Savage, reply 607


 

Hum, wouldn't this be more simple or is it not working out for what you are trying to do?

<SelectedAbilityBonusOption>Parry</SelectedAbilityBonusOption>
End of Primal_Savage's quote

 

Unfortunately, no it does not work. That causes the unit to disappear from the training screen because it contains the Unit Level trait not Unit Design.

 

Quoting parrottmath, reply 608

You can attach bonus options to the unit and not count it toward the ability bonus option count. Allowing one to use more perks than 4 and design such units without moving balance away. Think of it as a way to add special units to the mix that still get to choose ability bonus options. Although, I'd stick with the original method to to maintain balance (The one PrimalSavage) suggested.
End of parrottmath's quote

 

Which tag is that?

Reply #611 Top

Quoting UnleashedElf, reply 609
Which tag is that?
End of UnleashedElf's quote

Its the tag you are using, with the game modifiers.

The game modifier tag works, but you can add the bonus directly from the game-modifier (instead of conferring the ability).

Just adjust the UnitStat_MaxCounterAttack to +1. You could also attach this to a particular piece of clothing and thus wearing a special armor that only this unit can wear giving you a +1 to attack. Or you could set the weapon they use to give more counter attacks. I think you can also set this in the level milestone area as well. (Have to check this, but I think that would work as well). Similar to how Heavenfall sets up his background stats for all the units.

Reply #612 Top

Quoting parrottmath, reply 611
Just duplicate the (Parry) ability?
End of parrottmath's quote

That is the appropriate way to accomplish this, but is it a problem with the ability not showing up, or is it more of you want this particular unit design to have 5 or more traits?

Reply #614 Top

Dropbox will work, that's what I use. Posts mods and pics from one convenient location.

Reply #616 Top

I see... well looking at the help file you can enable it...

https://www.dropbox.com/help/16/en

although you can just share the links (with the public) from any folder. So in their opinion the public folder was just a pointless exercise anyway. (Its under the help header of Creating a Public Folder)

To share images via dropbox (as all of my images do that), you click on insert image button on the edit screen here and copy the url into the right spot and you have shared the image pretty straight forward.

Cheers.

+1 Loading…
Reply #618 Top

Couple of random mod questions, pretty sure the answer is not possible on most/all counts but just putting it out there anyways....

 

Anyone know of a way to mod any of these values from ElementalDefs on a per faction basis:

<NonZOCContiguousCityUnrestPenalty>15</NonZOCContiguousCityUnrestPenalty>

<!-- ** city occupation unrest ** -->
<OccupationInitialUnrest>50.0</OccupationInitialUnrest>
<OccupationTurnsBeforeReduction>5</OccupationTurnsBeforeReduction>
<OccupationMinimumUnrest>0.0</OccupationMinimumUnrest>

<!-- ** unrest penalty per city in a empire ** -->
<CityCountUnrestPenalty>3</CityCountUnrestPenalty>

I know there is DisableCityCountUnrestPenalty for improvements (like Tower of Dominion) just wondering if there is anything related to these.

 

Also, is there any way to target a spell on an enemy champion?  Friendly champion, yes.... Enemy unit, yes.... but seems that EnemyChampion is not a valid target :-(   Am I wrong?

 

Thanks.

 

 

 

Reply #620 Top

Quoting Primal_Savage, reply 619

EnemyUnit
Champion
End of Primal_Savage's quote

No kidding didn't think of that, awesome thanks Primal    :thumbsup:

 

 

 

 

 

Reply #622 Top

Quoting Primal_Savage, reply 621
Look at: RandomEvent_AdventureProblem_3

Although I'm not sure if the change applies only to the questing faction (Probably) or to all factions.



Alternatively, look at Xtra_Game_ElementalDefs.xml

The event does apply to all, but maybe you can change that if you add a Yes/No answer along w/ these:

<AIAcceptChance>0</AIAcceptChance>
<AICanGoOnQuest>0</AICanGoOnQuest>

End of Primal_Savage's quote

Thanks Primal checking those out.  I also picked up a few other ideas while going through various files from XtraDeconstruct  :thumbsup:

 

Reply #623 Top

Anyone now if it's possible and/or how to make it so that when you create a new RaceType, it is only either Kingdom or Empire?

New races I have created always seem to be available as both.  I'd like to make some Empire only like Trogs.

Thanks.

Reply #625 Top

Quoting abob101, reply 623
Anyone now if it's possible and/or how to make it so that when you create a new RaceType, it is only either Kingdom or Empire?
End of abob101's quote

There is only Kingdom and Empire, and there is functionality that will only support that you are either one or the other. At this point I haven't found or discovered the ability to create an entirely different allegiance.

The important part for allegiance is whether you use death magic or life magic. It is entirely possible to have a kingdom faction use the empire building style. You just need to create some life shard tiles in the empire style, or kingdom style death shards. (See my tentstyle mod for more on how to do that).