Magic with levels

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Ahh ok, I think it should be fixed now - you changed Thunder to Electric, but left it as thunder in the config. My fault - I should have had better error trapping in the checks for which school was being used ><". This should hopefully fix the error (I got the Fixnum error and it seems to have solved it): Magic Levels
Great. it looks like it is working now. I got the skills menu showing up without crashing. Now to test the curves for leveling...

Yes. I got the curves working. Thanks lots!
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Bleh. It looks like I have a learning offset crash. I just put together on all six main characters all of the appropriate learning levels for each element.

Some of them have a learning curve of -1(this is especially important for my shadow character) while most have positive curves. I made sure to put together all tags properly. But I suspect it has something to do with curves because when I went to test play, I get this error:

Line 257 Undefined method  nil:NilClass.

Line 257 is a learning curve/offset area:

         @learning_offset.each_value {|val| val += $1.to_i}
        else
257   ---       @learning_offset[school] += $1.to_i
        end
      when DPS::REGEX::SET_OFFSET

And here is a sample Actor with some Element growth tags:

<SCHOOL: water>
<OFFSET: water>
<ADD: -4>
<SET CURVE: -1>
</OFFSET>

<SCHOOL: ice>

<SCHOOL: fire>
<OFFSET: fire>
<ADD: 12>
<SET CURVE: 3>
</OFFSET>

<SCHOOL: special>
<OFFSET: special>
<ADD: 12>
<SET CURVE: 2>
</OFFSET>
 
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Interesting - that line deals with adding the offset for a single school, but should only throw an error like that if the school doesn't exist in the BASE_OFFSET Hash. Is :special => 0 defined in the Hash?

Since this seems to be an ongoing source of problems I'll try to find a better way of defining the elements in the Hash - maybe by pulling them from the Elements table in Terms. Sorry about that ><;
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Interesting - that line deals with adding the offset for a single school, but should only throw an error like that if the school doesn't exist in the BASE_OFFSET Hash. Is :special => 0 defined in the Hash?

Since this seems to be an ongoing source of problems I'll try to find a better way of defining the elements in the Hash - maybe by pulling them from the Elements table in Terms. Sorry about that ><;
Yeah I wanted to ask about what would happen if I changed elements for whatever reason but figured you covered something like this.

I actually don't have earth as a direct element and treat it as "special" because of its encompassing range of magical properties it can have in the game. I did of course make sure to match the terms and script thing so that nothing gets confused but this crash happens.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Here's a simpler version that should make things a bit easier and more understandable ^^: Magic Levels

I replaced the BASE_OFFSET and LEARNING_CURVE Hashes with Hashes that simply default to 0 - the customizable bases didn't really make logical sense, and it seemed like a pain to have to constantly make sure 3 different places were in sync every time a change was made to the elements. Everything else is still the same. Let me know if the error persists.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
This one works with no crashes. But does this mean you are going to remove the feature for changing level up speed for elements?
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
No, everything is the same except for the individual base offsets for specific elements. Essentially, this just means that more focus is on the notetags rather than the config in the script - which I think was already the case. All the functionality is still the same ^^.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
No, everything is the same except for the individual base offsets for specific elements. Essentially, this just means that more focus is on the notetags rather than the config in the script - which I think was already the case. All the functionality is still the same ^^.
I asked because when I looked at the skills, after giving all actors one of each element. The bar is showing them all as needing the same amount to the next level (16 in my setup) i did not touch any of the note tags. But if the structure for the note tags is the same, and two edits ago they were working, it is at least graphically I'm getting hints that it isn't reading the tags now...

Yep, there is no progression of skills either. I used spells a bunch of times and everything just stays lvl 1.
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Try this: Magic Levels

I eased up the regex to be a bit more lenient, and altered the way the check for get_school works to accommodate the new bases.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
OH! My fault. I somehow duplicated the script at the very top of the script editor where it doesn't belong. After I deleted the duplicate script, it went through again fine.

However, there is no progression for any of the magic levels, still. So everything stays at level 1 and there is no difference shown either for any of the elements per character. Everything is just flat. Whatever you changed, it seems to not read levels. When I had to adjust for the elements in the script and the note tags and in the element terms, everything worked alright then. Minus that one crash I was having regarding offsets. I didn't mind doing the work at all. If it keeps the script working right, I'm fine with putting in the effort to adjust for what was desired in my set up.
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Are you sure you copied the current version of the script? It's working fine for me ><"

I tested it with multiple schools and the progression and offsets seem fine. Here's the current one: Magic Levels

If it still isn't showing skill progression I'll take another look at it ^^.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Yes! This is it. It's working. I'm pretty sure that I copied the last one right because every link you send me I definitely copy and paste. I then restart rpgmaker to ensure that it loads up current additions. But this one is finally working thank you!
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
If there was one final tag I'd add though, it would be a tag to exclude certain skills from leveling up. It would be misleading to have a skill that does something like add a state, levels up but there is no change to anything at all.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top