Modding questions/help thread

By on June 1, 2013 9:05:52 PM from Elemental Forums Elemental Forums

cohka

Join Date 07/2007
0

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

843 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2013 11:31:33 AM from Elemental Forums Elemental Forums

Take a look at lightning form spell. It follows a similar set-up to what you are trying to accomplish. I believe the problem might be the spell targeting an enemy unit and the spell cannot teleport you onto that square since it is occupied already.

Try to see if you could target an empty square and teleport to there. Also, looking at lightning form and such they use LINE_BACKWARD instead of LINE_FORWARD for the radius type. So, maybe that has a role to play for the spell centered, since the spell may be centered where you are standing instead.

Maybe you can accomplish this by targeting enemy unit, using knockback to move the enemy unit off the square, then teleport your unit to that square.

Reason for Karma (Optional)
Successfully updated karma reason!
July 10, 2013 10:13:56 PM from Elemental Forums Elemental Forums

I was checking the Radius parameters earlier and found 3 in the CoreSpells file

ADJACENT: This is obvious, LINE_FORWARD, & LINE_BACKWARD.  I have no idea what distinguishes the LINE parameters. 
Guess I can try stacking the modifier effects and see what happens..

Thanks parrottmath, I'll post the code if I can get it to work the way I want.  Or let people dig it out of the Mod I've been working on  =P

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 1:30:16 AM from Elemental Forums Elemental Forums

Is it possible to make a quest where rewards are given based on the player's profession or class or stack leader's class (or the class of another hero in the stack)?

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 10:45:03 AM from Elemental Forums Elemental Forums

Quoting StevenAus,

Is it possible to make a quest where rewards are given based on the player's profession or class or stack leader's class (or the class of another hero in the stack)?

I don't think so, at least from reading the core .xml files. You'd need, I think, a <QuestCondition> that defined the leader's class, and I don't think that is ever done in the game's standard quests.

Heavenfall/parrotmath might know an exception.

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 12:19:21 PM from Elemental Forums Elemental Forums

I do not know if you can reward based soley on the abilities. The QuestCondition uses Item checks and Resource checks. When using this to unlock a choice it actually takes that item or resource away from the player. Within these guidelines you will have to try to set up a reward system for your particular profession.

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 7:32:34 PM from Elemental Forums Elemental Forums

OK, the one way I could think of doing a 'profession check' would be to have said profession create an item or resource when it is chosen.

i.e. when you choose Path of the Mage, a gamemodifier creates a new item, Badge of the Mage.  Quest then looks for Badge of the Mage.  Keep in mind that the quest will then 'take away' said badge when the item check is met, so if you plan to 'reuse' the tag, give the Mages multiple badges, or give them another badge after the condition is fulfilled...

The problem with this is keeping players from exchanging said badges with other heroes.

The other option is the resource option (Resource: Mage Class +1 when Mage is chosen), but since these will likely be tracked globally, the game might not look at the stack doing the quest, just if your faction has Mage Class of 1 or higher.

I suppose you could set the resource tag to not global, but I'm not sure how that would work with a hero. 

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 8:18:44 PM from Elemental Forums Elemental Forums

Edit: nevermind!

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 10:40:24 PM from Elemental Forums Elemental Forums

When you create a weapon, how does the game onow which tag to assign it when you're using it to design units? Hope that made sense.

Reason for Karma (Optional)
Successfully updated karma reason!
July 11, 2013 10:54:42 PM from Elemental Forums Elemental Forums

Not sure exactly what you are referring, but here goes:

The Tags

<Type>Weapon</Type>
<Type>Defense</Type>

refer to how the unit uses the weapon. Is it in the main hand (Weapon) is it in the offhand (Defense)


The next two tags are what is used when you define for a unit the upgrade style

<WeaponType> Is the type of weapon being equipped. I think this is a reference to how the animations are to deal with the weapon.

<WeaponUpgradeType> Is the type of weapon you choose when you define the upgrade paths in the unit xml

I think that defines pretty much it on what the game looks for in terms of tags.

 

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 2:52:51 AM from Elemental Forums Elemental Forums

Hey again Modding Collective!

Someone asked about the option to begin the game with the starting city in place.  I remembered that we USED to be able to do this in Elemental, and going WAAAAAAY back to version 1.0 of E:WOM, I found the relevant code.

I managed to get the 'ability' to appear ingame in E:LH, but it doesn't appear to do anything.

Has anyone else attempted this, or can anyone spot what I'm missing in the code?  This feature may have been 'de-implemented', similar to the Logistics_Organized ability.  Nonethess if it could still work, well hence the question...

Relevant Code here:

Code: xml
  1. <Techs>   
  2.   <TechDef InternalName="StartingCity">
  3.     <DisplayName>Starting City</DisplayName>
  4.     <Description>Gives the player a settlement at the start of the game.</Description>
  5.     <Image>NewKing_Medallion.png</Image>
  6.     <Rarity>0</Rarity>
  7.     <Category>Civilization</Category>
  8.     <Infinite>0</Infinite>
  9.     <AppearanceChance>100</AppearanceChance>
  10.   </TechDef>
  11. </Techs>
  12. </AbilityBonuses>
  13.   <AbilityBonus InternalName="CivilizedAbility">
  14.     <AbilityBonusType>Player</AbilityBonusType>
  15.     <AbilityBonusOption InternalName = "Civilized">
  16.       <DisplayName>Civilized</DisplayName>
  17.       <Description>Start with an established settlement.</Description>
  18.             <Icon>Ability_Abjuration_Icon.png</Icon>
  19.       <Cost>1</Cost>
  20.             <Type>Defensive</Type>
  21.       <GameModifier>
  22.         <ModType>Player</ModType>
  23.         <Attribute>UnlockTech</Attribute>
  24.         <StrVal>StartingCity</StrVal>
  25.       </GameModifier>
  26.     </AbilityBonusOption>
  27.   </AbilityBonus>
  28. </AbilityBonuses>

Starting City used to be part of the coretechs.xml file, but was removed by E:WOM 1.4.

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 3:09:21 AM from Elemental Forums Elemental Forums

Hopefully a quick and easy question:

I wanted to create an Ability that caused a Strike Exchange.  Effectively, I attack enemy, enemy gets a free counterattack.

What I'm not seeing is an immediate trigger for Counterattack.  Most options would grant a counterattack ability to the enemy, but no response to the immediate strike.  The only other thing I can think of is to fake a counterattack by giving a huge temporary stat boost to Initiative.

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 3:56:51 AM from Elemental Forums Elemental Forums

Quoting BernieTime,
Hopefully a quick and easy question:

I wanted to create an Ability that caused a Strike Exchange.  Effectively, I attack enemy, enemy gets a free counterattack.

What I'm not seeing is an immediate trigger for Counterattack.  Most options would grant a counterattack ability to the enemy, but no response to the immediate strike.  The only other thing I can think of is to fake a counterattack by giving a huge temporary stat boost to Initiative.

You can do a fake attack back, by doing a barbs type effect. Use defendable damage and apply it to caster, using the value of the targets combined attack. This will give you the effect of what you are doing, without the animation unfortunately.

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 5:07:56 PM from Elemental Forums Elemental Forums

Thanks again for the help. Is there any way to add particle effects to a race model unit type ie the genetic male female and the sovereign creation screen? I'm making a new race and trying to add particle effects. I did the effect attachment tags like you would use in the saved sovereign  files but it's not working. 

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 7:44:42 PM from Elemental Forums Elemental Forums


Adding Shard power from Items

I've been trying to make items that provide an appropriate shard power amount (like a shard would provide) by the method (if possible) is eluding me - here is what I have:

 

Item

Code: xml
  1. <GameItemType InternalName="MoxRuby">
  2.         <DisplayName>Mox Ruby</DisplayName>
  3.         <Description>This rare gem provides a mana gateway to the Fire shards of Elemental.</Description>
  4.         <Type>Accessory</Type>
  5.         <CanBeEquipped>1</CanBeEquipped>
  6.         <AdditionalTrainingTurns>16</AdditionalTrainingTurns>
  7.         <ShopValue>180</ShopValue>
  8.          <GameModifier>
  9.             <ModType>Unit</ModType>
  10.             <Attribute>UnlockUnitAbility</Attribute>
  11.             <StrVal>MoxRubyMana</StrVal>
  12.             <Provides>+1 Fire Power</Provides>
  13.         </GameModifier>
  14.         <GameModifier>
  15.             <ModType>Unit</ModType>
  16.             <Attribute>AdjustUnitStat</Attribute>
  17.             <StrVal>UnitStat_Attack_Fire</StrVal>
  18.             <Value>4</Value>
  19.             <Provides>+4 Fire Attack</Provides>
  20.         </GameModifier>
  21.         <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
  22.         <Likelihood>100</Likelihood>
  23.         <RarityDisplay>Rare</RarityDisplay>
  24.         <HeroOnly>1</HeroOnly>
  25.         <IsAvailableForUnitDesign>0</IsAvailableForUnitDesign>
  26.         <IsUsable>0</IsUsable>
  27.         <ArtDef>AmuletOfFlames_ArtDef</ArtDef>
  28.         <GameItemTypeArtDef InternalName="MoxRuby_ArtDef">
  29.             <GameItemTypeModelPack InternalName="MoxRuby_Default">
  30.                 <IconFile>MoxRuby_Item.png</IconFile>
  31.                 <TintR>240</TintR>
  32.                 <TintG>10</TintG>
  33.                 <TintB>10</TintB>
  34.                 <SFX>Equip_MagicRing_01</SFX>
  35.                 <SFX>Equip_MagicRing_02</SFX>
  36.                 <SFX>Equip_MagicRing_03</SFX>
  37.                 <SFX>Equip_MagicRing_04</SFX>
  38.                 <GameItemTypeModel>
  39.                 </GameItemTypeModel>
  40.             </GameItemTypeModelPack>
  41.         </GameItemTypeArtDef>
  42.     </GameItemType>

 

Attached Ability

Code: xml
  1. <AbilityBonus InternalName="MoxRubyAbility">
  2.         <AbilityBonusType>Player</AbilityBonusType>
  3.         <AbilityBonusOption InternalName="MoxRubyMana">
  4.         <DisplayName>Master Scouts</DisplayName>
  5.         <Description>+1 Fire Power</Description>
  6.         <Icon>Ability_Attunement_Icon.png</Icon>
  7.         <GameModifier>
  8.                 <ModType>Unit</ModType>
  9.                 <Attribute>ProduceResource</Attribute>
  10.                 <StrVal>FireMana</StrVal>
  11.                 <Value>1</Value>
  12.                 <Provides>+1 Fire Power</Provides>
  13.          </GameModifier>
  14.          <Type>Defensive</Type>
  15.             <AIData AIPersonality="AI_General">
  16.                 <AIPriority>5</AIPriority>
  17.             </AIData>
  18.         </AbilityBonusOption>
  19.     </AbilityBonus>

 

Sadly it's a no-go on seeing the extra shard power - even if it doesn't show up in the top right count that would be fine but it doesn't affect the spell power either.  Any help would be great

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 8:28:58 PM from Elemental Forums Elemental Forums

Could someone answer the modding new item with existing graphics question in this post?

http://forums.elementalgame.com/446620/get;3381184

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 9:27:53 PM from Elemental Forums Elemental Forums

Quoting StevenAus,

Could someone answer the modding new item with existing graphics question in this post?

http://forums.elementalgame.com/446620/get;3381184[/quote]

 

Hey bro, the file you're looking for is CoreWeapons.xml

There's an artdef tag and several other tags for all the core weapons for example.

 

Code: xml
  1. <GameItemTypeArtDef InternalName="Club_Doom_ArtDef">
  2. <GameItemTypeModelPack InternalName="Club_Doom_Default">
  3. <IconFile>W_Club_Doom_Icon_01.png</IconFile>
  4. <TintR>0</TintR>
  5. <TintG>0</TintG>
  6. <TintB>0</TintB>
  7. <AttackSFX>Hit_Club1</AttackSFX>
  8. <AttackSFX>Hit_Club2</AttackSFX>
  9. <EquipSFX>Equip_WoodenItem_01</EquipSFX>
  10. <EquipSFX>Equip_WoodenItem_02</EquipSFX>
  11. <EquipSFX>Equip_WoodenItem_03</EquipSFX>
  12. <OnHitParticleName>Club_Attack</OnHitParticleName>
  13. <SupportedUnitModelType>AmarianFemale</SupportedUnitModelType>
  14. <SupportedUnitModelType>AmarianMale</SupportedUnitModelType>
  15. <SupportedUnitModelType>DarklingMale</SupportedUnitModelType>
  16. <SupportedUnitModelType>EmpireFemale</SupportedUnitModelType>
  17. <SupportedUnitModelType>EmpireMale</SupportedUnitModelType>
  18. <SupportedUnitModelType>FallenFemale</SupportedUnitModelType>
  19. <SupportedUnitModelType>FallenMale</SupportedUnitModelType>
  20. <SupportedUnitModelType>HenchmanMale</SupportedUnitModelType>
  21. <SupportedUnitModelType>IroneerFemale</SupportedUnitModelType>
  22. <SupportedUnitModelType>IroneerMale</SupportedUnitModelType>
  23. <SupportedUnitModelType>IronGolem</SupportedUnitModelType>
  24. <SupportedUnitModelType>JuggernautMale</SupportedUnitModelType>
  25. <SupportedUnitModelType>KingdomFemale</SupportedUnitModelType>
  26. <SupportedUnitModelType>KingdomMale</SupportedUnitModelType>
  27. <SupportedUnitModelType>MancerFemale</SupportedUnitModelType>
  28. <SupportedUnitModelType>MancerMale</SupportedUnitModelType>
  29. <SupportedUnitModelType>QuendarFemale</SupportedUnitModelType>
  30. <SupportedUnitModelType>QuendarMale</SupportedUnitModelType>
  31. <SupportedUnitModelType>SlaveMale</SupportedUnitModelType>
  32. <SupportedUnitModelType>TarthanFemale</SupportedUnitModelType>
  33. <SupportedUnitModelType>TarthanMale</SupportedUnitModelType>
  34. <SupportedUnitModelType>UrxenFemale</SupportedUnitModelType>
  35. <SupportedUnitModelType>UrxenMale</SupportedUnitModelType>
  36. <SupportedUnitModelType>WraithFemale</SupportedUnitModelType>
  37. <SupportedUnitModelType>WraithMale</SupportedUnitModelType>
  38. <GameItemTypeModel>
  39. <ModelFile>gfx/hkb/Weapons/W_Doom_Club_Mesh_01.hkb</ModelFile>
  40. <Texture_All>W_Club_Texture_01.png</Texture_All>
  41. <Attachment>hand_right_Lcf</Attachment>
  42. <Color_Metal>52, 52, 52</Color_Metal>
  43. </GameItemTypeModel>
  44. </GameItemTypeModelPack>
  45. </GameItemTypeArtDef>

Or if you are a copy and paster like me, just go through that file pick a certain graphic you like copy the chunk between 

Code: xml
  1. <GameItemType InternalName="Itemgraphicyoulike">
  2. </GameItemType>

Modify it and there you go.

 

 

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 9:58:25 PM from Elemental Forums Elemental Forums

Thank you very much for your help, that's what I wanted to know, thanks!

And just so it doesn't get lost, it would be great if a modder could reply to Reply #214 too.

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 10:31:21 PM from Elemental Forums Elemental Forums

Quoting StevenAus,

Thank you very much for your help, that's what I wanted to know, thanks!

And just so it doesn't get lost, it would be great if a modder could reply to Reply #214 too.

If I understand the code you're working with, You're creating an item that gives +4 Fire Attack when equipped.  The following code then tries to get the item to also produce a fire resource as well?

You might give this a try

            <GameModifier>
                <ModType>Resource</ModType>
                <Attribute>FireMana</Attribute>
                <Value>1</Value>
                <PerTurn>1</PerTurn>
                <Provides>+1 Fire Magic per Season</Provides>
            </GameModifier>

 

Edit: I stand corrected, thanks Parrot

Reason for Karma (Optional)
Successfully updated karma reason!
July 12, 2013 11:50:02 PM from Elemental Forums Elemental Forums

Quoting BernieTime,



Quoting StevenAus,
reply 217

Thank you very much for your help, that's what I wanted to know, thanks!

And just so it doesn't get lost, it would be great if a modder could reply to Reply #214 too.


If I understand the code you're working with, You're creating an item that gives +4 Fire Attack when equipped.  The following code then tries to get the item to also produce a fire resource as well?

You might give this a try

            <GameModifier>
                <ModType>Resource</ModType>
                <Attribute>FireMagic</Attribute>
                <Value>1</Value>
                <PerTurn>1</PerTurn>
                <Provides>+1 Fire Magic per Season</Provides>
            </GameModifier>

Yes, except use FireMana instead of FireMagic (the resource name is FireMana)

All that was missing is the <PerTurn>1</PerTurn>, then it should work appropriately. I haven't tested it as I'm out on a trip currently.

Reason for Karma (Optional)
Successfully updated karma reason!
July 13, 2013 10:07:44 AM from Elemental Forums Elemental Forums


Hello, I wanted to mod some of the abilities you can give when making new units in the game. I was looking in CoreAbilities.xml in the /English folder, and tried giving a bigger attack bonus under the Fury ability. But nothing is changed when I run the game. Any ideas? It almost seems that the game doesn't read from those files at all...

Reason for Karma (Optional)
Successfully updated karma reason!
July 13, 2013 10:50:21 AM from Elemental Forums Elemental Forums

Quoting parrottmath,

Quoting BernieTime, reply 218


Quoting StevenAus,
reply 217

Thank you very much for your help, that's what I wanted to know, thanks!

And just so it doesn't get lost, it would be great if a modder could reply to Reply #214 too.


If I understand the code you're working with, You're creating an item that gives +4 Fire Attack when equipped.  The following code then tries to get the item to also produce a fire resource as well?

You might give this a try

            <GameModifier>
                <ModType>Resource</ModType>
                <Attribute>FireMagic</Attribute>
                <Value>1</Value>
                <PerTurn>1</PerTurn>
                <Provides>+1 Fire Magic per Season</Provides>
            </GameModifier>


Yes, except use FireMana instead of FireMagic (the resource name is FireMana)

All that was missing is the <PerTurn>1</PerTurn>, then it should work appropriately. I haven't tested it as I'm out on a trip currently.

 

None of the suggested methods work, sadly.

Reason for Karma (Optional)
Successfully updated karma reason!
July 13, 2013 12:12:26 PM from Elemental Forums Elemental Forums

Quoting dangerlinto,


Quoting parrottmath, reply 219
Quoting BernieTime, reply 218


Quoting StevenAus,

Yes, except use FireMana instead of FireMagic (the resource name is FireMana)

None of the suggested methods work, sadly.

Did you use the Attribute FireMana?  Initially I mistakenly stated the variable as FireMagic (woops)

Reason for Karma (Optional)
Successfully updated karma reason!
July 13, 2013 3:31:34 PM from Elemental Forums Elemental Forums

Quoting BernieTime,

Quoting dangerlinto, reply 221

Quoting parrottmath, reply 219
Quoting BernieTime, reply 218


Quoting StevenAus,

Yes, except use FireMana instead of FireMagic (the resource name is FireMana)

None of the suggested methods work, sadly.

Did you use the Attribute FireMana?  Initially I mistakenly stated the variable as FireMagic (woops)

Yes.  I tried many, many iterations of attempting to change the amount of elemental power or even mana one gets per turn (without physically giving them an ability - like attunement) through an item but it doesn't seem possible

Reason for Karma (Optional)
Successfully updated karma reason!
July 13, 2013 3:55:27 PM from Elemental Forums Elemental Forums

New Question;

I was trying to set some abilities that could not function if a Shield was equipped, based on code from Arching Shield Bash;

         <Prereq>
            <Type>UnitStat</Type>
            <Attribute>UnitStat_IsShield</Attribute>
            <Value>0</Value>
        </Prereq>

In theory that should work after setting the Value to 0 (meaning No), however in practice, does not appear to work as expected.

Am I correct in assuming that setting the tag to 0 really doesn't do anything, even though you'd think it would?

Reason for Karma (Optional)
Successfully updated karma reason!
July 14, 2013 6:03:06 AM from Elemental Forums Elemental Forums

What is the difference between a hero that can only be obtained from a Quest or Event and a hero that can show up at Fame milestones?  ie. what prevents a Quest Hero from appearing at Fame milestones?

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000578   Page Render Time: