Wanna make a new spell staff (I think)..

Ok so what I want to currently try to do is make a staff (using the Spellstaff model etc) but turn it into a Shadowbolt ranged staff (ie the ice, fire, and lightning ranged weapons) since, as far as I know, there is no staff that shoots sad shadow bolts... I am goin to have to wing it.  (unless someone has an item name lol, I admit I can still start a new game and see something I havnt seen before)

so wanna take the spellstaff model (gamemodifiers are irrelevent since i know how to change them) and turn it into a ranged staff that uses the shadowbolt spell effects.

now if anyone knows of an item in game that shoots said shadowbolts i can go from there and figure it out ;-p  i mean i can still start a new game and see something new in game which is awesome...  but havnt seen a shadowbolt staff yet... i assume cause it would not make sense to a kingdom player but.... meh...  anyone have an ideas... 

9,800 views 11 replies
Reply #1 Top

As far as I know there are no shadowbolt staves... but follow the model of the fire staff for ranged spell and switch the particle effect to your shadowbolt. While you are doing the shadow staff you can also add in a light staff, shoots a white particle... same type of effects to balance between kingdom and empire.

Just use the artwork from another staff and attach a particle effect that makes it shimmer dark energy like the burning staff is on fire. This is completely doable.

Reply #2 Top

will get to work and see how it goes.   as for the life based staff is there an actual white bolt particle effect?  spell name? etc

 

EDIT:
hmmm so the incineration staff uses
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>UnlockRangedAction</Attribute>
                <StrVal>BowAttack_Flaming</StrVal>
                <Provides>Ranged attack</Provides>
            </GameModifier>
how would i go about changing that to the shadowbolt fx...

Reply #3 Top

You have to make a spell with the SpellCastEffectName below

<SpellDef InternalName="BowAttack_Shadow">
    ...
    Copy the shadowbolt spell for the effects, change a few things for your staff unless you want it to act exactly like the shadowbolt.
    ...
</SpellDef>

That is what makes the look for the attack.

The other piece that you have written there is the call from the staff itself to use that spell effect and results.

Reply #4 Top

You have to make a spell called...

<SpellDef InternalName="BowAttack_Shadow">
    ...
    Copy the shadowbolt spell for the effects, change a few things for your staff unless you want it to act exactly like the shadowbolt.
    ...
</SpellDef>

That is what makes the look for the attack.

Model it after the flaming bow attack with the spell effect (look portion) of the spell shadowbolt.

Reply #5 Top

Nice.  working perfectly!  Thanks for the help Parrottmath.

Now you mentioned the Life version, is there a particle bolt effect that could function as one?  or would have to create a custom one?

and yeah once i added a spelldef, it worked like a charm.

 EDIT:  hmmm maybe use the poison bow particles? 

Reply #6 Top

I don't know of a good one of the pre-designed versions. But looking at these particle effect it doesn't seem too difficult to make a ball of light somehow. I recommend doing maybe a rainbow effect, I think that would look neat as it traveled through the air. But really it is up to you, I just thought it would be nice to make a light side equivalent to your dark side staff.

Reply #7 Top

This my cheater staff for my sovereign. I use this vvhen I'm playing sovs I intend to use as mages, since there is very fevv quality staffs and mage items in the game. It doesn't use a spell effect, it's a modified fire staff.

Main qualities are 100% armor piercing (I vvanted something similar to a shadovvbolt as vvell), +1 attack per level, no elemental effects (no resistance for anyone!), Overpovver, +25% spell damage, -25% mana cost.

 

<GameItemType InternalName="Staff_Magnus">
        <DisplayName>Staff of Magnus</DisplayName>
        <Description>Magnus created this staff to help him tame the wildlands.</Description>
        <Type>Weapon</Type>
        <Type>Defense</Type>
        <WeaponType>Staff</WeaponType>
        <CanBeEquipped>1</CanBeEquipped>
        <ShopValue>1000</ShopValue>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Attack_Pierce</StrVal>
            <Value>6</Value>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Attack_Pierce</StrVal>
            <Value>1</Value>
            <PerLevel>1</PerLevel>
            <Provides>6 +1 Mystic Attack per Level, ignoring defence</Provides>
        </GameModifier>
    <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_ArmorPierce</StrVal>
        <Value>100</Value>
        
    </GameModifier><GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_OverpowerMultiplier</StrVal>
            <Value>1</Value>
            <Provides>Overpower- Damage is multiplied by the number of units in the enemies group</Provides>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_CurrentWeight</StrVal>
            <Value>0</Value>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>UnlockRangedAction</Attribute>
            <StrVal>BowAttack_Ignys</StrVal>
            <Provides>Ranged attack</Provides>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_MagicPower</StrVal>
            <Value>10</Value>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_SpellDamage</StrVal>
            <Value>0.25</Value>
            <Provides>+25% Spell Damage</Provides>
        </GameModifier>
    <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_TacticalSpellManaCost_Multiplier</StrVal>
        <Value>-0.25</Value>
        <Provides>-25% mana cost for tactical spells</Provides>
    </GameModifier>    
    <IsAvailableForSovereignCustomization>1</IsAvailableForSovereignCustomization>
        <Likelihood>100</Likelihood>
        <RarityDisplay>Rare</RarityDisplay>
        <HeroOnly>1</HeroOnly>
        <IsAvailableForUnitDesign>0</IsAvailableForUnitDesign>
        <Prereq>
            <Type>UnitStat_Level</Type>
            <Attribute>1</Attribute>
        </Prereq>
        <AIData AIPersonality="AI_General">
            <AIPrefType>AIPrefType_BLUNT</AIPrefType>
            <AIPriority>119</AIPriority>
        </AIData>
        <ArtDef>Staff_Spell_ArtDef</ArtDef>
        <GameItemTypeArtDef InternalName="Staff_Spell_ArtDef">
            <GameItemTypeModelPack InternalName="Staff_Spell_Default">
                <IconFile>W_Staff_Spellstaff_Icon_01.png</IconFile>
                <TintR>0</TintR>
                <TintG>0</TintG>
                <TintB>0</TintB>
                <AttackSFX>Hit_WoodSpear1</AttackSFX>
                <EquipSFX>Equip_WoodenItem_01</EquipSFX>
                <EquipSFX>Equip_WoodenItem_02</EquipSFX>
                <EquipSFX>Equip_WoodenItem_03</EquipSFX>
                <OnHitParticleName>Staff_Attack</OnHitParticleName>
                <GameItemTypeModel>
                    <ModelFile>gfx/hkb/weapons/w_spell_staff_mesh_01.hkb</ModelFile>
                    <Texture_All>W_Club_Texture_01.png</Texture_All>
                    <Attachment>hand_right_Lcf</Attachment>
                    <Color_Clothing1>150, 29, 200</Color_Clothing1>
                    <Color_Metal>84,78, 90</Color_Metal>
                    <EffectAttachment>
                        <Attachment>Effect_Loc_04</Attachment>
                        <EffectName>A_LightningHammer_Particle</EffectName>
                        <EffectPosition>0,0,-5</EffectPosition>
                        <EffectRotation>0,0,0</EffectRotation>
                        <EffectScale>0.25</EffectScale>
                    </EffectAttachment>

                </GameItemTypeModel>
            </GameItemTypeModelPack>
        </GameItemTypeArtDef>
    </GameItemType>
</GameItemTypes>

Reply #8 Top

Guess i should post the final "test" code of the said staff i was working on to get the concept down (havnt made any official items yet using what i learned..  right now its ALL trial and error for me and never used xml before so learning a lot and fast)  eventually i'll either do a guide post or just post my final mod pack with pickables that you can use in your own mod folder or not :-P 

but anyways for the test run i took the Spell Staff model since it was a melee staff and and purply with purple glow lol.  and added a ranged shadowbolt to it..  i just used the same stats as the Enchanter's Leht Staff so more like a basic shooter staff and not a staff that fires actual shadowbolts though i can do that as well now that i got the idea of it, maybe as a super rare item drop or something in final mod, so it wasnt over powered or anything, which none of my mod will be, once i learned this stuff and get what i want set up i'll be doin extensive balance testing to make sure it flows well... ;-p

here is the SpellDef that needs to be added

    <SpellDef InternalName="BowAttack_Shadow">
        <DisplayName>Bow Attack</DisplayName>
        <Description>Attack a unit from a distance with a single arrow from your bow.</Description>
        <Image>Action_BowArrow.png</Image>
        <IconFG>Action_BowArrow.png</IconFG>
        <IconBG>Action_BowArrow.png</IconBG>
        <IconColor>255,255,255</IconColor>
        <SpellBookSortCategory>Unit</SpellBookSortCategory>
        <SpellBookSortSubCategory>UnitDamage</SpellBookSortSubCategory>
        <SpellType>Tactical</SpellType>
        <SpellClass>Offensive</SpellClass>
        <SpellSubClass>Damage</SpellSubClass>
        <SpellTargetType>EnemyUnit</SpellTargetType>
        <HideInHiergamenon>1</HideInHiergamenon>
        <IsCastable>0</IsCastable>
        <IsRangedAttack>1</IsRangedAttack>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>DefendableDamage</Attribute>
        </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>5</AIPriority>
        </AIData>
        <HitSoundFX>Spell_FlameDart_01</HitSoundFX>
        <SpellCastSoundFX>Spell_FlameDartTravel_01</SpellCastSoundFX>
        <SpellCastEffectName>T_ShadowBolt_Particle</SpellCastEffectName>
        <SpellCastEffectScale>0.3</SpellCastEffectScale>
        <SpellCastProjectile>1</SpellCastProjectile>
        <SpellCastProjectileSpeed>800</SpellCastProjectileSpeed>
    </SpellDef>

and this is the actual Item code, I did have an issue with Stormwold.  kept trying to give it to an Undead Champ and it was just vanishing, so tried tossing in the code for the factions, which i just fired up a new game and saw a goblin champ hired and tossed the staff on and it worked. so if someone can explain how the SupportedUnitModel code works, might help me out for future projects, also if i put NO supported units in the item code does the game read it as any unit? 

    <GameItemType InternalName="MyStaff_Shadow">
        <DisplayName>Shadow Staff</DisplayName>
        <Description>A staff filled with Dark Energies.</Description>
        <Type>Weapon</Type>
        <Type>Defense</Type>
        <WeaponType>Staff</WeaponType>
        <CanBeEquipped>1</CanBeEquipped>
        <AdditionalTrainingTurns>18</AdditionalTrainingTurns>
        <ShopValue>150</ShopValue>
        <ProductionRequirement>
            <Type>Resource</Type>
            <Attribute>RefinedCrystal</Attribute>
            <Value>3</Value>
        </ProductionRequirement>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_Attack_Fire</StrVal>
            <Value>12</Value>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_CombatSpeed</StrVal>
            <Value>-6</Value>
        </GameModifier>
        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>AdjustUnitStat</Attribute>
            <StrVal>UnitStat_CurrentWeight</StrVal>
            <Value>0</Value>
        </GameModifier>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>UnlockRangedAction</Attribute>
                <StrVal>BowAttack_Shadow</StrVal>
                <Provides>Ranged attack</Provides>
            </GameModifier>
        <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
        <Likelihood>200</Likelihood>
        <RarityDisplay>UltraRare</RarityDisplay>
        <Prereq>
            <Type>RestrictedAbilityBonusOption</Type>
            <Attribute>NoRangedWeapons</Attribute>
            <Target>Player</Target>
        </Prereq>
        <AIData AIPersonality="AI_General">
            <AIPrefType>AIPrefType_BLUNT</AIPrefType>
            <AIPriority>168</AIPriority>
        </AIData>
        <ArtDef>Staff_Spell_ArtDef</ArtDef>
        <GameItemTypeArtDef InternalName="Staff_Spell_ArtDef">
            <GameItemTypeModelPack InternalName="Staff_Spell_Default">
                <IconFile>W_Staff_Spellstaff_Icon_01.png</IconFile>
                <TintR>0</TintR>
                <TintG>0</TintG>
                <TintB>0</TintB>
                <AttackSFX>Hit_WoodSpear1</AttackSFX>
                <EquipSFX>Equip_WoodenItem_01</EquipSFX>
                <EquipSFX>Equip_WoodenItem_02</EquipSFX>
                <EquipSFX>Equip_WoodenItem_03</EquipSFX>
                <OnHitParticleName>Staff_Attack</OnHitParticleName>
                <SoundPack>SoundPack_Staff_Fire</SoundPack>
        <SupportedUnitModelType>Goblin</SupportedUnitModelType>
        <SupportedUnitModelType>LizardmanFemale</SupportedUnitModelType>
        <SupportedUnitModelType>DeathLegion</SupportedUnitModelType>
        <SupportedUnitModelType>Golem</SupportedUnitModelType>
        <SupportedUnitModelType>ElfFemale</SupportedUnitModelType>
        <SupportedUnitModelType>ElfMale</SupportedUnitModelType>
        <SupportedUnitModelType>LivingStone</SupportedUnitModelType>
        <SupportedUnitModelType>AmarianFemale</SupportedUnitModelType>
        <SupportedUnitModelType>AmarianMale</SupportedUnitModelType>
        <SupportedUnitModelType>EmpireFemale</SupportedUnitModelType>
        <SupportedUnitModelType>HenchmanMale</SupportedUnitModelType>
        <SupportedUnitModelType>EmpireMale</SupportedUnitModelType>
        <SupportedUnitModelType>Undead</SupportedUnitModelType>
        <SupportedUnitModelType>FallenFemale</SupportedUnitModelType>
        <SupportedUnitModelType>FallenMale</SupportedUnitModelType>
        <SupportedUnitModelType>LizardmanMale</SupportedUnitModelType>
        <SupportedUnitModelType>IroneerFemale</SupportedUnitModelType>
        <SupportedUnitModelType>IroneerMale</SupportedUnitModelType>
        <SupportedUnitModelType>KingdomFemale</SupportedUnitModelType>
        <SupportedUnitModelType>KingdomMale</SupportedUnitModelType>
        <SupportedUnitModelType>ShadowMale</SupportedUnitModelType>
        <SupportedUnitModelType>ShadowFemale</SupportedUnitModelType>
        <SupportedUnitModelType>MancerFemale</SupportedUnitModelType>
        <SupportedUnitModelType>MancerMale</SupportedUnitModelType>
        <SupportedUnitModelType>QuendarFemale</SupportedUnitModelType>
        <SupportedUnitModelType>QuendarMale</SupportedUnitModelType>
        <SupportedUnitModelType>SlaveMale</SupportedUnitModelType>
        <SupportedUnitModelType>TarthanFemale</SupportedUnitModelType>
        <SupportedUnitModelType>TarthanMale</SupportedUnitModelType>
        <SupportedUnitModelType>UrxenFemale</SupportedUnitModelType>
        <SupportedUnitModelType>UrxenMale</SupportedUnitModelType>
        <SupportedUnitModelType>WraithFemale</SupportedUnitModelType>
        <SupportedUnitModelType>WraithMale</SupportedUnitModelType>
        <SupportedUnitModelType>DwarfFemale</SupportedUnitModelType>
        <SupportedUnitModelType>DwarfMale</SupportedUnitModelType>
                <GameItemTypeModel>
                    <ModelFile>gfx/hkb/weapons/w_spell_staff_mesh_01.hkb</ModelFile>
                    <Texture_All>W_Club_Texture_01.png</Texture_All>
                    <Attachment>hand_right_Lcf</Attachment>
                    <Color_Clothing1>150, 29, 200</Color_Clothing1>
                    <Color_Metal>84,78, 90</Color_Metal>
        <EffectAttachment>
            <Attachment>Effect_Loc_04</Attachment>
            <EffectName>A_Spellstaff_Particle</EffectName>
            <EffectPosition>0,0,-5</EffectPosition>
            <EffectRotation>0,0,0</EffectRotation>
            <EffectScale>0.3</EffectScale>
        </EffectAttachment>
                </GameItemTypeModel>
            </GameItemTypeModelPack>
        </GameItemTypeArtDef>
    </GameItemType>

Reply #9 Top

If you would like to support my henchman female mod go ahead and add

<SupportedUnitModelType>HenchmanFemale</SupportedModelType>

to the supported unit model types.

Reply #10 Top

Quoting WarlordAlpha, reply 9
and this is the actual Item code, I did have an issue with Stormwold. kept trying to give it to an Undead Champ and it was just vanishing, so tried tossing in the code for the factions, which i just fired up a new game and saw a goblin champ hired and tossed the staff on and it worked. so if someone can explain how the SupportedUnitModel code works, might help me out for future projects, also if i put NO supported units in the item code does the game read it as any unit?
End of WarlordAlpha's quote

Essentially each unitmodeltype implies unique 3d models in general for the unit and its equipment. Mostly they are the same but sometimes they are different.

For weapons you generally want to add all the unitmodeltypes that have been used.

More info here https://forums.elementalgame.com/437295
 

Reply #11 Top

Quoting Heavenfall, reply 11
For weapons you generally want to add all the unitmodeltypes that have been used.
End of Heavenfall's quote

Namely if you don't put in the artdef <SupportedUnitModeltType> it can be used by everyone.