Magic with levels

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Woops! That comment is from when I had the base set at 50 ><; fixed that now XD

The SCHOOLS Hash is actually a base offset; the ID values in Elements are automatically accounted for (since they're stored in an Array I can just check if they're included, the important part is that the names are the same). I'll rename it to BASE_OFFSET so it's easier to understand ><", my bad! Not sure why it would set it to 12 though... I'll do some tests. :S

Here's a pastebin link (probably easier than downloading a new project every time haha :S): Magic Levels
MY FAULT! I know why it took 12 uses.

When I copied that piece of the formula, where everything was at 0. I didn't realize that was to add any additional experience directly to the element. I thought that those 0's were where you insert the ID numbers. When I saw Thunder at 05 as in the pic I attached. I put 5 at Thunder in the script editor. So it was like this:

Offset 3 for 3 extra experience but also the 5 from the editors extra experience list you got there. That was my fault. I didn't read it right the first time. This was why it took 12 uses to find a level up.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Ahhh ok ^^. Good to hear it wasn't a bug haha XD
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Hmm. I got to thinking about the Normal Attack feature in VX Ace.

Will this script also work with a normal attack kind of element? Or is it only for direct skills?

See, if I have a character with a normal attack element of fire. And this character uses skills like dual attack, triple attack, or just attack. Instead of at physical I have them set to normal attack so that when they hit they are doing the characters elemental damage(enemies too of course)

So, will this sort of thing work with normal attack? I don't need it to, I mean, I can just make some special skills meant to be a kind of base attack for special characters and just add the element and assign them to each character. But I am curious on this.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
It definitely should - it uses the RPG::Skill object as a base, so all the things you mentioned should apply the same learning as long as they have an Element associated with them.

That said, if you want to have multiple characters who share a Double Attack, one with Thunder and one with Fire, then you would need to copy the Double Attack skill and make a Thunder Double Attack and Fire Double Attack.

Generic attacks are a little different since the Attack command is always redirected to a specific skill (default skill 1). I'd be interested to see if an Actor with the Attack Element: Fire param would gain AP for regular Attack commands XD. I'll have to look into that ^^.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
It definitely should - it uses the RPG::Skill object as a base, so all the things you mentioned should apply the same learning as long as they have an Element associated with them.

That said, if you want to have multiple characters who share a Double Attack, one with Thunder and one with Fire, then you would need to copy the Double Attack skill and make a Thunder Double Attack and Fire Double Attack.

Generic attacks are a little different since the Attack command is always redirected to a specific skill (default skill 1). I'd be interested to see if an Actor with the Attack Element: Fire param would gain AP for regular Attack commands XD. I'll have to look into that ^^.
Then I will test normal attack on a test enemy using the demo you gave me. I'll let you know what's up.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Alright here is what I got from your script:

normal attack element on skill 1 with actor that has no elemental feature added = No growth

Normal attack element on skill 1 with actor that has elemental feature added = No growth

Changing attack to element other than normal attack so long as element is defined in editor = growth.

Hmm, actually I think it is because I didn't set the characters school element right? Do I have to set the elements for all schools with offsets? Even if that means setting offset to 0?

Can I have more examples of all possible tags for this script when applying them in the notebox?

Like, can I just do

<school: ice> or do I have to have that along with the other tags?
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Updated with examples of tag use: Magic Levels

Characters will only grow skills with the <school: element> tag for that element. You don't need to set the offsets, you can just tag that character with <school: ice> ^^.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Thanks so much. So I take it this is almost done or is this it? Because it does everything needed. Although of course you might play with your script to add things to it as you like. This is wonderful though.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Thanks! I may play around with it a bit more, but if you're happy with it where it is then that's the important thing XD.

I'm also happy to update it if necessary, or add further functionality if the need arises down the line, so feel free to let me know if there's something else you'd like or if something isn't working as expected ^^.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Thanks! I may play around with it a bit more, but if you're happy with it where it is then that's the important thing XD.

I'm also happy to update it if necessary, or add further functionality if the need arises down the line, so feel free to let me know if there's something else you'd like or if something isn't working as expected ^^.
I do see one small issue. If I have a skill with NONE as element, then the script shuts the battle off and I get undefined error for Nilclass. Line 325.

So skills that are non-elemental have an issue.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Ahh, ok! I didn't realize that setting the element to None set the Element as nil XD. Fixed: Magic Levels
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
When I went into skills from the character menu, I got another error:

TypeError occurred

Line 340 nil can't be coerced into Fixnum.

Maybe I did something?

On my water conjurer who specializes in both ice and water, I gave him two schools. These are his tags:

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

<SCHOOL: Ice>
<OFFSET: ice>
<SET: -4>
<SET CURVE: -1>
</OFFSET>

There also seems to be no change in the amount of AP needed to level when I use the tags to make it easier for a student of one element to level that element quicker than others. I tested this with water by inputting SET -12 for water, the BASE AP being 16, expecting only 4 uses for level up. But it doesn't register. It remains at 16...
 
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 changed it so that actor notetags are read on-load, so previously saved games shouldn't throw a nil error.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
This did not fix the crash. It happens even from new game. When I hit skills then click on the character to open up the menu, it crashes.

Same error

TypeError occurred

Line 340 nil can't be coerced into Fixnum
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Hmm, weird. I set up the same notes that you posted and can't reproduce the error.

Try adding 

rescue 0to the end of line 340 and line 341 and tell me what happens.
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Now I get a different error saying:

Script Window_Base line 362 FloatDomainError occurred

NaN
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Hm, it sounds like one of the schools you're setting is nil for some reason.

You can try adding these lines below # Calculate necessary values (line 339)

base_offset = 0 if base_offset.nil?curve_offset = 0 if curve_offset.nil?Could you maybe link me your version of the script so I can see what configurations you've set?

Sorry ><"
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
it's fine. I should learn to set these basic things up for myself in case I use such a script in other projects. I'll send you my script. Hold on...
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Alright, I have also sent you two pics for you to see my system terms and Actors tag. I'm sure that all things are matched up correctly. If there is any other case sensitive things I should be aware of you can warn me of any errors in my Actors pic.

There is some old data in the terms elements. Lots of things are still under some heavy editing. Nevermind Physical or Absorb elements...

ElementGrowthScriptissue.txt

elementspic.jpg

elements2.jpg
 

Attachments

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
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
 

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