Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Come and join our gamer community by
registering for free here
Other Gaming Forum
PC games
WarCraft III Modding
Spell Books
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Xeridanus" data-source="post: 121291" data-attributes="member: 5963"><p>start off by making a different spell one at each level. then make seperate books with the spells at the different levels in each book. (if you want each spell to appear at each level independant of the other spells, youll need 128 books. assuming you have three 3 level spells and one 1 level spell. three regulars and one ultimate.) then you'll have to initalise those into an array, in an ordered fashion (see below). now, just say the player picks the ultimate spell to level up, you would add on 64 (128/2) onto a variable and then use this as the index for the index of your array (again, if this doesn't make sense see below). if he chooses the first spell (a regular one) add on 1. if he chooses the second one, add on 4. if he chooses the third one, add on 16. this will then point you to the correct book to give to the player. here is what your array should look like, i have given the levels of the spells in parenthesis' that particular version of the book should have.. the last one is the ultimate.</p><p></p><p>spellbook[0]=(0,0,0, 0)</p><p>spellbook[1]=(1,0,0, 0)</p><p>spellbook[2]=(2,0,0, 0)</p><p>spellbook[3]=(3,0,0, 0)</p><p>spellbook[4]=(0,1,0, 0)</p><p>spellbook[5]=(1,1,0, 0)</p><p>spellbook[6]=(2,1,0, 0)</p><p>...</p><p>spellbook[19]=(3,0,1, 0)</p><p>spellbook[20]=(0,1,1, 0)</p><p>spellbook[21]=(1,1,1, 0)</p><p>...</p><p>spellbook[61]=(1,3,3, 0)</p><p>spellbook[62]=(2,3,3, 0)</p><p>spellbook[63]=(3,3,3, 0)</p><p>spellbook[64]=(0,0,0, 1)</p><p>spellbook[65]=(1,0,0, 1)</p><p>spellbook[66]=(2,0,0, 1)</p><p>...</p><p>spellbook[83]=(3,0,1, 1)</p><p>spellbook[84]=(0,1,1, 1)</p><p>spellbook[85]=(1,1,1, 1)</p><p>...</p><p>spellbook[127]=(3,3,3, 1)</p><p></p><p>notice that each book has an ultimate true and ultimate false version, each is exactly 64 apart in the array. likewise, other single-difference versions differ by the amounts given above.</p><p></p><p>this is only a partial list, some key vaules so you can double check and make sure you are on track. i am aware of the overwhleming gargantuity of this task i have posed for you. unless someone can think of a better way that still uses the spell books... i have worked with items before, ones that became more powerful when something happened, just like yours. lets just say, after months of sparatic levels of sanity, either me or the problem cracked, can't remmeber which... <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />. oh one other thing, i can't remember if arrays start at 0 or 1, if they start at 1 just add 1 to all the values inside the []'s.</p><p></p><p>this is not meant to discourage you, i have merely put forward a possible solution. another one would be to give/take the spells to/from the hero, but that would by-pass the spellbook.</p></blockquote><p></p>
[QUOTE="Xeridanus, post: 121291, member: 5963"] start off by making a different spell one at each level. then make seperate books with the spells at the different levels in each book. (if you want each spell to appear at each level independant of the other spells, youll need 128 books. assuming you have three 3 level spells and one 1 level spell. three regulars and one ultimate.) then you'll have to initalise those into an array, in an ordered fashion (see below). now, just say the player picks the ultimate spell to level up, you would add on 64 (128/2) onto a variable and then use this as the index for the index of your array (again, if this doesn't make sense see below). if he chooses the first spell (a regular one) add on 1. if he chooses the second one, add on 4. if he chooses the third one, add on 16. this will then point you to the correct book to give to the player. here is what your array should look like, i have given the levels of the spells in parenthesis' that particular version of the book should have.. the last one is the ultimate. spellbook[0]=(0,0,0, 0) spellbook[1]=(1,0,0, 0) spellbook[2]=(2,0,0, 0) spellbook[3]=(3,0,0, 0) spellbook[4]=(0,1,0, 0) spellbook[5]=(1,1,0, 0) spellbook[6]=(2,1,0, 0) ... spellbook[19]=(3,0,1, 0) spellbook[20]=(0,1,1, 0) spellbook[21]=(1,1,1, 0) ... spellbook[61]=(1,3,3, 0) spellbook[62]=(2,3,3, 0) spellbook[63]=(3,3,3, 0) spellbook[64]=(0,0,0, 1) spellbook[65]=(1,0,0, 1) spellbook[66]=(2,0,0, 1) ... spellbook[83]=(3,0,1, 1) spellbook[84]=(0,1,1, 1) spellbook[85]=(1,1,1, 1) ... spellbook[127]=(3,3,3, 1) notice that each book has an ultimate true and ultimate false version, each is exactly 64 apart in the array. likewise, other single-difference versions differ by the amounts given above. this is only a partial list, some key vaules so you can double check and make sure you are on track. i am aware of the overwhleming gargantuity of this task i have posed for you. unless someone can think of a better way that still uses the spell books... i have worked with items before, ones that became more powerful when something happened, just like yours. lets just say, after months of sparatic levels of sanity, either me or the problem cracked, can't remmeber which... :P. oh one other thing, i can't remember if arrays start at 0 or 1, if they start at 1 just add 1 to all the values inside the []'s. this is not meant to discourage you, i have merely put forward a possible solution. another one would be to give/take the spells to/from the hero, but that would by-pass the spellbook. [/QUOTE]
Verification
Post reply
Other Gaming Forum
PC games
WarCraft III Modding
Spell Books
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top