Starting items in shop?

By on March 30, 2013 9:52:26 AM from Elemental Forums Elemental Forums

thadianaphena

Join Date 09/2012
+10

I am working on making some items, and I would like to know how to do a few things.

 

1. How to make an item appear in the shop from the beginning of the game.

2. How to make an item not appear in the shop ever.

3. How to make an item not appear as loot for huts/quests/loot ever.

4. I want to make empire//kingdom versions of a few items, can I set that as a prereq?

5. Can I set bloodline as a prereq?

6. Is it possible to create a world spell which destroys an item you are wearing?

7. Is it possible to make an item "count" how many battles it has been used in? The idea is to make a crappy armor that after X battles, transforms into better armor.

8. Is it possible to make a weapon/armor/item get exp to level into a stronger copy of itself? I want to make some "ancestral items" which gain power over time. This can be from the number of battles it wins, or by gaining exp. I would be happy to make 3 versions of a "three stage" sword if need be.

9. I was looking at the Erog's Token, and am making an item pack that casts spells when attacked. Do I have to use "_Self" to make it summon ME a skeleton when attacked, or cast Growth on ME"? Likewise, can I make it happen when "attacked by ranged weapons" instead of melee or "is the target of hostile spells"?

Thanks for any answers to help me.

Locked Post 16 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 12:44:38 PM from Elemental Forums Elemental Forums

1. How to make an item appear in the shop from the beginning of the game.

To make a shopitem show up, it is attached to a particular building in the city. So if you wish an item to always be available you need to have

<ImprovementType InternalName="CityHub1">
     <UnlocksShopItem>ItemInternalTagName<UnlocksShopItem>
</ImprovementType>

You would need to include this for all the city hubs including the forts, towns, and conclaves.

2. How to make an item not appear in the shop ever.

Items by default are not in the shop. But to remove an item you will need to remove the tag I mentioned above on the improvement type. Not sure if you can do this from the mod folder though.

3. How to make an item not appear as loot for huts/quests/loot ever.

This is something given to you via through the quest itself. For the goodie huts and lairs and such most of these lairs are set to give you an item of a particular rarity, which is set on the item itself (common, uncommon and such). But if you would like to specifically give an item then you would need to edit the lair itself and set the probabilty yourself. These are in the CoreGoodieHuts.xml, and you can see what lairs and treasure troves give what types of items.

4. I want to make empire//kingdom versions of a few items, can I set that as a prereq?

5. Can I set bloodline as a prereq?

In a way, I know for particular items like armor and weapons you can set which body types can take this particular item under the art definitions of these files(making it unvailable to everyone else). I suspect that you could also include the pre-req for kingdom and empire or particular race, but I'm not sure about this. A work around is to give a race a particular trait like defensive and then you can call upon that pre-req to force exactly what you are looking for.

6. Is it possible to create a world spell which destroys an item you are wearing?

Not sure.

7. Is it possible to make an item "count" how many battles it has been used in? The idea is to make a crappy armor that after X battles, transforms into better armor.

Not sure. (Most likely no)

8. Is it possible to make a weapon/armor/item get exp to level into a stronger copy of itself? I want to make some "ancestral items" which gain power over time. This can be from the number of battles it wins, or by gaining exp. I would be happy to make 3 versions of a "three stage" sword if need be.

Not sure. (Most likely no)

9. I was looking at the Erog's Token, and am making an item pack that casts spells when attacked. Do I have to use "_Self" to make it summon ME a skeleton when attacked, or cast Growth on ME"? Likewise, can I make it happen when "attacked by ranged weapons" instead of melee or "is the target of hostile spells"?

My limited experience with these things are rather touchy. I don't think it is possible to have a spell shoot off when attacked by ranged weapons or target of hostile spell (which is the same thing by this games code). Casting a spell like summoning is rather difficult as you need a target, so I'm not sure that this is possible.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 1:12:30 PM from Elemental Forums Elemental Forums

I was confused because Salted Pork has nothing in the XML which seems to make it "appear" in the shop yet it does. Does this mean there is an improvement somewhere that allows Salted Pork to unlock?

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 1:16:35 PM from Elemental Forums Elemental Forums

huahahahahaha, CityHub1 indeed unlocks it!

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 1:18:01 PM from Elemental Forums Elemental Forums

Anyone know a fair "conversion" rate for Mana to Crystals, Metal or Horses? I want to use the alchemist spell to make a few others (for each resource).

 

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 1:18:52 PM from Elemental Forums Elemental Forums

If you look at coreimprovements.xml, the city hub improvement has the tag

<UnlocksShopItem>SaltedPork</UnlocksShopItem>

What i wrote above is what you need to make an item show up in the store always.

An example of Salted Meat I added to the game for those that couldn't handle eating pork

https://dl.dropbox.com/u/75549875/Fallen%20Enchantress/FoodItems/SaltedMeat.zip

 

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 2:21:35 PM from Elemental Forums Elemental Forums

I added

 

<ImprovementType InternalName="CityHub1">
     <UnlocksShopItem>ItemInternalTagName<UnlocksShopItem>
</ImprovementType>

 

all the way through, and in the shop it doesn't have an icon. I am sure I did something wrong. Here is an example of my code adding Quest Maps to the shop for everyone.

 

    <GameItemType InternalName="MythicQuestMap">
        <DisplayName>Mythic Quest Map</DisplayName>
        <Description>These maps can be used as clues to unique opportunities in the world.</Description>
        <ShopValue>100</ShopValue>
        <GameModifier>
            <ModType>Map</ModType>
            <Attribute>CreateQuestNearTile</Attribute>
            <BoolVal1>1</BoolVal1>
            <Value>-1</Value>
            <Provides>Spawns a new quest</Provides>
        </GameModifier>
        <ImprovementType InternalName="CityHub1">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub3_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub4_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub5_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub3_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
            <ImprovementType InternalName="CityHub4_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub5_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>        
        <ImprovementType InternalName="CityHub3_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>            
        <ImprovementType InternalName="CityHub4_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>    
        <ImprovementType InternalName="CityHub5_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>            
        <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
        <Likelihood>200</Likelihood>
        <RarityDisplay>Uncommon</RarityDisplay>
        <HeroOnly>1</HeroOnly>
        <IsAvailableForUnitDesign>0</IsAvailableForUnitDesign>
        <IsUsable>1</IsUsable>
        <ArtDef>QuestMap_ArtDef</ArtDef>
        <GameItemTypeArtDef InternalName="QuestMap_ArtDef">
            <GameItemTypeModelPack InternalName="QuestMap_Default">
                <IconFile>Parchment1.png</IconFile>
                <TintR>0</TintR>
                <TintG>0</TintG>
                <TintB>0</TintB>
                <GameItemTypeModel>
                </GameItemTypeModel>
            </GameItemTypeModelPack>
        </GameItemTypeArtDef>
    </GameItemType>    
   

 

and no graphic. My error has something to do with the <ArtDef> however I thought all I had to do was "point" it to the same item?

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 2:22:45 PM from Elemental Forums Elemental Forums

Quoting ,


7. Is it possible to make an item "count" how many battles it has been used in? The idea is to make a crappy armor that after X battles, transforms into better armor.

It is possible to do this but it is impractical.  Make an item grant a trait that then autounlocks a spell that autocasts the same as the amarian buff.  This spell would generate a "count" of one battle.  To do this you would have to create a global resource that would be stored and non visible.  That will give you a global count of battle but as far as the armor upgrading over time you could make it that the armor has within that trait stat modifiers for def and whatever else you want modified that are based upon those battle numbers.  Such that Normal def + battlexp/5 such that every 5 battles you would gain one additional defense.  Happy modding.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 2:25:34 PM from Elemental Forums Elemental Forums

Quoting thadianaphena,

I added

 


<ImprovementType InternalName="CityHub1">
     <UnlocksShopItem>ItemInternalTagName<UnlocksShopItem>
</ImprovementType>

 

all the way through, and in the shop it doesn't have an icon. I am sure I did something wrong. Here is an example of my code adding Quest Maps to the shop for everyone.

 




    <GameItemType InternalName="MythicQuestMap">
        <DisplayName>Mythic Quest Map</DisplayName>
        <Description>These maps can be used as clues to unique opportunities in the world.</Description>
        <ShopValue>100</ShopValue>
        <GameModifier>
            <ModType>Map</ModType>
            <Attribute>CreateQuestNearTile</Attribute>
            <BoolVal1>1</BoolVal1>
            <Value>-1</Value>
            <Provides>Spawns a new quest</Provides>
        </GameModifier>
        <ImprovementType InternalName="CityHub1">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub3_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub4_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub5_Conclave">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub3_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
            <ImprovementType InternalName="CityHub4_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub5_Fortress">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>
        <ImprovementType InternalName="CityHub2_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>        
        <ImprovementType InternalName="CityHub3_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>            
        <ImprovementType InternalName="CityHub4_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>    
        <ImprovementType InternalName="CityHub5_Town">
            <UnlocksShopItem>MythicQuestMap<UnlocksShopItem>
        </ImprovementType>            
        <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
        <Likelihood>200</Likelihood>
        <RarityDisplay>Uncommon</RarityDisplay>
        <HeroOnly>1</HeroOnly>
        <IsAvailableForUnitDesign>0</IsAvailableForUnitDesign>
        <IsUsable>1</IsUsable>
        <ArtDef>QuestMap_ArtDef</ArtDef>
        <GameItemTypeArtDef InternalName="QuestMap_ArtDef">
            <GameItemTypeModelPack InternalName="QuestMap_Default">
                <IconFile>Parchment1.png</IconFile>
                <TintR>0</TintR>
                <TintG>0</TintG>
                <TintB>0</TintB>
                <GameItemTypeModel>
                </GameItemTypeModel>
            </GameItemTypeModelPack>
        </GameItemTypeArtDef>
    </GameItemType>    
   




 

and no graphic. My error has something to do with the <ArtDef> however I thought all I had to do was "point" it to the same item?

 You need to go into each hub and unlock the item there through the coreimprovements not through the actual item.  I wish you could do it like this but it won't work.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 2:34:59 PM from Elemental Forums Elemental Forums

doing it like this in a new file for the item worked, it just didn't add the graphic...

 

Are you saying I need to edit the CityHub's in the core file to include it "In addition to" or "instead of" in the item itself? 

 

If I copy the hubs, deleting the items which they already add (Salted Pork) and put in my own items (Mythic Quest Map), will I be able to "make it happen?"

I should be able to use both in one file

<GameItemTypes>

     <GameItemType>

     </GameItemType>

</GameItemTypes>

 

<ImprovementTypes>

     <ImprovementType>

     </ImprovementType>

<ImprovementTypes>

to achieve this in one file...

 

Would creating a copy of the data from Hubs into the /mygames replacing "game item" with "my item" conflict with the city hubs in the main directory? I am a little confused about how that works...

 

If so, I could just make a modular hub file to "stick" all such items in.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 2:50:17 PM from Elemental Forums Elemental Forums

<Wrapper>

<GameItemType InternalName="MythicQuestMap">
    <DisplayName>Mythic Quest Map</DisplayName>
    <Description>These maps can be used as clues to unique opportunities in the world.</Description>
    <ShopValue>100</ShopValue>
    <GameModifier>
        <ModType>Map</ModType>
        <Attribute>CreateQuestNearTile</Attribute>
        <BoolVal1>1</BoolVal1>
        <Value>-1</Value>
        <Provides>Spawns a new quest</Provides>
    </GameModifier>
    <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
    <Likelihood>200</Likelihood>
    <RarityDisplay>Uncommon</RarityDisplay>
    <HeroOnly>1</HeroOnly>
    <IsAvailableForUnitDesign>0</IsAvailableForUnitDesign>
    <IsUsable>1</IsUsable>
    <ArtDef>MythicQuestMap_ArtDef</ArtDef>
    <GameItemTypeArtDef InternalName="MythicQuestMap_ArtDef">
        <GameItemTypeModelPack InternalName="MythicQuestMap_Default">
            <IconFile>Parchment1.png</IconFile>
            <TintR>0</TintR>
            <TintG>0</TintG>
            <TintB>0</TintB>          
        </GameItemTypeModelPack>
    </GameItemTypeArtDef>
</GameItemType>


<ImprovementTypes>
    <ImprovementType InternalName="CityHub1">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub2">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub2_Conclave">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub3_Conclave">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub4_Conclave">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub5_Conclave">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub2_Fortress">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub3_Fortress">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub4_Fortress">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub5_Fortress">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub2_Town">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub3_Town">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub4_Town">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
    <ImprovementType InternalName="CityHub5_Town">
        <UnlocksShopItem>MythicQuestMap</UnlocksShopItem>
    </ImprovementType>
</ImprovementTypes>

</Wrapper>

I've highlighted some changes that you need to do to get this to work properly. The improvement type must be kept in a seperate bin. These two seperate things are really in two different files, but these changes should allow it to work properly.

Edit: You have a lot of typo's /UnlocksShopItems you need these '/'

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 3:00:12 PM from Elemental Forums Elemental Forums


Here is a working file version... drop it in the items folder in your documents

https://dl.dropbox.com/u/75549875/Fallen%20Enchantress/randomItems/MythicQuest.zip

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 3:15:53 PM from Elemental Forums Elemental Forums

I did exactly what you said, and will include it at the end of every "items" pack file I make. Thank you!

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 3:22:11 PM from Elemental Forums Elemental Forums


Your welcome. If you are going to make a series of items you can have a seperate improvement file and include all the unlocks in one file. Also, this is the way to attach it to specific buildings say the city needs a forge before you can buy it at the store... or a stables of some kind. This is how you would accomplish this.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 3:33:20 PM from Elemental Forums Elemental Forums

Much better because it keeps organization, and simplicity especially for anyone else who wants to change things.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 4:14:14 PM from Elemental Forums Elemental Forums

This is pretty awesome guys I was told this would not work.  This makes it that you do not have to add everything through the core improvements file.

Reason for Karma (Optional)
Successfully updated karma reason!
March 30, 2013 6:46:38 PM from Elemental Forums Elemental Forums

All you need to do is copy changes from the core file and make a very slight alteration to the name.

 

Personally, I am adding Mythic as a tag because few things in the game use the term and it gives modders an easy way to find out anything I changed. meaningless now, but over time, it could matter more if people incorporate any of my work into their mods.

 

I always favor "tagging" things in this way just to keep order when using notepad++ search functions.

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