Advanced Search

Author Topic: [Special Item] Energy Balancer - v2c  (Read 10862 times)

0 Members and 1 Guest are viewing this topic.

February 11, 2011, 08:37:14 PM
Read 10862 times

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
[Special Item] Energy Balancer - v2c
« on: February 11, 2011, 08:37:14 PM »
ENERGY BALANCER

Code: [Select]
This special item was created by Dr. Light and synthesized by Auto the helper robot. The Energy Balancer (??????????, Energy Balancer), also known as Energy Equalizer and E. Balance, is an item that recovers energy from the Special Weapons with less energy when the player takes a Weapon Energy item without the need to select a weapon before taking it. However, if the player wishes to refill a specific weapon, equipping that weapon will cause the obtained weapon energy to fill that weapon instead of other weapons. If the player has a specific weapon selected and that weapon's energy is full, weapon energy pickups function the same way as if no weapon was equipped; going to the other weapons with the least amount of energy. It appears in Mega Man 6 and 7 as a hidden item, and can be bought in shops. In the Mega Man X and Mega Man ZX series, the function of the Energy Balancer is part of the characters as default.
(click to show/hide)

Get Version 2c

http://static.best-ever.org/wads/energybal-v2c.wad

Changes in v2c:
    Fully compatible with MM8BDM-v2b release - Now works with MM7 weapons!
     Updated SBARINFO definitions
     Updated GLOBAL ACS
     Includes ACS source code

Special thanks
(click to show/hide)

Note that this is the "mapper's version" where the item itself does not appear in game outside of a summon command but including this wad in your custom maps allows you access to this item. A test map is included. To see an example of this in a game mode check out the Game Modes!

---

DEPRECATED RELEASE NOTES


(click to show/hide)

February 11, 2011, 09:15:02 PM
Reply #1

Offline Lio

  • Standard Member
  • Date Registered: November 11, 2010, 01:48:55 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #1 on: February 11, 2011, 09:15:02 PM »
Oh my god, I love you Sick. I've been looking forward to something like this after playing MM10, it would be an awesome addition to the game. You just got another fan.  :ugeek:

February 11, 2011, 10:12:37 PM
Reply #2

Offline Max

  • MM8BDM Extender

  • i ate those food
  • ************
  • Date Registered: July 09, 2010, 08:10:13 PM

    • View Profile
    • ??
Re: [RELEASE] Energy Balancer
« Reply #2 on: February 11, 2011, 10:12:37 PM »
Okay, so I told you I'd post here.

In game the E. Balancer fills up the weapon with the least energy, no matter what weapon you're using.

In your weapon, the E. Balancer fills up every weapon, although it only works with the buster.

That's what I meant.

February 11, 2011, 11:08:09 PM
Reply #3

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #3 on: February 11, 2011, 11:08:09 PM »
Yeah I went mostly on the description of what it says in the MMKB. Right now it gives you less ammo but spread out over all weapons. Of course this benefits those with more weapons but it is also more cumbersome to switch between them. With the way it is now you also get more benefit from switching weapons and filling them up individually.

I originally wanted to do it so it calculates the least weapon energy and adds the entire amount to that but I can't think of a good way to do this that's not unnecessarily CPU intensive. Any suggestions?

February 16, 2011, 12:35:59 AM
Reply #4

Offline TERRORsphere

  • MM8BDM Contributor
  • ****
  • Date Registered: August 22, 2009, 08:45:17 PM

    • View Profile
    • http://www.youtube.com/user/DoomThroughDoom
Re: [RELEASE] Energy Balancer
« Reply #4 on: February 16, 2011, 12:35:59 AM »
Can only be done with a global ACS script. The item would look something like this:

Code: [Select]
actor Xxxx : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
Inventory.Icon "XXXX"
+INVBAR
+INVENTORY.UNDROPPABLE
States
{
Spawn:
XXXX A 0
stop
Use:
XXXX A 0 ACS_Execute(100,0)
stop
}
}

After that, you'll need a global ACS script that checks your ammo for all weapons like "BubbleAmmo" and "FlameBlastAmmo"... oh man, I can't actually help you further than this. I'm getting confused.

February 16, 2011, 01:38:18 AM
Reply #5

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #5 on: February 16, 2011, 01:38:18 AM »
Quote from: "DoomThroughDoom"
-snip-

Thanks, DTD. I know that. You're starting to get close to where I left off with thinking about this. If you had looked at it, you'd notice that it's already implemented using global ACS.

I realize the way to do this is to check if the player has the weapon AND how much corresponding ammo. But here's a question (and a challenge for you, since you know)

Which weapon should get the ammo if multiple weapons are depleted the same amount? A "random" solution is probably not appropriate.

Examples (separate scenarios):
Magnet Missile and Skull Barrier both have 0 ammo.
Star Crash and Mirror Buster both have 20 ammo.
Mirror Buster and Magnet Missile both have 50 ammo.

I will probably use the LMS string tables unless I see someone post some other suggestion.




In response to YD

Quote from: "Yellow Devil"
In game the E. Balancer fills up the weapon with the least energy, no matter what weapon you're using.

In your weapon, the E. Balancer fills up every weapon, although it only works with the buster.

In the version where the Energy Balancer properly adds the entire weapon energy amount to the lowest weapon I will not implement behavior like the bolded text unless I see a convincing argument otherwise.

The reason being is that if you have a weapon selected you should be allowed to fill that weapon, as it is active. I dislike a scenario where you have a weapon selected but the weapon energy you picked up is transferred to another weapon.

This text from the MMKB reinforces this (relevant text bolded)

Quote
The Energy Balancer (??????????, Energy Balancer), also known as Energy Equalizer and E. Balance, is an item that recovers energy from the Special Weapons with less energy when the player takes a Weapon Energy item without the need to select a weapon before taking it. However, if the player wishes to refill a specific weapon, equipping that weapon will cause the obtained weapon energy to fill that weapon instead of other weapons.

In the Megaman games, Megaman mostly uses his buster unless there is some special situation. I do not think it is unreasonable to do this also in MM8BDM. Because of this, it will probably also work only with the buster(s)/ slot 1 equipped unless someone suggests alternate behavior that makes sense.

February 16, 2011, 02:10:30 AM
Reply #6

Offline TheBladeRoden

  • MM8BDM Extender
  • ***
  • Date Registered: October 14, 2010, 07:26:58 PM

    • View Profile
    • TheBladeRoden's Home Page
Re: [RELEASE] Energy Balancer
« Reply #6 on: February 16, 2011, 02:10:30 AM »
Quote from: "DoomThroughDoom"
XXXX A 0 ACS_Execute(100,0)
ooh a new toy to play with

February 16, 2011, 02:15:47 AM
Reply #7

Offline Disco

  • Standard Member
  • Date Registered: October 27, 2010, 07:35:57 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #7 on: February 16, 2011, 02:15:47 AM »
Yesss

I always lamented the lack of this mechanic!

February 18, 2011, 09:25:54 AM
Reply #8

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: [RELEASE] Energy Balancer
« Reply #8 on: February 18, 2011, 09:25:54 AM »
I wanted the energy balancer in but I couldn't figure out the math to work out which ammo type to give.

February 18, 2011, 10:46:08 AM
Reply #9

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #9 on: February 18, 2011, 10:46:08 AM »
Quote from: "CutmanMike"
I wanted the energy balancer in but I couldn't figure out the math to work out which ammo type to give.

You're absolutely right, conceptually it is quite difficult.

My current thinking is to just randomly/ sequentially index tables of strings that hold values similar to the Last Man Standing string tables if the lowest value of ammo is shared between multiple weapons.

Flaws?

It's turning into a lot of ACS, lol

February 20, 2011, 06:00:46 PM
Reply #10

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #10 on: February 20, 2011, 06:00:46 PM »
DEPRECATED RELEASE NOTES
(click to show/hide)

March 03, 2011, 01:33:55 PM
Reply #11

Offline CutmanMike

  • Administrator

  • Is it hot in here or is it just zscript?
  • *******
  • Date Registered: December 17, 2008, 12:24:34 PM

    • View Profile
    • https://cutstuff.net
Re: [RELEASE] Energy Balancer
« Reply #11 on: March 03, 2011, 01:33:55 PM »
Oooh... Could I see the source script so I can see how it's done? I will most likely put it in the official version.

April 10, 2011, 12:14:27 PM
Reply #12

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: [RELEASE] Energy Balancer
« Reply #12 on: April 10, 2011, 12:14:27 PM »
Sure, man!

Check your PMs

June 11, 2011, 04:59:03 PM
Reply #13

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: [Special Item] Energy Balancer - v2a
« Reply #13 on: June 11, 2011, 04:59:03 PM »
Bumping for MM8BDM-v2b release, Energy Balancer v2c release

MM7 weapons!