[Falcao's Pearl ABS]Game_party.set_weapon?

Hi,

Do any of you still use this wonderful ABS from Falcao (https://falcaorgss.wordpress.com/) ?

Anyway,

In its script documentation, there is one part that says:

================================================================================
                          * Useful script calls

- $game_party.set_item(actor, item, slot)
  Use this command if you want to set automatically an item to the skillbar
  change actor for actor id, item for item id, slot for the slot name symbol
  Exp: $game_party.set_item(1, 20, :H)
 
- $game_party.set_skill(actor, skill, slot)  - samething as items

- SceneManager.call(Scene_QuickTool)    - call the quick tool window manually
- SceneManager.call(Scene_CharacterSet) - call the player slection manually

- $game_player.pop_damage('something')  - display pop text over the player
- $game_map.events[id].pop_damage('')   - display pop text over the event id
 
Okay, nice. Basically I can force the player to learn some skill or bringing some items that I want him/her to have directly to his/her slot by using those game_party.set_skill and/or game_party.set_item.

Now here are the questions:

What about weapon? armor?

I did tried script calling $game_party.set_weapon(actor, weapon, slot), and yea, of course it won't work. So I inject some codes into line 301.

  def set_weapon(actor_id, weapon_id, slot)
    actor = $game_actors[actor_id] ; weapon = $data_weapons[weapon_id]
    return unless actor.weapons.include?(weapon)
    case slot
    when Key::Weapon[1].to_sym  then actor.assigned_weapon = weapon
    end
  end
and yep, it still doesn't work.

I did tried deleting the weapon directly through event and it doesn't work. Basically, once you equip the weapon in your F slot, it will stay there. You can't just use an event and tell the event to force change or force delete the weapon, skill, or item that's already equipped into slots, they will stay in your slots...(that's why I have to force it!)

Thanks for at least reading.
I use this system. Thanks for letting me know changing the skill to weapon doesn't work lol. I was going to do that myself. I also noticed the icons don't change either. Have you tried hiding the bar first then eventing then show bar to see if they still there? I haven't tried that yet. This script is awesome but there are a lot of things he left out.
@nightdragon


You can change skill and item and weapon as long as you have other skill, item, and weapon in your quick menu tool to replace it.


BUT, you can't empty any slot if there is already something in it, there is no un-equip in this abs, change/switch only , even if you do it from normal event command without relying on script call (eg. make an event to change weapon, decrease item etc will not work).


That's why I resort to script call (tell the abs to force the player to equip empty skill or item)


And the problem suddenly comes: there is no script call to force the player to equip weapon...and here I am asking this question lol.


Hide the bar first and then show the bar again? Hmmmmm. I haven't tried that. I will try that asap and come back to you.
http://www.rpgmakervxace.net/topic/8809-falcao-pearl-abs-liquid-v3-update/page-29

Scroll down to Chigoo's message about empty skill slot. Down below is Falcao's reply.  How ever he doesn't  mention weapons. Perhaps you can add your weapon code. See if that works. It works for the skill. skill disappears. Then you can delete the skill by eventing. 

$game_player.actor.assigned_skill = nil

edit: I'm not a scripter but I think you need to change the pearl scene script as well.
@nightdragon

Hi,

that's a pretty nice discovery.

that script works to unequip the equipped skill and item!

but yea...it doesn't work for weapon and armor🙁.

$game_player.actor.assigned_weapon = nil will not work, as there is no interpreter for that.

tried $game_player.actor.equips[0] = nil, and it also doesn't work.

I think there gotta be some kind of code addition to the script, but as far as I am now, I am not sure which part of the script should I change.
Pearl script scenes lines: 540, 663 and 768?

It doesn't mention weapons, lol.
Bumping this topic as I am still looking for answer for this matter.
Hi, appreciate this is a very old thread: for those also experimenting with this, wanted to share my findings of the tool:


Noted that when assigning skills, etc:


1/ to fill a slot, the item / weapon has to be added first, using the 'Change Items: [x], +1 option


2/ similarly with skills and weapons


3/ when using Falcao's stuff in scripts, did not realise how important it is to have a [space] after the comma when entering parameters, otherwise it will record a zero! (must be a Ruby thing)


Anyway, looking at the particular problem of this thread: removing default items. I tried several ways to do this too, but failed: so please let us know if you ever had any luck. Otherwise, good luck!
Wow, pretty old topic. 😳


Weapon and armor tools are the same as your equipment. 


Obviously, you must have the weapon/armor in your inventory before you could equip it.


Same for items, you must own at least one of them before you can set it to a slot.


For weapons and armors, the actor must also be able to equip the specified weapon/armor, or nothing will be changed.


And skills must be learned before they could be equipped to a slot. 


The script call for this one actually has a bug. It won't read skills learned with feature settings from the database, only what your actors learned by leveling up.


My Bugfixes for Falcao's ABS contains a fix for this issue.


For equipping a weapon with a script call, you can use this:

Spoiler
# Based on Actor IDs:
$game_actors[id].change_equip(slot_id, item)

# Based on party position:
$game_party.members[index].change_equip(slot_id, item)

id = A valid Actor ID from your database.


index = Party position of the actor. 0 - Party leader, 1 - 2nd members, 2 - 3rd member, and so on.


slot_id = A valid slot index for the actor. Default slots: 0 - Weapon, 1 - Shield/2nd Weapon, 2 - Headwear, 3 - Armor, 4 - Accessory.


item = A valid weapon or armor object from your database. Weapons: $data_weapons[id], Armors: $data_armors[id].


Setting nil for the item argument will remove the currently equipped item (if there is anything equipped).


You can also forcibly change an equipment with a very similar script call:

Spoiler
# Based on Actor IDs:
$game_actors[id].force_change_equip(slot_id, item)

# Based on party position:
$game_party.members[index].force_change_equip(slot_id, item)

This won't care if the player owns the item you want to equip or not or that the actor can actually equip the item or not, it will change the equip no matter what to the one you specified.


You can also use these script calls to unequip a skill or item slot:

Spoiler
# For item slots:
$game_actors[id].assigned_item = nil # Item slot 1
$game_actors[id].assigned_item2 = nil # Item slot 2

$game_party.members[index].assigned_item = nil # Item slot 1
$game_party.members[index].assigned_item2 = nil # Item slot 2

# For skill slots:
$game_actors[id].assigned_skill = nil # Skill slot 1
$game_actors[id].assigned_skill2 = nil # Skill slot 2
$game_actors[id].assigned_skill3 = nil # Skill slot 3
$game_actors[id].assigned_skill4 = nil # Skill slot 4

$game_party.members[index].assigned_skill = nil # Skill slot 1
$game_party.members[index].assigned_skill2 = nil # Skill slot 2
$game_party.members[index].assigned_skill3 = nil # Skill slot 3
$game_party.members[index].assigned_skill4 = nil # Skill slot 4



And finally, if you use my Bugfixes script, you can also unequip any quickslot item by pressing the assigned key for the slot in the quickslot menu.
Wow - thanks! was not expecitng there to be any response - just wanted to share - but glad to see VX Ace is not all forgotten just yet. 🙂

for me, since posting this, have hacked the ABS scripts myself a bit, [mainly to stop a lot of projectile crashes].
I'll integrate your patch, see if I can start turning on some of the cool features again [like text!] 🙂 thanks!

borrowed this link to 'Falcao ABS Patch by Sixth'
I have a problem. I got sixth bug fixes but I have a problem where I can revive from menu the message says "you cannot revive from menu" but the player is alive but when I switch to him it says "you can't move a dead body" how do I stop it from reviving a dead guy from the menu?

Also I want my follower allies to have access to their other skills nd attacks... falcoa said it would be too easy but I can make the enemy hard but I want them to do more than just spam one attack assign to them. If I assign them an item they will spam a potion until it's gone disregarding if they need it or not. So I kind of want my followers to have access to other skills nd items with some AI if that's possible
Well, that is the problem there...

I've worked on doing a lot of similar things to as you say:
1/ disabled dead followers: the followers behind them were always getting stuck
2/ have put in some custom work which addresses the issue where followers can get stuck, either out of ammo or energy.

Stepping back form the engine, I realised that the problem for a lot of players is that the menus are unintuitive: you have to pause the game to update followers on-the-fly, which really disrupts gameplay. I agree that it would be better to have followers default to a secondary behaviour : but then you also get into the realms of 'should I look to apply an option to make followers passive or aggresive: if passive, fall back to player if cannot attack, preferably employing shields. If aggresive, switch to close-combat weapons / fists and charge-down enemies ...

well, that's one option: the other, which I've used, is to make swapping items much more fluid: as seen in Super Dungeon Master.

Original thread: https://forums.rpgmakerweb.com/threads/falcaos-pearl-abs-game_party-set_weapon.35200/