• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Buying spells inside spell books

Status
Not open for further replies.
Level 3
Joined
Sep 17, 2009
Messages
25
Ok i dont know really how to explain it so if you dont understand ill try and simplify it out.
Ok.
In my hero Survival you hero has no spells and every 3 levels your hero get one Mind point (Lumber)
Now your hero has no skills of its own so it has to by them or "read them" becouse my spell shop is a bookcase.
now in the book case i want it to have diffrent books so you click a book say "Fire Spells" and it opens into a new section that is only filled with fire spells that you can buy.
so say there are 8 books, and each book has 8 spells. but there all in the one shop.
Is this possible and how would i go about completeing this task?
 
Level 6
Joined
Aug 22, 2008
Messages
123
Since you are having strict differences in your spellbooks, this will be quite easy to do.
If spellbooks share the same basic ID, all of their spells can be seen in only one.
If you wish to add a fire based spell, you will have to add this spell in a hidden fire spellbook with the same basic ID as your main fire spellbook to the buying unit.:wink:
 
Level 3
Joined
Sep 17, 2009
Messages
25
Ok i sorta get where your coming from but not really sure how to go about doing it.
could you show an example like of two different spells in to seprate spellbooks in a item shop. If its not to much trouble.
or just post a tut.
im having a hard time implementing it
thanks in advance!
 
Level 6
Joined
Aug 22, 2008
Messages
123
Well I will post an example:

You got spell A and B of type fire.
In addition, you got a spellbook that is named "Firespells" whose basic ID is "harvest". This ID must be different to the other spellbooks (like "Icespells" would have "absorb").

First of all, you "wrap" A and B into their own custom spellbook, that was explicity created for A or B.
Means: You create a spellbook, call it "Spellbook for A" and put "spell A" into it. Afterwards you change this spellbook's ID to "harvest" and check its point "Hide spellbook".
Do the same with "spell B" (Create a spellbook for it and so on).

Whenever a unit buys the item "Learn spell A" you add "Spellbook for A" to it, if it buys "Learn spell B" you add "Spellbook for B" and so on.

The desired spells ("spell A" and "spell B") should appear in the "Firespells" spellbook.:wink:
 
Last edited:
Level 3
Joined
Sep 17, 2009
Messages
25
okay i think i get will try now

EDIT
I cant find the Hide spell book bit and does this make it so i buy a spell and it puts that spell in a spellbook in my abilities section?

Im sorry if you didnt get what i meant.
What i need is:
My shop has diffrent categories and in each catagory is 8 spells
And my hero when he goes to the shop opens a catagory and buys a spell in that category
So my hero can only have a max of 8 spells.
But this is perfect for my RPG map
 
Last edited:
Level 6
Joined
Aug 22, 2008
Messages
123
That "hiding" data is not necessary to put the new spells into your main spellbook, but it may be sort of prettier not to have 8 spellbooks, each one containing the same spells:wink:
I was mistaken about that point "hide". You will have to deactivate the "spellbook A", "spellbook B", ... whenever the unit receives that spell.
 
Level 3
Joined
Sep 17, 2009
Messages
25
Here is my triggers i have made could you just look over them for some reason my shop seems to get the ability. I have done it a bit diffrent to your way to suit my needs. so do look over to see if you can see why and how to fix it.
i will post if i find a solution

Note:
used Terradont's Hero Survival Template to make it.
Impale is the only one that i have set up.

Problem:
Iv got it working so that when an ability in the spellbook is clicked it is learnt but the shop learns it not the hero

To test out your solution:
Start the map
Goto Boxed, 1 vs 1 vs 1, Easy
that will make no pesky waves to deal with.

Link:
http://www.hiveworkshop.com/forums/pastebin.php?id=30elau

will give +rep to whoever finds a solution and re-posts the map with a fix
 
Last edited:
Level 3
Joined
Aug 2, 2009
Messages
62
i´m sorry because i can´t help you but when it´s ready i would really want to try the map ^^
 
Level 6
Joined
Aug 22, 2008
Messages
123
Seriously... you should be able to understand my explanation.
Here goes your testmap having one example inside. Your triggers are bugging all over, I just created a needed trigger for that example.
 

Attachments

  • Tyhones Hero survival.w3x
    49.7 KB · Views: 73
Level 3
Joined
Sep 17, 2009
Messages
25
I found that map but it dosent open in warcraft III it keeps going to the main menu whenever i try to play it

Also im not good at finding bugs where are they becouse i want to release this map, also Razman i will pm you with a link when its done k?

With the map i want the spellSHOP to have the spellbooks but there more like catagories. So each shop has 8 catagories and in each catagory is 10 spells.
so in total there are 80 spells in the shop that are buyable. the hero dosent have a spellbook so he can only ever have a max of 7 spells
so the shop has 80 spells to sell each group of ten spells have there own catagory in the shop.
Hero dosent have a spellbook
 
Last edited:
I don't really understand here, but i think your problem is either of theese:
*You dont have The Frozen Throne
*You saved your map once with your editor, and you don't have JassNewGenPack
*Or the system utilizes the return bug, wich is not compatiable with the newest patch.

But that category shop system you're talking about sounds pretty advanced. I Actually thing you should start off with something easier first.

But perhaps you could do it like this:
Make the categories into dummy items that doesn't cost anything. Then, make flying dummy shops without model file (set model string to 'none.mdl'), make a dummy shop for each category, then make it so that when you buy the dummy category item, it gets removed, and you automatically select one of the dummy shops.
 
Level 3
Joined
May 20, 2008
Messages
66
Make the categories into dummy items that doesn't cost anything. Then, make flying dummy shops without model file (set model string to 'none.mdl'), make a dummy shop for each category, then make it so that when you buy the dummy category item, it gets removed, and you automatically select one of the dummy shops.

This is what I'm about to say, but, oh well. I would like to add another thing: you can forget about the "remove dummy item" trigger, just set dummy item's "Use automatically when acquired" to Yes, and give it some dummy ability like Gain 0 Str/Agi/Int or heal 0 hp. You should also remove the visual effect on the dummy ability. Now, with this, you can forget about the "Inventory is full" thing when purchasing abilities.
 
Level 3
Joined
Sep 17, 2009
Messages
25
okay i used the agility book but i cant seem to find the "Art - Special effect" so it keeps showing the agility gain special effect.
is there any other way to disable a special effect?
And also how do i get rid of the "Requires nearby patron" thing

EDIT
Other then that you people are gods!
it works perfactly
+Rep
 
Last edited:
I also encounter that annoying problem from times to times, make sure you remove the buff too, and if that doesn't work, base it on another spell.
But generally, remove any string in the object data that looks like it could be a model path.

And for the nearby patron thing, if you want to completely remove it, you can set its range to 9999. Though it aint that realistic being able to buy stuff from the other side of the map.
 
Level 3
Joined
Sep 17, 2009
Messages
25
Did it, its all fixed now
My map it complete! I just need to do the spells which should just take a few hours so expect a release beta map later today,
How do we do a proper map upload so it appears in the maps section with pics and such and all the info?
Then im done
 
Status
Not open for further replies.
Top