Jump to content
Nelderson

N.A.S.T.Y. Extra Stats

Recommended Posts

Oh, wow... I don't even remember making the original. Well, it was apart of Z2, and I am on Z3. =w=d

 

EDIT: No... wait... this is... Z1 #26... this is really REALLY old, lulz.

Edited by Zetu

Share this post


Link to post
Share on other sites

Anderson:

It's possible, assuming you can "read" ruby, just learn how Nelderson place xstats on status window and you just need to use same way he used on your equip window. Well, rewrite "optimize" command work with your xstats will be a bit difficult, however.

 

I have no idea how to read ruby. _ _

If someone could sort of work this out for me, that would be greatly appreciated. :o

Share this post


Link to post
Share on other sites

I may just be doing it wrong, but it seems like Extra Stats doesn't like formulas for Enemy xstats. I've put in formulas such as this:

 

:satk => '0.5 * mat + 0.25 * mdf + 0.25 * luk',

 

which are the same as those for the player actors. When using the same skills reliant on xstats, enemies never deal damage, while players do; even setting an attack to merely 'a.satk' or such does nothing for enemies, while dealing the xstat in damage for actors.

Share this post


Link to post
Share on other sites

It doesn't seem to be working for me, either, even when I'm just putting a solid number!

 

Also, what about that darn shop scene, where they'll tell how much better a piece of equipment is than another? >_<

Share this post


Link to post
Share on other sites

well considering it should be a.xstat.satk and not a.satk

i can see why it wouldnt work for you

Share this post


Link to post
Share on other sites

Is there a way to get a stat to only display for certain classes/characters? Because I have a "magic level" stat, that I only want to show up on characters who have magic. Right now, it shows up on all characters.

Share this post


Link to post
Share on other sites

I have a problem. I can't put spaces in my stats names. I have individual stats for defence on body parts. I switch up the default stats and then run out of space, so I go over to the script and put in Head Defence, but the space messes up the script. The only way I can do this is by inputting HeadDefence...

Share this post


Link to post
Share on other sites

That's not a problem that's how programming works.

 

You can say Head_Defense.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Yes, I understand that's how programming works, but it looks silly in the status menu as HeadDefence or Head_Defence. It seems really out of place and ugly. Can't it be made so that it reads the name from a string?

Share this post


Link to post
Share on other sites

Yes it is trivial to change the script so that you can specify the "display name" separately from its internal name.

Share this post


Link to post
Share on other sites

A bit of necromagic:

I've been tinkering with this nice script, even made it work with PSPDS dekita's system, tho I've realized the fact that I can't use XSTATS to modify other XSTATS.

That set me back a little, as I can't figure out (yet) how to modify it so that it can read accessors to get values:

my idea was to toy with this part:

 


 def z26variate_stats(stat, level, adding = true)
    return if Z26.actor_level_formulas(@actor_id)[stat].nil?
    if Z26.actor_level_formulas(@actor_id)[stat].is_a?(String)
      amount = eval(Z26.actor_level_formulas(@actor_id)[stat]).to_i
    else
      amount = Z26.actor_level_formulas(@actor_id)[stat]
    end
    if adding
      eval("@xstat.#{stat} += #{amount}")
    else
      eval("@xstat.#{stat} -= #{amount}")
    end
  end

 

which, if I'm correct, reads the string imported from self.actor_level_formulas(actor_id). Would it be possible to make it so that if it encounter, let's say :something INSIDE the string, it would call recursively another instance, so that it can do something like eval("10 + :sm") = eval("10 + ( eval("20") )")? Or ruby does not let this work? (I'm still kinda new with ruby, so I'm just getting used to it, experimenting and all) 

edit:

managed to go around the problem by calling "target.xstat.STAT1 + target.xstat.STAT2" when I'm in need of a value to draw in the status window, but I'm yet to figure out how to increase a stat from inside a script

Edited by martiganthemad

Share this post


Link to post
Share on other sites

Apologies for reviving this, but is there any way to increase an actor's extra stat by means of an item? I tried using the equipment tag in the item notebox but that didn't work. If there's some script call I can link to a common event then that would be great.

Share this post


Link to post
Share on other sites

I have an interesting question! So it says in the you base other normal stats like HP, MP, ATK, etc. off xstats. But how do you do that? Like if I wanted the character's MP to be their Intelligence x Courage stats. There's an example on the default level formula in the script. But it might as well be written in Farsi, because I can't understand any of it. So could I define the actor's other stats by their xstat values?

Share this post


Link to post
Share on other sites

This is an awesome script! Just got a quick question here, this is the code that display actors' xstats in a window:

 

def draw_actor_xstat_param(actor, x, y, param_id)
	  id = Z26::STATS[param_id]
	  change_color(system_color)
	  draw_text(x, y, 40, line_height, id.capitalize)
	  change_color(normal_color)
	  draw_text(x + 40, y, 36, line_height, actor.xstat[id], 2)
  end

 

 

I tried to display enemy's xstats with similar code:

 

def draw_enemy_xstat_param(enemy, x, y, param_id)
	  id = Z26::STATS[param_id]
	  change_color(system_color)
	  draw_text(x, y, 40, 24, id.capitalize)
	  change_color(normal_color)
	  draw_text(x + 40, y, 36, 24, enemy.xstat[id], 2)
  end

 

However, it gave me an error"undefined method 'xstat' for nil:NilClass". I was wondering if you can help me find out where I did wrong?

Share this post


Link to post
Share on other sites

When I make 2 stats, one "ATT" and one "DEF" I would like to keep them capitalized all the way. But, when I enter into my game Its displays them as "Att" and "Def". How would I go about making the change to make sure the entire term is capitalized?

Share this post


Link to post
Share on other sites

When I make 2 stats, one "ATT" and one "DEF" I would like to keep them capitalized all the way. But, when I enter into my game Its displays them as "Att" and "Def". How would I go about making the change to make sure the entire term is capitalized?

maybe this could help

 

find

  draw_text(x, y, 120, line_height, id.capitalize)

and change it to

  draw_text(x, y, 120, line_height, id.upcase)

  • Like 1

Share this post


Link to post
Share on other sites

 

When I make 2 stats, one "ATT" and one "DEF" I would like to keep them capitalized all the way. But, when I enter into my game Its displays them as "Att" and "Def". How would I go about making the change to make sure the entire term is capitalized?

maybe this could help

 

find

  draw_text(x, y, 120, line_height, id.capitalize)

and change it to

  draw_text(x, y, 120, line_height, id.upcase)

 

I knew that was the line to look at and change, but I just didn't know the "term" to replace capitalize with. Worked like a charm. Thanks :)

Share this post


Link to post
Share on other sites

well i thought i had everything all nice and good. Had everything defined and when i open up status menu everything was correct.

 

however when my parameters increase the xstats are not. I tried using event to add 1 atk and my new xstat using atk in equation does not update. anything i should be doing to make sure the stat updates when something in its equation changes?

 

 

edit: okay i narrowed problem. if the formula only has level or constant number changes it works as intended. but when base stats are increased for any reason level up, event, point dstribution sysem the base stat in the formula does not update properly.

Share this post


Link to post
Share on other sites

Apologies for reviving this, but is there any way to increase an actor's extra stat by means of an item? I tried using the equipment tag in the item notebox but that didn't work. If there's some script call I can link to a common event then that would be great.

 

If you read the script comments you will see there is a notetag you can use called <Weapon_xstat>, here is comments:

 

- This script also uses notetags for weapons and armors to increase xstats

#   if you want.  Just place in a notebox:

#

#   <weapon_xstat: STAT x> , where STAT is th name of the new stat

#

#    Ex. <weapon_xstat: str 5> , would raise the actor's str +5

 

although there are issues with displaying this using Yanfly's Equip engine

Share this post


Link to post
Share on other sites

Is is possible to have the xstats not show in an actor? I want all my actors to have my stats set, but hot the leader.

Thanks!

Share this post


Link to post
Share on other sites

is it also possible, to increase extra stats by states? the equipment tag does not seem to work

Share this post


Link to post
Share on other sites

Lets wake the dead on this thread haha!

 

Does anyone know if it's possible to use this script to restructure the complete stat system? I want the stat structure of str, dex, con, int, wis, cha since my game is based off 3.5e dnd but the old stats are still showing under status in the game. I want to make the default stats of MaxHP etc completely disappear and not even be needed anymore. 

Share this post


Link to post
Share on other sites

Hi I'm loving this right now as it solves more problems with the way I want to have the game setup than I can count and am likely am aware of right now, so thanks a million.

I have, however run in to a small snag...

 

I am trying to do this

:CTR => ' (level/5ceil) ',

 

The idea is to have tiers set for PCs, monsters, and weapons for use in everything from game planning to damage calculations, of course, 2 of these do not need to be dynamic, I can set them on the weapon or monster and be done. The character tier, however needs to be dynamic so that is what I am trying to do. The problem is that when I go to playtest the game I get the following error.

 

"Script 'Extra Stats" line 205: Syntax error occurred.

 

unexpected tIDENTIFIER, expecting ')'

(level/5ceil)"

 

I figure I'm just using the ceil method wrong but if anyone could give me a hand I'd be greatfull

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted