Magic with levels

Discussion in 'RGSS3 Script Requests' started by CWells, Feb 27, 2014.

  1. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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: Mar 4, 2014
    #41
  2. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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: Mar 5, 2014
    #42
  3. DuncanS

    DuncanS Veteran Veteran

    Messages:
    160
    Likes Received:
    96
    Location:
    Toronto, Ontario, Canada
    First Language:
    English
    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 ><;
     
    #43
  4. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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.
     
    #44
  5. DuncanS

    DuncanS Veteran Veteran

    Messages:
    160
    Likes Received:
    96
    Location:
    Toronto, Ontario, Canada
    First Language:
    English
    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.
     
    #45
  6. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    This one works with no crashes. But does this mean you are going to remove the feature for changing level up speed for elements?
     
    #46
  7. DuncanS

    DuncanS Veteran Veteran

    Messages:
    160
    Likes Received:
    96
    Location:
    Toronto, Ontario, Canada
    First Language:
    English
    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 ^^.
     
    #47
  8. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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: Mar 5, 2014
    #48
  9. DuncanS

    DuncanS Veteran Veteran

    Messages:
    160
    Likes Received:
    96
    Location:
    Toronto, Ontario, Canada
    First Language:
    English
    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.
     
    #49
  10. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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: Mar 6, 2014
    #50
  11. DuncanS

    DuncanS Veteran Veteran

    Messages:
    160
    Likes Received:
    96
    Location:
    Toronto, Ontario, Canada
    First Language:
    English
    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 ^^.
     
    #51
  12. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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!
     
    #52
  13. CWells

    CWells Storyteller/Artist Veteran

    Messages:
    731
    Likes Received:
    40
    First Language:
    English
    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.
     
    #53

Share This Page