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,966 views 844 replies
Reply #402 Top

Are you referring to a tradable commodity among civilizations? or the shop?

If you mean a tradable commodity like iron, then I'm not sure how to go about doing that. I'd have to dig deep to see how to get a resource to show up... never tried.

 

Reply #405 Top

Thanks Primal_Savage !

 

Quoting Primal_Savage, reply 403

@Borg999




For each item (CoreItems.xml), you have those two lines:

<Likelihood>NUMBER</Likelihood>
<RarityDisplay>XXX</RarityDisplay>

 

<Likelihood> and associated <RarityDisplay> 

400 --- Common

200 --- Uncommon

100 --- Rare

100 --- UltraRare

N/A --- Unique (You do not use the line <Likelihood>NUMBER</Likelihood>; meaning it can only drop from a specific encounter --> See CoreMonsterUnitTypes.xml e.g. DelinsEmber)

-1 --- Rare? (I believe this is used for Quest spawned items)

 

End of Primal_Savage's quote

Reply #406 Top

Quoting Primal_Savage, reply 404


Quoting parrottmath, reply 402
Are you referring to a tradable commodity among civilizations? or the shop?

If you mean a tradable commodity like iron, then I'm not sure how to go about doing that. I'd have to dig deep to see how to get a resource to show up... never tried. 

Tradable commodity among civilizations (like iron)
End of Primal_Savage's quote

Look into tweaking it in techs if you haven't. I know stuff like wargs etc. gets unlocked there when you reach a certain tech. 

Edit:

<GameModifier>
<ModType>Player</ModType>
<Attribute>UnlockDiplomacyWndAbility</Attribute>
<StrVal>Gold</StrVal>
</GameModifier>

Here is an example modifier for gold at trading. You might be able to put it elsewhere if you want to not tweak the tech xml's.

+1 Loading…
Reply #408 Top

I'm trying to merge these two into one. 

<RadiusType>LINE_FORWARD</RadiusType>
<RadiusType>ADJACENT</RadiusType>

But I can't seem to do it, or I need to make a new RadiusType, and there is no template to work from afaik. Any suggestions how to proceed? I want Cleave and Impale merged into one, so it can hit up to 4 clumped up enemies. If there is some way to make 2 spells into one that could probably do the trick, but I don't know how to do that. 

Reply #410 Top

The range is target range, so 1 = melee. Radius is obvious ;) 

Adjacent = 2 next to target. More Radius should let you hit 5,7,9...  etc. in a row. Essentially a horizontal line in front of you.  

The <Radiustype> modifier seems to be limiters, if you remove it you get a fireballesque radius. The workaround I am using now is without limiter and just a pure 3x3 square effect radius. I tried putting these into gamemodifiers as well, but they stopped working completely then.

LINE_FORWARD LINE_BACKWARD and ADJACENT is all the radiustype values I've found, and I have no idea where they are created. Also, what the hell is the difference between forward and backward? They seem to be used randomly in the spells I looked through, but does essentially the same thing.

 

Reply #413 Top

Interesting. So it blocks the line in front of the target, and behind the starting point inside a grid. That last example looks especially interesting, wonder if we could make some spell utilizing that better. 

Reply #416 Top

Have anyone been able to get the <artdef> TintR 255 etc. stuff to work from the mod folder? I recently did a life magic book, but it still looks like attack default book that all the other magic books work from. 

Reply #418 Top

Yes, it's a minor issue so I hoped not having to do too much work on it ;)

Reply #419 Top

Good examples of tint are the Iru Elixir and the Skath Egg icons. The original icons are whitish or grey and <tint> softly colors them, namely green and purple. It's rather erratic as you will see the tint ingame when you find/buy these items but not in the Hiergamenon where the icons remain white/gray. I did several tests when I was editing icons and <tint> seems to be completely useless for those that already have colors.

Reply #420 Top

Problem:

If I make a copy of CoreAbility.xml where I edit abilities, in game I see that both abilities apply to a unit - those from original CoreAbility.xml and from my edited file. Also I see both descriptions.

Example:

I try to make trait Strength give +3 Attack instead of +2. I create a new file traits.xml and put it in the Mods folder. There I find the trait Strength and instead of +2 I insert +3. I save the file, launch the game and in my heroe's screen see:

"Strength

+2 Attack

+3 Attack

Here goes original description

Here goes my edited description"

If I look through statistic, my hero receives total +5 Attack instead of +3 as desired.

Why so? What is the best way to edit abilities?

Reply #421 Top

If you don't intend to create a mod and share it, just edit the file without creating a copy. If you delete it later and get steam to check local files it will be replaced again with the normal file. 

Reply #422 Top

Quoting sjaminei, reply 421
If you don't intend to create a mod and share it, just edit the file without creating a copy. If you delete it later and get steam to check local files it will be replaced again with the normal file.
End of sjaminei's quote

I want to keep it as a mod, so that to ensure that no patch or Steam will overwrite my changes and perhaps I will publish the mod if it will be interesting.

So the question remains the same - how to edit abilities for a mod?

Reply #423 Top

Well it is a tad bit harder then. Try making a new .xml file in your modsfolder and just copy the stuff you want to edit (not the whole file). Remove the <Provides> tags from your new file, and there should not be 2 messages. Editing the old one is harder.

Worst case you have to remove the old ability to make that work, and make a new duplicate yourself. Just post a specific problem when you get there, and we can help again. 

+1 Loading…
Reply #425 Top

Quoting sjaminei, reply 423
Well it is a tad bit harder then. Try making a new .xml file in your modsfolder and just copy the stuff you want to edit (not the whole file). Remove the tags from your new file, and there should not be 2 messages. Editing the old one is harder.
End of sjaminei's quote

The problem is solved for now. I wanted to make unit abilities be cheaper in production. I created a mod file and removed all <description> and <gamemodifier> tags and kept all other information untouched, but inserted changes about labour costs and it works fine.