RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Need some tweaks in a script

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 36
RMRK Junior
Hello! I think this might be much more simple than I can imagine, but I just can't get it working!

I'm using a script - it's Falcao's Mana Stones Enchantments. The script does the following:

- Create a consumible item (the mana stone) through a note tag (<mana_xxx: x>)
- Enable the amount of "mana stones" you can place in an weapon/armor/etc through another note tag (<sockets: x>)
- Display a menu in the "Equipment" window
- Consume the mana stones in order to add permanent new values to the weapon/armor/etc

This script is very cool but I have encountered two problems I wish you could help me solve:

1) This only works with "params" (mhp,mmp,atk,mat...) and not "xparams" (i.e. Critical Rate) or "sparams" (EXP rate) and I feel that the script would be much better if I could add a rune for increased Critical Rate, Hit Rate, Exp Adquisition rate... Instead of just boring flat values!

In Falcao's script, around line 186 it starts "def manastone_param" Let me quote that for you:

Code: [Select]
  def manastone_param
    param = [0, $1.to_i] if @note =~ /<mana_mhp: (.*)>/i
    param = [1, $1.to_i] if @note =~ /<mana_mmp: (.*)>/i
    param = [2, $1.to_i] if @note =~ /<mana_atk: (.*)>/i
    param = [3, $1.to_i] if @note =~ /<mana_def: (.*)>/i
    param = [4, $1.to_i] if @note =~ /<mana_mat: (.*)>/i
    param = [5, $1.to_i] if @note =~ /<mana_mdf: (.*)>/i
    param = [6, $1.to_i] if @note =~ /<mana_agi: (.*)>/i
    param = [7, $1.to_i] if @note =~ /<mana_luk: (.*)>/i

So I thought, let's try this! And added:
Code: [Select]
    xparam = [2, $1.to_i] if @note =~ /<mana_cri: (.*)>/i # Crit Rate ??

Sadly, it's apparently not that easy, because ingame, the script will not recognise the parameter I created (the <mana_cri: x> is just the notetag to use in the item, I'm sure I got it right) so it won't show my new "mana stone" when enchanting the item.

If anybody needs a xparam and sparams here it is! I got it from Vlue, so don't credit me for it.

Code: [Select]
#def mhp; param(0); end # MHP Maximum Hit Points
#def mmp; param(1); end # MMP Maximum Magic Points
#def atk; param(2); end # ATK ATtacK power
#def def; param(3); end # DEF DEFense power
#def mat; param(4); end # MAT Magic ATtack power
#def mdf; param(5); end # MDF Magic DeFense power
#def agi; param(6); end # AGI AGIlity
#def luk; param(7); end # LUK LUcK
#def hit; xparam(0); end # HIT HIT rate
#def eva; xparam(1); end # EVA EVAsion rate
#def cri; xparam(2); end # CRI CRItical rate
#def cev; xparam(3); end # CEV Critical EVasion rate
#def mev; xparam(4); end # MEV Magic EVasion rate
#def mrf; xparam(5); end # MRF Magic ReFlection rate
#def cnt; xparam(6); end # CNT CouNTer attack rate
#def hrg; xparam(7); end # HRG Hp ReGeneration rate
#def mrg; xparam(8); end # MRG Mp ReGeneration rate
#def trg; xparam(9); end # TRG Tp ReGeneration rate
#def tgr; sparam(0); end # TGR TarGet Rate
#def grd; sparam(1); end # GRD GuaRD effect rate
#def rec; sparam(2); end # REC RECovery effect rate
#def pha; sparam(3); end # PHA PHArmacology
#def mcr; sparam(4); end # MCR Mp Cost Rate
#def tcr; sparam(5); end # TCR Tp Charge Rate
#def pdr; sparam(6); end # PDR Physical Damage Rate
#def mdr; sparam(7); end # MDR Magical Damage Rate
#def fdr; sparam(8); end # FDR Floor Damage Rate
#def exr; sparam(9); end # EXR EXperience Rate

So here's the first question! How can I enable xparams and sparams to work with this? I believe that since they work with percentages, in order to add 100% it should display "1" and for 50% it should be "0.5", right?

Second problem
2) This window won't listen to my text commands! I am using Modern Algebra's Global Text Codes, but the left window doesn't "listen" to the text codes, but the second one does. Does anybody know what line can I add in the script?

Thanks a lot! I hope I stated everything as clearly as possible =) Edit:Contacted MA about modifying his script, awaiting response. Falcao is much harder, but I will try his YT channel.

« Last Edit: July 13, 2014, 03:35:24 PM by juanymedio »