[Ace] Calling script from another script?

Calmf

Warper
Member
Joined
May 31, 2014
Messages
2
Reaction score
0
First Language
Portuguese
Primarily Uses
Well, It is my first day using RPG Maker VX Ace, so I was exploring the scripting, or destroying it, not sure, So I was looking for some scripts I could use and learn a bit with, and I found these two scripts:

Weapon/Armor Randomization

Crafting Script

So, I wanted to activate the Randomization script when I craft a weapon (for example), I tried to call using "add_weapon" but that doesn't work, can I call a script from another script?
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,670
First Language
German
Primarily Uses
RMMV
you cannot call another script, you can only call functions inside that other script.


Have you tested if they are automatically effecting each other? If not, you'll need to call the specific method from one script on the specific object created in the other one, that isn't a trivial problem and you should only try it yourself if you know how to program something...
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
I might be able to add a random factor to the script for you if you don't mind waiting a bit for it
 

Calmf

Warper
Member
Joined
May 31, 2014
Messages
2
Reaction score
0
First Language
Portuguese
Primarily Uses
I might be able to add a random factor to the script for you if you don't mind waiting a bit for it
Oh, that would be great! Thanks
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,202
First Language
Binary
Primarily Uses
RMMZ
You can call another script ...technically. Through Scene.manager.
You could also have some code written to make a scripts features / functions be called during various points.

For example...

module methods that interact directly with the code within your chosen script.

But thats not really good for someone who isnt confident in their editing of scripts.

Edit:

@Calmf- You may** find THIS LINK useful :)
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
ok so after toying with a few ideas.. went with just making the crafted_item part of the recipe a list of possible items you can make. I'm uploading the demo again as there are some minor changes to the main script.. all the add ons should still work fine with it.

https://www.dropbox.com/s/vxyd2ptv4j7inde/Random%20Crafting%20Demo.exe

setting up the recipes is slightly different. You might notice that the crafted_item setting in the recipes have some extra []'s around them. If you want a recipe to always craft the same item, then leave it as something like this: [[:i29, 1]]

if you want to make it random, then you'll need to create a dummy item in the database to use for displaying in the craft scenes and then the follow items you put in the list would be the items you could make. I used Recipe[1] in the settings to demo it. So you could craft some bread of stew randomly.

Check it out, if you have questions about it just send me a PM, I notice those a lot faster then I do posts
 

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top